...
|
...
|
@@ -1243,6 +1243,9 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
|
|
if val.WarnFlag > 0 {
|
|
|
val.WarnFlag = 1
|
|
|
}
|
|
|
if val.CurrentStage.Id == 0 {
|
|
|
tk.WarnFlag = 0
|
|
|
}
|
|
|
// if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
// tk.WarnFlag = int(domain.TaskWarn)
|
|
|
// }
|
...
|
...
|
@@ -1528,6 +1531,12 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
|
|
if val.CurrentStage.RealCompletedAt > 0 {
|
|
|
tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
|
|
|
}
|
|
|
if tk.WarnFlag > 0 {
|
|
|
tk.WarnFlag = 1
|
|
|
}
|
|
|
if val.CurrentStage.Id == 0 {
|
|
|
tk.WarnFlag = 0
|
|
|
}
|
|
|
// if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
// tk.WarnFlag = int(domain.TaskWarn)
|
|
|
// }
|
...
|
...
|
@@ -1779,7 +1788,7 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
|
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
nowTime := time.Now().Unix()
|
|
|
|
|
|
for _, val := range taskListData {
|
|
|
tk := adapter.TaskItem{
|
|
|
Id: val.TaskId,
|
...
|
...
|
@@ -1791,7 +1800,7 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
|
|
LevelName: val.LevelName,
|
|
|
UpdatedAt: val.UpdatedAt.Local().Format("2006-01-02 15:04:05"),
|
|
|
Anomaly: val.Anomaly,
|
|
|
WarnFlag: 0,
|
|
|
WarnFlag: val.WarnFlag,
|
|
|
LastStage: adapter.TaskStage{
|
|
|
Id: val.LastStage.Id,
|
|
|
Name: val.LastStage.Name,
|
...
|
...
|
@@ -1815,13 +1824,19 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
|
|
if val.CurrentStage.RealCompletedAt > 0 {
|
|
|
tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
|
|
|
}
|
|
|
if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
// tk.WarnFlag = int(domain.TaskWarn)
|
|
|
// if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
// // tk.WarnFlag = int(domain.TaskWarn)
|
|
|
// tk.WarnFlag = 1
|
|
|
// }
|
|
|
// if val.CurrentStage.Id > 0 && val.CurrentStage.PlanCompletedAt < nowTime {
|
|
|
// // tk.WarnFlag = int(domain.TaskWarn)
|
|
|
// tk.WarnFlag = 1
|
|
|
// }
|
|
|
if tk.WarnFlag > 0 {
|
|
|
tk.WarnFlag = 1
|
|
|
}
|
|
|
if val.CurrentStage.Id > 0 && val.CurrentStage.PlanCompletedAt < nowTime {
|
|
|
// tk.WarnFlag = int(domain.TaskWarn)
|
|
|
tk.WarnFlag = 1
|
|
|
if val.CurrentStage.Id == 0 {
|
|
|
tk.WarnFlag = 0
|
|
|
}
|
|
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
|
|
"taskId": val.TaskId,
|
...
|
...
|
|