...
|
...
|
@@ -266,7 +266,7 @@ func (statisticsService *StatisticsService) SystemCashStatistics(systemCashStati |
|
|
}
|
|
|
}
|
|
|
|
|
|
// 获取员工财富值分组统计
|
|
|
// TODO 获取员工财富值分组统计
|
|
|
func (statisticsService *StatisticsService) EmployeesSuMoneyStatistics(employeesSuMoneyStatisticsCommand *command.EmployeesSuMoneyStatisticsCommand) (interface{}, error) {
|
|
|
if err := employeesSuMoneyStatisticsCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
...
|
...
|
@@ -281,6 +281,7 @@ func (statisticsService *StatisticsService) EmployeesSuMoneyStatistics(employees |
|
|
defer func() {
|
|
|
transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
|
|
|
var employeeDao *dao.EmployeeDao
|
|
|
if value, err := factory.CreateEmployeeDao(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
...
|
...
|
@@ -289,6 +290,7 @@ func (statisticsService *StatisticsService) EmployeesSuMoneyStatistics(employees |
|
|
} else {
|
|
|
employeeDao = value
|
|
|
}
|
|
|
|
|
|
if employeesSuMoneyStatistics, err := employeeDao.CalculateEmployeesSuMoney(employeesSuMoneyStatisticsCommand.CompanyId, employeesSuMoneyStatisticsCommand.StartTime, employeesSuMoneyStatisticsCommand.EndTime); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
} else {
|
...
|
...
|
@@ -299,7 +301,7 @@ func (statisticsService *StatisticsService) EmployeesSuMoneyStatistics(employees |
|
|
}
|
|
|
}
|
|
|
|
|
|
// 获取员工贡献值分组统计
|
|
|
// TODO 获取员工贡献值分组统计
|
|
|
func (statisticsService *StatisticsService) EmployeesContributionsStatistics(employeesContributionsStatisticsCommand *command.EmployeesContributionsStatisticsCommand) (interface{}, error) {
|
|
|
if err := employeesContributionsStatisticsCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
...
|
...
|
@@ -314,6 +316,7 @@ func (statisticsService *StatisticsService) EmployeesContributionsStatistics(emp |
|
|
defer func() {
|
|
|
transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
|
|
|
var employeeDao *dao.EmployeeDao
|
|
|
if value, err := factory.CreateEmployeeDao(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
...
|
...
|
@@ -322,6 +325,7 @@ func (statisticsService *StatisticsService) EmployeesContributionsStatistics(emp |
|
|
} else {
|
|
|
employeeDao = value
|
|
|
}
|
|
|
|
|
|
if employeesContributionsStatistics, err := employeeDao.CalculateEmployeesContributions(employeesContributionsStatisticsCommand.CompanyId, employeesContributionsStatisticsCommand.StartTime, employeesContributionsStatisticsCommand.EndTime); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
} else {
|
...
|
...
|
|