|
...
|
...
|
@@ -334,13 +334,13 @@ func (ptr *CooperationStatisticsService) DividendsStatistics(queryOptions map[st |
|
|
|
}
|
|
|
|
creditAccountDao, _ := dao.NewCreditAccountDao(ptr.transactionContext)
|
|
|
|
|
|
|
|
var allDividends = &response{}
|
|
|
|
var allDividends = &CreditAccountStatisticsResponse{}
|
|
|
|
if err := creditAccountDao.DividendsStatistics(queryOptions, allDividends); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
allDividends.Accounting = allDividends.Total - allDividends.Accounted
|
|
|
|
|
|
|
|
var annualDividends = &response{}
|
|
|
|
var annualDividends = &CreditAccountStatisticsResponse{}
|
|
|
|
queryOptions["beginTime"] = time.Date(time.Now().Year(), 1, 1, 0, 0, 0, 0, time.Local)
|
|
|
|
queryOptions["endTime"] = time.Date(time.Now().Year(), 1, 1, 0, 0, 0, 0, time.Local).AddDate(1, 0, 0)
|
|
|
|
if err := creditAccountDao.DividendsStatistics(queryOptions, annualDividends); err != nil {
|
|
...
|
...
|
@@ -348,7 +348,7 @@ func (ptr *CooperationStatisticsService) DividendsStatistics(queryOptions map[st |
|
|
|
}
|
|
|
|
annualDividends.Accounting = annualDividends.Total - annualDividends.Accounted
|
|
|
|
|
|
|
|
var quarterDividends = &response{}
|
|
|
|
var quarterDividends = &CreditAccountStatisticsResponse{}
|
|
|
|
queryOptions["beginTime"], queryOptions["endTime"] = quarterBeginEnd()
|
|
|
|
if err := creditAccountDao.DividendsStatistics(queryOptions, quarterDividends); err != nil {
|
|
|
|
return nil, err
|
...
|
...
|
|