作者 tangxvhui

修复bug ,任务列表标红

@@ -1235,17 +1235,11 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i @@ -1235,17 +1235,11 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i
1235 tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02") 1235 tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
1236 } 1236 }
1237 if val.WarnFlag > 0 { 1237 if val.WarnFlag > 0 {
1238 - val.WarnFlag = 1 1238 + tk.WarnFlag = 1
1239 } 1239 }
1240 if val.CurrentStage.Id == 0 { 1240 if val.CurrentStage.Id == 0 {
1241 tk.WarnFlag = 0 1241 tk.WarnFlag = 0
1242 } 1242 }
1243 - // if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {  
1244 - // tk.WarnFlag = int(domain.TaskWarn)  
1245 - // }  
1246 - // if val.CurrentStage.Id > 0 && val.CurrentStage.PlanCompletedAt < nowTime {  
1247 - // tk.WarnFlag = int(domain.TaskWarn)  
1248 - // }  
1249 _, stageList, err := taskStageRepo.Find(map[string]interface{}{ 1243 _, stageList, err := taskStageRepo.Find(map[string]interface{}{
1250 "taskId": val.TaskId, 1244 "taskId": val.TaskId,
1251 }) 1245 })
@@ -180,7 +180,7 @@ func (t *TaskAnomaly) IsWarnFlag(taskData *Task, taskRecordData *TaskRecord) boo @@ -180,7 +180,7 @@ func (t *TaskAnomaly) IsWarnFlag(taskData *Task, taskRecordData *TaskRecord) boo
180 180
181 // 检查是否是辅导异常, 181 // 检查是否是辅导异常,
182 func (t *TaskAnomaly) IsAssistFlag(taskData *Task, taskRecordData *TaskRecord) bool { 182 func (t *TaskAnomaly) IsAssistFlag(taskData *Task, taskRecordData *TaskRecord) bool {
183 - if taskData.AssistFlag < taskData.AssistFlagMax { 183 + if taskData.AssistFlag <= taskData.AssistFlagMax {
184 return false 184 return false
185 } 185 }
186 *t = TaskAnomaly{ 186 *t = TaskAnomaly{
@@ -9,7 +9,7 @@ import ( @@ -9,7 +9,7 @@ import (
9 func TestGenerateToken(t *testing.T) { 9 func TestGenerateToken(t *testing.T) {
10 ut := UserAuth{ 10 ut := UserAuth{
11 CompanyId: 8, 11 CompanyId: 8,
12 - UserId: 3422174102828544, 12 + UserId: 3422185340122624,
13 Phone: "13066667710", 13 Phone: "13066667710",
14 PlatformId: 29, 14 PlatformId: 29,
15 AdminType: 1, 15 AdminType: 1,