| | |
| | | where io2.id = #{orderId} |
| | | and ip.is_binding != 1 |
| | | </select> |
| | | |
| | | <!-- 根据订单查询产品id --> |
| | | <select id="selectProductByOrderId" resultType="com.ruoyi.inspect.pojo.InsProduct"> |
| | | select ip.*, is2.sample_code |
| | | from ins_product ip |
| | | left join ins_sample is2 on is2.id = ip.ins_sample_id |
| | | where is2.ins_order_id = #{orderId} |
| | | </select> |
| | | <select id="selectAnalysis" resultType="com.ruoyi.inspect.dto.InsProductAnalysisDto"> |
| | | select ip.id insProductId, |
| | | ip.`last_value`, |
| | | io.id insOrderId, |
| | | is2.id insSampleId |
| | | from ins_product ip |
| | | left join ins_sample is2 on is2.id = ip.ins_sample_id |
| | | left join ins_order io on io.id = is2.ins_order_id |
| | | left join ifs_inventory_quantity iiq on iiq.id = io.ifs_inventory_id |
| | | where concat(ip.inspection_item, ip.inspection_item_subclass) = concat(#{insProduct.inspectionItem}, #{insProduct.inspectionItemSubclass}) |
| | | and ip.model = #{insProduct.model} |
| | | and iiq.supplier_name = #{supplierName} |
| | | and io.state = 4 |
| | | and ip.ins_result = 1 |
| | | order by io.first_submit_date desc |
| | | limit 10 |
| | | </select> |
| | | </mapper> |