正在显示
2 个修改的文件
包含
17 行增加
和
7 行删除
@@ -30,6 +30,7 @@ func (srv *SummaryEvaluationService) ListEvaluationShow1(param command.QueryEval | @@ -30,6 +30,7 @@ func (srv *SummaryEvaluationService) ListEvaluationShow1(param command.QueryEval | ||
30 | staffAssessDaoRepo := dao.NewStaffAssessDao(map[string]interface{}{"transactionContext": transactionContext}) | 30 | staffAssessDaoRepo := dao.NewStaffAssessDao(map[string]interface{}{"transactionContext": transactionContext}) |
31 | userRepo := factory.CreateUserRepository(map[string]interface{}{"transactionContext": transactionContext}) | 31 | userRepo := factory.CreateUserRepository(map[string]interface{}{"transactionContext": transactionContext}) |
32 | positionRepo := factory.CreatePositionRepository(map[string]interface{}{"transactionContext": transactionContext}) | 32 | positionRepo := factory.CreatePositionRepository(map[string]interface{}{"transactionContext": transactionContext}) |
33 | + staffAssessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{"transactionContext": transactionContext}) | ||
33 | 34 | ||
34 | limit := param.PageSize | 35 | limit := param.PageSize |
35 | offset := limit * (param.PageNumber - 1) | 36 | offset := limit * (param.PageNumber - 1) |
@@ -98,14 +99,18 @@ func (srv *SummaryEvaluationService) ListEvaluationShow1(param command.QueryEval | @@ -98,14 +99,18 @@ func (srv *SummaryEvaluationService) ListEvaluationShow1(param command.QueryEval | ||
98 | for i := range list { | 99 | for i := range list { |
99 | v := list[i] | 100 | v := list[i] |
100 | endTime := v.EndTime.Local() | 101 | endTime := v.EndTime.Local() |
101 | - // 状态 | ||
102 | - statusVal := "" | ||
103 | - if v.HrCheckResult == domain.EvaluationCheckCompleted { | ||
104 | - statusVal = "已完成" | ||
105 | - } else { | ||
106 | - statusVal = "待完成" | 102 | + // 检查15日自评 完成情况状态 |
103 | + statusVal := "未完成" | ||
104 | + _, assessList, err := staffAssessRepo.Find(map[string]interface{}{ | ||
105 | + "cycleId": v.CycleId, | ||
106 | + "targetUserId": v.TargetUser.UserId, | ||
107 | + "beginDayNumber": 15, | ||
108 | + }) | ||
109 | + if err == nil && len(assessList) > 0 { | ||
110 | + if assessList[0].Status == domain.StaffAssessCompleted { | ||
111 | + statusVal = "已完成" | ||
112 | + } | ||
107 | } | 113 | } |
108 | - | ||
109 | // 部门拼接 | 114 | // 部门拼接 |
110 | var departmentBuild strings.Builder | 115 | var departmentBuild strings.Builder |
111 | departmentBuild.WriteString("") | 116 | departmentBuild.WriteString("") |
@@ -167,6 +167,11 @@ func (repo *StaffAssessRepository) Find(queryOptions map[string]interface{}) (in | @@ -167,6 +167,11 @@ func (repo *StaffAssessRepository) Find(queryOptions map[string]interface{}) (in | ||
167 | if v, ok := queryOptions["evaluationProjectId"]; ok { | 167 | if v, ok := queryOptions["evaluationProjectId"]; ok { |
168 | query.Where("staff_assess.evaluation_project_id=?", v) | 168 | query.Where("staff_assess.evaluation_project_id=?", v) |
169 | } | 169 | } |
170 | + //查询第几号日期的数据 | ||
171 | + if v, ok := queryOptions["beginDayNumber"]; ok { | ||
172 | + query.Where("date_part('day',staff_assess.begin_time) = ?", v) | ||
173 | + } | ||
174 | + | ||
170 | query.Order("staff_assess.id DESC") | 175 | query.Order("staff_assess.id DESC") |
171 | count, err := query.SelectAndCount() | 176 | count, err := query.SelectAndCount() |
172 | if err != nil { | 177 | if err != nil { |
-
请 注册 或 登录 后发表评论