From 1c8ab7e48b85ab6ee54cebc691467041fbf2799b Mon Sep 17 00:00:00 2001
From: deslrey <deslre0381@gmail.com>
Date: 星期一, 12 一月 2026 14:54:59 +0800
Subject: [PATCH] 外购报告调整:电缆颜色顺序要与下单一致

---
 inspect-server/src/main/resources/mapper/InsOrderMapper.xml |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/inspect-server/src/main/resources/mapper/InsOrderMapper.xml b/inspect-server/src/main/resources/mapper/InsOrderMapper.xml
index 18f7a41..df67330 100644
--- a/inspect-server/src/main/resources/mapper/InsOrderMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsOrderMapper.xml
@@ -326,6 +326,7 @@
         ORDER BY COUNT(*) DESC
         LIMIT 1;
     </select>
+
     <select id="selectSampleCableTag" resultType="java.lang.String">
         SELECT ip.cable_tag
         FROM ins_sample isa
@@ -333,10 +334,11 @@
                  LEFT JOIN ins_product ip ON isa.id = ip.ins_sample_id
         WHERE ip.state = 1
           AND isa.id = #{id}
-          and ip.cable_tag is not null
+          AND ip.cable_tag IS NOT NULL
         GROUP BY ip.cable_tag
-        order by ip.cable_tag
+        ORDER BY MIN(ip.id)
     </select>
+
     <select id="selectSampleItemS" resultType="java.lang.Integer">
         select count(*)
         from (select distinct ip.inspection_item

--
Gitblit v1.9.3