...
|
...
|
@@ -895,18 +895,24 @@ func (srv TaskService) ReplyTaskStage(transactionContext application.Transaction |
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务数据"+err.Error())
|
|
|
}
|
|
|
if val.AnomalyState == domain.AnomalyState1 {
|
|
|
taskData.Anomaly = 0
|
|
|
}
|
|
|
taskList = append(taskList, taskData)
|
|
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{"ids": []int{val.TaskStageCheck.Id}})
|
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务里程碑数据"+err.Error())
|
|
|
}
|
|
|
if val.AnomalyState == domain.AnomalyState1 {
|
|
|
taskData.Anomaly = 0
|
|
|
}
|
|
|
if len(stageList) > 0 {
|
|
|
stageList[0].RealCompletedAt = val.TaskStageCheck.RealCompletedAt
|
|
|
taskStages = append(taskStages, stageList[0])
|
|
|
if stageList[0].PlanCompletedAt < stageList[0].RealCompletedAt {
|
|
|
taskData.WarnFlag = domain.TaskWarn
|
|
|
} else {
|
|
|
taskData.WarnFlag = domain.TaskWarnNull
|
|
|
}
|
|
|
}
|
|
|
|
|
|
taskList = append(taskList, taskData)
|
|
|
}
|
|
|
err := taskStageRepo.Save(taskStages)
|
|
|
if err != nil {
|
...
|
...
|
|