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