he wei
2022-09-09 03f02568ffb34923dbe4808caf8d0d39cc5634d1
'lxw'
1个文件已修改
9 ■■■■■ 已修改文件
src/main/resources/mapper/MaterialMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/MaterialMapper.xml
@@ -207,13 +207,12 @@
    </resultMap>
    <select id="selectMaterialInProduct"  resultMap="productIds">
        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}
        select p.*,tb_material_product_history.material_id  from (select DISTINCT tb_product.*  FROM db_doc.tb_product, db_doc.tb_product_bom
        where  tb_product.id=tb_product_bom.product_id  and tb_product_bom.material_id=#{id}) as p
        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
        tb_material_product_history.parent_code= p.parent_code  and tb_material_product_history.custom_code= p.custom_code
        and  p.version>=tb_material_product_history.s_version and  p.version&lt;=tb_material_product_history.e_version
        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