|
@@ -1280,18 +1280,12 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
|
@@ -1280,18 +1280,12 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
1280
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取里程碑数据:"+err.Error())
|
1280
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取里程碑数据:"+err.Error())
|
1281
|
}
|
1281
|
}
|
1282
|
|
1282
|
|
1283
|
- // 首次提交任务记录(未过期前可以多次编辑提交)
|
|
|
1284
|
- var isFirstSubmit = false
|
|
|
1285
|
for i := range taskRecords {
|
1283
|
for i := range taskRecords {
|
1286
|
it := taskRecords[i]
|
1284
|
it := taskRecords[i]
|
1287
|
if v, ok := recordMap[it.Id]; ok {
|
1285
|
if v, ok := recordMap[it.Id]; ok {
|
1288
|
it.AssistLevel = v.AssistLevel // 更新上级辅导情况
|
1286
|
it.AssistLevel = v.AssistLevel // 更新上级辅导情况
|
1289
|
it.AssistContent = v.AssistContent // 更新上级辅导内容
|
1287
|
it.AssistContent = v.AssistContent // 更新上级辅导内容
|
1290
|
|
1288
|
|
1291
|
- if !isFirstSubmit && it.AnomalyState == domain.AnomalyStateInit {
|
|
|
1292
|
- isFirstSubmit = true
|
|
|
1293
|
- }
|
|
|
1294
|
-
|
|
|
1295
|
var anomalyState = domain.AnomalyState0
|
1289
|
var anomalyState = domain.AnomalyState0
|
1296
|
key := fmt.Sprintf("%s-%s", v.Category, v.Name)
|
1290
|
key := fmt.Sprintf("%s-%s", v.Category, v.Name)
|
1297
|
if item, ok := contentCategoryMap[key]; ok {
|
1291
|
if item, ok := contentCategoryMap[key]; ok {
|
|
@@ -1299,7 +1293,7 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
|
@@ -1299,7 +1293,7 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
1299
|
trimSpace := strings.TrimLeft(remark.RemarkText, "\n") // 去掉前换行符
|
1293
|
trimSpace := strings.TrimLeft(remark.RemarkText, "\n") // 去掉前换行符
|
1300
|
trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
|
1294
|
trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
|
1301
|
trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
|
1295
|
trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
|
1302
|
- if !(len(trimSpace) == 0 || trimSpace == "无") { // 有一个填写项是正常即可
|
1296
|
+ if !(len(trimSpace) == 0 || trimSpace == "无") { // 有一个填写项就恢复正常状态
|
1303
|
anomalyState = domain.AnomalyState1
|
1297
|
anomalyState = domain.AnomalyState1
|
1304
|
break
|
1298
|
break
|
1305
|
}
|
1299
|
}
|
|
@@ -1341,7 +1335,7 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
|
@@ -1341,7 +1335,7 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
1341
|
}
|
1335
|
}
|
1342
|
|
1336
|
|
1343
|
if len(taskRecords) > 0 {
|
1337
|
if len(taskRecords) > 0 {
|
1344
|
- err := taskService.NewTaskService().ReplyTaskStage(transactionContext, taskRecords, isFirstSubmit)
|
1338
|
+ err := taskService.NewTaskService().ReplyTaskStage(transactionContext, taskRecords)
|
1345
|
if err != nil {
|
1339
|
if err != nil {
|
1346
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "更新里程碑数据:"+err.Error())
|
1340
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "更新里程碑数据:"+err.Error())
|
1347
|
}
|
1341
|
}
|