正在显示
4 个修改的文件
包含
19 行增加
和
15 行删除
@@ -460,10 +460,9 @@ func (srv StaffAssessServeice) buildTaskRecord(staffAssess *domain.StaffAssess) | @@ -460,10 +460,9 @@ func (srv StaffAssessServeice) buildTaskRecord(staffAssess *domain.StaffAssess) | ||
460 | continue | 460 | continue |
461 | } | 461 | } |
462 | if taskList[0].UseEndTime == 1 { | 462 | if taskList[0].UseEndTime == 1 { |
463 | - if staffAssess.BeginTime.Unix() > taskList[0].EndTime { | 463 | + if staffAssess.BeginTime.Local().Unix() > taskList[0].EndTime { |
464 | continue | 464 | continue |
465 | } | 465 | } |
466 | - | ||
467 | } | 466 | } |
468 | //获取里程碑数据 | 467 | //获取里程碑数据 |
469 | _, taskStageList, err := taskStageRepo.Find(map[string]interface{}{ | 468 | _, taskStageList, err := taskStageRepo.Find(map[string]interface{}{ |
@@ -30,20 +30,21 @@ func (t *TaskItem) GenStatusDescript() { | @@ -30,20 +30,21 @@ func (t *TaskItem) GenStatusDescript() { | ||
30 | if domain.TaskState(t.Status) == domain.TaskRunning { | 30 | if domain.TaskState(t.Status) == domain.TaskRunning { |
31 | statusNamed = "进行中" | 31 | statusNamed = "进行中" |
32 | } | 32 | } |
33 | - if t.CurrentStage.Id == 0 && t.LastStage.PlanCompletedAt < t.LastStage.RealCompletedAt { | ||
34 | - statusNamed = "逾期完成" | 33 | + if t.Anomaly > 0 { |
34 | + statusNamed = "反馈异常" | ||
35 | } | 35 | } |
36 | - if t.CurrentStage.Id == 0 && t.LastStage.PlanCompletedAt >= t.LastStage.RealCompletedAt { | ||
37 | - statusNamed = "如期完成" | 36 | + if domain.TaskWarnFlag(t.WarnFlag) == domain.TaskWarn { |
37 | + statusNamed = "里程碑异常" | ||
38 | } | 38 | } |
39 | if domain.TaskState(t.Status) == domain.TaskStop { | 39 | if domain.TaskState(t.Status) == domain.TaskStop { |
40 | statusNamed = "已停止" | 40 | statusNamed = "已停止" |
41 | } | 41 | } |
42 | - if domain.TaskWarnFlag(t.WarnFlag) == domain.TaskWarn { | ||
43 | - statusNamed = "里程碑异常" | 42 | + if t.CurrentStage.Id == 0 && t.LastStage.PlanCompletedAt < t.LastStage.RealCompletedAt { |
43 | + statusNamed = "逾期完成" | ||
44 | } | 44 | } |
45 | - if t.Anomaly > 0 { | ||
46 | - statusNamed = "反馈异常" | 45 | + if t.CurrentStage.Id == 0 && t.LastStage.PlanCompletedAt >= t.LastStage.RealCompletedAt { |
46 | + statusNamed = "如期完成" | ||
47 | } | 47 | } |
48 | + | ||
48 | t.StatusDescript = statusNamed | 49 | t.StatusDescript = statusNamed |
49 | } | 50 | } |
@@ -67,9 +67,7 @@ func checkTaskRecord(param *domain.TaskRecord) error { | @@ -67,9 +67,7 @@ func checkTaskRecord(param *domain.TaskRecord) error { | ||
67 | } else { | 67 | } else { |
68 | taskData.Anomaly = 0 | 68 | taskData.Anomaly = 0 |
69 | } | 69 | } |
70 | - // if param.CanTaskAnomaly() { | ||
71 | - // taskData.Anomaly = 0 | ||
72 | - // } | 70 | + |
73 | err = taskRepo.Save(taskData) | 71 | err = taskRepo.Save(taskData) |
74 | if err != nil { | 72 | if err != nil { |
75 | return fmt.Errorf("保存任务数据:%s", err) | 73 | return fmt.Errorf("保存任务数据:%s", err) |
@@ -160,7 +160,10 @@ func (d *TaskDao) CountTaskStageAnomalyNotHrbp(param ListTaskCondition) (int, er | @@ -160,7 +160,10 @@ func (d *TaskDao) CountTaskStageAnomalyNotHrbp(param ListTaskCondition) (int, er | ||
160 | and task.company_id =? | 160 | and task.company_id =? |
161 | and task.deleted_at isnull | 161 | and task.deleted_at isnull |
162 | and ( | 162 | and ( |
163 | - cast(COALESCE(task.current_stage ->>'planCompletedAt','0') as int)<floor(extract(epoch from now())) | 163 | + ( |
164 | + cast(COALESCE(task.current_stage ->>'planCompletedAt','0') as int)>0 and | ||
165 | + cast(COALESCE(task.current_stage ->>'planCompletedAt','0') as int)<floor(extract(epoch from now())) | ||
166 | + ) | ||
164 | or | 167 | or |
165 | task.warn_flag = 1 | 168 | task.warn_flag = 1 |
166 | ) | 169 | ) |
@@ -199,7 +202,10 @@ func (d *TaskDao) CountTaskStageAnomalyByHrbp(param ListTaskCondition) (int, err | @@ -199,7 +202,10 @@ func (d *TaskDao) CountTaskStageAnomalyByHrbp(param ListTaskCondition) (int, err | ||
199 | and task.deleted_at isnull | 202 | and task.deleted_at isnull |
200 | and t_task_ignore.id isnull | 203 | and t_task_ignore.id isnull |
201 | and ( | 204 | and ( |
202 | - cast(COALESCE(task.current_stage ->>'planCompletedAt','0') as int)<floor(extract(epoch from now())) | 205 | + ( |
206 | + cast(COALESCE(task.current_stage ->>'planCompletedAt','0') as int)>0 and | ||
207 | + cast(COALESCE(task.current_stage ->>'planCompletedAt','0') as int)<floor(extract(epoch from now())) | ||
208 | + ) | ||
203 | or | 209 | or |
204 | task.warn_flag = 1 | 210 | task.warn_flag = 1 |
205 | )` | 211 | )` |
-
请 注册 或 登录 后发表评论