...
|
...
|
@@ -416,7 +416,14 @@ func (ptr *CooperationStatisticsService) DividendsStatistics(queryOptions map[st |
|
|
if err := dividendsEstimateDao.DividendsEstimateStatistics(queryOptions, annualDividendsEstimate); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
if err := creditAccountDao.DividendsStatistics(queryOptions, annualDividends); err != nil {
|
|
|
if err := creditAccountDao.DividendsStatistics(map[string]interface{}{
|
|
|
"companyId": request.CompanyId,
|
|
|
"orgId": request.OrgId,
|
|
|
"userId": request.UserId,
|
|
|
"userBaseId": request.UserBaseId,
|
|
|
"paymentBeginTime": queryOptions["beginTime"],
|
|
|
"paymentEndTime": queryOptions["endTime"],
|
|
|
}, annualDividends); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
annualDividendsEstimate.Paid = annualDividends.Paid
|
...
|
...
|
@@ -425,7 +432,14 @@ func (ptr *CooperationStatisticsService) DividendsStatistics(queryOptions map[st |
|
|
if err := dividendsEstimateDao.DividendsEstimateStatistics(queryOptions, quarterDividendsEstimate); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
if err := creditAccountDao.DividendsStatistics(queryOptions, quarterDividends); err != nil {
|
|
|
if err := creditAccountDao.DividendsStatistics(map[string]interface{}{
|
|
|
"companyId": request.CompanyId,
|
|
|
"orgId": request.OrgId,
|
|
|
"userId": request.UserId,
|
|
|
"userBaseId": request.UserBaseId,
|
|
|
"paymentBeginTime": queryOptions["beginTime"],
|
|
|
"paymentEndTime": queryOptions["endTime"],
|
|
|
}, quarterDividends); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
quarterDividendsEstimate.Paid = quarterDividends.Paid
|
...
|
...
|
@@ -526,6 +540,7 @@ func (ptr *CooperationStatisticsService) SearchDividendsEstimates(queryOptions m |
|
|
queryOptions["cooperationContractNumbers"] = contractNumbers
|
|
|
|
|
|
dividendsEstimateRepository, _ := repository.NewDividendsEstimateRepository(ptr.transactionContext)
|
|
|
queryOptions["isCanceled"] = false
|
|
|
_, estimates, err := dividendsEstimateRepository.Find(queryOptions)
|
|
|
if err != nil {
|
|
|
return nil, err
|
...
|
...
|
|