|
|
@@ -161,7 +161,7 @@ func (s CtrContractCollectionService) Add(ctx context.Context, req *model.CtrCon
|
|
|
CollectionDatetime: req.CollectionDatetime,
|
|
|
CollectionAmount: req.CollectionAmount,
|
|
|
CollectionType: req.CollectionType,
|
|
|
- ApproStatus: "10",
|
|
|
+ ApproStatus: "20", // 回款没有审核逻辑,这里修改为创建即为已回款
|
|
|
ContractAmount: c.ContractAmount,
|
|
|
Remark: req.Remark,
|
|
|
CreatedBy: s.userInfo.Id,
|
|
|
@@ -177,6 +177,10 @@ func (s CtrContractCollectionService) Add(ctx context.Context, req *model.CtrCon
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
+ err = s.UpdateAmount(tx, int(collectionId))
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
err = s.ctrSrv.AddDynamicsByCurrentUser(tx, req.ContractId, "创建回款", map[string]interface{}{
|
|
|
"id": collectionId,
|
|
|
"collectionDatetime": req.CollectionDatetime,
|