he wei
2022-08-26 ebde11c0241367bf4136efe247404d57b501f745
'lxw'
1个文件已修改
11 ■■■■ 已修改文件
src/main/resources/mapper/MaterialMapper.xml 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/MaterialMapper.xml
@@ -154,7 +154,7 @@
        <result property="createDate" column="create_date"></result>
        <result property="updateDate" column="update_date"></result>
        <result property="dwgUrl" column="dwg_url"></result>
        <collection property="mproductHistorys" javaType="java.util.ArrayList" ofType="com.whyc.pojo.MaterialProductHistory" column="{id=id}" select="selectMaterialProductHistory">
        <collection property="mproductHistorys" javaType="java.util.ArrayList" ofType="com.whyc.pojo.MaterialProductHistory" column="{subCode=sub_code}" select="selectMaterialProductHistory">
        </collection>
        <collection property="products" javaType="java.util.ArrayList" ofType="com.whyc.pojo.Product" column="{subCode=sub_code}" select="selectMaterialInProduct">
        </collection>
@@ -186,13 +186,14 @@
        where  tb_product.version>=tb_material_product_history.s_version and tb_product.version&lt;=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_code=#{subCode}
    </select>
    <select id="selectMaterialInProduct"  resultType="com.whyc.pojo.Product">
        select DISTINCT tb_product.*  FROM db_doc.tb_material,db_doc.tb_product, db_doc.tb_product_bom
        select DISTINCT tb_product.*  FROM db_doc.tb_material_product_history,db_doc.tb_product, db_doc.tb_product_bom
        where  tb_product.id=tb_product_bom.product_id
          and tb_material.sub_code=tb_product_bom.sub_code
          and tb_material.sub_code=#{subCode}
          and tb_material_product_history.sub_code=tb_product_bom.sub_code
          and tb_product.version>=tb_material_product_history.s_version and tb_product.version&lt;=tb_material_product_history.e_version
          and tb_material_product_history.sub_code=#{subCode}
    </select>
    <select id="getListByCodeList" resultType="java.lang.String">
        SELECT sub_code FROM db_doc.tb_material where sub_code in