...
|
...
|
@@ -124,48 +124,48 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
|
}
|
|
|
|
|
|
// 获取共创项目
|
|
|
cooperationProject, err := cooperationProjectRepository.FindOne(map[string]interface{}{
|
|
|
"cooperationProjectNumber": cooperationContract.CooperationProjectNumber,
|
|
|
"companyId": cooperationContract.Company.CompanyId,
|
|
|
"orgId": cooperationContract.Org.OrgId,
|
|
|
//"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: orderNumber,
|
|
|
IsSuccessfully: false,
|
|
|
Reason: "共创项目" + orderGood.CooperationContractNumber + "查询错误",
|
|
|
if cooperationContract.CooperationProjectNumber != "" {
|
|
|
cooperationProject, err := cooperationProjectRepository.FindOne(map[string]interface{}{
|
|
|
"cooperationProjectNumber": cooperationContract.CooperationProjectNumber,
|
|
|
"companyId": cooperationContract.Company.CompanyId,
|
|
|
"orgId": cooperationContract.Org.OrgId,
|
|
|
})
|
|
|
continue
|
|
|
//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
|
|
|
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: orderNumber,
|
|
|
IsSuccessfully: false,
|
|
|
Reason: "共创项目" + cooperationContract.CooperationProjectNumber + "查询错误",
|
|
|
})
|
|
|
continue
|
|
|
}
|
|
|
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: orderNumber,
|
|
|
IsSuccessfully: false,
|
|
|
Reason: "共创项目" + cooperationContract.CooperationProjectNumber + "已结束或不存在",
|
|
|
})
|
|
|
continue
|
|
|
}
|
|
|
dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
|
|
|
DividendsUser: nil,
|
|
|
DividendsParticipateType: 0,
|
|
|
DividendsStage: 0,
|
|
|
DividendsAmount: 0,
|
|
|
OrderOrReturnedOrderNumber: orderNumber,
|
|
|
IsSuccessfully: false,
|
|
|
Reason: "共创项目" + orderGood.CooperationContractNumber + "已结束或不存在",
|
|
|
})
|
|
|
continue
|
|
|
}
|
|
|
|
|
|
if orderGood.DividendsOrderNumber != "" { // 获取分红订单
|
...
|
...
|
|