作者 tangxvhui

评估填写的值的结构

... ... @@ -91,6 +91,7 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit
newItemValue.SetBlankValue(evaluationSuper, val)
newItemValue.Remark = itemValueParam[val.Id].Remark
evaluationSuper.FillItemValue(val, &newItemValue, itemValueParam[val.Id].Value)
newItemValue.HrCheck = param.ExecutorId
newSuperItemValueList = append(newSuperItemValueList, &newItemValue)
temp = newItemValue
}
... ... @@ -99,6 +100,7 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit
newItemValue.SetBlankValue(evalutionHrbp, val)
newItemValue.Remark = itemValueParam[val.Id].Remark
evalutionHrbp.FillItemValue(val, &newItemValue, itemValueParam[val.Id].Value)
newItemValue.HrCheck = param.ExecutorId
newHrbpItemValueList = append(newHrbpItemValueList, &newItemValue)
temp = newItemValue
}
... ... @@ -113,6 +115,7 @@ func (srv *SummaryEvaluationService) EditEvaluationByHrCheck(param *command.Edit
newItemValue.SetBlankValue(evaluation360, val)
newItemValue.Remark = itemValueParam[val.Id].Remark
evaluation360.FillItemValue(val, &newItemValue, itemValueParam[val.Id].Value)
newItemValue.HrCheck = param.ExecutorId
itemValue360List = append(itemValue360List, &newItemValue)
new360ItemValueList[evaluation360.Executor.UserId] = itemValue360List
temp = newItemValue
... ...
... ... @@ -22,7 +22,7 @@ type SummaryEvaluationValue struct {
Rating RatingLevel `json:"rating"` //评级时的填写值
CreatedAt time.Time `json:"createdAt"` //数据创建时间
UpdatedAt time.Time `json:"updatedAt"` //数据更新时间
Version string `json:"version"`
HrCheck int `json:"hrCheck"` // >0:代表是人资稽查填写的评估
}
type SummaryEvaluationValueRepository interface {
... ... @@ -45,6 +45,7 @@ func (itemValue *SummaryEvaluationValue) SetBlankValue(evaluation *SummaryEvalua
itemValue.CreatedAt = time.Now()
itemValue.UpdatedAt = time.Now()
itemValue.Executor = evaluation.Executor
itemValue.HrCheck = 0
}
// 自评 填充评估的内容的规则
... ...
... ... @@ -21,4 +21,5 @@ type SummaryEvaluationValue struct {
Remark string //填写的内容反馈
CreatedAt time.Time //数据创建时间
UpdatedAt time.Time //数据更新时间
HrCheck int // >0:代表是人资稽查填写的评估
}
... ...
... ... @@ -35,6 +35,7 @@ func (repo *SummaryEvaluationValueRepository) TransformToDomain(d *models.Summar
Rating: d.Rating,
CreatedAt: d.CreatedAt,
UpdatedAt: d.UpdatedAt,
HrCheck: d.HrCheck,
}
}
... ... @@ -52,6 +53,7 @@ func (repo *SummaryEvaluationValueRepository) Save(param *domain.SummaryEvaluati
Remark: param.Remark,
CreatedAt: param.CreatedAt,
UpdatedAt: param.UpdatedAt,
HrCheck: param.HrCheck,
}
db := repo.transactionContext.PgTx
if m.Id == 0 {
... ...
ALTER TABLE public.summary_evaluation
ADD "version" varchar NOT NULL DEFAULT 'v1'::character varying;
... ...