作者 tangxvhui

更新输出内容

... ... @@ -211,6 +211,11 @@ func dayZeroTime(t time.Time) time.Time {
// 下发周期评估
func TaskSendSummaryEvaluation() error {
nowTime := time.Now()
defer func() {
str := fmt.Sprintf("下发周期评估耗时%.2f s", time.Since(nowTime).Seconds())
log.Logger.Info(str)
}()
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
return err
... ...
... ... @@ -1686,10 +1686,6 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu
}
}
}
// 基础数据
evaluationBase := srv.getSummaryEvaluation(transactionContext, result)
// 未完成考核,需要重新计算分数
if result.CheckResult == domain.EvaluationCheckUncompleted {
if err = result.EvaluationTotalScore(itemValues); err != nil {
... ... @@ -1697,6 +1693,9 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu
}
}
// 基础数据
evaluationBase := srv.getSummaryEvaluation(transactionContext, result)
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
... ...