提交 fff5a5ee authored 作者: 000516's avatar 000516 提交者: Coding

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

Merge Request: 城市经理限制创建计划时间先取消,5月再上 Created By: @李秋林 Accepted By: @李秋林 URL: https://g-pkkp8204.coding.net/p/promotion/d/promotion-service/git/merge/271?initial=true
......@@ -19,7 +19,6 @@ import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.YearMonth;
import java.time.ZoneId;
import java.util.Date;
import java.util.Map;
import java.util.Objects;
......@@ -168,13 +167,13 @@ public class PromPlanCoreController {
throw new ParamException(RCode.ACTIVITY_PLAN_EMPLOYEE_ERROR);
}
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()) && (
!YearMonth.from(localDate).equals(YearMonth.from(nextMonthValue))
)) {
throw new ParamException(RCode.NEXT_MONTH_PLAN_CREATE_ERROR);
}
// if (operVo.getEmployeeNo().equals(operVo.getOperNo()) && (
// !YearMonth.from(localDate).equals(YearMonth.from(nextMonthValue))
// )) {
// throw new ParamException(RCode.NEXT_MONTH_PLAN_CREATE_ERROR);
// }
// 上下班时间补充日期部分
operVo.setClockInTime(LocalDateTime.of(localDate,operVo.getInTime()));
operVo.setClockOutTime(LocalDateTime.of(localDate,operVo.getOutTime()));
......
......@@ -211,8 +211,9 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService {
}
LocalDate planDate = LocalDate.of(year, month, day);
// && monthInt != monthValue
if (monthInt != nextMonthValue && monthInt != monthValue) {
dto.setErrorMsg("月份只能是当月或次月;");
dto.setErrorMsg("月份只能是次月;");
} else if (planDate.isBefore(LocalDate.now())) {
dto.setErrorMsg("日期不能是以前;");
} else {
......@@ -229,10 +230,6 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService {
dto.setClockOutTime(LocalDateTime.of(planDate, outLocalTime));
}
}
// if (monthInt == nextMonthValue) {
// } else {
// dto.setErrorMsg("月份必需是下个月;");
// }
// 8:工资
dto.setSalary(new BigDecimal(row.get(8).toString()));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论