diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/DeviceTaskServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/DeviceTaskServiceImpl.java index c44b6b61..378ca3d6 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/DeviceTaskServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/DeviceTaskServiceImpl.java @@ -265,18 +265,33 @@ public class DeviceTaskServiceImpl implements IDeviceTaskService { EquPlan equPlan = new EquPlan(); equPlan.setPlanType("spotInspection"); List plans = deviceTaskMapper.getPlans(equPlan); - List producePlans = this.confirmPlanProduceLine(plans,poolName); - - for (EquPlan plan : producePlans) { - EquOrder hasTask = deviceTaskMapper.getNewTaskOrder(plan); - if (hasTask == null || Integer.parseInt(plan.getPlanLoop()) <= hasTask.getDays() || checkHourTask(hasTask, plan)) { - //生成点检计划 - int m = this.createOrderPlan(plan); - if (m == 0) { - error("equ_order相关添加失败"); + logger.info("++++++++++++" + poolName + "++++需要点检的++++++++++"+plans); + if(poolName.equals("ds_1000")){ + List producePlans = this.confirmPlanProduceLine(plans,poolName);//日点检 无产线计划 不生成点检工单 + logger.info("++++++++++++" + poolName + "++++需要点检的++++++++++"+producePlans); + for (EquPlan plan : producePlans) { + EquOrder hasTask = deviceTaskMapper.getNewTaskOrder(plan); + if (hasTask == null || Integer.parseInt(plan.getPlanLoop()) <= hasTask.getDays() || checkHourTask(hasTask, plan)) { + //生成点检计划 + int m = this.createOrderPlan(plan); + if (m == 0) { + error("equ_order相关添加失败"); + } + } + } + }else{ + for (EquPlan plan : plans) { + EquOrder hasTask = deviceTaskMapper.getNewTaskOrder(plan); + if (hasTask == null || Integer.parseInt(plan.getPlanLoop()) <= hasTask.getDays() || checkHourTask(hasTask, plan)) { + //生成点检计划 + int m = this.createOrderPlan(plan); + if (m == 0) { + error("equ_order相关添加失败"); + } } } } + logger.info("++++++++++++" + poolName + "++++点检结束++++++++++"); }