Commit f7f2c246 authored by cq990612's avatar cq990612

优化代码结构

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