From 62a7f3228c94db41bf57858a6549eb0db033bf1e Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期三, 29 五月 2024 11:44:17 +0800
Subject: [PATCH] 2024-05-29 朱宝民
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml | 59 +++++++++++++++++++++++++----------------------------------
1 files changed, 25 insertions(+), 34 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 37c0c6c..f656fde 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml
@@ -9,11 +9,7 @@
<result column="command_name" jdbcType="VARCHAR" property="commandName" />
<result column="rtuAddr" jdbcType="VARCHAR" property="rtuaddr" />
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
- <result column="command_type" jdbcType="VARCHAR" property="commandType" />
- <result column="callBack" jdbcType="VARCHAR" property="callback" />
-<!-- <result column="param" jdbcType="VARCHAR" property="param" />-->
<result column="param" property="param" jdbcType="JAVA_OBJECT" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" />
-
<result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<result column="result" jdbcType="TINYINT" property="result" />
@@ -22,8 +18,8 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
- id, command_code, command_name, rtuAddr, protocol, command_type, callBack, param,
- send_time, `operator`, `result`, result_time, result_text
+ id, command_code, command_name, rtuAddr, protocol, param, send_time, `operator`,
+ `result`, result_time, result_text
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -40,15 +36,13 @@
<insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmCommandHistory">
<!--@mbg.generated-->
insert into rm_command_history (id, command_code, command_name,
- rtuAddr, protocol, command_type,
- callBack, param, send_time,
- `operator`, `result`, result_time,
- result_text)
+ rtuAddr, protocol, param,
+ send_time, `operator`, `result`,
+ result_time, result_text)
values (#{id,jdbcType=BIGINT}, #{commandCode,jdbcType=VARCHAR}, #{commandName,jdbcType=VARCHAR},
- #{rtuaddr,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}, #{commandType,jdbcType=VARCHAR},
- #{callback,jdbcType=VARCHAR}, #{param,jdbcType= JAVA_OBJECT, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler}, #{sendTime,jdbcType=TIMESTAMP},
- #{operator,jdbcType=BIGINT}, #{result,jdbcType=TINYINT}, #{resultTime,jdbcType=TIMESTAMP},
- #{resultText,jdbcType= JAVA_OBJECT, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler})
+ #{rtuaddr,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}, #{param,jdbcType= JAVA_OBJECT, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler},
+ #{sendTime,jdbcType=TIMESTAMP}, #{operator,jdbcType=BIGINT}, #{result,jdbcType=TINYINT},
+ #{resultTime,jdbcType=TIMESTAMP}, #{resultText,jdbcType= JAVA_OBJECT, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler})
</insert>
<insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmCommandHistory">
<!--@mbg.generated-->
@@ -68,12 +62,6 @@
</if>
<if test="protocol != null">
protocol,
- </if>
- <if test="commandType != null">
- command_type,
- </if>
- <if test="callback != null">
- callBack,
</if>
<if test="param != null">
param,
@@ -109,12 +97,6 @@
</if>
<if test="protocol != null">
#{protocol,jdbcType=VARCHAR},
- </if>
- <if test="commandType != null">
- #{commandType,jdbcType=VARCHAR},
- </if>
- <if test="callback != null">
- #{callback,jdbcType=VARCHAR},
</if>
<if test="param != null">
#{param,jdbcType= JAVA_OBJECT, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler},
@@ -152,12 +134,6 @@
<if test="protocol != null">
protocol = #{protocol,jdbcType=VARCHAR},
</if>
- <if test="commandType != null">
- command_type = #{commandType,jdbcType=VARCHAR},
- </if>
- <if test="callback != null">
- callBack = #{callback,jdbcType=VARCHAR},
- </if>
<if test="param != null">
param = #{param,jdbcType= JAVA_OBJECT, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler},
</if>
@@ -186,8 +162,6 @@
command_name = #{commandName,jdbcType=VARCHAR},
rtuAddr = #{rtuaddr,jdbcType=VARCHAR},
protocol = #{protocol,jdbcType=VARCHAR},
- command_type = #{commandType,jdbcType=VARCHAR},
- callBack = #{callback,jdbcType=VARCHAR},
param = #{param,jdbcType= JAVA_OBJECT, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler},
send_time = #{sendTime,jdbcType=TIMESTAMP},
`operator` = #{operator,jdbcType=BIGINT},
@@ -196,4 +170,21 @@
result_text = #{resultText,jdbcType= JAVA_OBJECT, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler}
where id = #{id,jdbcType=BIGINT}
</update>
+
+ <!--鏍规嵁鎿嶄綔鍛業D鑾峰彇鏈叧闃�璁板綍-->
+ <select id="getUnclosedValves" resultType="com.dy.pipIrrGlobal.voRm.VoUnclosedValve">
+ SELECT
+ com.command_code AS commandCode,
+ inta.name AS intakeNum,
+ com.rtuAddr,
+ com.param ->>'$.orderNo' AS orderNo,
+ com.param ->>'$.icCardNo' AS vcNum,
+ com.send_time AS openTime
+ FROM rm_command_history com
+ INNER JOIN pr_controller con ON com.rtuAddr = con.rtuAddr
+ INNER JOIN pr_intake inta ON con.intakeId = inta.id
+ WHERE (com.command_code = '92' OR com.command_code = 'A2') AND com.operator = #{operator}
+ AND NOT EXISTS (SELECT * FROM rm_command_history WHERE (command_code = '93' OR command_code = 'A3') AND param ->>'$.orderNo' = com.param ->>'$.orderNo')
+ ORDER BY com.send_time DESC
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0