From 4783fc799e4416c4c90e07afd00e733502f0bba8 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 31 十月 2024 16:09:11 +0800
Subject: [PATCH] 1、更新日漏损最新记录有bug(新生成了记录,应该是更新老记录),修改之 ; 2、CommonV1_0_0中获取开关阀类型名称时,对于null返回空字符串。
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateHistoryMapper.xml | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateHistoryMapper.xml
index 069917c..5fc59a3 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateHistoryMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateHistoryMapper.xml
@@ -353,7 +353,7 @@
<select id="getRecordCount" resultType="java.lang.Long">
select count(*)
from rm_alarm_state_history rash
- Left join pr_intake pint on intake_id = pint.id
+ Left join pr_intake pint on rash.intake_id = pint.id
<where>
<if test="alarmState == 1">
and (
@@ -396,8 +396,11 @@
<if test="valveState != null">
and rash.valve_state = #{valveState,jdbcType=TINYINT}
</if>
- <if test="intakeName != null">
- and pint.name = #{intakeName,jdbcType=VARCHAR}
+ <if test="intakeId != null and intakeId != '' ">
+ and rash.intake_id = #{intakeId}
+ </if>
+ <if test="intakeName != null and intakeName != '' ">
+ and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
</if>
<if test="startDt != null">
and rash.dt >= #{startDt,jdbcType=TIMESTAMP}
@@ -434,7 +437,7 @@
rash.alarm_valve as alarmValve,
rash.power_type as powerType
from rm_alarm_state_history rash
- Left join pr_intake pint on intake_id = pint.id
+ Left join pr_intake pint on rash.intake_id = pint.id
<where>
<if test="alarmState == 1">
and (
@@ -477,7 +480,10 @@
<if test="valveState != null">
and rash.valve_state = #{valveState,jdbcType=TINYINT}
</if>
- <if test="intakeName != null">
+ <if test="intakeId != null and intakeId != '' ">
+ and rash.intake_id = #{intakeId}
+ </if>
+ <if test="intakeName != null and intakeName != '' ">
and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
</if>
<if test="startDt != null">
@@ -487,7 +493,7 @@
and rash.dt <= #{endDt,jdbcType=TIMESTAMP}
</if>
</where>
- ORDER BY rash.dt DESC
+ ORDER BY rash.id DESC
<if test="pageCurr != null and pageSize != null">
LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
</if>
--
Gitblit v1.8.0