From 23eb9c9a21afc8ed065706f0e6494ee998a217b5 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 04 三月 2026 16:35:27 +0800
Subject: [PATCH] fix:1.班次页面:月度统计时间调整为上月26到本月25;班次支持右键添加批注 2.外购下单:KJNS域订单免检自动更新批次属性;外购下单-全部页新增【更新IFS批次属性】按钮,支持更新已提交订单的批次属性 3.资源要求-设备:设备核查计划:核查负责人回显问题修复;设备使用授权:检验项目导出数据错误问题修复
---
inspect-server/src/main/resources/mapper/InsProductDeviationWarningMapper.xml | 55 +++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 47 insertions(+), 8 deletions(-)
diff --git a/inspect-server/src/main/resources/mapper/InsProductDeviationWarningMapper.xml b/inspect-server/src/main/resources/mapper/InsProductDeviationWarningMapper.xml
index 26fa63d..e83094e 100644
--- a/inspect-server/src/main/resources/mapper/InsProductDeviationWarningMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsProductDeviationWarningMapper.xml
@@ -4,15 +4,54 @@
<!-- 鏌ョ湅棰勮鍒楄〃 -->
<select id="selectDeviationWarningPage" resultType="com.ruoyi.inspect.dto.InsProductDeviationWarningDto">
- select * from (select ipdw.*,
- isa.sample sample_name,
- isa.model sample_model
- from ins_product_deviation_warning ipdw
- left join ins_sample isa on isa.id = ipdw.ins_sample_id) a
- <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
- ${ew.customSqlSegment}
+ <!-- select *-->
+ <!-- from (select ipdw.*,-->
+ <!-- isa.sample sample_name,-->
+ <!-- isa.model sample_model,-->
+ <!-- concat(ip.inspection_item, ip.inspection_item_subclass) inspection_item_name-->
+ <!-- from ins_product_deviation_warning ipdw-->
+ <!-- left join ins_sample isa on isa.id = ipdw.ins_sample_id-->
+ <!-- left join ins_product ip On ip.id = ipdw.ins_product_id) a-->
+ <!-- <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">-->
+ <!-- ${ew.customSqlSegment}-->
+ <!-- </if>-->
+ <!-- order by ipdw.detection_time desc-->
+ SELECT *
+ FROM (
+ SELECT
+ ipdw.*,
+ sip.sample AS sss,
+ isa.sample AS sample_name,
+ isa.model AS sample_model,
+ io.ifs_inventory_id,
+ CONCAT(ip.inspection_item, ip.inspection_item_subclass) AS inspection_item_name,
+ sto.object_type
+ FROM ins_product_deviation_warning ipdw
+ LEFT JOIN ins_sample isa ON isa.id = ipdw.ins_sample_id
+ LEFT JOIN ins_product ip ON ip.id = ipdw.ins_product_id
+ LEFT JOIN structure_item_parameter sip ON sip.id = ip.structure_item_parameter_id
+ LEFT JOIN ins_order io ON io.id = isa.ins_order_id
+ LEFT JOIN structure_test_object sto
+ ON sip.sample LIKE CONCAT('%"', sto.specimen_name, '"%')
+ LEFT JOIN ifs_inventory_quantity ifs ON ifs.id = io.ifs_inventory_id
+ WHERE sto.object_type != 3
+ <if test="dictValues != null and dictValues.size() > 0">
+ AND ifs.material_prop IN
+ <foreach collection="dictValues" item="value" open="(" separator="," close=")">
+ #{value}
+ </foreach>
</if>
- order by ipdw.detection_time desc
+ <if test="dictValues == null or dictValues.size() == 0">
+ AND 1 = 0
+ </if>
+ <if test="ew.sqlFirst != null">
+ ${ew.sqlFirst}
+ </if>
+ <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
+ AND ${ew.customSqlSegment}
+ </if>
+ ) t
+ ORDER BY t.detection_time DESC
</select>
</mapper>
--
Gitblit v1.9.3