|
@@ -1243,6 +1243,9 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
|
@@ -1243,6 +1243,9 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
1243
|
if val.WarnFlag > 0 {
|
1243
|
if val.WarnFlag > 0 {
|
1244
|
val.WarnFlag = 1
|
1244
|
val.WarnFlag = 1
|
1245
|
}
|
1245
|
}
|
|
|
1246
|
+ if val.CurrentStage.Id == 0 {
|
|
|
1247
|
+ tk.WarnFlag = 0
|
|
|
1248
|
+ }
|
1246
|
// if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
1249
|
// if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
1247
|
// tk.WarnFlag = int(domain.TaskWarn)
|
1250
|
// tk.WarnFlag = int(domain.TaskWarn)
|
1248
|
// }
|
1251
|
// }
|
|
@@ -1528,6 +1531,12 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
|
@@ -1528,6 +1531,12 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
1528
|
if val.CurrentStage.RealCompletedAt > 0 {
|
1531
|
if val.CurrentStage.RealCompletedAt > 0 {
|
1529
|
tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
|
1532
|
tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
|
1530
|
}
|
1533
|
}
|
|
|
1534
|
+ if tk.WarnFlag > 0 {
|
|
|
1535
|
+ tk.WarnFlag = 1
|
|
|
1536
|
+ }
|
|
|
1537
|
+ if val.CurrentStage.Id == 0 {
|
|
|
1538
|
+ tk.WarnFlag = 0
|
|
|
1539
|
+ }
|
1531
|
// if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
1540
|
// if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
1532
|
// tk.WarnFlag = int(domain.TaskWarn)
|
1541
|
// tk.WarnFlag = int(domain.TaskWarn)
|
1533
|
// }
|
1542
|
// }
|
|
@@ -1779,7 +1788,7 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
|
@@ -1779,7 +1788,7 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
1779
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
1788
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
1780
|
"transactionContext": transactionContext,
|
1789
|
"transactionContext": transactionContext,
|
1781
|
})
|
1790
|
})
|
1782
|
- nowTime := time.Now().Unix()
|
1791
|
+
|
1783
|
for _, val := range taskListData {
|
1792
|
for _, val := range taskListData {
|
1784
|
tk := adapter.TaskItem{
|
1793
|
tk := adapter.TaskItem{
|
1785
|
Id: val.TaskId,
|
1794
|
Id: val.TaskId,
|
|
@@ -1791,7 +1800,7 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
|
@@ -1791,7 +1800,7 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
1791
|
LevelName: val.LevelName,
|
1800
|
LevelName: val.LevelName,
|
1792
|
UpdatedAt: val.UpdatedAt.Local().Format("2006-01-02 15:04:05"),
|
1801
|
UpdatedAt: val.UpdatedAt.Local().Format("2006-01-02 15:04:05"),
|
1793
|
Anomaly: val.Anomaly,
|
1802
|
Anomaly: val.Anomaly,
|
1794
|
- WarnFlag: 0,
|
1803
|
+ WarnFlag: val.WarnFlag,
|
1795
|
LastStage: adapter.TaskStage{
|
1804
|
LastStage: adapter.TaskStage{
|
1796
|
Id: val.LastStage.Id,
|
1805
|
Id: val.LastStage.Id,
|
1797
|
Name: val.LastStage.Name,
|
1806
|
Name: val.LastStage.Name,
|
|
@@ -1815,13 +1824,19 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
|
@@ -1815,13 +1824,19 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
1815
|
if val.CurrentStage.RealCompletedAt > 0 {
|
1824
|
if val.CurrentStage.RealCompletedAt > 0 {
|
1816
|
tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
|
1825
|
tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
|
1817
|
}
|
1826
|
}
|
1818
|
- if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
1819
|
- // tk.WarnFlag = int(domain.TaskWarn)
|
1827
|
+ // if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
1828
|
+ // // tk.WarnFlag = int(domain.TaskWarn)
|
|
|
1829
|
+ // tk.WarnFlag = 1
|
|
|
1830
|
+ // }
|
|
|
1831
|
+ // if val.CurrentStage.Id > 0 && val.CurrentStage.PlanCompletedAt < nowTime {
|
|
|
1832
|
+ // // tk.WarnFlag = int(domain.TaskWarn)
|
|
|
1833
|
+ // tk.WarnFlag = 1
|
|
|
1834
|
+ // }
|
|
|
1835
|
+ if tk.WarnFlag > 0 {
|
1820
|
tk.WarnFlag = 1
|
1836
|
tk.WarnFlag = 1
|
1821
|
}
|
1837
|
}
|
1822
|
- if val.CurrentStage.Id > 0 && val.CurrentStage.PlanCompletedAt < nowTime {
|
|
|
1823
|
- // tk.WarnFlag = int(domain.TaskWarn)
|
|
|
1824
|
- tk.WarnFlag = 1
|
1838
|
+ if val.CurrentStage.Id == 0 {
|
|
|
1839
|
+ tk.WarnFlag = 0
|
1825
|
}
|
1840
|
}
|
1826
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
1841
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
1827
|
"taskId": val.TaskId,
|
1842
|
"taskId": val.TaskId,
|