From 7a2fa8d7481a3eb0a39dc9e434776b7ae05013b0 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期三, 03 七月 2024 08:44:16 +0800
Subject: [PATCH] 2024-07-03 朱宝民 获取充值记录兼容10位水卡编号

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml
index aee1cf2..203967b 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml
@@ -227,7 +227,8 @@
       INNER JOIN pr_controller con ON com.rtu_addr = con.rtuAddr
       INNER JOIN pr_intake inta ON con.intakeId = inta.id
       INNER JOIN JSON_TABLE(
-      '[{"rtuAddr":"620201000029","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',
+<!--      '[{"rtuAddr":"620201000029","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',-->
+        #{onLineMap},
       '$[*]' COLUMNS(
       rtuAddr VARCHAR(20) PATH '$.rtuAddr',
       isOnLine BOOLEAN PATH '$.isOnLine'
@@ -245,4 +246,27 @@
       LIMIT 0,1
   </select>
 
+  <select id="getCommandHistories" resultType="com.dy.pipIrrGlobal.voRm.VoCommand">
+
+    SELECT
+      his.id,
+      his.command_name AS commandName,
+      inta.name AS intakeName,
+      his.rtu_addr AS rtuAddr,
+      his.protocol,
+      his.send_time AS sendTime,
+      his.result_time AS resultTime,
+      (CASE
+         WHEN his.result = 1 THEN "鎴愬姛"
+         ELSE "澶辫触"
+        END) AS result,
+      his.result_text,
+      IFNULL(cli.name, user.name) AS userName
+    FROM rm_command_history his
+           INNER JOIN pr_intake inta ON inta.id = his.intake_id
+           LEFT JOIN se_client cli ON cli.id = his.operator
+           LEFT JOIN ba_user  user ON user.id = his.operator
+    WHERE his.command_name LIKE '%鍏抽榾%' AND his.result =1 AND his.send_time BETWEEN '2024-06-01 00:00:00' AND '2024-07-31 23:59:59'
+  </select>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0