作者 tangxvhui

调整 异常的判定逻辑

... ... @@ -143,7 +143,6 @@ func anomalyIsWarnFlag(transactionContext application.TransactionContext, taskAn
})
if len(oldAnomaly) > 0 {
taskAnomalyData.WarnFlag = oldAnomaly[0].WarnFlag + 1
taskAnomalyData.RecordBegin = oldAnomaly[0].RecordBegin
for i := range oldAnomaly {
oldAnomaly[i].IsLast = 2
err = taskAnomalyRepo.Save(oldAnomaly[i])
... ...
... ... @@ -1192,7 +1192,6 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
"transactionContext": transactionContext,
})
nowDay := xtime.DayEndTime(time.Now()).Unix()
for _, val := range taskListData {
tk := adapter.TaskItem{
Id: val.TaskId,
... ... @@ -1236,14 +1235,6 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i
if val.WarnFlag > 0 {
tk.WarnFlag = 1
}
if val.LastStage.Id > 0 && val.LastStage.RealCompletedAt < nowDay {
if val.LastStage.Id > 0 &&
val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt &&
val.CurrentStage.Id > 0 {
//上一个里程碑超期完成,标红
tk.WarnFlag = 1
}
}
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
"taskId": val.TaskId,
... ...
... ... @@ -168,7 +168,7 @@ func (t *TaskAnomaly) IsWarnFlag(taskData *Task, taskRecordData *TaskRecord) boo
WarnFlag: 1,
AssistFlag: 0,
IsLast: 1,
RecordBegin: xtime.DayZeroTime(taskRecordData.CreatedAt).Unix(),
RecordBegin: taskData.CurrentStage.PlanCompletedAt,
NoticeWho: []map[string]string{},
Marks: map[string]string{
"a": "去更新", "b": "去反馈", "c": "找上级", "d": "去辅导",
... ...