Commit f7f2c246 authored by cq990612's avatar cq990612

优化代码结构

parent 508495d7
...@@ -93,9 +93,10 @@ public class WorkCollectServiceImpl implements WorkCollectService { ...@@ -93,9 +93,10 @@ public class WorkCollectServiceImpl implements WorkCollectService {
} }
calendarMonthDto.setRejectMonth(rejectMonth); calendarMonthDto.setRejectMonth(rejectMonth);
WorkUser user = workUserService.getById(userId); WorkUser user = workUserService.getById(userId);
if (1 == user.getSubmitOrder()) { // 如果查询的日期大于本月的日期,则不查询
if (1 == user.getSubmitOrder() && workMonth.compareTo(new Date())<=0) {
List<Date> notCompletedByMonth = getNotCompletedByMonth(userId, workMonth); List<Date> notCompletedByMonth = getNotCompletedByMonth(userId, workMonth);
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
if (!CollectionUtils.isEmpty(notCompletedByMonth)) { if (!CollectionUtils.isEmpty(notCompletedByMonth)) {
...@@ -103,7 +104,7 @@ public class WorkCollectServiceImpl implements WorkCollectService { ...@@ -103,7 +104,7 @@ public class WorkCollectServiceImpl implements WorkCollectService {
sb.deleteCharAt(sb.length() - 1); sb.deleteCharAt(sb.length() - 1);
calendarMonthDto.setNotCompleteDay(sb.toString()); calendarMonthDto.setNotCompleteDay(sb.toString());
} }
}else{ }else if(0 == user.getSubmitOrder()){
calendarMonthDto.setNotCompleteDay("0"); calendarMonthDto.setNotCompleteDay("0");
} }
return calendarMonthDto; return calendarMonthDto;
......
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