作者 陈志颖

fix:修复现金池返回错误创建时间问题

@@ -9,7 +9,7 @@ import ( @@ -9,7 +9,7 @@ import (
9 type EmployeesContributionsStatisticsCommand struct { 9 type EmployeesContributionsStatisticsCommand struct {
10 CompanyId int `json:"companyId" valid:"Required"` // 公司id 10 CompanyId int `json:"companyId" valid:"Required"` // 公司id
11 StartTime time.Time `json:"startTime"` // 年榜开始时间 11 StartTime time.Time `json:"startTime"` // 年榜开始时间
12 - EndTime time.Time `json:"EndTime"` // 年榜结束时间 12 + EndTime time.Time `json:"endTime"` // 年榜结束时间
13 } 13 }
14 14
15 func (employeesContributionsStatisticsCommand *EmployeesContributionsStatisticsCommand) ValidateCommand() error { 15 func (employeesContributionsStatisticsCommand *EmployeesContributionsStatisticsCommand) ValidateCommand() error {
@@ -10,7 +10,7 @@ import ( @@ -10,7 +10,7 @@ import (
10 type EmployeesSuMoneyStatisticsCommand struct { 10 type EmployeesSuMoneyStatisticsCommand struct {
11 CompanyId int `json:"companyId" valid:"Required"` // 公司id 11 CompanyId int `json:"companyId" valid:"Required"` // 公司id
12 StartTime time.Time `json:"startTime"` // 年榜开始时间 12 StartTime time.Time `json:"startTime"` // 年榜开始时间
13 - EndTime time.Time `json:"EndTime"` // 年榜结束时间 13 + EndTime time.Time `json:"endTime"` // 年榜结束时间
14 } 14 }
15 15
16 func (employeesSuMoneyStatisticsCommand *EmployeesSuMoneyStatisticsCommand) ValidateCommand() error { 16 func (employeesSuMoneyStatisticsCommand *EmployeesSuMoneyStatisticsCommand) ValidateCommand() error {
@@ -114,20 +114,6 @@ func (cashPoolService *CashPoolService) UpdateCashPool(updateCashPoolCommand *co @@ -114,20 +114,6 @@ func (cashPoolService *CashPoolService) UpdateCashPool(updateCashPoolCommand *co
114 defer func() { 114 defer func() {
115 transactionContext.RollbackTransaction() 115 transactionContext.RollbackTransaction()
116 }() 116 }()
117 -  
118 - //var cashPoolRepository domain.CashPoolRepository  
119 - //if value, err := factory.CreateCashPoolRepository(map[string] interface{} {  
120 - // "transactionContext": transactionContext,  
121 - //}); err != nil {  
122 - // return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
123 - //} else {  
124 - // cashPoolRepository = value  
125 - //}  
126 - //  
127 - //count, cashPools, err := cashPoolRepository.Find(map[string]interface{}{  
128 - // "companyId":  
129 - //})  
130 -  
131 return nil , nil 117 return nil , nil
132 } 118 }
133 119
@@ -276,6 +262,9 @@ func (cashPoolService *CashPoolService) ListExchangeCashActivityDeadline(listExc @@ -276,6 +262,9 @@ func (cashPoolService *CashPoolService) ListExchangeCashActivityDeadline(listExc
276 for _, activity := range activities { 262 for _, activity := range activities {
277 deadlines = append(deadlines, activity.Deadline) 263 deadlines = append(deadlines, activity.Deadline)
278 } 264 }
  265 + if len(deadlines) == 0 {
  266 + deadlines = []interface{}{}
  267 + }
279 return map[string]interface{}{ 268 return map[string]interface{}{
280 "deadlines": deadlines, 269 "deadlines": deadlines,
281 }, nil 270 }, nil
@@ -431,19 +420,6 @@ func (cashPoolService *CashPoolService) GetExchangeCashActivity(getExchangeCashA @@ -431,19 +420,6 @@ func (cashPoolService *CashPoolService) GetExchangeCashActivity(getExchangeCashA
431 } 420 }
432 return activityFound, nil 421 return activityFound, nil
433 } 422 }
434 - // 返回兑换现金活动  
435 - //activityFound, err := exchangeCashActivityRepository.FindOne(map[string]interface{}{"exchangeCashActivityId": getExchangeCashActivityQuery.ExchangeCashActivityId})  
436 - //if err != nil {  
437 - // return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
438 - //}  
439 - //if activityFound == nil {  
440 - // return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(getExchangeCashActivityQuery.ExchangeCashActivityId)))  
441 - //} else {  
442 - // if err := transactionContext.CommitTransaction(); err != nil {  
443 - // return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())  
444 - // }  
445 - // return activityFound, nil  
446 - //}  
447 } 423 }
448 424
449 // 更新兑换现金活动,名称,截止日期、汇率 425 // 更新兑换现金活动,名称,截止日期、汇率
@@ -497,7 +473,7 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang @@ -497,7 +473,7 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang
497 if err != nil { 473 if err != nil {
498 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 474 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
499 } 475 }
500 - if cashPools == nil { 476 + if len(cashPools) == 0 {
501 return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(activity.CompanyId))) 477 return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(activity.CompanyId)))
502 } 478 }
503 // 判断兑换活动清单中现金总金额是否超过平台未兑换现金值 479 // 判断兑换活动清单中现金总金额是否超过平台未兑换现金值
@@ -521,7 +497,6 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang @@ -521,7 +497,6 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang
521 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "已超过投入现金池的未兑换现金") 497 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "已超过投入现金池的未兑换现金")
522 } 498 }
523 // 批量更新兑换清单中已兑换现金值 499 // 批量更新兑换清单中已兑换现金值
524 - // 获取兑换清单列表  
525 var exchangeCashPersonListRepository domain.ExchangeCashPersonListRepository 500 var exchangeCashPersonListRepository domain.ExchangeCashPersonListRepository
526 if value, err := factory.CreateExchangeCashPersonListRepository(map[string]interface{}{ 501 if value, err := factory.CreateExchangeCashPersonListRepository(map[string]interface{}{
527 "transactionContext": transactionContext, 502 "transactionContext": transactionContext,
@@ -532,7 +507,7 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang @@ -532,7 +507,7 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang
532 } 507 }
533 _, people, err := exchangeCashPersonListRepository.Find(map[string]interface{}{ 508 _, people, err := exchangeCashPersonListRepository.Find(map[string]interface{}{
534 "exchangeCashActivityId": updateExchangeCashActivityCommand.ExchangeCashActivityId, 509 "exchangeCashActivityId": updateExchangeCashActivityCommand.ExchangeCashActivityId,
535 - }); 510 + })
536 if err != nil { 511 if err != nil {
537 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 512 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
538 } 513 }
@@ -627,15 +602,19 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC @@ -627,15 +602,19 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC
627 transactionContext.RollbackTransaction() 602 transactionContext.RollbackTransaction()
628 }() 603 }()
629 // 获取兑换活动兑换汇率 604 // 获取兑换活动兑换汇率
630 - var rate float64  
631 var exchangeCashActivityRepository domain.ExchangeActivityRepository 605 var exchangeCashActivityRepository domain.ExchangeActivityRepository
  606 + if value, err := factory.CreateExchangeCashActivityRepository(map[string]interface{}{
  607 + "transactionContext": transactionContext,
  608 + }); err != nil {
  609 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  610 + } else {
  611 + exchangeCashActivityRepository = value
  612 + }
632 activity, err := exchangeCashActivityRepository.FindOne(map[string]interface{}{"exchangeCashActivityId": createExchangeCashPersonCommand.ExchangeCashActivityId}) 613 activity, err := exchangeCashActivityRepository.FindOne(map[string]interface{}{"exchangeCashActivityId": createExchangeCashPersonCommand.ExchangeCashActivityId})
633 if err != nil { 614 if err != nil {
634 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 615 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
635 } 616 }
636 - if activity != nil {  
637 - rate = activity.Rate  
638 - } 617 + rate := activity.Rate
639 // 根据uid/手机账号判断成员是否存在,素币是否超过本人持有的真实素币 618 // 根据uid/手机账号判断成员是否存在,素币是否超过本人持有的真实素币
640 var employeeRepository domain.EmployeeRepository 619 var employeeRepository domain.EmployeeRepository
641 if value, err := factory.CreateEmployeeRepository(map[string]interface{}{ 620 if value, err := factory.CreateEmployeeRepository(map[string]interface{}{
@@ -645,10 +624,17 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC @@ -645,10 +624,17 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC
645 } else { 624 } else {
646 employeeRepository = value 625 employeeRepository = value
647 } 626 }
648 - employee, err := employeeRepository.FindOne(map[string]interface{}{  
649 - "uid": createExchangeCashPersonCommand.Uid,  
650 - "account": createExchangeCashPersonCommand.PersonAccount,  
651 - }) 627 + getEmployee := map[string]interface{}{}
  628 + if createExchangeCashPersonCommand.PersonName == "" {
  629 + getEmployee = map[string]interface{}{
  630 + "uid": createExchangeCashPersonCommand.Uid,
  631 + }
  632 + } else {
  633 + getEmployee = map[string]interface{}{
  634 + "account": createExchangeCashPersonCommand.PersonAccount,
  635 + }
  636 + }
  637 + employee, err := employeeRepository.FindOne(getEmployee)
652 if err != nil { 638 if err != nil {
653 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 639 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
654 } 640 }
@@ -892,6 +878,7 @@ func (cashPoolService *CashPoolService) ListExchangeCashPerson(listExchangeCashP @@ -892,6 +878,7 @@ func (cashPoolService *CashPoolService) ListExchangeCashPerson(listExchangeCashP
892 } else { 878 } else {
893 exchangeCashPersonListRepository = value 879 exchangeCashPersonListRepository = value
894 } 880 }
  881 + // TODO 增加总榜单查询
895 if count, people, err := exchangeCashPersonListRepository.Find(tool_funs.SimpleStructToMap(listExchangeCashPersonQuery)); err != nil { 882 if count, people, err := exchangeCashPersonListRepository.Find(tool_funs.SimpleStructToMap(listExchangeCashPersonQuery)); err != nil {
896 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 883 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
897 } else { 884 } else {
@@ -151,17 +151,6 @@ func (dao *EmployeeDao) CalculateSystemCash(companyId int64) (map[string] interf @@ -151,17 +151,6 @@ func (dao *EmployeeDao) CalculateSystemCash(companyId int64) (map[string] interf
151 systemUnExchangeCash float64 151 systemUnExchangeCash float64
152 systemExchangedCash float64 152 systemExchangedCash float64
153 ) 153 )
154 - // 系统已兑换现金  
155 - //suMoneyTransactionRecordModel := new(models.SuMoneyTransactionRecord)  
156 - //if err := tx.Model(suMoneyTransactionRecordModel).Join("JOIN employees AS e ON e.uid = (su_money_transaction_record.employee->>'uid')::bigint").  
157 - // ColumnExpr("sum(su_money_transaction_record.cash) AS system_exchanged_cash").  
158 - // Where("e.company_id = ?", companyId).  
159 - // //Where(`e.status = ?`, 1).  
160 - // Where(`su_money_transaction_record.record_type = ?`, 5).  
161 - // Select(&systemExchangedCash) ; err != nil {  
162 - // return nil, err  
163 - //}  
164 -  
165 // 系统未兑换现金 154 // 系统未兑换现金
166 cashPool := new(models.CashPool) 155 cashPool := new(models.CashPool)
167 if err := tx.Model(cashPool). 156 if err := tx.Model(cashPool).
@@ -169,7 +158,7 @@ func (dao *EmployeeDao) CalculateSystemCash(companyId int64) (map[string] interf @@ -169,7 +158,7 @@ func (dao *EmployeeDao) CalculateSystemCash(companyId int64) (map[string] interf
169 Where("cash_pool.company_id = ?", companyId). 158 Where("cash_pool.company_id = ?", companyId).
170 Order("id DESC"). 159 Order("id DESC").
171 Limit(1). 160 Limit(1).
172 - Select(&systemUnExchangeCash) ; err != nil { 161 + Select(&systemExchangedCash) ; err != nil {
173 return nil, err 162 return nil, err
174 } 163 }
175 if err := tx.Model(cashPool). 164 if err := tx.Model(cashPool).
@@ -223,13 +212,12 @@ func (dao *EmployeeDao) CalculateEmployeesSuMoney(companyId int, startTime time. @@ -223,13 +212,12 @@ func (dao *EmployeeDao) CalculateEmployeesSuMoney(companyId int, startTime time.
223 Uid int 212 Uid int
224 EmployeeName string 213 EmployeeName string
225 EmployeesSuMoney float64 214 EmployeesSuMoney float64
226 - //Employee domain.Employee  
227 } 215 }
228 suMoneyTransactionRecordModel := new(models.SuMoneyTransactionRecord) 216 suMoneyTransactionRecordModel := new(models.SuMoneyTransactionRecord)
229 if err := tx.Model(suMoneyTransactionRecordModel).Join("JOIN employees AS e ON e.uid = (su_money_transaction_record.employee->>'uid')::bigint"). 217 if err := tx.Model(suMoneyTransactionRecordModel).Join("JOIN employees AS e ON e.uid = (su_money_transaction_record.employee->>'uid')::bigint").
230 - Column("su_money_transaction_record.employee").  
231 - Column("(su_money_transaction_record.employee->>'employeeName')::text").  
232 - ColumnExpr("(su_money_transaction_record.employee->>'uid') AS uid, (su_money_transaction_record.employee->>'employeeName') AS employeeName, sum(su_money_transaction_record.su_money) AS employee_su_money"). 218 + //Column("su_money_transaction_record.employee").
  219 + //Column("su_money_transaction_record.employee->>'employeeName'").
  220 + ColumnExpr("su_money_transaction_record.employee->>'uid' AS uid, su_money_transaction_record.employee->>'employeeName' AS employeeName, sum(su_money_transaction_record.su_money) AS employee_su_money").
233 Where(`e.company_id = ?`, companyId). 221 Where(`e.company_id = ?`, companyId).
234 Where(`e.status = ?`, 1). 222 Where(`e.status = ?`, 1).
235 Where(`su_money_transaction_record.record_type IN (?)`, pg.In([]int{2, 3})). // 增加,任务奖励的 223 Where(`su_money_transaction_record.record_type IN (?)`, pg.In([]int{2, 3})). // 增加,任务奖励的
@@ -252,21 +240,16 @@ func (dao *EmployeeDao) CalculateEmployeesContributions(companyId int, startTime @@ -252,21 +240,16 @@ func (dao *EmployeeDao) CalculateEmployeesContributions(companyId int, startTime
252 Uid int 240 Uid int
253 EmployeeName string 241 EmployeeName string
254 EmployeesContributions float64 242 EmployeesContributions float64
255 - //Employee domain.Employee  
256 } 243 }
257 var retDecrease []struct { // 员工减少的贡献值 244 var retDecrease []struct { // 员工减少的贡献值
258 Uid int 245 Uid int
259 EmployeeName string 246 EmployeeName string
260 EmployeesContributions float64 247 EmployeesContributions float64
261 - //Employee domain.Employee  
262 } 248 }
263 - //var employeesContributionsIncrease []struct{} // 员工增加的贡献值列表  
264 - //var employeesContributionsDecrease []struct{} //  
265 - //var employeesContributions []struct{}  
266 suMoneyTransactionRecordModel := new(models.SuMoneyTransactionRecord) 249 suMoneyTransactionRecordModel := new(models.SuMoneyTransactionRecord)
267 // 增加的贡献值 250 // 增加的贡献值
268 if err := tx.Model(suMoneyTransactionRecordModel).Join("JOIN employees AS e ON e.uid = (su_money_transaction_record.employee->>'uid')::bigint"). 251 if err := tx.Model(suMoneyTransactionRecordModel).Join("JOIN employees AS e ON e.uid = (su_money_transaction_record.employee->>'uid')::bigint").
269 - Column("su_money_transaction_record.employee"). 252 + //Column("su_money_transaction_record.employee").
270 ColumnExpr("su_money_transaction_record.employee->>'uid' AS uid, su_money_transaction_record.employee->>'employeeName' AS employeeName, sum(su_money_transaction_record.su_money) AS employees_contributions_increase"). 253 ColumnExpr("su_money_transaction_record.employee->>'uid' AS uid, su_money_transaction_record.employee->>'employeeName' AS employeeName, sum(su_money_transaction_record.su_money) AS employees_contributions_increase").
271 Where(`e.company_id = ?`, companyId). 254 Where(`e.company_id = ?`, companyId).
272 Where(`su_money_transaction_record.record_type IN (?)`, pg.In([]int{2, 3})). 255 Where(`su_money_transaction_record.record_type IN (?)`, pg.In([]int{2, 3})).
@@ -280,8 +263,8 @@ func (dao *EmployeeDao) CalculateEmployeesContributions(companyId int, startTime @@ -280,8 +263,8 @@ func (dao *EmployeeDao) CalculateEmployeesContributions(companyId int, startTime
280 } 263 }
281 // 减少的贡献值 264 // 减少的贡献值
282 if err := tx.Model(suMoneyTransactionRecordModel).Join("JOIN employees AS e ON e.uid = (su_money_transaction_record.employee->>'uid')::bigint"). 265 if err := tx.Model(suMoneyTransactionRecordModel).Join("JOIN employees AS e ON e.uid = (su_money_transaction_record.employee->>'uid')::bigint").
283 - Column("su_money_transaction_record.employee").  
284 - ColumnExpr("sum(su_money_transaction_record.su_money) AS employees_contributions_decrease"). 266 + //Column("su_money_transaction_record.employee").
  267 + ColumnExpr("su_money_transaction_record.employee->>'uid' AS uid, su_money_transaction_record.employee->>'employeeName' AS employeeName, sum(su_money_transaction_record.su_money) AS employees_contributions_decrease").
285 Where(`e.company_id = ?`, companyId). 268 Where(`e.company_id = ?`, companyId).
286 Where(`su_money_transaction_record.record_type = ?`, 4). 269 Where(`su_money_transaction_record.record_type = ?`, 4).
287 Where(`e.status = ?`, 1). 270 Where(`e.status = ?`, 1).
@@ -6,7 +6,7 @@ import ( @@ -6,7 +6,7 @@ import (
6 ) 6 )
7 7
8 type SuMoneyTransactionRecord struct { 8 type SuMoneyTransactionRecord struct {
9 - TableName string `pg:"su_money_transaction_records,alias:su_money_transaction_record"` 9 + TableName string `pg:"su_money_transaction_records,alias:su_money_transaction_record,discard_unknown_columns"`
10 // 素币事务记录ID 10 // 素币事务记录ID
11 Id int64 `pg:",pk"` 11 Id int64 `pg:",pk"`
12 // 记录类型 12 // 记录类型
@@ -16,9 +16,9 @@ func (repository *CashPoolRepository) Save(cashPool *domain.CashPool) (*domain.C @@ -16,9 +16,9 @@ func (repository *CashPoolRepository) Save(cashPool *domain.CashPool) (*domain.C
16 tx := repository.transactionContext.PgTx 16 tx := repository.transactionContext.PgTx
17 if cashPool.Identity() == nil { 17 if cashPool.Identity() == nil {
18 if _, err := tx.QueryOne( 18 if _, err := tx.QueryOne(
19 - pg.Scan(&cashPool.CashPoolId, &cashPool.Cash, &cashPool.CompanyId, &cashPool.ExchangedCash, &cashPool.UnExchangeCash, &cashPool.ExchangedSuMoney, &cashPool.UnExchangeSuMoney, &cashPool.Rate),  
20 - "INSERT INTO cash_pools (cash, company_id, exchanged_cash, un_exchange_cash, exchanged_su_money, un_exchange_su_money, rate) VALUES (?, ?, ?, ?, ?, ?, ?) RETURNING id, cash, company_id, exchanged_cash, un_exchange_cash, exchanged_su_money, un_exchange_su_money, rate",  
21 - cashPool.Cash, cashPool.CompanyId, cashPool.ExchangedCash, cashPool.UnExchangeCash, cashPool.ExchangedSuMoney, cashPool.UnExchangeSuMoney, cashPool.Rate); err != nil { 19 + pg.Scan(&cashPool.CashPoolId, &cashPool.Cash, &cashPool.CompanyId, &cashPool.ExchangedCash, &cashPool.UnExchangeCash, &cashPool.ExchangedSuMoney, &cashPool.UnExchangeSuMoney, &cashPool.Rate, &cashPool.CreateTime),
  20 + "INSERT INTO cash_pools (cash, company_id, exchanged_cash, un_exchange_cash, exchanged_su_money, un_exchange_su_money, rate, create_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?) RETURNING id, cash, company_id, exchanged_cash, un_exchange_cash, exchanged_su_money, un_exchange_su_money, rate, create_time",
  21 + cashPool.Cash, cashPool.CompanyId, cashPool.ExchangedCash, cashPool.UnExchangeCash, cashPool.ExchangedSuMoney, cashPool.UnExchangeSuMoney, cashPool.Rate, cashPool.CreateTime); err != nil {
22 return cashPool, err 22 return cashPool, err
23 } 23 }
24 } else { 24 } else {
@@ -102,6 +102,7 @@ func (repository *CashPoolRepository) transformPgModelToDomainModel(cashPoolMode @@ -102,6 +102,7 @@ func (repository *CashPoolRepository) transformPgModelToDomainModel(cashPoolMode
102 ExchangedSuMoney: cashPoolModel.ExchangedSuMoney, 102 ExchangedSuMoney: cashPoolModel.ExchangedSuMoney,
103 UnExchangeSuMoney: cashPoolModel.UnExchangeSuMoney, 103 UnExchangeSuMoney: cashPoolModel.UnExchangeSuMoney,
104 Rate: cashPoolModel.Rate, 104 Rate: cashPoolModel.Rate,
  105 + CreateTime: cashPoolModel.CreateTime,
105 }, nil 106 }, nil
106 } 107 }
107 108
@@ -103,6 +103,7 @@ func (controller *StatisticsController) SystemCashStatistics() { @@ -103,6 +103,7 @@ func (controller *StatisticsController) SystemCashStatistics() {
103 controller.ServeJSON() 103 controller.ServeJSON()
104 } 104 }
105 105
  106 +// 员工财富值
106 func (controller *StatisticsController) EmployeesSuMoneyStatistics() { 107 func (controller *StatisticsController) EmployeesSuMoneyStatistics() {
107 statisticsService := service.NewStatisticsService(nil) 108 statisticsService := service.NewStatisticsService(nil)
108 employeesSuMoneyStatisticsCommand := &command.EmployeesSuMoneyStatisticsCommand{} 109 employeesSuMoneyStatisticsCommand := &command.EmployeesSuMoneyStatisticsCommand{}
@@ -118,6 +119,7 @@ func (controller *StatisticsController) EmployeesSuMoneyStatistics() { @@ -118,6 +119,7 @@ func (controller *StatisticsController) EmployeesSuMoneyStatistics() {
118 controller.ServeJSON() 119 controller.ServeJSON()
119 } 120 }
120 121
  122 +// 员工贡献值
121 func (controller *StatisticsController) EmployeesContributionsStatistics() { 123 func (controller *StatisticsController) EmployeesContributionsStatistics() {
122 statisticsService := service.NewStatisticsService(nil) 124 statisticsService := service.NewStatisticsService(nil)
123 employeesContributionsStatisticsCommand := &command.EmployeesContributionsStatisticsCommand{} 125 employeesContributionsStatisticsCommand := &command.EmployeesContributionsStatisticsCommand{}