diff --git a/industry-system/src/main/java/com/industry/work/mapper/IndustryMaterialMapper.java b/industry-system/src/main/java/com/industry/work/mapper/IndustryMaterialMapper.java index 110bcb85..c2895c05 100644 --- a/industry-system/src/main/java/com/industry/work/mapper/IndustryMaterialMapper.java +++ b/industry-system/src/main/java/com/industry/work/mapper/IndustryMaterialMapper.java @@ -92,4 +92,7 @@ public interface IndustryMaterialMapper List selectIndustryMaterialListAndNotFinish(); List selectIndustryListRecord(IndustryMaterial industryMaterial); + + void updateIndustryMaterialByBatchId(IndustryMaterial params); + } diff --git a/industry-system/src/main/java/com/industry/work/service/impl/IndustryMaterialServiceImpl.java b/industry-system/src/main/java/com/industry/work/service/impl/IndustryMaterialServiceImpl.java index 45adf528..f24d84c8 100644 --- a/industry-system/src/main/java/com/industry/work/service/impl/IndustryMaterialServiceImpl.java +++ b/industry-system/src/main/java/com/industry/work/service/impl/IndustryMaterialServiceImpl.java @@ -779,7 +779,7 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService { IndustryMaterialVo industryMaterialVo = new IndustryMaterialVo(); industryMaterialVo.setBatchId(industryMaterial.getBatchId()); // 获得该批次的所有原料 - List industryMaterialVos = industryMaterialMapper.selectIndustryMaterialList(industryMaterialVo); + List industryMaterialVos = industryMaterialMapper.selectAbnormalList(industryMaterialVo); // 首先查看是否有该批次的料 if (Objects.nonNull(industryMaterialVos) && !industryMaterialVos.isEmpty()) { 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 280ba2b7..b02c49a0 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 @@ -468,8 +468,10 @@ public class IndustryStepServiceImpl implements IIndustryStepService { // 校验是否都存在道次 如果有一个不存在此工艺直接返回不做任何操作 if (industryTechnologyVos.isEmpty()) { // 把状态改回去 - success.setState(0L); - industryMaterialMapper.updateIndustryMaterial(success); + IndustryMaterial params = new IndustryMaterial(); + params.setState(0L); + params.setBatchId(success.getBatchId()); + industryMaterialMapper.updateIndustryMaterialByBatchId(params); return Constants.NOT_HAVE_TECHNOLOGY; } diff --git a/industry-system/src/main/resources/mapper/work/IndustryMaterialMapper.xml b/industry-system/src/main/resources/mapper/work/IndustryMaterialMapper.xml index c63a2bc9..f713b8fa 100644 --- a/industry-system/src/main/resources/mapper/work/IndustryMaterialMapper.xml +++ b/industry-system/src/main/resources/mapper/work/IndustryMaterialMapper.xml @@ -373,6 +373,30 @@ set state=#{state} where id = #{materialId} + + update industry_material + + specification = #{specification}, + technology = #{technology}, + operation = #{operation}, + diameter = #{diameter}, + sort = #{sort}, + create_time = #{createTime}, + create_by = #{createBy}, + update_time = #{updateTime}, + update_by = #{updateBy}, + del_flag = #{delFlag}, + state = #{state}, + step_size = #{stepSize}, + final_width = #{finalWidth}, + final_width2 = #{finalWidth2}, + final_diameter = #{finalDiameter}, + final_diameter2 = #{finalDiameter2}, + weight = #{weight}, + width = #{width}, + + where batch_id = #{batchId} + diff --git a/industry-system/src/main/resources/mapper/work/IndustryTechnologyMapper.xml b/industry-system/src/main/resources/mapper/work/IndustryTechnologyMapper.xml index 2324f865..8350ffc5 100644 --- a/industry-system/src/main/resources/mapper/work/IndustryTechnologyMapper.xml +++ b/industry-system/src/main/resources/mapper/work/IndustryTechnologyMapper.xml @@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"