| | |
| | | if plan.SourceType == 0 || |
| | | plan.SourceId == 0 || |
| | | plan.CollectionType == 0 || |
| | | plan.CollectionDate.IsZero() || |
| | | plan.CollectionDate == "" || |
| | | plan.Amount.IsZero() || |
| | | plan.Percent.IsZero() || |
| | | plan.PrincipalId == 0 { |
| | | ctx.Fail(ecode.ParamsErr) |
| | | return |
| | | } |
| | | plan.AmountTotal = plan.AmountReceivable |
| | | plan.Status = constvar.CollectionStatusUnCollected |
| | | } |
| | | |
| | |
| | | return |
| | | } |
| | | |
| | | serviceCollectionPlan, total, errCode := service.NewServiceCollectionPlanService().GetServiceCollectionPlanList(params.ServiceContractId) |
| | | serviceCollectionPlan, total, errCode := service.NewServiceCollectionPlanService().GetServiceCollectionPlanList(params.SourceType, params.SourceId) |
| | | if errCode != ecode.OK { |
| | | ctx.Fail(errCode) |
| | | return |