From ff55f15de19cb5bf02fa4d2313f4882ef9b3a452 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 30 四月 2025 10:47:34 +0800
Subject: [PATCH] 表阀一体机上报心跳数据最小间隔经常改动,时常不通知软件开发人员,所以通信中间件根据最小上报数据间隔会切断设备网络连接,为此改变中间件配置,最小心跳间隔改为在properties文件中配置。
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml | 50 +++++++++++++++++++++++++++++---------------------
1 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml
index 7f1859a..c5dcab8 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml
@@ -351,6 +351,8 @@
<select id="getUnderVoltIntakes" resultType="com.dy.pipIrrGlobal.voSt.VoBatteryVolt">
SELECT inta.id AS intakeId,
inta.name AS intakeNum,
+ inta.lng AS lng,
+ inta.lat AS lat,
blo.name AS blockName,
hou.battery_volt AS batteryVolt,
hou.dt AS getDate
@@ -393,6 +395,8 @@
<select id="getSpecifiedSignalIntakes" resultType="com.dy.pipIrrGlobal.voSt.VoSignalIntensity">
SELECT inta.id AS intakeId,
inta.name AS intakeNum,
+ inta.lng AS lng,
+ inta.lat AS lat,
blo.name AS blockName,
hou.signal_value AS signValue,
hou.dt AS getDate
@@ -423,36 +427,40 @@
<!--鑾峰彇鏈�杩戞湭鎶ユ暟鐨勫彇姘村彛鏁伴噺-->
<select id="getUnReportedIntakesCount" resultType="java.lang.Long">
SELECT
- count(*)
- FROM pr_intake pit
- LEFT JOIN `rm_on_hour_report_last` rohrl ON pit.id = rohrl.intake_id
- LEFT JOIN pr_controller pct ON pit.id = pct.intakeId
- WHERE rohrl.id is NULL
+ count(*)
+ FROM pr_intake pit
+ LEFT JOIN `rm_on_hour_report_last` rohrl
+ ON (
+ pit.id = rohrl.intake_id
<if test="timeStart != null and timeStart != '' ">
- OR rohrl.rtu_dt < #{timeStart}
+ AND rohrl.dt > #{timeStart}
</if>
-<!-- <if test="timeStop != null and timeStop != '' ">-->
-<!-- OR rohrl.rtu_dt > #{timeStop}-->
-<!-- </if>-->
- ORDER BY rtu_dt ASC
+ )
+ LEFT JOIN ba_block bbl ON bbl.id = pit.blockId
+ LEFT JOIN pr_controller pct ON pit.id = pct.intakeId
+ WHERE rohrl.id is NULL
</select>
<!--鑾峰彇鏈�杩戞湭鎶ユ暟鐨勫彇姘村彛-->
<select id="getUnReportedIntakes" resultType="com.dy.pipIrrGlobal.voSt.VoIntakeUnReported">
SELECT
- pit.`name` intakeNum,
- pct.rtuAddr,
- rohrl.rtu_dt rtuDt
+ pit.id AS intakeId,
+ pit.`name` AS intakeNum,
+ pit.lng AS lng,
+ pit.lat AS lat,
+ bbl.name AS blockName,
+ pct.rtuAddr AS rtuAddr
FROM pr_intake pit
- LEFT JOIN `rm_on_hour_report_last` rohrl ON pit.id = rohrl.intake_id
+ LEFT JOIN `rm_on_hour_report_last` rohrl
+ ON (
+ pit.id = rohrl.intake_id
+ <if test="timeStart != null and timeStart != '' ">
+ AND rohrl.dt > #{timeStart}
+ </if>
+ )
+ LEFT JOIN ba_block bbl ON bbl.id = pit.blockId
LEFT JOIN pr_controller pct ON pit.id = pct.intakeId
WHERE rohrl.id is NULL
- <if test="timeStart != null">
- OR rohrl.rtu_dt < #{timeStart}
- </if>
-<!-- <if test="timeStop != null">-->
-<!-- OR rohrl.rtu_dt > #{timeStop}-->
-<!-- </if>-->
- ORDER BY rtu_dt ASC
+ ORDER BY pit.id DESC
<trim prefix="limit ">
<if test="start != null and count != null">
#{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
--
Gitblit v1.8.0