From 1f46976c9ee72d7889fceee968db9c8aef885eca Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 28 十月 2024 17:28:15 +0800 Subject: [PATCH] 远程监控中开关阀记录查询重构,增加了水价信息,调整了显示内容,优化SQL语句,开闭阀类型改为通信协议中的Common*.*.java中的统一匹配。 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml index fc3b608..a40bbe2 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml @@ -35,6 +35,10 @@ delete from pr_controller_tramp where id = #{id,jdbcType=BIGINT} </delete> + <!--娓呯┖娴佹氮鎺у埗鍣ㄨ〃--> + <delete id="emptyTrampController"> + delete from pr_controller_tramp + </delete> <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrControllerTramp"> <!--@mbg.generated--> insert into pr_controller_tramp (id, rtuAddr, protocol, @@ -116,7 +120,7 @@ <!--鏍规嵁鎺у埗鍣ㄧ紪鍙疯幏鍙栨祦娴帶鍒跺櫒淇℃伅--> <select id="getTrampControllerInfo" resultMap="BaseResultMap"> - SELECT rtuAddr, protocol, findDt FROM pr_controller_tramp WHERE id = #{controllerId} + SELECT rtuAddr, protocol, findDt, orgTag FROM pr_controller_tramp WHERE id = #{controllerId} </select> <!-- 鏍规嵁鏉′欢鑾峰彇娴佹氮鎺у埗鍣ㄤ俊鎭�--> @@ -132,13 +136,19 @@ id = #{id,jdbcType=VARCHAR} </if> <if test="rtuAddr != null and rtuAddr != ''"> - AND rtuAddr = #{rtuAddr,jdbcType=VARCHAR} + AND rtuAddr = #{rtuAddr,jdbcType=VARCHAR} </if> <if test="protocol != null and protocol != ''"> - AND protocol = #{protocol,jdbcType=VARCHAR} + AND protocol = #{protocol,jdbcType=VARCHAR} </if> </where> - </select> + order by id desc + <trim prefix="limit " > + <if test="start != null and count != null"> + #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} + </if> + </trim> +</select> <!-- 鏍规嵁鏉′欢鑾峰彇娴佹氮鎺у埗鍣ㄦ暟閲�--> <select id="getTrampControllersCount" resultType="java.lang.Long"> select -- Gitblit v1.8.0