Commit 8f945e10 authored by cq990612's avatar cq990612

优化代码结构

parent 3b2c9edc
......@@ -994,7 +994,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
Date endDate;
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.set(Calendar.DAY_OF_MONTH, -submitTime);
calendar.add(Calendar.DATE, -submitTime);
if (DateUtil.isYearAndMonthEqual(date, calendar.getTime())) {
startDate = DateUtil.getFirstDayOfMonth(date);
endDate = date;
......@@ -1002,6 +1002,8 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
startDate = DateUtil.getFirstDayOfMonth(calendar.getTime());
endDate = DateUtil.getLastDayByMonth2(calendar.getTime());
}
System.out.println(DateUtils.dateToShortString(startDate));
System.out.println(DateUtils.dateToShortString(endDate));
boolean flag = DateUtil.isYearAndMonthEqual(date, date);
List<Date> workDays = statisticsService.currentMonthWorkDays(date, flag);
......@@ -1057,6 +1059,13 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
deptUserDto.setUserDtos(userDtos);
}
}
if (!CollectionUtils.isEmpty(deptUserDtos)) {
for (DeptUserDto deptUserDto : deptUserDtos) {
if (!CollectionUtils.isEmpty(deptUserDto.getUserDtos())) {
deptUserDto.getUserDtos().removeIf(userDto -> 0 == userDto.getNotWorkDays());
}
}
}
notWorkSubmitOrderDto.setDeptUserDtos(deptUserDtos);
return notWorkSubmitOrderDto;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment