...
|
...
|
@@ -1262,12 +1262,19 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取里程碑数据:"+err.Error())
|
|
|
}
|
|
|
|
|
|
// 首次提交任务记录(未过期前可以多次编辑提交)
|
|
|
var isFirstSubmit = false
|
|
|
for i := range taskRecords {
|
|
|
it := taskRecords[i]
|
|
|
if v, ok := recordMap[it.Id]; ok {
|
|
|
it.AssistLevel = v.AssistLevel // 更新上级辅导情况
|
|
|
it.AssistContent = v.AssistContent // 更新上级辅导内容
|
|
|
|
|
|
if !isFirstSubmit && it.AnomalyState == domain.AnomalyStateInit {
|
|
|
isFirstSubmit = true
|
|
|
}
|
|
|
|
|
|
var anomalyState = domain.AnomalyState0
|
|
|
key := fmt.Sprintf("%s-%s", v.Category, v.Name)
|
|
|
if item, ok := contentCategoryMap[key]; ok {
|
...
|
...
|
@@ -1317,7 +1324,7 @@ func (srv StaffAssessServeice) SaveSelfAssess(in *command.SaveSelfAssessCommand) |
|
|
}
|
|
|
|
|
|
if len(taskRecords) > 0 {
|
|
|
err := taskService.NewTaskService().ReplyTaskStage(transactionContext, taskRecords)
|
|
|
err := taskService.NewTaskService().ReplyTaskStage(transactionContext, taskRecords, isFirstSubmit)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "更新里程碑数据:"+err.Error())
|
|
|
}
|
...
|
...
|
|