作者 郑周

1. 优化

... ... @@ -1281,16 +1281,15 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand)
}
}
}
if anomalyState == domain.AnomalyState0 {
trimSpace := strings.TrimLeft(it.AssistContent, "\n") // 去掉前换行符
trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
// 上级填写内容有值,选项是已辅导,变为正常
if !(len(trimSpace) == 0 || trimSpace == "无") && it.AssistLevel >= domain.AssistLevel2 {
anomalyState = domain.AnomalyState1
}
}
//if anomalyState == domain.AnomalyState0 {
// trimSpace := strings.TrimLeft(it.AssistContent, "\n") // 去掉前换行符
// trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
// trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
// // 上级填写内容有值,选项是已辅导,变为正常
// if !(len(trimSpace) == 0 || trimSpace == "无") && it.AssistLevel >= domain.AssistLevel2 {
// anomalyState = domain.AnomalyState1
// }
//}
it.AnomalyState = anomalyState
// 更新里程碑状态
... ...
... ... @@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"strconv"
"strings"
"time"
"github.com/linmadan/egglib-go/core/application"
... ... @@ -922,11 +923,18 @@ func (srv TaskService) ReplyTaskStage(transactionContext application.Transaction
if err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务里程碑数据"+err.Error())
}
if val.AnomalyState == domain.AnomalyState1 {
taskData.Anomaly = 0
} else {
if val.AnomalyState == domain.AnomalyState0 {
taskData.Anomaly += 1
}
trimSpace := strings.TrimLeft(val.AssistContent, "\n") // 去掉前换行符
trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
// 上级填写内容有值,选项是已辅导,变为正常
if !(len(trimSpace) == 0 || trimSpace == "无") && val.AssistLevel >= domain.AssistLevel2 {
taskData.Anomaly = 0
}
for _, val2 := range stageList {
if val2.Id != val.TaskStageCheck.Id {
continue
... ...