...
|
...
|
@@ -1277,12 +1277,15 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
|
|
it.AssistContent = v.AssistContent // 更新上级辅导内容
|
|
|
it.RemarkContent = make([]domain.RemarkText, 0) // 更新填写反馈内容
|
|
|
|
|
|
var anomalyState = domain.AnomalyState0
|
|
|
var anomalyState = domain.AnomalyState0 // 反馈异常
|
|
|
key := fmt.Sprintf("%s-%s", v.Category, v.Name)
|
|
|
// 反馈内容填写
|
|
|
// 反馈内容填写(区分:一、模板分类中的反馈内容 二、模板的反馈内容
|
|
|
if item, ok := contentCategoryMap[key]; ok {
|
|
|
it.RemarkContent = append(it.RemarkContent, item.Remark...)
|
|
|
for _, remark := range item.Remark {
|
|
|
} else {
|
|
|
it.RemarkContent = append(it.RemarkContent, v.RemarkContent...)
|
|
|
}
|
|
|
for _, remark := range it.RemarkContent {
|
|
|
trimSpace := strings.TrimLeft(remark.RemarkText, "\n") // 去掉前换行符
|
|
|
trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
|
|
|
trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
|
...
|
...
|
@@ -1291,20 +1294,20 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
|
|
break
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
it.RemarkContent = append(it.RemarkContent, v.RemarkContent...)
|
|
|
}
|
|
|
//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
|
|
|
|
|
|
var assistState = domain.AssistState0 // 辅导异常
|
|
|
if it.AssistLevel > domain.AssistLevel1 {
|
|
|
trimSpace := strings.TrimLeft(it.AssistContent, "\n") // 去掉前换行符
|
|
|
trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
|
|
|
trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
|
|
|
// 辅导情况是已辅导且有填写内容,变为正常
|
|
|
if !(len(trimSpace) == 0 || trimSpace == "无") {
|
|
|
assistState = domain.AssistState1
|
|
|
}
|
|
|
}
|
|
|
it.AssistState = assistState
|
|
|
|
|
|
// 更新里程碑状态
|
|
|
if v.TaskStageId == it.TaskStageCheck.Id {
|
|
|
if v.Check == domain.TaskStageUncompleted {
|
...
|
...
|
|