lxw
2022-09-07 bf8bc79e9630daba692ab7b317384abb255f5e0c
物料的关联关系
2个文件已删除
1个文件已修改
514 ■■■■■ 已修改文件
src/main/java/com/whyc/constant/AlarmConstant.java 441 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/constant/BattTestEnum.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/MaterialMapper.xml 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/constant/AlarmConstant.java
File was deleted
src/main/java/com/whyc/constant/BattTestEnum.java
File was deleted
src/main/resources/mapper/MaterialMapper.xml
@@ -191,7 +191,7 @@
        where  tb_product.version>=tb_material_product_history.s_version and tb_product.version<=tb_material_product_history.e_version
          and tb_product.parent_code=tb_material_product_history.parent_code
          and tb_product.custom_code=tb_material_product_history.custom_code
          and tb_material_product_history.material_id=#{id}
          and tb_material_product_history.sub_material_id=#{id}
    </select>
    <resultMap id="productIds" type="product">
        <id property="id" column="id"></id>
@@ -202,17 +202,18 @@
        <result property="createTime" column="create_time"></result>
        <result property="version" column="version"></result>
        <collection property="materialIds" ofType="java.lang.Integer" >
            <result property="subMaterialId" column="sub_material_id"></result>
            <result property="materialId" column="material_id"></result>
        </collection>
    </resultMap>
    <select id="selectMaterialInProduct"  resultMap="productIds">
        select DISTINCT tb_product.*,tb_material_product_history.sub_material_id  FROM db_doc.tb_product
        left  outer join db_doc.tb_product_bom on tb_product.id=tb_product_bom.product_id
        select DISTINCT tb_product.*,tb_material_product_history.material_id  FROM db_doc.tb_product
        left  outer join db_doc.tb_product_bom on tb_product.id=tb_product_bom.product_id  and tb_product_bom.material_id=#{id}
        left  outer join db_doc.tb_material_product_history on
        tb_material_product_history.parent_code=tb_product.parent_code  and tb_material_product_history.custom_code=tb_product.custom_code
        and tb_product.version>=tb_material_product_history.s_version and tb_product.version&lt;=tb_material_product_history.e_version
        where tb_product_bom.material_id=#{id}
        and tb_material_product_history.sub_material_id=#{id}
    </select>
    <select id="getListByCodeList" resultType="java.lang.String">
        SELECT sub_code FROM db_doc.tb_material where sub_code in