fix(eims): 修复计划生成逻辑
- 修改点检计划生成逻辑,将等于当前日期改为小于当前日期
- 更新维护计划生成逻辑,使用日期比较代替天数差计算
| | |
| | | planBoQueryWrapper.eq("ip.status", DictConstants.SYS_NORMAL_DISABLE_DETAIL.NORMAL) |
| | | .eq("equ.status", DictConstants.EIMS_EQU_STATUS_DETAIL.SHIYONG); |
| | | // 增加过滤条件 上次生成日期小于当前日期 |
| | | planBoQueryWrapper.and(wrapper -> wrapper.eq("ip.insp_next_time", DateUtils.getDate()).or().isNull("ip.insp_next_time")); |
| | | planBoQueryWrapper.and(wrapper -> wrapper.lt("ip.insp_next_time", DateUtils.getDate()).or().isNull("ip.insp_next_time")); |
| | | // // 过滤没有下次运行时间 |
| | | // planBoQueryWrapper.isNotNull(EimsInspectPlan::getInspNextTime); |
| | | // // 过滤没有点检周期的数据 |
| | |
| | | Date oldNext = planVo.getMaintNextTime(); |
| | | int day = DateUtils.differentDays(today, oldNext); |
| | | // 如果计划生成工单日期大于今天则不生成工单 |
| | | if (day >= 1) { |
| | | if (today.before(oldNext)) { |
| | | continue; |
| | | } |
| | | |