作者 陈志颖

fix:退货单取消预算状态更新错误,一键审核问题

@@ -26,6 +26,8 @@ type OneClickApprovalCooperationApplicationCommand struct { @@ -26,6 +26,8 @@ type OneClickApprovalCooperationApplicationCommand struct {
26 CooperationApplicationStatus int32 `cname:"共创申请审核状态" json:"cooperationApplicationStatus"` 26 CooperationApplicationStatus int32 `cname:"共创申请审核状态" json:"cooperationApplicationStatus"`
27 // 查询限制 27 // 查询限制
28 OffsetLimit bool `cname:"查询限制" json:"offsetLimit"` 28 OffsetLimit bool `cname:"查询限制" json:"offsetLimit"`
  29 + // 是否取消标志
  30 + IsCanceled int32 `cname:"是否删除" json:"isCanceled"`
29 } 31 }
30 32
31 func (oneClickApprovalCooperationApplicationCommand *OneClickApprovalCooperationApplicationCommand) Valid(validation *validation.Validation) { 33 func (oneClickApprovalCooperationApplicationCommand *OneClickApprovalCooperationApplicationCommand) Valid(validation *validation.Validation) {
@@ -453,6 +453,7 @@ func (cooperationApplicationService *CooperationApplicationService) OneClickAppr @@ -453,6 +453,7 @@ func (cooperationApplicationService *CooperationApplicationService) OneClickAppr
453 // 查询共创申请 453 // 查询共创申请
454 oneClickApprovalCooperationApplicationCommand.CooperationApplicationStatus = 1 // 待审核 454 oneClickApprovalCooperationApplicationCommand.CooperationApplicationStatus = 1 // 待审核
455 oneClickApprovalCooperationApplicationCommand.OffsetLimit = false 455 oneClickApprovalCooperationApplicationCommand.OffsetLimit = false
  456 + oneClickApprovalCooperationApplicationCommand.IsCanceled = int32(1)
456 if count, cooperationApplications, err := cooperationApplicationRepository.Find(tool_funs.SimpleStructToMap(oneClickApprovalCooperationApplicationCommand)); err != nil { 457 if count, cooperationApplications, err := cooperationApplicationRepository.Find(tool_funs.SimpleStructToMap(oneClickApprovalCooperationApplicationCommand)); err != nil {
457 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 458 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
458 } else { 459 } else {
@@ -160,7 +160,6 @@ func (domainService *CancelDividendsEstimateService) CancelEstimate(dividendsEst @@ -160,7 +160,6 @@ func (domainService *CancelDividendsEstimateService) CancelEstimate(dividendsEst
160 }); err4 != nil { 160 }); err4 != nil {
161 return nil, err4 161 return nil, err4
162 } else { 162 } else {
163 -  
164 if countDividendsOrder > 0 { 163 if countDividendsOrder > 0 {
165 for i, order := range orders { 164 for i, order := range orders {
166 // 取消分红的订单产品 165 // 取消分红的订单产品
@@ -230,7 +229,7 @@ func (domainService *CancelDividendsEstimateService) CancelEstimate(dividendsEst @@ -230,7 +229,7 @@ func (domainService *CancelDividendsEstimateService) CancelEstimate(dividendsEst
230 if countDividendsReturnedOrder > 0 { 229 if countDividendsReturnedOrder > 0 {
231 for i, returnedOrder := range returnedOrders { 230 for i, returnedOrder := range returnedOrders {
232 // 已取消的退货单产品 231 // 已取消的退货单产品
233 - newReturnedOrderGoodIds := utils.RemoveDuplicationInt64(orderGoodMaps[returnedOrder.DividendsOrderNumber]) 232 + newReturnedOrderGoodIds := utils.RemoveDuplicationInt64(orderGoodMaps[returnedOrder.DividendsReturnedOrderNumber])
234 var goodIds []int64 233 var goodIds []int64
235 for _, good := range returnedOrder.Goods { 234 for _, good := range returnedOrder.Goods {
236 if good.OrderGoodDividendsStatus == 2 { 235 if good.OrderGoodDividendsStatus == 2 {
@@ -72,8 +72,8 @@ func (controller *CooperationApplicationController) OneClickApprovalCooperationA @@ -72,8 +72,8 @@ func (controller *CooperationApplicationController) OneClickApprovalCooperationA
72 header := controller.GetRequestHeader(controller.Ctx) 72 header := controller.GetRequestHeader(controller.Ctx)
73 oneClickApprovalCooperationApplicationCommand.CompanyId = header.CompanyId 73 oneClickApprovalCooperationApplicationCommand.CompanyId = header.CompanyId
74 oneClickApprovalCooperationApplicationCommand.OrgId = header.OrgId 74 oneClickApprovalCooperationApplicationCommand.OrgId = header.OrgId
75 - oneClickApprovalCooperationApplicationCommand.UserId = header.UserId  
76 - oneClickApprovalCooperationApplicationCommand.UserBaseId = header.UserBaseId 75 + //oneClickApprovalCooperationApplicationCommand.UserId = header.UserId
  76 + //oneClickApprovalCooperationApplicationCommand.UserBaseId = header.UserBaseId
77 data, err := cooperationApplicationService.OneClickApprovalCooperationApplication(oneClickApprovalCooperationApplicationCommand) 77 data, err := cooperationApplicationService.OneClickApprovalCooperationApplication(oneClickApprovalCooperationApplicationCommand)
78 controller.Response(data, err) 78 controller.Response(data, err)
79 } 79 }