From e9bf5a0070b5fbdf9afd4475adbf51e46f579040 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 17 四月 2025 17:20:38 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_ztzb' into dev_ztzb
---
inspect-server/src/main/resources/mapper/InsProductMapper.xml | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/inspect-server/src/main/resources/mapper/InsProductMapper.xml b/inspect-server/src/main/resources/mapper/InsProductMapper.xml
index 7d92da9..5299c2b 100644
--- a/inspect-server/src/main/resources/mapper/InsProductMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsProductMapper.xml
@@ -141,4 +141,35 @@
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.pojo.InsProductDeviationWarningDetail">
+ select io.id insOrderId,
+ is2.id insSampleId,
+ ip.id insProductId,
+ io.entrust_code,
+ is2.sample_code,
+ iiq.supplier_name,
+ ip.`last_value` testValue,
+ ip.update_time detectionTime
+ 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
+ left join ins_product_deviation_warning ipdw on ipdw.ins_product_id = ip.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
+ and ipdw.deviation_warning_id is null
+ order by io.first_submit_date desc
+ limit 10
+ </select>
</mapper>
--
Gitblit v1.9.3