From 5e2faddb34e79918b73dc75aca8f63048dd4526d Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 15 七月 2024 20:53:33 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml |   29 +++++++++++++++++++++++++++--
 1 files changed, 27 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 af30365..3099a55 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
@@ -358,7 +358,7 @@
     WHERE id NOT IN(SELECT intakeId FROM pr_controller) AND deleted = 0
   </select>
 
-  <!--鑾峰彇鍙栨按鍙f暟閲忥紙鍦ㄧ嚎鍜屼笉鍦ㄥ厛锛�-->
+  <!--鑾峰彇鍙栨按鍙f暟閲忥紙鍦ㄧ嚎鍜屼笉鍦ㄥ厛锛� 搴熷純-->
   <select id="getOnLineIntakesCount" resultType="java.lang.Long">
     SELECT
         COUNT(*) AS recordCount
@@ -382,7 +382,7 @@
     </where>
   </select>
 
-  <!--鑾峰彇鍙栨按鍙e垪琛紙鍦ㄧ嚎鍜屼笉鍦ㄥ厛锛�-->
+  <!--鑾峰彇鍙栨按鍙e垪琛紙鍦ㄧ嚎鍜屼笉鍦ㄥ厛锛� 搴熷純-->
   <select id="getOnLineIntakes" resultType="com.dy.pipIrrGlobal.voPr.VoOnLineIntake">
     SELECT
       con.intakeId,
@@ -413,6 +413,31 @@
     </if>
   </select>
 
+  <!--鏍规嵁鍙栨按鍙g紪鍙疯幏鍙栧彇姘村彛瀵硅薄-->
+  <select id="getIntakeByName" resultType="com.dy.pipIrrGlobal.voPr.VoOnLineIntake">
+    SELECT
+      con.intakeId,
+      con.rtuAddr,
+      inta.name AS intakeNum,
+      rtus.isOnLine
+    FROM pr_controller con
+      INNER JOIN pr_intake inta ON con.intakeId = inta.id
+      left JOIN JSON_TABLE(
+        #{onLineMap},
+        '$[*]' COLUMNS(
+        rtuAddr VARCHAR(20) PATH '$.rtuAddr',
+        isOnLine BOOLEAN PATH '$.isOnLine'
+        )
+      ) rtus ON con.rtuAddr = rtus.rtuAddr
+    <where>
+      <if test="intakeNum != null and intakeNum != ''">
+        AND LOWER(inta.name) = #{intakeNum}
+      </if>
+    </where>
+    LIMIT 0,1
+
+  </select>
+
   <!--鏍规嵁鎿嶄綔鍛樿幏鍙栧父鐢ㄥ彇姘村彛-->
   <select id="getUsedIntakes" resultType="com.dy.pipIrrGlobal.voPr.VoOnLineIntake">
     SELECT

--
Gitblit v1.8.0