...
|
...
|
@@ -603,17 +603,25 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf(param *domain. |
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
nowTime := time.Now()
|
|
|
updatedId := []int{}
|
|
|
// 变更360评估/人资评估/上级评估的开始时间
|
|
|
for _, v := range evaluationList {
|
|
|
if v.BeginTime.After(nowTime) {
|
|
|
v.BeginTime = nowTime
|
|
|
updatedId = append(updatedId, v.Id)
|
|
|
}
|
|
|
err = evaluationRepo.Save(v)
|
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
}
|
|
|
evaluationDao := dao.NewSummaryEvaluationDao(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
|
|
|
err = evaluationDao.UpdateBeginTime(updatedId, nowTime)
|
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
@@ -666,15 +674,20 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluation360Hrbp(param *doma |
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
nowTime := time.Now()
|
|
|
updatedId := []int{}
|
|
|
// 变更上级评估的开始时间
|
|
|
for _, v := range evaluationList {
|
|
|
if v.BeginTime.After(nowTime) {
|
|
|
v.BeginTime = nowTime
|
|
|
updatedId = append(updatedId, v.Id)
|
|
|
}
|
|
|
err = evaluationRepo.Save(v)
|
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
}
|
|
|
evaluationDao := dao.NewSummaryEvaluationDao(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
err = evaluationDao.UpdateBeginTime(updatedId, nowTime)
|
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
...
|
...
|
|