正在显示
1 个修改的文件
包含
5 行增加
和
5 行删除
| 1 | package service | 1 | package service |
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | - "fmt" | ||
| 5 | "github.com/linmadan/egglib-go/core/application" | 4 | "github.com/linmadan/egglib-go/core/application" |
| 6 | "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/application/factory" | 5 | "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/application/factory" |
| 7 | "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/application/statistics/command" | 6 | "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/application/statistics/command" |
| @@ -307,15 +306,11 @@ func (statisticsService *StatisticsService) EmployeesSuMoneyStatistics(employees | @@ -307,15 +306,11 @@ func (statisticsService *StatisticsService) EmployeesSuMoneyStatistics(employees | ||
| 307 | employeeDao = value | 306 | employeeDao = value |
| 308 | } | 307 | } |
| 309 | 308 | ||
| 310 | - fmt.Print(employeesSuMoneyStatisticsCommand, "\n") | ||
| 311 | - | ||
| 312 | if employeesSuMoneyStatisticsCommand.StartTime.IsZero() && employeesSuMoneyStatisticsCommand.EndTime.IsZero() { | 309 | if employeesSuMoneyStatisticsCommand.StartTime.IsZero() && employeesSuMoneyStatisticsCommand.EndTime.IsZero() { |
| 313 | employeesSuMoneyStatisticsCommand.StartTime = time.Date(1971, time.Month(1), 1, 0, 0, 0, 0, time.Now().Location()) | 310 | employeesSuMoneyStatisticsCommand.StartTime = time.Date(1971, time.Month(1), 1, 0, 0, 0, 0, time.Now().Location()) |
| 314 | employeesSuMoneyStatisticsCommand.EndTime = time.Now().Local() | 311 | employeesSuMoneyStatisticsCommand.EndTime = time.Now().Local() |
| 315 | } | 312 | } |
| 316 | 313 | ||
| 317 | - fmt.Print(employeesSuMoneyStatisticsCommand, "\n") | ||
| 318 | - | ||
| 319 | if employeesSuMoneyStatistics, err := employeeDao.CalculateEmployeesSuMoney(employeesSuMoneyStatisticsCommand.CompanyId, employeesSuMoneyStatisticsCommand.StartTime, employeesSuMoneyStatisticsCommand.EndTime); err != nil { | 314 | if employeesSuMoneyStatistics, err := employeeDao.CalculateEmployeesSuMoney(employeesSuMoneyStatisticsCommand.CompanyId, employeesSuMoneyStatisticsCommand.StartTime, employeesSuMoneyStatisticsCommand.EndTime); err != nil { |
| 320 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 315 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
| 321 | } else { | 316 | } else { |
| @@ -351,6 +346,11 @@ func (statisticsService *StatisticsService) EmployeesContributionsStatistics(emp | @@ -351,6 +346,11 @@ func (statisticsService *StatisticsService) EmployeesContributionsStatistics(emp | ||
| 351 | employeeDao = value | 346 | employeeDao = value |
| 352 | } | 347 | } |
| 353 | 348 | ||
| 349 | + if employeesContributionsStatisticsCommand.StartTime.IsZero() && employeesContributionsStatisticsCommand.EndTime.IsZero() { | ||
| 350 | + employeesContributionsStatisticsCommand.StartTime = time.Date(1971, time.Month(1), 1, 0, 0, 0, 0, time.Now().Location()) | ||
| 351 | + employeesContributionsStatisticsCommand.EndTime = time.Now().Local() | ||
| 352 | + } | ||
| 353 | + | ||
| 354 | if employeesContributionsStatistics, err := employeeDao.CalculateEmployeesContributions(employeesContributionsStatisticsCommand.CompanyId, employeesContributionsStatisticsCommand.StartTime, employeesContributionsStatisticsCommand.EndTime); err != nil { | 354 | if employeesContributionsStatistics, err := employeeDao.CalculateEmployeesContributions(employeesContributionsStatisticsCommand.CompanyId, employeesContributionsStatisticsCommand.StartTime, employeesContributionsStatisticsCommand.EndTime); err != nil { |
| 355 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 355 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
| 356 | } else { | 356 | } else { |
-
请 注册 或 登录 后发表评论