提交 2e711ece authored 作者: 000516's avatar 000516

web端修改计划时,判断参数午休时间段是否为null,为null时修改db表中午休属性值也为null

......@@ -228,6 +228,8 @@ public class PromPlanCoreController {
operVo.setClockOutTime(LocalDateTime.of(localDate,operVo.getOutTime()));
if (operVo.getNoonOutTime() == null && operVo.getNoonInTime() == null){
operVo.setNoonClockOutTime(null);
operVo.setNoonClockInTime(null);
promPlanCoreService.putActivityPlan(operVo);
return R.success();
}
......
......@@ -555,14 +555,14 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService {
throw new FlowException(RCode.ACTIVITY_PLAN_NOT_DELETE);
}
//todo 判断修改后 月底 >= 活动日期 > 今日
// LocalDate today = LocalDate.now();
// 判断修改后 月底 >= 活动日期 > 今日
LocalDate today = LocalDate.now();
Date planDate = operVo.getDate();
// LocalDate localDatePlan = DateUtils.parseDateBylocalDate(planDate);
// LocalDate lastDayOfMonth = today.with(TemporalAdjusters.lastDayOfMonth());
// if (!localDatePlan.isAfter(today) || localDatePlan.isAfter(lastDayOfMonth)){
// throw new FlowException(RCode.ACTIVITY_PLAN_DATA_ERROR);
// }
LocalDate localDatePlan = DateUtils.parseDateBylocalDate(planDate);
LocalDate lastDayOfMonth = today.with(TemporalAdjusters.lastDayOfMonth());
if (!localDatePlan.isAfter(today) || localDatePlan.isAfter(lastDayOfMonth)){
throw new FlowException(RCode.ACTIVITY_PLAN_DATA_ERROR);
}
ActivityPlanInfoDto planDto = new ActivityPlanInfoDto();
// 归属人改变
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论