|
|
@@ -3,9 +3,11 @@ package com.xunmei.core.safetyCheck.vo.regsiter;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|
|
+import com.xunmei.common.core.utils.DateUtils;
|
|
|
import com.xunmei.common.core.vo.IdNameVo;
|
|
|
import com.xunmei.core.safetyCheck.domain.CoreSafetyTask;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
@@ -84,6 +86,9 @@ public class TaskRegisterVo<T> {
|
|
|
@ApiModelProperty
|
|
|
private String submitBy;
|
|
|
|
|
|
+ @ApiModelProperty(value = "为1时,表示可登记,其它值均表示不能登记")
|
|
|
+ private Integer inRegisterTime;
|
|
|
+
|
|
|
@ApiModelProperty(value = "检查列表")
|
|
|
private List<T> checkList;
|
|
|
|
|
|
@@ -107,6 +112,12 @@ public class TaskRegisterVo<T> {
|
|
|
vo.setGrantUserId(task.getGrantUserId());
|
|
|
vo.setExceptionCount(task.getExceptionCount().intValue());
|
|
|
vo.setSubmitBy(task.getSubmitBy());
|
|
|
+
|
|
|
+ Date date=DateUtil.beginOfDay(new Date());
|
|
|
+ Date planStartDate=DateUtil.beginOfDay(task.getPlanStartTime());
|
|
|
+ Date planEndDate=DateUtil.beginOfDay(task.getPlanEndTime());
|
|
|
+ vo.setInRegisterTime((planStartDate.before(date) && planEndDate.after(date) || date.getTime()==planStartDate.getTime())?1:0);
|
|
|
+
|
|
|
return vo;
|
|
|
}
|
|
|
}
|