|
@@ -4,6 +4,7 @@ import ( |
|
@@ -4,6 +4,7 @@ import ( |
4
|
"encoding/json"
|
4
|
"encoding/json"
|
5
|
"fmt"
|
5
|
"fmt"
|
6
|
"strconv"
|
6
|
"strconv"
|
|
|
7
|
+ "strings"
|
7
|
"time"
|
8
|
"time"
|
8
|
|
9
|
|
9
|
"github.com/linmadan/egglib-go/core/application"
|
10
|
"github.com/linmadan/egglib-go/core/application"
|
|
@@ -922,11 +923,18 @@ func (srv TaskService) ReplyTaskStage(transactionContext application.Transaction |
|
@@ -922,11 +923,18 @@ func (srv TaskService) ReplyTaskStage(transactionContext application.Transaction |
922
|
if err != nil {
|
923
|
if err != nil {
|
923
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务里程碑数据"+err.Error())
|
924
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务里程碑数据"+err.Error())
|
924
|
}
|
925
|
}
|
925
|
- if val.AnomalyState == domain.AnomalyState1 {
|
|
|
926
|
- taskData.Anomaly = 0
|
|
|
927
|
- } else {
|
926
|
+
|
|
|
927
|
+ if val.AnomalyState == domain.AnomalyState0 {
|
928
|
taskData.Anomaly += 1
|
928
|
taskData.Anomaly += 1
|
929
|
}
|
929
|
}
|
|
|
930
|
+ trimSpace := strings.TrimLeft(val.AssistContent, "\n") // 去掉前换行符
|
|
|
931
|
+ trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
|
|
|
932
|
+ trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
|
|
|
933
|
+ // 上级填写内容有值,选项是已辅导,变为正常
|
|
|
934
|
+ if !(len(trimSpace) == 0 || trimSpace == "无") && val.AssistLevel >= domain.AssistLevel2 {
|
|
|
935
|
+ taskData.Anomaly = 0
|
|
|
936
|
+ }
|
|
|
937
|
+
|
930
|
for _, val2 := range stageList {
|
938
|
for _, val2 := range stageList {
|
931
|
if val2.Id != val.TaskStageCheck.Id {
|
939
|
if val2.Id != val.TaskStageCheck.Id {
|
932
|
continue
|
940
|
continue
|