|
@@ -89,7 +89,9 @@ func (domainService *ConfirmMoneyIncentivesEstimateService) Confirm(contract *do |
|
@@ -89,7 +89,9 @@ func (domainService *ConfirmMoneyIncentivesEstimateService) Confirm(contract *do |
89
|
DividendsAmount: undertakerDividendsAmount,
|
89
|
DividendsAmount: undertakerDividendsAmount,
|
90
|
})
|
90
|
})
|
91
|
}
|
91
|
}
|
|
|
92
|
+
|
92
|
// 判断业务员在当前阶段是否已经分红
|
93
|
// 判断业务员在当前阶段是否已经分红
|
|
|
94
|
+ if undertaker.Salesman.UserId != 0 {
|
93
|
salesmanEstimated, err := dividendsEstimateDao.UserEstimated(map[string]interface{}{
|
95
|
salesmanEstimated, err := dividendsEstimateDao.UserEstimated(map[string]interface{}{
|
94
|
"undertakerUid": undertaker.Salesman.UserId,
|
96
|
"undertakerUid": undertaker.Salesman.UserId,
|
95
|
"companyId": contract.Company.CompanyId,
|
97
|
"companyId": contract.Company.CompanyId,
|
|
@@ -121,7 +123,11 @@ func (domainService *ConfirmMoneyIncentivesEstimateService) Confirm(contract *do |
|
@@ -121,7 +123,11 @@ func (domainService *ConfirmMoneyIncentivesEstimateService) Confirm(contract *do |
121
|
DividendsAmount: undertakerDividendsAmount,
|
123
|
DividendsAmount: undertakerDividendsAmount,
|
122
|
})
|
124
|
})
|
123
|
}
|
125
|
}
|
|
|
126
|
+
|
|
|
127
|
+ }
|
|
|
128
|
+
|
124
|
// 判断关联业务员在当前阶段是否已经分红
|
129
|
// 判断关联业务员在当前阶段是否已经分红
|
|
|
130
|
+ if undertaker.Referrer.UserId != 0 {
|
125
|
referrerEstimated, err := dividendsEstimateDao.UserEstimated(map[string]interface{}{
|
131
|
referrerEstimated, err := dividendsEstimateDao.UserEstimated(map[string]interface{}{
|
126
|
"undertakerUid": undertaker.Referrer.UserId,
|
132
|
"undertakerUid": undertaker.Referrer.UserId,
|
127
|
"companyId": contract.Company.CompanyId,
|
133
|
"companyId": contract.Company.CompanyId,
|
|
@@ -154,6 +160,7 @@ func (domainService *ConfirmMoneyIncentivesEstimateService) Confirm(contract *do |
|
@@ -154,6 +160,7 @@ func (domainService *ConfirmMoneyIncentivesEstimateService) Confirm(contract *do |
154
|
})
|
160
|
})
|
155
|
}
|
161
|
}
|
156
|
}
|
162
|
}
|
|
|
163
|
+ }
|
157
|
return dividendsEstimateDetails, nil
|
164
|
return dividendsEstimateDetails, nil
|
158
|
}
|
165
|
}
|
159
|
|
166
|
|