作者 tangxvhui

添加人资稽查 状态描述

... ... @@ -164,6 +164,8 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
evalutionHrbp.Status = domain.EvaluationCompleted
evalutionHrbp.HrCheckResult = domain.EvaluationCheckCompleted
err = evaluationRepo.Save(evalutionHrbp)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
... ... @@ -183,6 +185,8 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
val.Status = domain.EvaluationCompleted
val.HrCheckResult = domain.EvaluationCheckCompleted
err = evaluationRepo.Save(val)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
... ... @@ -202,6 +206,8 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
evaluationSuper.Status = domain.EvaluationCompleted
evaluationSuper.HrCheckResult = domain.EvaluationCheckCompleted
err = evaluationRepo.Save(evaluationSuper)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
... ... @@ -222,6 +228,7 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
evalutionFinish.Status = domain.EvaluationCompleted
evalutionFinish.HrCheckResult = domain.EvaluationCheckCompleted
err = evaluationRepo.Save(evalutionFinish)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
... ...
... ... @@ -3,7 +3,6 @@ package service
import (
"fmt"
"strings"
"time"
"github.com/linmadan/egglib-go/core/application"
"github.com/linmadan/egglib-go/utils/tool_funs"
... ... @@ -17,7 +16,7 @@ import (
//获取周期评估的列表 ,根据页面需要提供不同的结构变体
// 人资稽查 页面列表数据输出
// 根据周期id 获取类型为"上级评估" 的全部周期评估
// 根据周期id 获取类型为"EvaluationFinish" 的全部周期评估
func (srv *SummaryEvaluationService) ListEvaluationShow1(param command.QueryEvaluationList) (result map[string]interface{}, err error) {
transactionContext, err := factory.ValidateStartTransaction(param)
if err != nil {
... ... @@ -95,22 +94,16 @@ func (srv *SummaryEvaluationService) ListEvaluationShow1(param command.QueryEval
projectCountMap[key] = targetCount[i].Cnt
}
}
now := time.Now().Local() // 当前时间
resultList := make([]*adapter.EvaluationItemAdapter2, 0)
for i := range list {
v := list[i]
endTime := v.EndTime.Local()
// 状态
statusVal := ""
if v.CheckResult == domain.EvaluationCheckCompleted {
if v.HrCheckResult == domain.EvaluationCheckCompleted {
statusVal = "已完成"
} else {
if now.After(endTime) {
statusVal = "已逾期"
} else {
statusVal = "待完成"
}
statusVal = "待完成"
}
// 部门拼接
... ...
... ... @@ -216,6 +216,7 @@ func (se *summaryEvaluationPublisher) sendSummaryEvaluationV2(
Types: 0, //待填充
Status: domain.EvaluationUncompleted,
CheckResult: domain.EvaluationCheckUncompleted,
HrCheckResult: domain.EvaluationCheckUncompleted,
BeginTime: time.Time{}, //待填充
EndTime: time.Time{}, //待填充
TotalScore: "",
... ...
... ... @@ -21,6 +21,7 @@ type SummaryEvaluation struct {
Types EvaluationType `json:"types"` //评估类型
Status EvaluationStatus `json:"status"` //评估的填写状态
CheckResult EvaluationCheckResult `json:"checkResult"` //被执行的人确认评估结果
HrCheckResult EvaluationCheckResult `json:"hrCheckResult"` //存在人资稽查填写完成评估
BeginTime time.Time `json:"beginTime"` //开始时间
EndTime time.Time `json:"endTime"` //截止时间
TotalScore string `json:"totalScore"` //最终上级评估得分.
... ...
... ... @@ -22,6 +22,7 @@ type SummaryEvaluation struct {
Types int //评估类型
Status string //评估的填写状态
CheckResult string //被执行的人确认评估结果
HrCheckResult string //存在人资稽查填写完成评估
BeginTime time.Time //开始时间
EndTime time.Time //截止时间
TotalScore string //最终上级评估得分.
... ...
... ... @@ -36,6 +36,7 @@ func (repo *SummaryEvaluationRepository) TransformToDomain(d *models.SummaryEval
Types: domain.EvaluationType(d.Types),
Status: domain.EvaluationStatus(d.Status),
CheckResult: domain.EvaluationCheckResult(d.CheckResult),
HrCheckResult: domain.EvaluationCheckResult(d.HrCheckResult),
Version: domain.EvaluationVersion(d.Version),
BeginTime: d.BeginTime,
EndTime: d.EndTime,
... ... @@ -62,6 +63,7 @@ func (repo *SummaryEvaluationRepository) Save(param *domain.SummaryEvaluation) e
Types: int(param.Types),
Status: string(param.Status),
CheckResult: string(param.CheckResult),
HrCheckResult: string(param.HrCheckResult),
Version: string(param.Version),
BeginTime: param.BeginTime,
EndTime: param.EndTime,
... ...