示例#1
0
 // 添加节假日不催办的限制条件
 public boolean isHolidayDate() {
   Calendar cal = Calendar.getInstance();
   cal.setTime(new Date());
   Date tomorrow = cal.getTime();
   List<Integer> holidaySetting = holidayManager.getMonthSetting(tomorrow);
   Integer tomorrowDay = cal.get(Calendar.DATE);
   if (holidaySetting.contains(tomorrowDay)) return true;
   return false;
 }
 /**
  * 查询给定时间段内的节假日和工作日
  *
  * @param startDate 开始日期
  * @param endDate 结束日期
  * @param branchId 分支机构 id
  * @return Map<String, List<Date>> key: workDate工作日,spareDate节假日
  */
 public Map<String, List<Date>> getHolidaySettingDays(
     Date startDate, Date endDate, Long branchId) {
   return HolidayManager.getHolidaySettingDays(startDate, endDate, branchId);
 }
 /**
  * 查询给定时间段内的节假日和工作日
  *
  * @param startDate 开始日期
  * @param endDate 结束日期
  * @return Map<String, List<Date>> key: workDate工作日,spareDate节假日
  */
 public Map<String, List<Date>> getHolidaySettingDays(Date startDate, Date endDate) {
   return HolidayManager.getHolidaySettingDays(startDate, endDate, ContextUtils.getSubCompanyId());
 }