...
|
...
|
@@ -70,7 +70,6 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
Reason: "共创合约错误",
|
|
|
})
|
|
|
continue
|
|
|
//return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if cooperationContract == nil {
|
|
|
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
|
...
|
...
|
@@ -83,7 +82,6 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
Reason: "共创合约" + orderGood.CooperationContractNumber + "不存在",
|
|
|
})
|
|
|
continue
|
|
|
//return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("共创合约%s不存在", orderGood.CooperationContractNumber))
|
|
|
}
|
|
|
|
|
|
// 获取共创项目
|
...
|
...
|
@@ -117,7 +115,6 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
Reason: "共创项目" + orderGood.CooperationContractNumber + "已结束或不存在",
|
|
|
})
|
|
|
continue
|
|
|
//return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("共创项目%s不存在", cooperationContract.CooperationProjectNumber))
|
|
|
}
|
|
|
|
|
|
// 校验合约关联的项目是否已结束
|
...
|
...
|
@@ -153,7 +150,6 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
Reason: "分红订单" + orderGood.DividendsOrderNumber + "查询错误",
|
|
|
})
|
|
|
continue
|
|
|
//return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "分红订单不存在")
|
|
|
}
|
|
|
if dividendsOrder == nil {
|
|
|
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
|
...
|
...
|
@@ -166,7 +162,6 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
Reason: "分红订单" + orderGood.DividendsOrderNumber + "不存在",
|
|
|
})
|
|
|
continue
|
|
|
//return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("分红订单%s不存在", orderGood.DividendsOrderNumber))
|
|
|
}
|
|
|
|
|
|
// 匹配分红规则
|
...
|
...
|
@@ -189,7 +184,6 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
Reason: "未匹配到分红规则",
|
|
|
})
|
|
|
continue
|
|
|
//return nil, application.ThrowError(application.RES_NO_FIND_ERROR, "未匹配到分红规则")
|
|
|
}
|
|
|
|
|
|
// 计算分红
|
...
|
...
|
@@ -285,7 +279,6 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
Reason: "退货单" + orderGood.DividendsReturnedOrderNumber + "不存在",
|
|
|
})
|
|
|
continue
|
|
|
//return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "分红退货单不存在")
|
|
|
}
|
|
|
if dividendsReturnedOrder == nil {
|
|
|
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
|
...
|
...
|
@@ -298,7 +291,6 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
Reason: "退货单" + orderGood.DividendsReturnedOrderNumber + "不存在",
|
|
|
})
|
|
|
continue
|
|
|
//return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", orderGood.DividendsReturnedOrderNumber))
|
|
|
}
|
|
|
// 匹配分红规则
|
|
|
var dividendsIncentivesRuleMatched *domain.DividendsIncentivesRule
|
...
|
...
|
|