From 7efbf921192559cad13a4f8086c46c3617ad2a05 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 31 十月 2024 08:34:42 +0800
Subject: [PATCH] 1、协议解析中,关阀报(83)中的RTU时钟改为关阀时间,但代码误注解掉了这行代码,修改之; 2、通信中间件测试web系统增加查询所在在线情况的命令下发。
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml | 40 +++++++++++++++++++++-------------------
1 files changed, 21 insertions(+), 19 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 f7bf939..a75444d 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
@@ -232,7 +232,7 @@
LEFT JOIN ba_district village ON ge.villageId = village.id
LEFT JOIN pr_controller cont ON ge.id = cont.intakeId
<if test = "bindNumber != null and bindNumber > 0">
- JOIN (SELECT intakeId, COUNT(*) num FROM pr_intake_controller WHERE operateType = 1 group by intakeId) AS bindNumTb on bindNumTb.intakeId= ge.id
+ LEFT JOIN (SELECT intakeId, COUNT(*) num FROM pr_intake_controller WHERE operateType = 1 group by intakeId) AS bindNumTb on bindNumTb.intakeId= ge.id
</if>
<where>
ge.deleted = 0
@@ -302,7 +302,7 @@
LEFT JOIN ba_district town ON ge.townId = town.id
LEFT JOIN ba_district village ON ge.villageId = village.id
LEFT JOIN pr_controller cont ON ge.id = cont.intakeId
- JOIN (SELECT intakeId, COUNT(*) num FROM pr_intake_controller WHERE operateType = 1 group by intakeId) AS bindNumTb on bindNumTb.intakeId= ge.id
+ LEFT JOIN (SELECT intakeId, COUNT(*) num FROM pr_intake_controller WHERE operateType = 1 group by intakeId) AS bindNumTb on bindNumTb.intakeId= ge.id
<where>
ge.deleted = 0
AND divi.deleted = 0
@@ -637,26 +637,28 @@
<!--鏍规嵁鎿嶄綔鍛樿幏鍙栧父鐢ㄥ彇姘村彛-->
<select id="getUsedIntakes" resultType="com.dy.pipIrrGlobal.voPr.VoOnLineIntake">
- SELECT DISTINCT con.intakeId,
- con.rtuAddr,
- inta.name AS intakeNum,
- rtus.isOnLine
- FROM pr_controller con
- INNER JOIN pr_intake inta ON con.intakeId = inta.id
- INNER JOIN rm_command_history com ON con.rtuAddr = com.rtu_addr
- INNER JOIN JSON_TABLE(
- <!--'[{"rtuAddr":"37142501020100215","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',-->
- #{onLineMap},
- '$[*]' COLUMNS (
- rtuAddr VARCHAR(20) PATH '$.rtuAddr',
- isOnLine BOOLEAN PATH '$.isOnLine'
- )
- ) rtus ON con.rtuAddr = rtus.rtuAddr
+ SELECT
+ com.intake_id AS intakeId,
+ con.rtuAddr,
+ inta.name AS intakeNum,
+ rtus.isOnLine
+ FROM pr_common_intakes com
+ INNER JOIN pr_intake inta ON inta.id = com.intake_id
+ INNER JOIN pr_controller con ON con.intakeId = com.intake_id
+ LEFT JOIN JSON_TABLE(
+ <!--'[{"rtuAddr":"530115059980","isOnLine":true},{"rtuAddr":"620201000030","isOnLine":true}]',-->
+ #{onLineMap},
+ '$[*]' COLUMNS (
+ rtuAddr VARCHAR(20) PATH '$.rtuAddr',
+ isOnLine BOOLEAN PATH '$.isOnLine'
+ )
+ ) rtus ON con.rtuAddr = rtus.rtuAddr
<where>
- <if test="operator != null">
- com.operator = #{operator}
+ <if test="operatorId != null">
+ AND com.operator_id = #{operatorId}
</if>
</where>
+ ORDER BY com.last_used_time DESC,com.usage_count DESC
</select>
<!--鍙栨按鍙e悕绉版崲鍙栨按鍙D锛屾壂鐮佸紑闃�浣跨敤-->
--
Gitblit v1.8.0