修复bug
This commit is contained in:
@@ -92,4 +92,7 @@ public interface IndustryMaterialMapper
|
|||||||
List<IndustryMaterialVo> selectIndustryMaterialListAndNotFinish();
|
List<IndustryMaterialVo> selectIndustryMaterialListAndNotFinish();
|
||||||
|
|
||||||
List<IndustryMaterialVo> selectIndustryListRecord(IndustryMaterial industryMaterial);
|
List<IndustryMaterialVo> selectIndustryListRecord(IndustryMaterial industryMaterial);
|
||||||
|
|
||||||
|
void updateIndustryMaterialByBatchId(IndustryMaterial params);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -779,7 +779,7 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
|
|||||||
IndustryMaterialVo industryMaterialVo = new IndustryMaterialVo();
|
IndustryMaterialVo industryMaterialVo = new IndustryMaterialVo();
|
||||||
industryMaterialVo.setBatchId(industryMaterial.getBatchId());
|
industryMaterialVo.setBatchId(industryMaterial.getBatchId());
|
||||||
// 获得该批次的所有原料
|
// 获得该批次的所有原料
|
||||||
List<IndustryMaterialVo> industryMaterialVos = industryMaterialMapper.selectIndustryMaterialList(industryMaterialVo);
|
List<IndustryMaterialVo> industryMaterialVos = industryMaterialMapper.selectAbnormalList(industryMaterialVo);
|
||||||
|
|
||||||
// 首先查看是否有该批次的料
|
// 首先查看是否有该批次的料
|
||||||
if (Objects.nonNull(industryMaterialVos) && !industryMaterialVos.isEmpty()) {
|
if (Objects.nonNull(industryMaterialVos) && !industryMaterialVos.isEmpty()) {
|
||||||
|
|||||||
@@ -468,8 +468,10 @@ public class IndustryStepServiceImpl implements IIndustryStepService {
|
|||||||
// 校验是否都存在道次 如果有一个不存在此工艺直接返回不做任何操作
|
// 校验是否都存在道次 如果有一个不存在此工艺直接返回不做任何操作
|
||||||
if (industryTechnologyVos.isEmpty()) {
|
if (industryTechnologyVos.isEmpty()) {
|
||||||
// 把状态改回去
|
// 把状态改回去
|
||||||
success.setState(0L);
|
IndustryMaterial params = new IndustryMaterial();
|
||||||
industryMaterialMapper.updateIndustryMaterial(success);
|
params.setState(0L);
|
||||||
|
params.setBatchId(success.getBatchId());
|
||||||
|
industryMaterialMapper.updateIndustryMaterialByBatchId(params);
|
||||||
return Constants.NOT_HAVE_TECHNOLOGY;
|
return Constants.NOT_HAVE_TECHNOLOGY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -373,6 +373,30 @@
|
|||||||
set state=#{state}
|
set state=#{state}
|
||||||
where id = #{materialId}
|
where id = #{materialId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateIndustryMaterialByBatchId">
|
||||||
|
update industry_material
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="specification != null">specification = #{specification},</if>
|
||||||
|
<if test="technology != null">technology = #{technology},</if>
|
||||||
|
<if test="operation != null">operation = #{operation},</if>
|
||||||
|
<if test="diameter != null">diameter = #{diameter},</if>
|
||||||
|
<if test="sort != null">sort = #{sort},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
<if test="state != null">state = #{state},</if>
|
||||||
|
<if test="stepSize != null">step_size = #{stepSize},</if>
|
||||||
|
<if test="finalWidth != null">final_width = #{finalWidth},</if>
|
||||||
|
<if test="finalWidth2 != null">final_width2 = #{finalWidth2},</if>
|
||||||
|
<if test="finalDiameter != null">final_diameter = #{finalDiameter},</if>
|
||||||
|
<if test="finalDiameter2 != null">final_diameter2 = #{finalDiameter2},</if>
|
||||||
|
<if test="weight != null">weight = #{weight},</if>
|
||||||
|
<if test="width != null">width = #{width},</if>
|
||||||
|
</trim>
|
||||||
|
where batch_id = #{batchId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<delete id="deleteIndustryMaterialByIds" parameterType="String">
|
<delete id="deleteIndustryMaterialByIds" parameterType="String">
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="selectIndustryTechnologyList" parameterType="IndustryTechnology" resultMap="IndustryTechnologyResult">
|
<select id="selectIndustryTechnologyList" parameterType="IndustryTechnology" resultMap="IndustryTechnologyResult">
|
||||||
<include refid="selectIndustryTechnologyVo"/>
|
<include refid="selectIndustryTechnologyVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="technologyId != null and technologyId != ''"> and technology_id = #{technologyId}</if>
|
<if test="technologyId != null"> and technology_id = #{technologyId}</if>
|
||||||
<if test="step != null "> and step = #{step}</if>
|
<if test="step != null "> and step = #{step}</if>
|
||||||
<if test="reduction != null "> and reduction = #{reduction}</if>
|
<if test="reduction != null "> and reduction = #{reduction}</if>
|
||||||
<if test="thicknessFront != null "> and thickness_front = #{thicknessFront}</if>
|
<if test="thicknessFront != null "> and thickness_front = #{thicknessFront}</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user