提交 6fdd1720 authored 作者: 李秋林's avatar 李秋林

城市经理限制创建计划时间先取消,5月再上

上级 72b4bd66
...@@ -167,13 +167,13 @@ public class PromPlanCoreController { ...@@ -167,13 +167,13 @@ public class PromPlanCoreController {
throw new ParamException(RCode.ACTIVITY_PLAN_EMPLOYEE_ERROR); throw new ParamException(RCode.ACTIVITY_PLAN_EMPLOYEE_ERROR);
} }
LocalDate localDate = operVo.getDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); LocalDate localDate = operVo.getDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
LocalDate nextMonthValue = LocalDate.now().plusMonths(1); // LocalDate nextMonthValue = LocalDate.now().plusMonths(1);
if (operVo.getEmployeeNo().equals(operVo.getOperNo()) && ( // if (operVo.getEmployeeNo().equals(operVo.getOperNo()) && (
!YearMonth.from(localDate).equals(YearMonth.from(nextMonthValue)) // !YearMonth.from(localDate).equals(YearMonth.from(nextMonthValue))
)) { // )) {
throw new ParamException(RCode.NEXT_MONTH_PLAN_CREATE_ERROR); // throw new ParamException(RCode.NEXT_MONTH_PLAN_CREATE_ERROR);
} // }
// 上下班时间补充日期部分 // 上下班时间补充日期部分
operVo.setClockInTime(LocalDateTime.of(localDate,operVo.getInTime())); operVo.setClockInTime(LocalDateTime.of(localDate,operVo.getInTime()));
operVo.setClockOutTime(LocalDateTime.of(localDate,operVo.getOutTime())); operVo.setClockOutTime(LocalDateTime.of(localDate,operVo.getOutTime()));
......
...@@ -212,7 +212,7 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService { ...@@ -212,7 +212,7 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService {
LocalDate planDate = LocalDate.of(year, month, day); LocalDate planDate = LocalDate.of(year, month, day);
// && monthInt != monthValue // && monthInt != monthValue
if (monthInt != nextMonthValue) { if (monthInt != nextMonthValue && monthInt != monthValue) {
dto.setErrorMsg("月份只能是次月;"); dto.setErrorMsg("月份只能是次月;");
} else if (planDate.isBefore(LocalDate.now())) { } else if (planDate.isBefore(LocalDate.now())) {
dto.setErrorMsg("日期不能是以前;"); dto.setErrorMsg("日期不能是以前;");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论