正在显示
1 个修改的文件
包含
23 行增加
和
2 行删除
@@ -250,7 +250,18 @@ func (srv *SummaryEvaluationService) GetEvaluation360(param *command.QueryEvalua | @@ -250,7 +250,18 @@ func (srv *SummaryEvaluationService) GetEvaluation360(param *command.QueryEvalua | ||
250 | } | 250 | } |
251 | // 评估项截止时间 | 251 | // 评估项截止时间 |
252 | endTime := sEvaluation.EndTime.Local().Format("2006-01-02 15:04:05") | 252 | endTime := sEvaluation.EndTime.Local().Format("2006-01-02 15:04:05") |
253 | - return map[string]interface{}{"endTime": endTime, "version": sEvaluation.Version, "list": itemValuesAdapter}, nil | 253 | + result := map[string]interface{}{"endTime": endTime, "version": sEvaluation.Version, "status": sEvaluation.Status, "list": itemValuesAdapter} |
254 | + if sEvaluation.CompletedAt == 0 { | ||
255 | + result["status"] = string(domain.EvaluationUncompleted) //未完成 | ||
256 | + } else { | ||
257 | + if sEvaluation.EndTime.Unix() < sEvaluation.CompletedAt { | ||
258 | + result["status"] = string(domain.EvaluationCompleted) + "_timeout" //超时完成 | ||
259 | + } else { | ||
260 | + result["status"] = string(domain.EvaluationCompleted) // 正常完成 | ||
261 | + } | ||
262 | + } | ||
263 | + | ||
264 | + return result, nil | ||
254 | } | 265 | } |
255 | 266 | ||
256 | // GetEvaluation360Complete 获取360综评详情(他人评估目标用户)(已完成状态) | 267 | // GetEvaluation360Complete 获取360综评详情(他人评估目标用户)(已完成状态) |
@@ -548,7 +559,17 @@ func (srv *SummaryEvaluationService) GetEvaluationHRBP(param *command.QueryEvalu | @@ -548,7 +559,17 @@ func (srv *SummaryEvaluationService) GetEvaluationHRBP(param *command.QueryEvalu | ||
548 | 559 | ||
549 | // 评估项截止时间 | 560 | // 评估项截止时间 |
550 | endTime := sEvaluation.EndTime.Local().Format("2006-01-02 15:04:05") | 561 | endTime := sEvaluation.EndTime.Local().Format("2006-01-02 15:04:05") |
551 | - return map[string]interface{}{"endTime": endTime, "version": sEvaluation.Version, "list": itemValuesAdapter}, nil | 562 | + result := map[string]interface{}{"endTime": endTime, "version": sEvaluation.Version, "status": "", "list": itemValuesAdapter} |
563 | + if sEvaluation.CompletedAt == 0 { | ||
564 | + result["status"] = string(domain.EvaluationUncompleted) //未完成 | ||
565 | + } else { | ||
566 | + if sEvaluation.EndTime.Unix() < sEvaluation.CompletedAt { | ||
567 | + result["status"] = string(domain.EvaluationCompleted) + "_timeout" //超时完成 | ||
568 | + } else { | ||
569 | + result["status"] = string(domain.EvaluationCompleted) // 正常完成 | ||
570 | + } | ||
571 | + } | ||
572 | + return result, nil | ||
552 | } | 573 | } |
553 | 574 | ||
554 | // GetEvaluationHRBPComplete 获取人资综评详情(已完成状态) | 575 | // GetEvaluationHRBPComplete 获取人资综评详情(已完成状态) |
-
请 注册 或 登录 后发表评论