| | |
| | | <result property="materialId" column="material_id"></result> |
| | | </collection> |
| | | </resultMap> |
| | | <select id="selectMaterialInProduct" resultMap="productIds"> |
| | | <!--<select id="selectMaterialInProduct" resultMap="productIds"> |
| | | select DISTINCT tb_product.*,tb_material_product_history.material_id 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_product_history.sub_code=tb_product_bom.sub_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<=tb_material_product_history.e_version |
| | | and tb_material_product_history.sub_code=#{subCode} |
| | | </select>--> |
| | | <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 |
| | | 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<=tb_material_product_history.e_version |
| | | where tb_product_bom.sub_code=#{subCode} |
| | | </select> |
| | | <select id="getListByCodeList" resultType="java.lang.String"> |
| | | SELECT sub_code FROM db_doc.tb_material where sub_code in |