作者 郑周

1. 任务详情列表 判断当天的话,状态默认设置为正常

... ... @@ -917,10 +917,6 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map
nowDay := time.Now().Format("2006-01-02")
for _, val := range taskRecordList {
recordCreatedAt := val.CreatedAt.Local().Format("2006-01-02")
if nowDay == recordCreatedAt && val.AnomalyState != domain.AnomalyState1 {
cnt = cnt - 1
continue
}
item := adapter.TaskRecordAdapter{
Id: val.Id,
StaffAssessId: val.StaffAssessId,
... ... @@ -946,6 +942,9 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map
if val.AnomalyState == domain.AnomalyStateInit {
item.AnomalyState = domain.AnomalyState0
}
if nowDay == recordCreatedAt {
item.AnomalyState = domain.AnomalyState1
}
t1 := time.Unix(val.TaskStageCheck.PlanCompletedAt, 0).Local().Format("2006-01-02")
item.TaskStageCheck.PlanCompletedAt = t1
if val.TaskStageCheck.RealCompletedAt > 0 {
... ...