|
@@ -142,7 +142,7 @@ func (ptr *CooperationStatisticsService) getUserContracts(orgId, userBaseId int6 |
|
@@ -142,7 +142,7 @@ func (ptr *CooperationStatisticsService) getUserContracts(orgId, userBaseId int6 |
|
142
|
if userBaseId == 0 {
|
142
|
if userBaseId == 0 {
|
|
143
|
return contracts, nil
|
143
|
return contracts, nil
|
|
144
|
}
|
144
|
}
|
|
145
|
- contractNumbers, err := ptr.getRelevantContracts(map[string]interface{}{"orgId": orgId, "userBaseId": userBaseId})
|
145
|
+ contractNumbers, err := ptr.getUnderTakerContracts(map[string]interface{}{"orgId": orgId, "userBaseId": userBaseId})
|
|
146
|
if len(contractNumbers) == 0 {
|
146
|
if len(contractNumbers) == 0 {
|
|
147
|
return contracts, nil
|
147
|
return contracts, nil
|
|
148
|
}
|
148
|
}
|
|
@@ -163,7 +163,7 @@ func (ptr *CooperationStatisticsService) getCompanyContracts(orgId, userId int64 |
|
@@ -163,7 +163,7 @@ func (ptr *CooperationStatisticsService) getCompanyContracts(orgId, userId int64 |
|
163
|
if userId == 0 {
|
163
|
if userId == 0 {
|
|
164
|
return contracts, nil
|
164
|
return contracts, nil
|
|
165
|
}
|
165
|
}
|
|
166
|
- contractNumbers, err := ptr.getRelevantContracts1(map[string]interface{}{"orgId": orgId, "userId": userId})
|
166
|
+ contractNumbers, err := ptr.getRelevantContracts(map[string]interface{}{"orgId": orgId, "userId": userId})
|
|
167
|
if len(contractNumbers) == 0 {
|
167
|
if len(contractNumbers) == 0 {
|
|
168
|
return contracts, nil
|
168
|
return contracts, nil
|
|
169
|
}
|
169
|
}
|
|
@@ -176,8 +176,8 @@ func (ptr *CooperationStatisticsService) getCompanyContracts(orgId, userId int64 |
|
@@ -176,8 +176,8 @@ func (ptr *CooperationStatisticsService) getCompanyContracts(orgId, userId int64 |
|
176
|
return contracts, err
|
176
|
return contracts, err
|
|
177
|
}
|
177
|
}
|
|
178
|
|
178
|
|
|
179
|
-//getRelevantContracts 获取相关人的合约
|
|
|
|
180
|
-func (ptr *CooperationStatisticsService) getRelevantContracts(queryOptions map[string]interface{}) ([]string, error) {
|
179
|
+// getUnderTakerContracts 获取承接人的合约
|
|
|
|
180
|
+func (ptr *CooperationStatisticsService) getUnderTakerContracts(queryOptions map[string]interface{}) ([]string, error) {
|
|
181
|
undertakerRepository, _ := dao.NewCooperationContractUndertakerDao(ptr.transactionContext)
|
181
|
undertakerRepository, _ := dao.NewCooperationContractUndertakerDao(ptr.transactionContext)
|
|
182
|
_, undertakers, err := undertakerRepository.Find(queryOptions)
|
182
|
_, undertakers, err := undertakerRepository.Find(queryOptions)
|
|
183
|
var numbers []string
|
183
|
var numbers []string
|
|
@@ -191,7 +191,7 @@ func (ptr *CooperationStatisticsService) getRelevantContracts(queryOptions map[s |
|
@@ -191,7 +191,7 @@ func (ptr *CooperationStatisticsService) getRelevantContracts(queryOptions map[s |
|
191
|
}
|
191
|
}
|
|
192
|
|
192
|
|
|
193
|
//getRelevantContracts 获取相关人的合约
|
193
|
//getRelevantContracts 获取相关人的合约
|
|
194
|
-func (ptr *CooperationStatisticsService) getRelevantContracts1(queryOptions map[string]interface{}) ([]string, error) {
|
194
|
+func (ptr *CooperationStatisticsService) getRelevantContracts(queryOptions map[string]interface{}) ([]string, error) {
|
|
195
|
undertakerRepository, _ := repository.NewCooperationContractRelevantRepository(ptr.transactionContext)
|
195
|
undertakerRepository, _ := repository.NewCooperationContractRelevantRepository(ptr.transactionContext)
|
|
196
|
_, undertakers, err := undertakerRepository.Find(queryOptions)
|
196
|
_, undertakers, err := undertakerRepository.Find(queryOptions)
|
|
197
|
var numbers []string
|
197
|
var numbers []string
|
|
@@ -401,7 +401,7 @@ func (ptr *CooperationStatisticsService) DividendsStatistics(queryOptions map[st |
|
@@ -401,7 +401,7 @@ func (ptr *CooperationStatisticsService) DividendsStatistics(queryOptions map[st |
|
401
|
return struct{}{}, err
|
401
|
return struct{}{}, err
|
|
402
|
}
|
402
|
}
|
|
403
|
} else if request.UserBaseId > 0 {
|
403
|
} else if request.UserBaseId > 0 {
|
|
404
|
- contractNumbers, err = ptr.getRelevantContracts(map[string]interface{}{"orgId": request.OrgId, "userBaseId": request.UserBaseId})
|
404
|
+ contractNumbers, err = ptr.getUnderTakerContracts(map[string]interface{}{"orgId": request.OrgId, "userBaseId": request.UserBaseId})
|
|
405
|
if err != nil {
|
405
|
if err != nil {
|
|
406
|
return struct{}{}, err
|
406
|
return struct{}{}, err
|
|
407
|
}
|
407
|
}
|
|
@@ -524,7 +524,7 @@ func (ptr *CooperationStatisticsService) SearchDividendsEstimates(queryOptions m |
|
@@ -524,7 +524,7 @@ func (ptr *CooperationStatisticsService) SearchDividendsEstimates(queryOptions m |
|
524
|
return struct{}{}, err
|
524
|
return struct{}{}, err
|
|
525
|
}
|
525
|
}
|
|
526
|
} else if request.UserBaseId > 0 {
|
526
|
} else if request.UserBaseId > 0 {
|
|
527
|
- contractNumbers, err = ptr.getRelevantContracts(map[string]interface{}{"orgId": request.OrgId, "userBaseId": request.UserBaseId})
|
527
|
+ contractNumbers, err = ptr.getUnderTakerContracts(map[string]interface{}{"orgId": request.OrgId, "userBaseId": request.UserBaseId})
|
|
528
|
if err != nil {
|
528
|
if err != nil {
|
|
529
|
return struct{}{}, err
|
529
|
return struct{}{}, err
|
|
530
|
}
|
530
|
}
|