|
@@ -3,7 +3,6 @@ package service |
|
@@ -3,7 +3,6 @@ package service |
3
|
import (
|
3
|
import (
|
4
|
"fmt"
|
4
|
"fmt"
|
5
|
"strconv"
|
5
|
"strconv"
|
6
|
- "strings"
|
|
|
7
|
"time"
|
6
|
"time"
|
8
|
|
7
|
|
9
|
service "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/role"
|
8
|
service "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/role"
|
|
@@ -1296,7 +1295,6 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
|
@@ -1296,7 +1295,6 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
1296
|
it.AssistContent = v.AssistContent // 更新上级辅导内容
|
1295
|
it.AssistContent = v.AssistContent // 更新上级辅导内容
|
1297
|
it.RemarkContent = make([]domain.RemarkText, 0) // 更新填写反馈内容
|
1296
|
it.RemarkContent = make([]domain.RemarkText, 0) // 更新填写反馈内容
|
1298
|
|
1297
|
|
1299
|
- var anomalyState = domain.AnomalyState0 // 反馈异常
|
|
|
1300
|
key := fmt.Sprintf("%s-%s", v.Category, v.Name)
|
1298
|
key := fmt.Sprintf("%s-%s", v.Category, v.Name)
|
1301
|
// 反馈内容填写(区分:一、模板分类中的反馈内容 二、模板的反馈内容
|
1299
|
// 反馈内容填写(区分:一、模板分类中的反馈内容 二、模板的反馈内容
|
1302
|
if item, ok := contentCategoryMap[key]; ok {
|
1300
|
if item, ok := contentCategoryMap[key]; ok {
|
|
@@ -1304,27 +1302,34 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
|
@@ -1304,27 +1302,34 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
1304
|
} else {
|
1302
|
} else {
|
1305
|
it.RemarkContent = append(it.RemarkContent, v.RemarkContent...)
|
1303
|
it.RemarkContent = append(it.RemarkContent, v.RemarkContent...)
|
1306
|
}
|
1304
|
}
|
1307
|
- for _, remark := range it.RemarkContent {
|
|
|
1308
|
- trimSpace := strings.TrimLeft(remark.RemarkText, "\n") // 去掉前换行符
|
|
|
1309
|
- trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
|
|
|
1310
|
- trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
|
|
|
1311
|
- if !(len(trimSpace) == 0 || trimSpace == "无") { // 有一个填写项就恢复正常状态
|
|
|
1312
|
- anomalyState = domain.AnomalyState1
|
|
|
1313
|
- break
|
|
|
1314
|
- }
|
1305
|
+ var anomalyState = domain.AnomalyState1 // 反馈异常
|
|
|
1306
|
+ if it.IsRemarkAnomaly() {
|
|
|
1307
|
+ anomalyState = domain.AnomalyState0
|
1315
|
}
|
1308
|
}
|
|
|
1309
|
+ // for _, remark := range it.RemarkContent {
|
|
|
1310
|
+ // trimSpace := strings.TrimLeft(remark.RemarkText, "\n") // 去掉前换行符
|
|
|
1311
|
+ // trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
|
|
|
1312
|
+ // trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
|
|
|
1313
|
+ // if !(len(trimSpace) == 0 || trimSpace == "无") { // 有一个填写项就恢复正常状态
|
|
|
1314
|
+ // anomalyState = domain.AnomalyState1
|
|
|
1315
|
+ // break
|
|
|
1316
|
+ // }
|
|
|
1317
|
+ // }
|
1316
|
it.AnomalyState = anomalyState
|
1318
|
it.AnomalyState = anomalyState
|
1317
|
|
1319
|
|
1318
|
- var assistState = domain.AssistState0 // 辅导异常
|
|
|
1319
|
- if it.AssistLevel > domain.AssistLevel1 {
|
|
|
1320
|
- trimSpace := strings.TrimLeft(it.AssistContent, "\n") // 去掉前换行符
|
|
|
1321
|
- trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
|
|
|
1322
|
- trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
|
|
|
1323
|
- // 辅导情况是已辅导且有填写内容,变为正常
|
|
|
1324
|
- if !(len(trimSpace) == 0 || trimSpace == "无") {
|
|
|
1325
|
- assistState = domain.AssistState1
|
|
|
1326
|
- }
|
1320
|
+ var assistState = domain.AssistState1 // 辅导异常
|
|
|
1321
|
+ if it.IsAssistAnomaly() {
|
|
|
1322
|
+ assistState = domain.AssistState0
|
1327
|
}
|
1323
|
}
|
|
|
1324
|
+ // if it.AssistLevel > domain.AssistLevel1 {
|
|
|
1325
|
+ // trimSpace := strings.TrimLeft(it.AssistContent, "\n") // 去掉前换行符
|
|
|
1326
|
+ // trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
|
|
|
1327
|
+ // trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
|
|
|
1328
|
+ // // 辅导情况是已辅导且有填写内容,变为正常
|
|
|
1329
|
+ // if !(len(trimSpace) == 0 || trimSpace == "无") {
|
|
|
1330
|
+ // assistState = domain.AssistState1
|
|
|
1331
|
+ // }
|
|
|
1332
|
+ // }
|
1328
|
it.AssistState = assistState
|
1333
|
it.AssistState = assistState
|
1329
|
|
1334
|
|
1330
|
// 更新里程碑状态
|
1335
|
// 更新里程碑状态
|