作者 tangxvhui

调整 异常的判定逻辑

@@ -143,7 +143,6 @@ func anomalyIsWarnFlag(transactionContext application.TransactionContext, taskAn @@ -143,7 +143,6 @@ func anomalyIsWarnFlag(transactionContext application.TransactionContext, taskAn
143 }) 143 })
144 if len(oldAnomaly) > 0 { 144 if len(oldAnomaly) > 0 {
145 taskAnomalyData.WarnFlag = oldAnomaly[0].WarnFlag + 1 145 taskAnomalyData.WarnFlag = oldAnomaly[0].WarnFlag + 1
146 - taskAnomalyData.RecordBegin = oldAnomaly[0].RecordBegin  
147 for i := range oldAnomaly { 146 for i := range oldAnomaly {
148 oldAnomaly[i].IsLast = 2 147 oldAnomaly[i].IsLast = 2
149 err = taskAnomalyRepo.Save(oldAnomaly[i]) 148 err = taskAnomalyRepo.Save(oldAnomaly[i])
@@ -1192,7 +1192,6 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i @@ -1192,7 +1192,6 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i
1192 taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{ 1192 taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
1193 "transactionContext": transactionContext, 1193 "transactionContext": transactionContext,
1194 }) 1194 })
1195 - nowDay := xtime.DayEndTime(time.Now()).Unix()  
1196 for _, val := range taskListData { 1195 for _, val := range taskListData {
1197 tk := adapter.TaskItem{ 1196 tk := adapter.TaskItem{
1198 Id: val.TaskId, 1197 Id: val.TaskId,
@@ -1236,14 +1235,6 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i @@ -1236,14 +1235,6 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i
1236 if val.WarnFlag > 0 { 1235 if val.WarnFlag > 0 {
1237 tk.WarnFlag = 1 1236 tk.WarnFlag = 1
1238 } 1237 }
1239 - if val.LastStage.Id > 0 && val.LastStage.RealCompletedAt < nowDay {  
1240 - if val.LastStage.Id > 0 &&  
1241 - val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt &&  
1242 - val.CurrentStage.Id > 0 {  
1243 - //上一个里程碑超期完成,标红  
1244 - tk.WarnFlag = 1  
1245 - }  
1246 - }  
1247 1238
1248 _, stageList, err := taskStageRepo.Find(map[string]interface{}{ 1239 _, stageList, err := taskStageRepo.Find(map[string]interface{}{
1249 "taskId": val.TaskId, 1240 "taskId": val.TaskId,
@@ -168,7 +168,7 @@ func (t *TaskAnomaly) IsWarnFlag(taskData *Task, taskRecordData *TaskRecord) boo @@ -168,7 +168,7 @@ func (t *TaskAnomaly) IsWarnFlag(taskData *Task, taskRecordData *TaskRecord) boo
168 WarnFlag: 1, 168 WarnFlag: 1,
169 AssistFlag: 0, 169 AssistFlag: 0,
170 IsLast: 1, 170 IsLast: 1,
171 - RecordBegin: xtime.DayZeroTime(taskRecordData.CreatedAt).Unix(), 171 + RecordBegin: taskData.CurrentStage.PlanCompletedAt,
172 NoticeWho: []map[string]string{}, 172 NoticeWho: []map[string]string{},
173 Marks: map[string]string{ 173 Marks: map[string]string{
174 "a": "去更新", "b": "去反馈", "c": "找上级", "d": "去辅导", 174 "a": "去更新", "b": "去反馈", "c": "找上级", "d": "去辅导",