|
@@ -895,9 +895,7 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map |
|
@@ -895,9 +895,7 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map |
895
|
_ = transactionContext.RollbackTransaction()
|
895
|
_ = transactionContext.RollbackTransaction()
|
896
|
}()
|
896
|
}()
|
897
|
taskRecordRepo := factory.CreateTaskRecordRepository(map[string]interface{}{"transactionContext": transactionContext})
|
897
|
taskRecordRepo := factory.CreateTaskRecordRepository(map[string]interface{}{"transactionContext": transactionContext})
|
898
|
- //assessContentRepo := factory.CreateStaffAssessContentRepository(map[string]interface{}{
|
|
|
899
|
- // "transactionContext": transactionContext,
|
|
|
900
|
- //})
|
898
|
+
|
901
|
cnt, taskRecordList, err := taskRecordRepo.Find(map[string]interface{}{
|
899
|
cnt, taskRecordList, err := taskRecordRepo.Find(map[string]interface{}{
|
902
|
"companyId": param.CompanyId,
|
900
|
"companyId": param.CompanyId,
|
903
|
"taskId": param.TaskId,
|
901
|
"taskId": param.TaskId,
|
|
@@ -1194,6 +1192,7 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
|
@@ -1194,6 +1192,7 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
1194
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
1192
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
1195
|
"transactionContext": transactionContext,
|
1193
|
"transactionContext": transactionContext,
|
1196
|
})
|
1194
|
})
|
|
|
1195
|
+ nowDay := xtime.DayEndTime(time.Now()).Unix()
|
1197
|
for _, val := range taskListData {
|
1196
|
for _, val := range taskListData {
|
1198
|
tk := adapter.TaskItem{
|
1197
|
tk := adapter.TaskItem{
|
1199
|
Id: val.TaskId,
|
1198
|
Id: val.TaskId,
|
|
@@ -1237,14 +1236,15 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
|
@@ -1237,14 +1236,15 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
1237
|
if val.WarnFlag > 0 {
|
1236
|
if val.WarnFlag > 0 {
|
1238
|
tk.WarnFlag = 1
|
1237
|
tk.WarnFlag = 1
|
1239
|
}
|
1238
|
}
|
1240
|
- if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
1241
|
- //上一个里程碑超期完成
|
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
|
+ //上一个里程碑超期完成,标红
|
1242
|
tk.WarnFlag = 1
|
1244
|
tk.WarnFlag = 1
|
1243
|
}
|
1245
|
}
|
1244
|
- if val.CurrentStage.Id == 0 {
|
|
|
1245
|
- //里程碑已全部完成
|
|
|
1246
|
- tk.WarnFlag = 0
|
|
|
1247
|
}
|
1246
|
}
|
|
|
1247
|
+
|
1248
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
1248
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
1249
|
"taskId": val.TaskId,
|
1249
|
"taskId": val.TaskId,
|
1250
|
})
|
1250
|
})
|
|
@@ -1539,14 +1539,6 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
|
@@ -1539,14 +1539,6 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
1539
|
if tk.WarnFlag > 0 {
|
1539
|
if tk.WarnFlag > 0 {
|
1540
|
tk.WarnFlag = 1
|
1540
|
tk.WarnFlag = 1
|
1541
|
}
|
1541
|
}
|
1542
|
- if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
1543
|
- //上一个里程碑超期完成
|
|
|
1544
|
- tk.WarnFlag = 1
|
|
|
1545
|
- }
|
|
|
1546
|
- if val.CurrentStage.Id == 0 {
|
|
|
1547
|
- //里程已全部完成
|
|
|
1548
|
- tk.WarnFlag = 0
|
|
|
1549
|
- }
|
|
|
1550
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
1542
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
1551
|
"taskId": val.TaskId,
|
1543
|
"taskId": val.TaskId,
|
1552
|
})
|
1544
|
})
|
|
@@ -1794,7 +1786,7 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
|
@@ -1794,7 +1786,7 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
1794
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
1786
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
1795
|
"transactionContext": transactionContext,
|
1787
|
"transactionContext": transactionContext,
|
1796
|
})
|
1788
|
})
|
1797
|
-
|
1789
|
+ // nowDay := xtime.DayEndTime(time.Now()).Unix()
|
1798
|
for _, val := range taskListData {
|
1790
|
for _, val := range taskListData {
|
1799
|
tk := adapter.TaskItem{
|
1791
|
tk := adapter.TaskItem{
|
1800
|
Id: val.TaskId,
|
1792
|
Id: val.TaskId,
|
|
@@ -1830,20 +1822,11 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
|
@@ -1830,20 +1822,11 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
1830
|
if val.CurrentStage.RealCompletedAt > 0 {
|
1822
|
if val.CurrentStage.RealCompletedAt > 0 {
|
1831
|
tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
|
1823
|
tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
|
1832
|
}
|
1824
|
}
|
1833
|
- // if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
1834
|
- // // tk.WarnFlag = int(domain.TaskWarn)
|
|
|
1835
|
- // tk.WarnFlag = 1
|
|
|
1836
|
- // }
|
|
|
1837
|
- // if val.CurrentStage.Id > 0 && val.CurrentStage.PlanCompletedAt < nowTime {
|
|
|
1838
|
- // // tk.WarnFlag = int(domain.TaskWarn)
|
|
|
1839
|
- // tk.WarnFlag = 1
|
|
|
1840
|
- // }
|
1825
|
+
|
1841
|
if tk.WarnFlag > 0 {
|
1826
|
if tk.WarnFlag > 0 {
|
1842
|
tk.WarnFlag = 1
|
1827
|
tk.WarnFlag = 1
|
1843
|
}
|
1828
|
}
|
1844
|
- if val.CurrentStage.Id == 0 {
|
|
|
1845
|
- tk.WarnFlag = 0
|
|
|
1846
|
- }
|
1829
|
+
|
1847
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
1830
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
1848
|
"taskId": val.TaskId,
|
1831
|
"taskId": val.TaskId,
|
1849
|
})
|
1832
|
})
|