From 7d606f55907db40fc178243467b210cf3928cbca Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期二, 26 五月 2026 17:54:20 +0800
Subject: [PATCH] 修改排序

---
 src/main/resources/mapper/quality/QualityTestStandardMapper.xml |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/main/resources/mapper/quality/QualityTestStandardMapper.xml b/src/main/resources/mapper/quality/QualityTestStandardMapper.xml
index b9ad8ed..53eef84 100644
--- a/src/main/resources/mapper/quality/QualityTestStandardMapper.xml
+++ b/src/main/resources/mapper/quality/QualityTestStandardMapper.xml
@@ -13,22 +13,23 @@
         <if test="c.standardName != null and c.standardName != '' ">
             AND standard_name like concat('%',#{c.standardName},'%')
         </if>
-        <if test="c.state != null and c.state != '' ">
+        <if test="c.state != null ">
             AND state =#{c.state}
         </if>
-        <if test="c.inspectType != null and c.inspectType != '' ">
+        <if test="c.inspectType != null ">
             AND inspect_type =#{c.inspectType}
         </if>
+        order by create_time desc
     </select>
     <select id="getQualityTestStandardByProductId" resultType="com.ruoyi.quality.pojo.QualityTestStandard">
         SELECT qts.*
         FROM quality_test_standard qts
                  left join quality_test_standard_binding qtsb on qtsb.test_standard_id = qts.id
-                 left join product_process pp on qts.process_id = pp.id
+                 left join technology_operation toper on qts.process_id = toper.id
         WHERE qtsb.product_id = #{productId}
           AND qts.inspect_type = #{inspectType}
         <if test="process!='' and process!=null">
-            and pp.name = #{process}
+            and toper.name = #{process}
         </if>
         order by qts.id desc
     </select>

--
Gitblit v1.9.3