Commit a6e004f8 authored by cq990612's avatar cq990612

优化代码结构

parent 5f6bbdd9
...@@ -61,7 +61,5 @@ public class WorkTimeOrderDto { ...@@ -61,7 +61,5 @@ public class WorkTimeOrderDto {
@ApiModelProperty(name = "isOvertime",value = "0:正常工时,1:加班") @ApiModelProperty(name = "isOvertime",value = "0:正常工时,1:加班")
private Integer isOvertime; private Integer isOvertime;
@JsonFormat(shape=JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "modifyTime", value = "工单修改时间")
private Date modifyTime;
} }
...@@ -238,7 +238,9 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -238,7 +238,9 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
} }
if (REJECTED.equals(dto.getStatus()) || RE_SUBMIT.equals(dto.getStatus())) { if (REJECTED.equals(dto.getStatus()) || RE_SUBMIT.equals(dto.getStatus())) {
if (date.getTime() - dto.getModifyTime().getTime() > submitTime * 24 * 60 * 60 * 1000) { Date modifyTime = DateUtil.convertStrToDate(DateUtil.convertDateToStr(workTimeOrderMapper.selectById(dto.getWorkId()).getModifyTime(), "yyyy-MM-dd"), "yyyy-MM-dd");
System.out.println(modifyTime);
if (date.getTime() - modifyTime.getTime() > submitTime * 24 * 60 * 60 * 1000) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.WORK_DAY_THAN_DATE); throw new BaseCustomException(BASE_RESP_CODE_ENUM.WORK_DAY_THAN_DATE);
} }
} }
...@@ -768,9 +770,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -768,9 +770,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
if (thanDate(dto.getWorkDay())) { if (thanDate(dto.getWorkDay())) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.WORK_TIME_OVER_NOW_DAY); throw new BaseCustomException(BASE_RESP_CODE_ENUM.WORK_TIME_OVER_NOW_DAY);
} }
if (1 == dto.getType() || 2 == dto.getType() && null == dto.getProjectId()) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.NO_JOIN_EVERY_PROJECT_PLASE_JION);
}
for (ProjectTypeEnum value : ProjectTypeEnum.values()) { for (ProjectTypeEnum value : ProjectTypeEnum.values()) {
if (value.getReviewer() == 2) { if (value.getReviewer() == 2) {
if (dto.getType().equals(value.getType())) { if (dto.getType().equals(value.getType())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment