|
@@ -432,7 +432,7 @@ func (ptr *CooperationStatisticsService) CooperationUserModeStatistics(queryOpti |
|
@@ -432,7 +432,7 @@ func (ptr *CooperationStatisticsService) CooperationUserModeStatistics(queryOpti |
432
|
}
|
432
|
}
|
433
|
|
433
|
|
434
|
// 3.分红支出
|
434
|
// 3.分红支出
|
435
|
- dividendsDetails, err := ptr.userModeDividend(request.OrgId, mapMode, mapModeContracts)
|
435
|
+ dividendsDetails, err := ptr.userModeDividend(request.UserId, request.OrgId, mapMode, mapModeContracts)
|
436
|
if err != nil {
|
436
|
if err != nil {
|
437
|
return nil, err
|
437
|
return nil, err
|
438
|
}
|
438
|
}
|
|
@@ -449,14 +449,14 @@ func (ptr *CooperationStatisticsService) CooperationUserModeStatistics(queryOpti |
|
@@ -449,14 +449,14 @@ func (ptr *CooperationStatisticsService) CooperationUserModeStatistics(queryOpti |
449
|
}
|
449
|
}
|
450
|
|
450
|
|
451
|
// 用户模式分红
|
451
|
// 用户模式分红
|
452
|
-func (ptr *CooperationStatisticsService) userModeDividend(orgId int64, mapMode map[string]*domain.CooperationMode, mapModeContracts map[string][]string) (interface{}, error) {
|
452
|
+func (ptr *CooperationStatisticsService) userModeDividend(userId, orgId int64, mapMode map[string]*domain.CooperationMode, mapModeContracts map[string][]string) (interface{}, error) {
|
453
|
creditAccountDao, _ := dao.NewCreditAccountDao(ptr.transactionContext)
|
453
|
creditAccountDao, _ := dao.NewCreditAccountDao(ptr.transactionContext)
|
454
|
var dividends dividendsExpenseByTypes = make([]dividendsExpenseByType, 0)
|
454
|
var dividends dividendsExpenseByTypes = make([]dividendsExpenseByType, 0)
|
455
|
var total float64 = 0
|
455
|
var total float64 = 0
|
456
|
for _, v := range mapMode {
|
456
|
for _, v := range mapMode {
|
457
|
numbers := mapModeContracts[v.CooperationModeNumber]
|
457
|
numbers := mapModeContracts[v.CooperationModeNumber]
|
458
|
var dividendsEstimate = &CreditAccountStatisticsResponse{}
|
458
|
var dividendsEstimate = &CreditAccountStatisticsResponse{}
|
459
|
- err := creditAccountDao.DividendsStatistics(map[string]interface{}{"orgId": orgId, "cooperationContractNumbers": numbers}, dividendsEstimate)
|
459
|
+ err := creditAccountDao.DividendsStatistics(map[string]interface{}{"userId": userId, "orgId": orgId, "cooperationContractNumbers": numbers}, dividendsEstimate)
|
460
|
if err != nil {
|
460
|
if err != nil {
|
461
|
return nil, err
|
461
|
return nil, err
|
462
|
}
|
462
|
}
|