1、修改了工作日计算方法。
修改文件:src/main/java/cn/tzsoft/roadflow/service/WorkDateService.java
/** * 计算时间加上天后的时间(要除去工作日) * * @param day 天数 * @param dateTime 时间 如果为NULL,取当前时间。 * @return 加上后的日期时间 */ public LocalDateTime addDays(double day, LocalDateTime dateTime) { LocalDateTime nowDateTime = dateTime == null ? DateTimeUtils.now() : dateTime; int intDay = (int) Math.floor(day); double decimalDay = day - intDay; int year = nowDateTime.getYear(); List<WorkDateModel> yearList = getYearList(year); for (int i = 0; i <= intDay; ) { nowDateTime = nowDateTime.plusDays(1); //如果跨年了则要获取下一年的工作日设置 if (nowDateTime.getYear() > year) { year = nowDateTime.getYear(); yearList = getYearList(year); } LocalDateTime finalNowDateTime = nowDateTime; WorkDateModel workDateModel = yearList.stream().filter(s -> s.getWorkDay().compareTo(finalNowDateTime.toLocalDate()) == 0).findFirst().orElse(null); //如果是工作日则向后延一天 if (workDateModel == null || workDateModel.getIsWork() == 1) { i++; } } return nowDateTime.plusMinutes((long) (decimalDay * 24 * 60)); }
2、修改了流程数据条件判断可以设置null。
修改文件:src/main/java/cn/tzsoft/roadflow/service/FlowRunService.java
联系QQ:493501010电话:136 0832 5512(微信同号)邮箱:road@roadflow.net
Copyright 2014 - 2024 重庆天知软件技术有限公司 版权所有
|