作者 tangxvhui

修复bug ,任务列表标红

... ... @@ -1235,17 +1235,11 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i
tk.CurrentStage.RealCompletedAt = time.Unix(int64(val.CurrentStage.RealCompletedAt), 0).Local().Format("2006-01-02")
}
if val.WarnFlag > 0 {
val.WarnFlag = 1
tk.WarnFlag = 1
}
if val.CurrentStage.Id == 0 {
tk.WarnFlag = 0
}
// if val.LastStage.Id > 0 && val.LastStage.PlanCompletedAt < val.LastStage.RealCompletedAt {
// tk.WarnFlag = int(domain.TaskWarn)
// }
// if val.CurrentStage.Id > 0 && val.CurrentStage.PlanCompletedAt < nowTime {
// tk.WarnFlag = int(domain.TaskWarn)
// }
_, stageList, err := taskStageRepo.Find(map[string]interface{}{
"taskId": val.TaskId,
})
... ...
... ... @@ -180,7 +180,7 @@ func (t *TaskAnomaly) IsWarnFlag(taskData *Task, taskRecordData *TaskRecord) boo
// 检查是否是辅导异常,
func (t *TaskAnomaly) IsAssistFlag(taskData *Task, taskRecordData *TaskRecord) bool {
if taskData.AssistFlag < taskData.AssistFlagMax {
if taskData.AssistFlag <= taskData.AssistFlagMax {
return false
}
*t = TaskAnomaly{
... ...
... ... @@ -9,7 +9,7 @@ import (
func TestGenerateToken(t *testing.T) {
ut := UserAuth{
CompanyId: 8,
UserId: 3422174102828544,
UserId: 3422185340122624,
Phone: "13066667710",
PlatformId: 29,
AdminType: 1,
... ...