Merge branch 'test' of http://gitlab.fjmaimaimai.com/allied-creation/performance into test
正在显示
1 个修改的文件
包含
11 行增加
和
0 行删除
@@ -1689,6 +1689,14 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu | @@ -1689,6 +1689,14 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu | ||
1689 | 1689 | ||
1690 | // 基础数据 | 1690 | // 基础数据 |
1691 | evaluationBase := srv.getSummaryEvaluation(transactionContext, result) | 1691 | evaluationBase := srv.getSummaryEvaluation(transactionContext, result) |
1692 | + | ||
1693 | + // 未完成考核,需要重新计算分数 | ||
1694 | + if result.CheckResult == domain.EvaluationCheckUncompleted { | ||
1695 | + if err = result.EvaluationTotalScore(itemValues); err != nil { | ||
1696 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
1697 | + } | ||
1698 | + } | ||
1699 | + | ||
1692 | if err := transactionContext.CommitTransaction(); err != nil { | 1700 | if err := transactionContext.CommitTransaction(); err != nil { |
1693 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 1701 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
1694 | } | 1702 | } |
@@ -1698,6 +1706,9 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu | @@ -1698,6 +1706,9 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu | ||
1698 | codeList := make([]*adapter.LevalCodeCount, 0) | 1706 | codeList := make([]*adapter.LevalCodeCount, 0) |
1699 | codeMap := map[string]*adapter.LevalCodeCount{} | 1707 | codeMap := map[string]*adapter.LevalCodeCount{} |
1700 | for _, v := range itemValuesAdapter { | 1708 | for _, v := range itemValuesAdapter { |
1709 | + if len(v.Value) == 0 { | ||
1710 | + continue | ||
1711 | + } | ||
1701 | if v.Weight == 0 { | 1712 | if v.Weight == 0 { |
1702 | if _, ok := codeMap[v.Value]; !ok { | 1713 | if _, ok := codeMap[v.Value]; !ok { |
1703 | code := &adapter.LevalCodeCount{ | 1714 | code := &adapter.LevalCodeCount{ |
-
请 注册 或 登录 后发表评论