...
|
...
|
@@ -1518,7 +1518,9 @@ func (srv *SummaryEvaluationService) ConfirmScoreEvaluation(param *command.Confi |
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
}
|
|
|
|
|
|
for i := range itemList {
|
|
|
result.ResetTotalRating(itemList[i])
|
|
|
}
|
|
|
if err := result.EvaluationTotalScore(itemValues); err != nil {
|
|
|
return application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
@@ -1688,6 +1690,9 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu |
|
|
}
|
|
|
// 未完成考核,需要重新计算分数
|
|
|
if result.CheckResult == domain.EvaluationCheckUncompleted {
|
|
|
for i := range itemList {
|
|
|
result.ResetTotalRating(itemList[i])
|
|
|
}
|
|
|
if err = result.EvaluationTotalScore(itemValues); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
@@ -1702,7 +1707,7 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu |
|
|
|
|
|
// 组合 评估填写的值和评估项
|
|
|
itemValuesAdapter := srv.buildSummaryItemValue(itemList, itemValues)
|
|
|
codeList := make([]*adapter.LevalCodeCount, 0)
|
|
|
|
|
|
codeMap := map[string]*adapter.LevalCodeCount{}
|
|
|
for _, v := range itemValuesAdapter {
|
|
|
//处理加分项评级汇总
|
...
|
...
|
@@ -1714,13 +1719,23 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu |
|
|
ItemList: []string{},
|
|
|
}
|
|
|
codeMap[v.Value] = code
|
|
|
codeList = append(codeList, code)
|
|
|
}
|
|
|
codeMap[v.Value].ItemList = append(codeMap[v.Value].ItemList, v.Name)
|
|
|
codeMap[v.Value].Number += 1
|
|
|
}
|
|
|
}
|
|
|
|
|
|
codeList := make([]*adapter.LevalCodeCount, 0)
|
|
|
for _, val := range result.TotalRating {
|
|
|
if codeItem, ok := codeMap[val.Code]; ok {
|
|
|
codeList = append(codeList, codeItem)
|
|
|
} else {
|
|
|
codeList = append(codeList, &adapter.LevalCodeCount{
|
|
|
Code: val.Code,
|
|
|
Number: 0,
|
|
|
ItemList: []string{},
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
eiAdapter := adapter.EvaluationInfoSuperAdapter{
|
|
|
EvaluationBaseAdapter: evaluationBase,
|
|
|
LevelCount: codeList,
|
...
|
...
|
|