作者 tangxvhui

修正一些问题

... ... @@ -67,7 +67,7 @@ func sendSummaryEvaluation(project *domain.EvaluationProject,
}
}
//确定360评估的执行人
_, itemList, err := evaluationItemRepo.Find(map[string]interface{}{"evaluationProjectId": project.Id})
_, itemList, err := evaluationItemRepo.Find(map[string]interface{}{"evaluationProjectId": project.Id, "nodeType": int(domain.LinkNodeSelfAssessment)})
if err != nil {
return nil, err
}
... ...
... ... @@ -3,6 +3,7 @@ package service
import (
"errors"
"fmt"
"strings"
"time"
"github.com/linmadan/egglib-go/core/application"
... ... @@ -1530,6 +1531,7 @@ func (srv *SummaryEvaluationService) editEvaluationValue(
}
//填入填写的更新值
for _, v := range updatedValue {
v.Value = strings.TrimSpace(v.Value)
newItemValue, ok := evaluationValueMap[v.EvaluationItemId]
if !ok {
continue
... ... @@ -1538,6 +1540,11 @@ func (srv *SummaryEvaluationService) editEvaluationValue(
if !ok {
continue
}
if evaluationItem.Required == domain.NodeRequiredYes {
if len(v.Value) == 0 {
return fmt.Errorf("%s-%s 是必填项", evaluationItem.Category, evaluationItem.Name)
}
}
//填充评估填写值
err := newItemValue.FillValue(evaluationItem, v.Value, v.Remark)
if err != nil {
... ...