提交 5d3d6b5e authored 作者: 000516's avatar 000516

促销模板迭代至4.0,新增午休/试吃/品类

...@@ -231,15 +231,13 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService { ...@@ -231,15 +231,13 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService {
// 午休时间:上班时间<午休下班时间<午休上班时间<下班时间 // 午休时间:上班时间<午休下班时间<午休上班时间<下班时间
LocalTime noonOutLocalTime = DateUtils.parseLocalTimeByEmdtime(row.get(8).toString()); LocalTime noonOutLocalTime = DateUtils.parseLocalTimeByEmdtime(row.get(8).toString());
LocalTime noonInLocalTime = DateUtils.parseLocalTimeByEmdtime(row.get(9).toString()); LocalTime noonInLocalTime = DateUtils.parseLocalTimeByEmdtime(row.get(9).toString());
if (LocalTime.MIDNIGHT.equals(noonOutLocalTime) && LocalTime.MIDNIGHT.equals(noonInLocalTime)) {
if (ObjectUtils.allNotNull(noonOutLocalTime, noonInLocalTime) dto.setNoonClockOutTime(null);
&& inLocalTime.isBefore(noonOutLocalTime) dto.setNoonClockInTime(null);
&& noonOutLocalTime.isBefore(noonInLocalTime) } else if (inLocalTime.isBefore(noonOutLocalTime) && noonOutLocalTime.isBefore(noonInLocalTime) && noonInLocalTime.isBefore(outLocalTime)) {
&& noonInLocalTime.isBefore(outLocalTime))
{
dto.setNoonClockOutTime(LocalDateTime.of(planDate, noonOutLocalTime)); dto.setNoonClockOutTime(LocalDateTime.of(planDate, noonOutLocalTime));
dto.setNoonClockInTime(LocalDateTime.of(planDate, noonInLocalTime)); dto.setNoonClockInTime(LocalDateTime.of(planDate, noonInLocalTime));
}else if (ObjectUtils.allNotNull(noonOutLocalTime, noonInLocalTime)){ } else {
dto.setErrorMsg("时间错误,正确规则:上班时间<午休下班时间<午休上班时间<下班时间;"); dto.setErrorMsg("时间错误,正确规则:上班时间<午休下班时间<午休上班时间<下班时间;");
} }
} }
...@@ -464,15 +462,13 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService { ...@@ -464,15 +462,13 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService {
// 午休时间:上班时间<午休下班时间<午休上班时间<下班时间 // 午休时间:上班时间<午休下班时间<午休上班时间<下班时间
LocalTime noonOutLocalTime = DateUtils.parseLocalTimeByEmdtime(row.get(8).toString()); LocalTime noonOutLocalTime = DateUtils.parseLocalTimeByEmdtime(row.get(8).toString());
LocalTime noonInLocalTime = DateUtils.parseLocalTimeByEmdtime(row.get(9).toString()); LocalTime noonInLocalTime = DateUtils.parseLocalTimeByEmdtime(row.get(9).toString());
if (LocalTime.MIDNIGHT.equals(noonOutLocalTime) && LocalTime.MIDNIGHT.equals(noonInLocalTime)) {
if (ObjectUtils.allNotNull(noonOutLocalTime, noonInLocalTime) dto.setNoonClockOutTime(null);
&& inLocalTime.isBefore(noonOutLocalTime) dto.setNoonClockInTime(null);
&& noonOutLocalTime.isBefore(noonInLocalTime) } else if (inLocalTime.isBefore(noonOutLocalTime) && noonOutLocalTime.isBefore(noonInLocalTime) && noonInLocalTime.isBefore(outLocalTime)) {
&& noonInLocalTime.isBefore(outLocalTime))
{
dto.setNoonClockOutTime(LocalDateTime.of(planDate, noonOutLocalTime)); dto.setNoonClockOutTime(LocalDateTime.of(planDate, noonOutLocalTime));
dto.setNoonClockInTime(LocalDateTime.of(planDate, noonInLocalTime)); dto.setNoonClockInTime(LocalDateTime.of(planDate, noonInLocalTime));
}else { } else {
dto.setErrorMsg("时间错误,正确规则:上班时间<午休下班时间<午休上班时间<下班时间;"); dto.setErrorMsg("时间错误,正确规则:上班时间<午休下班时间<午休上班时间<下班时间;");
} }
} }
...@@ -777,15 +773,13 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService { ...@@ -777,15 +773,13 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService {
// 午休时间:上班时间<午休下班时间<午休上班时间<下班时间 // 午休时间:上班时间<午休下班时间<午休上班时间<下班时间
LocalTime noonOutLocalTime = DateUtils.parseLocalTimeByEmdtime(row.get(8).toString()); LocalTime noonOutLocalTime = DateUtils.parseLocalTimeByEmdtime(row.get(8).toString());
LocalTime noonInLocalTime = DateUtils.parseLocalTimeByEmdtime(row.get(9).toString()); LocalTime noonInLocalTime = DateUtils.parseLocalTimeByEmdtime(row.get(9).toString());
if (LocalTime.MIDNIGHT.equals(noonOutLocalTime) && LocalTime.MIDNIGHT.equals(noonInLocalTime)) {
if (ObjectUtils.allNotNull(noonOutLocalTime, noonInLocalTime) dto.setNoonClockOutTime(null);
&& inLocalTime.isBefore(noonOutLocalTime) dto.setNoonClockInTime(null);
&& noonOutLocalTime.isBefore(noonInLocalTime) } else if (inLocalTime.isBefore(noonOutLocalTime) && noonOutLocalTime.isBefore(noonInLocalTime) && noonInLocalTime.isBefore(outLocalTime)) {
&& noonInLocalTime.isBefore(outLocalTime))
{
dto.setNoonClockOutTime(LocalDateTime.of(planDate, noonOutLocalTime)); dto.setNoonClockOutTime(LocalDateTime.of(planDate, noonOutLocalTime));
dto.setNoonClockInTime(LocalDateTime.of(planDate, noonInLocalTime)); dto.setNoonClockInTime(LocalDateTime.of(planDate, noonInLocalTime));
}else { } else {
dto.setErrorMsg("时间错误,正确规则:上班时间<午休下班时间<午休上班时间<下班时间;"); dto.setErrorMsg("时间错误,正确规则:上班时间<午休下班时间<午休上班时间<下班时间;");
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论