From 8bf1cad94113d5c604e95e370cf068efdea87d27 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期三, 30 八月 2023 09:43:49 +0800
Subject: [PATCH] fix
---
api/v1/serviceCollectionPlan.go | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/api/v1/serviceCollectionPlan.go b/api/v1/serviceCollectionPlan.go
index 346aec8..134a633 100644
--- a/api/v1/serviceCollectionPlan.go
+++ b/api/v1/serviceCollectionPlan.go
@@ -31,13 +31,14 @@
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
}
@@ -114,7 +115,7 @@
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
--
Gitblit v1.8.0