提交 fd1a17fd authored 作者: 000516's avatar 000516

城市经理上传计划可以上传当月或次月

...@@ -133,7 +133,7 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService { ...@@ -133,7 +133,7 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService {
private List<ActivityPlanInfoDto> getRowByCSJLUp(ActivityPlanVo planVo, List<Object> row,Map<String, Object> rMap) { private List<ActivityPlanInfoDto> getRowByCSJLUp(ActivityPlanVo planVo, List<Object> row,Map<String, Object> rMap) {
List<ActivityPlanInfoDto> dtos = new ArrayList<>(); List<ActivityPlanInfoDto> dtos = new ArrayList<>();
LocalDate now = LocalDate.now(); LocalDate now = LocalDate.now();
// int monthValue = now.getMonthValue(); int monthValue = now.getMonthValue();
int nextMonthValue = now.plusMonths(1).getMonthValue(); int nextMonthValue = now.plusMonths(1).getMonthValue();
/** /**
...@@ -208,10 +208,10 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService { ...@@ -208,10 +208,10 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService {
year += 1; year += 1;
} }
LocalDate planDate = LocalDate.of(year, month, day); LocalDate planDate = LocalDate.of(year, month, day);
// if (monthInt != nextMonthValue && monthInt != monthValue) { if (monthInt != nextMonthValue && monthInt != monthValue) {
// dto.setErrorMsg("月份只能是当月或次月;"); dto.setErrorMsg("月份只能是当月或次月;");
if (monthInt != nextMonthValue) { // if (monthInt != nextMonthValue) {
dto.setErrorMsg("月份只能是次月;"); // dto.setErrorMsg("月份只能是次月;");
} else if (planDate.isBefore(LocalDate.now())) { } else if (planDate.isBefore(LocalDate.now())) {
dto.setErrorMsg("日期不能是以前;"); dto.setErrorMsg("日期不能是以前;");
} else { } else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论