提交 06d4baa7 authored 作者: 000516's avatar 000516

模板4.0中,午休上下班时间不存在要写00:00

上级 189a0cb5
...@@ -61,8 +61,10 @@ public class PromPlanCoreController { ...@@ -61,8 +61,10 @@ public class PromPlanCoreController {
try { try {
String[] urlArr = activityPlanVo.getExcelUrl().split("/"); String[] urlArr = activityPlanVo.getExcelUrl().split("/");
String fileId = urlArr[urlArr.length - 1]; String fileId = urlArr[urlArr.length - 1];
String filePath = "/root/promotion/planv2/" + fileId; //todo String filePath = "/root/promotion/planv2/" + fileId;
FileUtils.downloadExcel(activityPlanVo.getExcelUrl(), filePath); //todo FileUtils.downloadExcel(activityPlanVo.getExcelUrl(), filePath);
//todo
String filePath = activityPlanVo.getExcelUrl();
activityPlanVo.setExcelId(fileId); activityPlanVo.setExcelId(fileId);
Map<String, Object> map = promPlanCoreService.selfPlanUp(activityPlanVo, filePath); Map<String, Object> map = promPlanCoreService.selfPlanUp(activityPlanVo, filePath);
return R.success(map); return R.success(map);
......
...@@ -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("时间错误,正确规则:上班时间<午休下班时间<午休上班时间<下班时间;");
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论