From 7fd3a235eb04e09f4fe42f0374550724e81c27f3 Mon Sep 17 00:00:00 2001 From: 86156 <823267011@qq.com> Date: Fri, 1 Aug 2025 14:25:14 +0800 Subject: [PATCH] =?UTF-8?q?bug=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../industry/work/service/impl/IndustryStepServiceImpl.java | 5 +++++ .../src/main/resources/mapper/work/IndustryStepMapper.xml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/industry-system/src/main/java/com/industry/work/service/impl/IndustryStepServiceImpl.java b/industry-system/src/main/java/com/industry/work/service/impl/IndustryStepServiceImpl.java index 979dc4de..72ffc48d 100644 --- a/industry-system/src/main/java/com/industry/work/service/impl/IndustryStepServiceImpl.java +++ b/industry-system/src/main/java/com/industry/work/service/impl/IndustryStepServiceImpl.java @@ -340,6 +340,11 @@ public class IndustryStepServiceImpl implements IIndustryStepService { s7PLC.writeBoolean("DB15.0.3", false); } + // 将此批次所有的进行中全部更新成 operation = 0 + IndustryStep newStep = new IndustryStep(); + newStep.setBatchId(industryMaterial.getBatchId()); + newStep.setOperation(0L); + industryStepMapper.updateAllIndustryStepByBatchId(newStep); industryStep.setStep(smallStep.getStep()); industryStep.setOperation(1L); industryStep.setState(null); diff --git a/industry-system/src/main/resources/mapper/work/IndustryStepMapper.xml b/industry-system/src/main/resources/mapper/work/IndustryStepMapper.xml index 596ea1f5..9cc0203f 100644 --- a/industry-system/src/main/resources/mapper/work/IndustryStepMapper.xml +++ b/industry-system/src/main/resources/mapper/work/IndustryStepMapper.xml @@ -267,7 +267,7 @@ update_by = #{updateBy}, - where step = #{step} and del_flag = 1 + where step = #{step} and del_flag = 1 and batch_id = #{batchId} update industry_step