From 16e144456b5bf1f23dfbdc6b2d0f07307b0c2af2 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期二, 16 一月 2024 19:01:01 +0800
Subject: [PATCH] 2024-01-16 朱宝民 项目编号及协议列表转到Constant

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml |   22 ++++++++++++++++++++--
 1 files changed, 20 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..209c07b 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,19 @@
     <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, intakeId
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <!--@mbg.generated-->
@@ -32,8 +42,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 +220,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