From 1d22190911836c10553d73df455d79acb392fbb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=83=E6=B0=94=E6=BB=A1=E6=BB=A1?= <11056461+jia-guiying@user.noreply.gitee.com> Date: Mon, 24 Feb 2025 15:12:46 +0800 Subject: [PATCH] =?UTF-8?q?2025-2-24=20=E8=AE=BE=E5=A4=87=E7=82=B9?= =?UTF-8?q?=E6=A3=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DeviceTaskServiceImpl.java | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) 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 + "++++点检结束++++++++++"); }