From 72d81a467c21fa0b528565ce4150291d257a5a23 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期四, 27 六月 2024 16:49:07 +0800
Subject: [PATCH] 2024-06-27 朱宝民 优化字典项返回值

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
index 1d5434d..939f3f1 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
@@ -224,6 +224,7 @@
       ge.deleted = 0
       AND divi.deleted = 0
       and blo.deleted = 0
+      and cont.deleted = 0
       <if test="intakeName != null and intakeName != ''">
         AND ge.name LIKE CONCAT('%', #{intakeName}, '%')
       </if>
@@ -283,6 +284,7 @@
       ge.deleted = 0
       AND divi.deleted = 0
       and blo.deleted = 0
+      and cont.deleted = 0
       <if test="intakeName != null and intakeName != ''">
         AND ge.name LIKE CONCAT('%', #{intakeName}, '%')
       </if>
@@ -364,7 +366,7 @@
         COUNT(*) AS recordCount
     FROM pr_controller con
         INNER JOIN pr_intake inta ON con.intakeId = inta.id
-        INNER JOIN JSON_TABLE(
+        left JOIN JSON_TABLE(
         <!--'[{"rtuAddr":"37142501020100215","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',-->
         #{onLineMap},
         '$[*]' COLUMNS(
@@ -391,7 +393,7 @@
       rtus.isOnLine
     FROM pr_controller con
         INNER JOIN pr_intake inta ON con.intakeId = inta.id
-        INNER JOIN JSON_TABLE(
+        left JOIN JSON_TABLE(
             <!--'[{"rtuAddr":"37142501020100215","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',-->
             #{onLineMap},
             '$[*]' COLUMNS(
@@ -407,6 +409,7 @@
         AND inta.name LIKE CONCAT('%', #{intakeNum}, '%')
       </if>
     </where>
+    order by con.id ASC
     <if test="pageCurr != null and pageSize != null">
       LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
     </if>

--
Gitblit v1.8.0