From 007e33dd8728b4557917a2ffa2e2449865602742 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期一, 04 十二月 2023 16:10:48 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeALlCodeMapper.xml |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeALlCodeMapper.xml b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeALlCodeMapper.xml
index 201be73..1a108c6 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeALlCodeMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeALlCodeMapper.xml
@@ -8,11 +8,18 @@
 
     <select id="selectCodeAllCodePage" resultMap="CodeAllcodeResultMap">
         select * from PL_CODE_ALLCODE
-        <where>
-            <if test="tenantId != null and tenantId != ''">
-                TENANT_ID = #{tenantId}
-            </if>
-        </where>
+    </select>
+    <select id="selectGroupByClassify" resultMap="CodeAllcodeResultMap">
+        select codeClassifyOid,
+               codeRuleOid,
+               serialUnit,
+               max(unFillSerial) unFillSerial
+        from (select codeClassifyOid,
+                     codeRuleOid,
+                     serialUnit,
+                     to_number(replace(unFillSerial, ${replaceString}, '')) unFillSerial
+              from PL_CODE_ALLCODE where codeClassifyOid in (${codeClassifyOid}))
+        group by codeClassifyOid, codeRuleOid, serialUnit
     </select>
 
 </mapper>

--
Gitblit v1.9.3