...
|
...
|
@@ -60,24 +60,36 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
"orgId": orderGood.OrgId,
|
|
|
})
|
|
|
if err != nil {
|
|
|
var orderNumber string
|
|
|
if orderGood.DividendsOrderNumber != "" {
|
|
|
orderNumber = orderGood.DividendsOrderNumber
|
|
|
} else {
|
|
|
orderNumber = orderGood.DividendsReturnedOrderNumber
|
|
|
}
|
|
|
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
|
|
|
DividendsUser: nil,
|
|
|
DividendsParticipateType: 0,
|
|
|
DividendsStage: 0,
|
|
|
DividendsAmount: 0,
|
|
|
OrderOrReturnedOrderNumber: orderGood.DividendsOrderNumber,
|
|
|
OrderOrReturnedOrderNumber: orderNumber,
|
|
|
IsSuccessfully: false,
|
|
|
Reason: "共创合约错误",
|
|
|
})
|
|
|
continue
|
|
|
}
|
|
|
if cooperationContract == nil {
|
|
|
var orderNumber string
|
|
|
if orderGood.DividendsOrderNumber != "" {
|
|
|
orderNumber = orderGood.DividendsOrderNumber
|
|
|
} else {
|
|
|
orderNumber = orderGood.DividendsReturnedOrderNumber
|
|
|
}
|
|
|
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
|
|
|
DividendsUser: nil,
|
|
|
DividendsParticipateType: 0,
|
|
|
DividendsStage: 0,
|
|
|
DividendsAmount: 0,
|
|
|
OrderOrReturnedOrderNumber: orderGood.DividendsOrderNumber,
|
|
|
OrderOrReturnedOrderNumber: orderNumber,
|
|
|
IsSuccessfully: false,
|
|
|
Reason: "共创合约" + orderGood.CooperationContractNumber + "不存在",
|
|
|
})
|
...
|
...
|
@@ -92,12 +104,18 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
//"notPause": true,
|
|
|
})
|
|
|
if err != nil {
|
|
|
var orderNumber string
|
|
|
if orderGood.DividendsOrderNumber != "" {
|
|
|
orderNumber = orderGood.DividendsOrderNumber
|
|
|
} else {
|
|
|
orderNumber = orderGood.DividendsReturnedOrderNumber
|
|
|
}
|
|
|
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
|
|
|
DividendsUser: nil,
|
|
|
DividendsParticipateType: 0,
|
|
|
DividendsStage: 0,
|
|
|
DividendsAmount: 0,
|
|
|
OrderOrReturnedOrderNumber: orderGood.DividendsOrderNumber,
|
|
|
OrderOrReturnedOrderNumber: orderNumber,
|
|
|
IsSuccessfully: false,
|
|
|
Reason: "共创项目" + orderGood.CooperationContractNumber + "查询错误",
|
|
|
})
|
...
|
...
|
@@ -105,12 +123,18 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
//return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if cooperationProject == nil {
|
|
|
var orderNumber string
|
|
|
if orderGood.DividendsOrderNumber != "" {
|
|
|
orderNumber = orderGood.DividendsOrderNumber
|
|
|
} else {
|
|
|
orderNumber = orderGood.DividendsReturnedOrderNumber
|
|
|
}
|
|
|
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
|
|
|
DividendsUser: nil,
|
|
|
DividendsParticipateType: 0,
|
|
|
DividendsStage: 0,
|
|
|
DividendsAmount: 0,
|
|
|
OrderOrReturnedOrderNumber: orderGood.DividendsOrderNumber,
|
|
|
OrderOrReturnedOrderNumber: orderNumber,
|
|
|
IsSuccessfully: false,
|
|
|
Reason: "共创项目" + orderGood.CooperationContractNumber + "已结束或不存在",
|
|
|
})
|
...
|
...
|
@@ -316,7 +340,7 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
DividendsParticipateType: domain.UNDERTAKER,
|
|
|
DividendsStage: dividendsIncentivesRuleMatched.DividendsIncentivesStage,
|
|
|
DividendsAmount: -undertakerDividendsAmount,
|
|
|
OrderOrReturnedOrderNumber: dividendsReturnedOrder.DividendsOrderNumber,
|
|
|
OrderOrReturnedOrderNumber: dividendsReturnedOrder.DividendsReturnedOrderNumber,
|
|
|
IsSuccessfully: true,
|
|
|
})
|
|
|
}
|
...
|
...
|
@@ -342,7 +366,7 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
DividendsParticipateType: domain.REFERRER,
|
|
|
DividendsStage: dividendsIncentivesRuleMatched.DividendsIncentivesStage,
|
|
|
DividendsAmount: -referrerDividendsAmount,
|
|
|
OrderOrReturnedOrderNumber: dividendsReturnedOrder.DividendsOrderNumber,
|
|
|
OrderOrReturnedOrderNumber: dividendsReturnedOrder.DividendsReturnedOrderNumber,
|
|
|
IsSuccessfully: true,
|
|
|
})
|
|
|
}
|
...
|
...
|
@@ -369,7 +393,7 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
DividendsParticipateType: domain.SALESMAN,
|
|
|
DividendsStage: dividendsIncentivesRuleMatched.DividendsIncentivesStage,
|
|
|
DividendsAmount: -salesmanDividendsAmount,
|
|
|
OrderOrReturnedOrderNumber: dividendsReturnedOrder.DividendsOrderNumber,
|
|
|
OrderOrReturnedOrderNumber: dividendsReturnedOrder.DividendsReturnedOrderNumber,
|
|
|
IsSuccessfully: true,
|
|
|
})
|
|
|
}
|
...
|
...
|
|