作者 陈志颖

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

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