正在显示
6 个修改的文件
包含
15 行增加
和
10 行删除
@@ -164,6 +164,8 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit | @@ -164,6 +164,8 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit | ||
164 | if err != nil { | 164 | if err != nil { |
165 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 165 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
166 | } | 166 | } |
167 | + evalutionHrbp.Status = domain.EvaluationCompleted | ||
168 | + evalutionHrbp.HrCheckResult = domain.EvaluationCheckCompleted | ||
167 | err = evaluationRepo.Save(evalutionHrbp) | 169 | err = evaluationRepo.Save(evalutionHrbp) |
168 | if err != nil { | 170 | if err != nil { |
169 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 171 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
@@ -183,6 +185,8 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit | @@ -183,6 +185,8 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit | ||
183 | if err != nil { | 185 | if err != nil { |
184 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 186 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
185 | } | 187 | } |
188 | + val.Status = domain.EvaluationCompleted | ||
189 | + val.HrCheckResult = domain.EvaluationCheckCompleted | ||
186 | err = evaluationRepo.Save(val) | 190 | err = evaluationRepo.Save(val) |
187 | if err != nil { | 191 | if err != nil { |
188 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 192 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
@@ -202,6 +206,8 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit | @@ -202,6 +206,8 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit | ||
202 | if err != nil { | 206 | if err != nil { |
203 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 207 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
204 | } | 208 | } |
209 | + evaluationSuper.Status = domain.EvaluationCompleted | ||
210 | + evaluationSuper.HrCheckResult = domain.EvaluationCheckCompleted | ||
205 | err = evaluationRepo.Save(evaluationSuper) | 211 | err = evaluationRepo.Save(evaluationSuper) |
206 | if err != nil { | 212 | if err != nil { |
207 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 213 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
@@ -222,6 +228,7 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit | @@ -222,6 +228,7 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit | ||
222 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 228 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
223 | } | 229 | } |
224 | evalutionFinish.Status = domain.EvaluationCompleted | 230 | evalutionFinish.Status = domain.EvaluationCompleted |
231 | + evalutionFinish.HrCheckResult = domain.EvaluationCheckCompleted | ||
225 | err = evaluationRepo.Save(evalutionFinish) | 232 | err = evaluationRepo.Save(evalutionFinish) |
226 | if err != nil { | 233 | if err != nil { |
227 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 234 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
@@ -3,7 +3,6 @@ package service | @@ -3,7 +3,6 @@ package service | ||
3 | import ( | 3 | import ( |
4 | "fmt" | 4 | "fmt" |
5 | "strings" | 5 | "strings" |
6 | - "time" | ||
7 | 6 | ||
8 | "github.com/linmadan/egglib-go/core/application" | 7 | "github.com/linmadan/egglib-go/core/application" |
9 | "github.com/linmadan/egglib-go/utils/tool_funs" | 8 | "github.com/linmadan/egglib-go/utils/tool_funs" |
@@ -17,7 +16,7 @@ import ( | @@ -17,7 +16,7 @@ import ( | ||
17 | //获取周期评估的列表 ,根据页面需要提供不同的结构变体 | 16 | //获取周期评估的列表 ,根据页面需要提供不同的结构变体 |
18 | 17 | ||
19 | // 人资稽查 页面列表数据输出 | 18 | // 人资稽查 页面列表数据输出 |
20 | -// 根据周期id 获取类型为"上级评估" 的全部周期评估 | 19 | +// 根据周期id 获取类型为"EvaluationFinish" 的全部周期评估 |
21 | func (srv *SummaryEvaluationService) ListEvaluationShow1(param command.QueryEvaluationList) (result map[string]interface{}, err error) { | 20 | func (srv *SummaryEvaluationService) ListEvaluationShow1(param command.QueryEvaluationList) (result map[string]interface{}, err error) { |
22 | transactionContext, err := factory.ValidateStartTransaction(param) | 21 | transactionContext, err := factory.ValidateStartTransaction(param) |
23 | if err != nil { | 22 | if err != nil { |
@@ -95,22 +94,16 @@ func (srv *SummaryEvaluationService) ListEvaluationShow1(param command.QueryEval | @@ -95,22 +94,16 @@ func (srv *SummaryEvaluationService) ListEvaluationShow1(param command.QueryEval | ||
95 | projectCountMap[key] = targetCount[i].Cnt | 94 | projectCountMap[key] = targetCount[i].Cnt |
96 | } | 95 | } |
97 | } | 96 | } |
98 | - | ||
99 | - now := time.Now().Local() // 当前时间 | ||
100 | resultList := make([]*adapter.EvaluationItemAdapter2, 0) | 97 | resultList := make([]*adapter.EvaluationItemAdapter2, 0) |
101 | for i := range list { | 98 | for i := range list { |
102 | v := list[i] | 99 | v := list[i] |
103 | endTime := v.EndTime.Local() | 100 | endTime := v.EndTime.Local() |
104 | // 状态 | 101 | // 状态 |
105 | statusVal := "" | 102 | statusVal := "" |
106 | - if v.CheckResult == domain.EvaluationCheckCompleted { | 103 | + if v.HrCheckResult == domain.EvaluationCheckCompleted { |
107 | statusVal = "已完成" | 104 | statusVal = "已完成" |
108 | } else { | 105 | } else { |
109 | - if now.After(endTime) { | ||
110 | - statusVal = "已逾期" | ||
111 | - } else { | ||
112 | - statusVal = "待完成" | ||
113 | - } | 106 | + statusVal = "待完成" |
114 | } | 107 | } |
115 | 108 | ||
116 | // 部门拼接 | 109 | // 部门拼接 |
@@ -216,6 +216,7 @@ func (se *summaryEvaluationPublisher) sendSummaryEvaluationV2( | @@ -216,6 +216,7 @@ func (se *summaryEvaluationPublisher) sendSummaryEvaluationV2( | ||
216 | Types: 0, //待填充 | 216 | Types: 0, //待填充 |
217 | Status: domain.EvaluationUncompleted, | 217 | Status: domain.EvaluationUncompleted, |
218 | CheckResult: domain.EvaluationCheckUncompleted, | 218 | CheckResult: domain.EvaluationCheckUncompleted, |
219 | + HrCheckResult: domain.EvaluationCheckUncompleted, | ||
219 | BeginTime: time.Time{}, //待填充 | 220 | BeginTime: time.Time{}, //待填充 |
220 | EndTime: time.Time{}, //待填充 | 221 | EndTime: time.Time{}, //待填充 |
221 | TotalScore: "", | 222 | TotalScore: "", |
@@ -21,6 +21,7 @@ type SummaryEvaluation struct { | @@ -21,6 +21,7 @@ type SummaryEvaluation struct { | ||
21 | Types EvaluationType `json:"types"` //评估类型 | 21 | Types EvaluationType `json:"types"` //评估类型 |
22 | Status EvaluationStatus `json:"status"` //评估的填写状态 | 22 | Status EvaluationStatus `json:"status"` //评估的填写状态 |
23 | CheckResult EvaluationCheckResult `json:"checkResult"` //被执行的人确认评估结果 | 23 | CheckResult EvaluationCheckResult `json:"checkResult"` //被执行的人确认评估结果 |
24 | + HrCheckResult EvaluationCheckResult `json:"hrCheckResult"` //存在人资稽查填写完成评估 | ||
24 | BeginTime time.Time `json:"beginTime"` //开始时间 | 25 | BeginTime time.Time `json:"beginTime"` //开始时间 |
25 | EndTime time.Time `json:"endTime"` //截止时间 | 26 | EndTime time.Time `json:"endTime"` //截止时间 |
26 | TotalScore string `json:"totalScore"` //最终上级评估得分. | 27 | TotalScore string `json:"totalScore"` //最终上级评估得分. |
@@ -22,6 +22,7 @@ type SummaryEvaluation struct { | @@ -22,6 +22,7 @@ type SummaryEvaluation struct { | ||
22 | Types int //评估类型 | 22 | Types int //评估类型 |
23 | Status string //评估的填写状态 | 23 | Status string //评估的填写状态 |
24 | CheckResult string //被执行的人确认评估结果 | 24 | CheckResult string //被执行的人确认评估结果 |
25 | + HrCheckResult string //存在人资稽查填写完成评估 | ||
25 | BeginTime time.Time //开始时间 | 26 | BeginTime time.Time //开始时间 |
26 | EndTime time.Time //截止时间 | 27 | EndTime time.Time //截止时间 |
27 | TotalScore string //最终上级评估得分. | 28 | TotalScore string //最终上级评估得分. |
@@ -36,6 +36,7 @@ func (repo *SummaryEvaluationRepository) TransformToDomain(d *models.SummaryEval | @@ -36,6 +36,7 @@ func (repo *SummaryEvaluationRepository) TransformToDomain(d *models.SummaryEval | ||
36 | Types: domain.EvaluationType(d.Types), | 36 | Types: domain.EvaluationType(d.Types), |
37 | Status: domain.EvaluationStatus(d.Status), | 37 | Status: domain.EvaluationStatus(d.Status), |
38 | CheckResult: domain.EvaluationCheckResult(d.CheckResult), | 38 | CheckResult: domain.EvaluationCheckResult(d.CheckResult), |
39 | + HrCheckResult: domain.EvaluationCheckResult(d.HrCheckResult), | ||
39 | Version: domain.EvaluationVersion(d.Version), | 40 | Version: domain.EvaluationVersion(d.Version), |
40 | BeginTime: d.BeginTime, | 41 | BeginTime: d.BeginTime, |
41 | EndTime: d.EndTime, | 42 | EndTime: d.EndTime, |
@@ -62,6 +63,7 @@ func (repo *SummaryEvaluationRepository) Save(param *domain.SummaryEvaluation) e | @@ -62,6 +63,7 @@ func (repo *SummaryEvaluationRepository) Save(param *domain.SummaryEvaluation) e | ||
62 | Types: int(param.Types), | 63 | Types: int(param.Types), |
63 | Status: string(param.Status), | 64 | Status: string(param.Status), |
64 | CheckResult: string(param.CheckResult), | 65 | CheckResult: string(param.CheckResult), |
66 | + HrCheckResult: string(param.HrCheckResult), | ||
65 | Version: string(param.Version), | 67 | Version: string(param.Version), |
66 | BeginTime: param.BeginTime, | 68 | BeginTime: param.BeginTime, |
67 | EndTime: param.EndTime, | 69 | EndTime: param.EndTime, |
-
请 注册 或 登录 后发表评论