From cef843b8175ab3775036f705f7cf69e4bd32c4f3 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 16 一月 2024 16:53:07 +0800
Subject: [PATCH] 1、修改获得绑定控制器的方法; 2、添加文档“取水口控制哭喊及测控数据关系”

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml
index 9227924..fa8b81d 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml
@@ -14,9 +14,18 @@
     <result column="operateDt" jdbcType="TIMESTAMP" property="operateDt" />
     <result column="deleted" jdbcType="TINYINT" property="deleted" />
   </resultMap>
+  <resultMap id="PartResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrController">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="intakeId" jdbcType="BIGINT" property="intakeId" />
+    <result column="rtuAddr" jdbcType="VARCHAR" property="rtuAddr" />
+  </resultMap>
   <sql id="Base_Column_List">
     <!--@mbg.generated-->
     id, intakeId, rtuAddr, protocol, findDt, addWays, `operator`, operateDt, deleted
+  </sql>
+  <sql id="Part_Column_List">
+    <!--@mbg.generated-->
+    id, rtuAddr
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <!--@mbg.generated-->
@@ -32,8 +41,8 @@
   </delete>
   <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController">
     <!--@mbg.generated-->
-    insert into pr_controller (id, intakeId, rtuAddr, 
-      protocol, findDt, addWays, 
+    insert into pr_controller (id, intakeId, rtuAddr,
+      protocol, findDt, addWays,
       `operator`, operateDt, deleted
       )
     values (#{id,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT}, #{rtuAddr,jdbcType=VARCHAR},
@@ -210,6 +219,14 @@
     SELECT id, rtuAddr FROM pr_controller WHERE deleted = 0 AND rtuAddr LIKE CONCAT('%',#{rtuAddr},'%')
   </select>
 
+  <!--鏍规嵁鎺у埗鍣ㄥ湴鍧�鑾峰彇鎺у埗鍣ㄥ垪琛�-->
+  <select id="getControllersByRtuAddrAndIntakeNotNull" parameterType="java.lang.String" resultMap="PartResultMap">
+    SELECT
+    <include refid="Part_Column_List">
+    </include>
+    FROM pr_controller WHERE deleted = 0 AND intakeId is not null AND rtuAddr=#{rtuAddr,jdbcType=VARCHAR}
+  </select>
+
   <!--鏍规嵁鎺у埗鍣ㄧ紪鍙烽�昏緫鍒犻櫎鎺у埗-->
   <update id="deleteControllerById">
     UPDATE pr_controller SET deleted = 1 WHERE id = ${controllerId}

--
Gitblit v1.8.0