...
|
...
|
@@ -2,7 +2,6 @@ package service |
|
|
|
|
|
import (
|
|
|
"fmt"
|
|
|
"time"
|
|
|
|
|
|
"github.com/linmadan/egglib-go/core/application"
|
|
|
"github.com/linmadan/egglib-go/utils/tool_funs"
|
...
|
...
|
@@ -278,6 +277,7 @@ func (srv *SummaryEvaluationService) buildSummaryItemValue(itemList []*domain.Ev |
|
|
item.Score = value.Score
|
|
|
item.Value = value.Value
|
|
|
item.Remark = value.Remark
|
|
|
item.Rating = value.Rating
|
|
|
}
|
|
|
itemValues = append(itemValues, item)
|
|
|
}
|
...
|
...
|
@@ -474,7 +474,6 @@ func (srv *SummaryEvaluationService) EditEvaluationSelf(param *command.EditEvalu |
|
|
mValue.Id = v.Id
|
|
|
}
|
|
|
}
|
|
|
nowTime := time.Now()
|
|
|
for _, v := range param.EvaluationItems {
|
|
|
updatedData, ok := evaluationValueMap[v.EvaluationItemId]
|
|
|
if !ok {
|
...
|
...
|
@@ -484,7 +483,6 @@ func (srv *SummaryEvaluationService) EditEvaluationSelf(param *command.EditEvalu |
|
|
if !ok {
|
|
|
continue
|
|
|
}
|
|
|
updatedData.UpdatedAt = nowTime
|
|
|
//填充评估填写值
|
|
|
err = updatedData.FillValue(evaluationItem, v.Value, v.Remark)
|
|
|
if err != nil {
|
...
|
...
|
@@ -506,7 +504,6 @@ func (srv *SummaryEvaluationService) EditEvaluationSelf(param *command.EditEvalu |
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
evaluationData.UpdatedAt = nowTime
|
|
|
evaluationData.Status = domain.EvaluationCompleted
|
|
|
//保存填写值
|
|
|
err = evaluationRepo.Save(evaluationData)
|
...
|
...
|
@@ -862,7 +859,7 @@ func (srv *SummaryEvaluationService) EditEvaluationSuper(param *command.EditEval |
|
|
mValue.Id = v.Id
|
|
|
}
|
|
|
}
|
|
|
nowTime := time.Now()
|
|
|
|
|
|
for _, v := range param.EvaluationItems {
|
|
|
updatedData, ok := evaluationValueMap[v.EvaluationItemId]
|
|
|
if !ok {
|
...
|
...
|
@@ -884,7 +881,6 @@ func (srv *SummaryEvaluationService) EditEvaluationSuper(param *command.EditEval |
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
}
|
|
|
}
|
|
|
updatedData.UpdatedAt = nowTime
|
|
|
}
|
|
|
evaluationValueList := []*domain.SummaryEvaluationValue{}
|
|
|
for _, v := range evaluationValueMap {
|
...
|
...
|
@@ -900,7 +896,7 @@ func (srv *SummaryEvaluationService) EditEvaluationSuper(param *command.EditEval |
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
evaluationData.UpdatedAt = nowTime
|
|
|
//变更评估状态为已填写
|
|
|
evaluationData.Status = domain.EvaluationCompleted
|
|
|
//保存填写值
|
|
|
err = evaluationRepo.Save(evaluationData)
|
...
|
...
|
|