From a265e62ac86c31a7e63ead82bf5f2300ebe5108f Mon Sep 17 00:00:00 2001 From: zhuo <2089219845@qq.com> Date: 星期日, 13 四月 2025 16:34:31 +0800 Subject: [PATCH] 不合格复测调整 --- inspect-server/src/main/resources/mapper/InsUnqualifiedRetestProductMapper.xml | 37 +++++++++++++++++++++---------------- 1 files changed, 21 insertions(+), 16 deletions(-) diff --git a/inspect-server/src/main/resources/mapper/InsUnqualifiedRetestProductMapper.xml b/inspect-server/src/main/resources/mapper/InsUnqualifiedRetestProductMapper.xml index 4be6b91..06b9f6e 100644 --- a/inspect-server/src/main/resources/mapper/InsUnqualifiedRetestProductMapper.xml +++ b/inspect-server/src/main/resources/mapper/InsUnqualifiedRetestProductMapper.xml @@ -57,7 +57,7 @@ </resultMap> <sql id="getInsProducSql"> - ip.id ip_id, + ip.id ip_id, inspection_item, inspection_item_en, inspection_item_class, @@ -100,7 +100,9 @@ ip.method_s, ip.tell, ip.dic, - ip.cable_tag + ip.sort, + ip.cable_tag, + ip.structure_item_parameter_id </sql> <select id="selectRetestProduct" resultType="com.ruoyi.inspect.pojo.InsUnqualifiedRetestProduct"> @@ -162,28 +164,30 @@ select <include refid="getInsProducSql"/> from ins_unqualified_retest_product ip left join ins_unqualified_retest_result ipr on ip.id = ipr.retest_product_id - where ins_sample_id = #{id} - and state = 1 - and ip.son_laboratory = #{laboratory} - and ins_fiber_id is null - and ins_fibers_id is null - and standard_method_list_id is not null - and ip.cable_tag is null - and ip.retest_tag = #{retestTag} - </select> - <select id="getInsProductUnqualifiedRetest5" resultMap="product"> - select <include refid="getInsProducSql"/> - from ins_unqualified_retest_product ip - left join ins_unqualified_retest_result ipr on ip.id = ipr.retest_product_id where ins_sample_id = #{id} and state = 1 and ip.son_laboratory = #{laboratory} and ins_fiber_id is null and ins_fibers_id is null and standard_method_list_id is not null - and ip.cable_tag = #{cableTag} + /* 鐢电紗閰嶇疆鏍囪瘑 */ + <if test="cableTag == null or cableTag == ''"> + and ip.cable_tag is null + </if> + <if test="cableTag != null and cableTag != ''"> + and ip.cable_tag = #{cableTag} + </if> + /* 閲嶅鍊兼爣璇� */ + <if test="repetitionTag == null or repetitionTag == ''"> + and ip.repetition_tag is null + </if> + <if test="repetitionTag != null and repetitionTag != ''"> + and ip.repetition_tag = #{repetitionTag} + </if> and ip.retest_tag = #{retestTag} + order by sort asc </select> + <select id="getInsProductUnqualifiedRetest6" resultMap="product"> select <include refid="getInsProducSql"/> from ins_unqualified_retest_product ip @@ -196,5 +200,6 @@ and standard_method_list_id is not null and ip.raw_material_tag = #{rawMaterialTag} and ip.retest_tag = #{retestTag} + order by sort asc </select> </mapper> -- Gitblit v1.9.3