|
@@ -1185,7 +1185,6 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
|
@@ -1185,7 +1185,6 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
1185
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
1185
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
1186
|
"transactionContext": transactionContext,
|
1186
|
"transactionContext": transactionContext,
|
1187
|
})
|
1187
|
})
|
1188
|
- nowTime := time.Now().Unix()
|
|
|
1189
|
for _, val := range taskListData {
|
1188
|
for _, val := range taskListData {
|
1190
|
tk := adapter.TaskItem{
|
1189
|
tk := adapter.TaskItem{
|
1191
|
Id: val.TaskId,
|
1190
|
Id: val.TaskId,
|
|
@@ -1197,7 +1196,7 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
|
@@ -1197,7 +1196,7 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
1197
|
LevelName: val.LevelName,
|
1196
|
LevelName: val.LevelName,
|
1198
|
UpdatedAt: val.UpdatedAt.Local().Format("2006-01-02 15:04:05"),
|
1197
|
UpdatedAt: val.UpdatedAt.Local().Format("2006-01-02 15:04:05"),
|
1199
|
Anomaly: val.Anomaly,
|
1198
|
Anomaly: val.Anomaly,
|
1200
|
- WarnFlag: 0,
|
1199
|
+ WarnFlag: val.WarnFlag,
|
1201
|
LastStage: adapter.TaskStage{
|
1200
|
LastStage: adapter.TaskStage{
|
1202
|
Id: val.LastStage.Id,
|
1201
|
Id: val.LastStage.Id,
|
1203
|
Name: val.LastStage.Name,
|
1202
|
Name: val.LastStage.Name,
|
|
@@ -1226,12 +1225,12 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
|
@@ -1226,12 +1225,12 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
1226
|
if val.CurrentStage.RealCompletedAt > 0 {
|
1225
|
if val.CurrentStage.RealCompletedAt > 0 {
|
1227
|
tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
|
1226
|
tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
|
1228
|
}
|
1227
|
}
|
1229
|
- if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
1230
|
- tk.WarnFlag = int(domain.TaskWarn)
|
|
|
1231
|
- }
|
|
|
1232
|
- if val.CurrentStage.Id > 0 && val.CurrentStage.PlanCompletedAt < nowTime {
|
|
|
1233
|
- tk.WarnFlag = int(domain.TaskWarn)
|
|
|
1234
|
- }
|
1228
|
+ // if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
1229
|
+ // tk.WarnFlag = int(domain.TaskWarn)
|
|
|
1230
|
+ // }
|
|
|
1231
|
+ // if val.CurrentStage.Id > 0 && val.CurrentStage.PlanCompletedAt < nowTime {
|
|
|
1232
|
+ // tk.WarnFlag = int(domain.TaskWarn)
|
|
|
1233
|
+ // }
|
1235
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
1234
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
1236
|
"taskId": val.TaskId,
|
1235
|
"taskId": val.TaskId,
|
1237
|
})
|
1236
|
})
|
|
@@ -1468,7 +1467,6 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
|
@@ -1468,7 +1467,6 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
1468
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
1467
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
1469
|
"transactionContext": transactionContext,
|
1468
|
"transactionContext": transactionContext,
|
1470
|
})
|
1469
|
})
|
1471
|
- nowTime := time.Now().Unix()
|
|
|
1472
|
for _, val := range taskListData {
|
1470
|
for _, val := range taskListData {
|
1473
|
tk := adapter.TaskItem{
|
1471
|
tk := adapter.TaskItem{
|
1474
|
Id: val.TaskId,
|
1472
|
Id: val.TaskId,
|
|
@@ -1480,7 +1478,7 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
|
@@ -1480,7 +1478,7 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
1480
|
LevelName: val.LevelName,
|
1478
|
LevelName: val.LevelName,
|
1481
|
UpdatedAt: val.UpdatedAt.Local().Format("2006-01-02 15:04:05"),
|
1479
|
UpdatedAt: val.UpdatedAt.Local().Format("2006-01-02 15:04:05"),
|
1482
|
Anomaly: val.Anomaly,
|
1480
|
Anomaly: val.Anomaly,
|
1483
|
- WarnFlag: 0,
|
1481
|
+ WarnFlag: val.WarnFlag,
|
1484
|
LastStage: adapter.TaskStage{
|
1482
|
LastStage: adapter.TaskStage{
|
1485
|
Id: val.LastStage.Id,
|
1483
|
Id: val.LastStage.Id,
|
1486
|
Name: val.LastStage.Name,
|
1484
|
Name: val.LastStage.Name,
|
|
@@ -1505,12 +1503,12 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
|
@@ -1505,12 +1503,12 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
1505
|
if val.CurrentStage.RealCompletedAt > 0 {
|
1503
|
if val.CurrentStage.RealCompletedAt > 0 {
|
1506
|
tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
|
1504
|
tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
|
1507
|
}
|
1505
|
}
|
1508
|
- if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
1509
|
- tk.WarnFlag = int(domain.TaskWarn)
|
|
|
1510
|
- }
|
|
|
1511
|
- if val.CurrentStage.Id > 0 && val.CurrentStage.PlanCompletedAt < nowTime {
|
|
|
1512
|
- tk.WarnFlag = int(domain.TaskWarn)
|
|
|
1513
|
- }
|
1506
|
+ // if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
1507
|
+ // tk.WarnFlag = int(domain.TaskWarn)
|
|
|
1508
|
+ // }
|
|
|
1509
|
+ // if val.CurrentStage.Id > 0 && val.CurrentStage.PlanCompletedAt < nowTime {
|
|
|
1510
|
+ // tk.WarnFlag = int(domain.TaskWarn)
|
|
|
1511
|
+ // }
|
1514
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
1512
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
1515
|
"taskId": val.TaskId,
|
1513
|
"taskId": val.TaskId,
|
1516
|
})
|
1514
|
})
|