|
@@ -124,48 +124,48 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
|
@@ -124,48 +124,48 @@ func (domainService *ConfirmDividendsIncentivesEstimateService) Confirm(orderGoo |
124
|
}
|
124
|
}
|
125
|
|
125
|
|
126
|
// 获取共创项目
|
126
|
// 获取共创项目
|
127
|
- cooperationProject, err := cooperationProjectRepository.FindOne(map[string]interface{}{
|
|
|
128
|
- "cooperationProjectNumber": cooperationContract.CooperationProjectNumber,
|
|
|
129
|
- "companyId": cooperationContract.Company.CompanyId,
|
|
|
130
|
- "orgId": cooperationContract.Org.OrgId,
|
|
|
131
|
- //"notPause": true,
|
|
|
132
|
- })
|
|
|
133
|
- if err != nil {
|
|
|
134
|
- var orderNumber string
|
|
|
135
|
- if orderGood.DividendsOrderNumber != "" {
|
|
|
136
|
- orderNumber = orderGood.DividendsOrderNumber
|
|
|
137
|
- } else {
|
|
|
138
|
- orderNumber = orderGood.DividendsReturnedOrderNumber
|
|
|
139
|
- }
|
|
|
140
|
- dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
|
|
|
141
|
- DividendsUser: nil,
|
|
|
142
|
- DividendsParticipateType: 0,
|
|
|
143
|
- DividendsStage: 0,
|
|
|
144
|
- DividendsAmount: 0,
|
|
|
145
|
- OrderOrReturnedOrderNumber: orderNumber,
|
|
|
146
|
- IsSuccessfully: false,
|
|
|
147
|
- Reason: "共创项目" + orderGood.CooperationContractNumber + "查询错误",
|
127
|
+ if cooperationContract.CooperationProjectNumber != "" {
|
|
|
128
|
+ cooperationProject, err := cooperationProjectRepository.FindOne(map[string]interface{}{
|
|
|
129
|
+ "cooperationProjectNumber": cooperationContract.CooperationProjectNumber,
|
|
|
130
|
+ "companyId": cooperationContract.Company.CompanyId,
|
|
|
131
|
+ "orgId": cooperationContract.Org.OrgId,
|
148
|
})
|
132
|
})
|
149
|
- continue
|
|
|
150
|
- //return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
151
|
- }
|
|
|
152
|
- if cooperationProject == nil {
|
|
|
153
|
- var orderNumber string
|
|
|
154
|
- if orderGood.DividendsOrderNumber != "" {
|
|
|
155
|
- orderNumber = orderGood.DividendsOrderNumber
|
|
|
156
|
- } else {
|
|
|
157
|
- orderNumber = orderGood.DividendsReturnedOrderNumber
|
133
|
+ if err != nil {
|
|
|
134
|
+ var orderNumber string
|
|
|
135
|
+ if orderGood.DividendsOrderNumber != "" {
|
|
|
136
|
+ orderNumber = orderGood.DividendsOrderNumber
|
|
|
137
|
+ } else {
|
|
|
138
|
+ orderNumber = orderGood.DividendsReturnedOrderNumber
|
|
|
139
|
+ }
|
|
|
140
|
+ dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
|
|
|
141
|
+ DividendsUser: nil,
|
|
|
142
|
+ DividendsParticipateType: 0,
|
|
|
143
|
+ DividendsStage: 0,
|
|
|
144
|
+ DividendsAmount: 0,
|
|
|
145
|
+ OrderOrReturnedOrderNumber: orderNumber,
|
|
|
146
|
+ IsSuccessfully: false,
|
|
|
147
|
+ Reason: "共创项目" + cooperationContract.CooperationProjectNumber + "查询错误",
|
|
|
148
|
+ })
|
|
|
149
|
+ continue
|
|
|
150
|
+ }
|
|
|
151
|
+ if cooperationProject == nil {
|
|
|
152
|
+ var orderNumber string
|
|
|
153
|
+ if orderGood.DividendsOrderNumber != "" {
|
|
|
154
|
+ orderNumber = orderGood.DividendsOrderNumber
|
|
|
155
|
+ } else {
|
|
|
156
|
+ orderNumber = orderGood.DividendsReturnedOrderNumber
|
|
|
157
|
+ }
|
|
|
158
|
+ dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
|
|
|
159
|
+ DividendsUser: nil,
|
|
|
160
|
+ DividendsParticipateType: 0,
|
|
|
161
|
+ DividendsStage: 0,
|
|
|
162
|
+ DividendsAmount: 0,
|
|
|
163
|
+ OrderOrReturnedOrderNumber: orderNumber,
|
|
|
164
|
+ IsSuccessfully: false,
|
|
|
165
|
+ Reason: "共创项目" + cooperationContract.CooperationProjectNumber + "已结束或不存在",
|
|
|
166
|
+ })
|
|
|
167
|
+ continue
|
158
|
}
|
168
|
}
|
159
|
- dividendsEstimateDetails = append(dividendsEstimateDetails, &service.DividendsEstimateDetail{
|
|
|
160
|
- DividendsUser: nil,
|
|
|
161
|
- DividendsParticipateType: 0,
|
|
|
162
|
- DividendsStage: 0,
|
|
|
163
|
- DividendsAmount: 0,
|
|
|
164
|
- OrderOrReturnedOrderNumber: orderNumber,
|
|
|
165
|
- IsSuccessfully: false,
|
|
|
166
|
- Reason: "共创项目" + orderGood.CooperationContractNumber + "已结束或不存在",
|
|
|
167
|
- })
|
|
|
168
|
- continue
|
|
|
169
|
}
|
169
|
}
|
170
|
|
170
|
|
171
|
if orderGood.DividendsOrderNumber != "" { // 获取分红订单
|
171
|
if orderGood.DividendsOrderNumber != "" { // 获取分红订单
|