| | |
| | | </collection> |
| | | </resultMap> |
| | | <select id="getBomAndMaterial" resultMap="MaterialList" parameterType="java.lang.Integer"> |
| | | select distinct tb_product_bom.*,tb_product.parent_code,tb_product.custom_code from db_doc.tb_product_bom,db_doc.tb_product |
| | | <where> |
| | | select distinct tb_product_bom.* |
| | | ,tb_product.parent_code,tb_product.custom_code |
| | | ,tb_Material.dwg_url,tb_Material.file_url,tb_Material.picture_url |
| | | from db_doc.tb_product_bom,db_doc.tb_product,tb_Material |
| | | where |
| | | tb_product_bom.product_id = tb_product.id |
| | | and |
| | | tb_product_bom.version = tb_product.version |
| | | and |
| | | tb_Material.sub_code = tb_product_bom.sub_code |
| | | and |
| | | tb_product.id = #{productId} |
| | | and |
| | | tb_product.version = #{version} |
| | | </where> |
| | | order by id asc |
| | | order by tb_product_bom.id asc |
| | | </select> |
| | | <select id="selectMaterial" resultType="com.whyc.pojo.Material"> |
| | | select DISTINCT tb_Material.* FROM db_doc.tb_Material,db_doc.tb_material_product_history |