...
|
...
|
@@ -895,9 +895,7 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map |
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
taskRecordRepo := factory.CreateTaskRecordRepository(map[string]interface{}{"transactionContext": transactionContext})
|
|
|
//assessContentRepo := factory.CreateStaffAssessContentRepository(map[string]interface{}{
|
|
|
// "transactionContext": transactionContext,
|
|
|
//})
|
|
|
|
|
|
cnt, taskRecordList, err := taskRecordRepo.Find(map[string]interface{}{
|
|
|
"companyId": param.CompanyId,
|
|
|
"taskId": param.TaskId,
|
...
|
...
|
@@ -1194,6 +1192,7 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
|
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
nowDay := xtime.DayEndTime(time.Now()).Unix()
|
|
|
for _, val := range taskListData {
|
|
|
tk := adapter.TaskItem{
|
|
|
Id: val.TaskId,
|
...
|
...
|
@@ -1237,14 +1236,15 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
|
|
if val.WarnFlag > 0 {
|
|
|
tk.WarnFlag = 1
|
|
|
}
|
|
|
if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
//上一个里程碑超期完成
|
|
|
if val.LastStage.Id > 0 && val.LastStage.RealCompletedAt < nowDay {
|
|
|
if val.LastStage.Id > 0 &&
|
|
|
val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt &&
|
|
|
val.CurrentStage.Id > 0 {
|
|
|
//上一个里程碑超期完成,标红
|
|
|
tk.WarnFlag = 1
|
|
|
}
|
|
|
if val.CurrentStage.Id == 0 {
|
|
|
//里程碑已全部完成
|
|
|
tk.WarnFlag = 0
|
|
|
}
|
|
|
|
|
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
|
|
"taskId": val.TaskId,
|
|
|
})
|
...
|
...
|
@@ -1539,14 +1539,6 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
|
|
if tk.WarnFlag > 0 {
|
|
|
tk.WarnFlag = 1
|
|
|
}
|
|
|
if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
|
|
|
//上一个里程碑超期完成
|
|
|
tk.WarnFlag = 1
|
|
|
}
|
|
|
if val.CurrentStage.Id == 0 {
|
|
|
//里程已全部完成
|
|
|
tk.WarnFlag = 0
|
|
|
}
|
|
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
|
|
"taskId": val.TaskId,
|
|
|
})
|
...
|
...
|
@@ -1794,7 +1786,7 @@ func (srv *TaskService) ListTaskIgnore(param *command.SearchTaskCommand) (result |
|
|
taskStageRepo := factory.CreateTaskStageRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
|
|
|
// nowDay := xtime.DayEndTime(time.Now()).Unix()
|
|
|
for _, val := range taskListData {
|
|
|
tk := adapter.TaskItem{
|
|
|
Id: val.TaskId,
|
...
|
...
|
@@ -1830,20 +1822,11 @@ 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)
|
|
|
// 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 {
|
|
|
tk.WarnFlag = 0
|
|
|
}
|
|
|
|
|
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
|
|
|
"taskId": val.TaskId,
|
|
|
})
|
...
|
...
|
|