From 742b6bbac1b4609386817a6e6fb489ec098a5490 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期二, 21 一月 2025 18:29:44 +0800
Subject: [PATCH] 重构获取分水房详情接口
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml | 32 ++++++++++++++++++++++----------
1 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml
index ec4f68d..8b04ce5 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml
@@ -552,31 +552,43 @@
</select>
<!--鏍规嵁寮�闃�鏂瑰紡鑾峰彇鎿嶄綔娆℃暟-->
- <select id="getCountByOpenType" resultType="java.lang.Integer">
- SELECT COUNT(*) AS recordCount
+ <select id="getCountByOpenType" resultType="com.dy.pipIrrGlobal.voSt.VoCountOfOpenType">
+ SELECT
+ COUNT(*) AS openTypeCount,
+ op_type AS openType
FROM rm_open_close_valve_history
<where>
+ <if test="idStart != nul">
+ id <![CDATA[>=]]> #{idStart}
+ </if>
+ <if test="idEnd != nul">
+ AND id <![CDATA[<=]]> #{idEnd}
+ </if>
<if test="openType != null">
AND op_type = #{openType}
</if>
- <if test="timeStart != null and timeStop != null">
- AND op_dt BETWEEN #{timeStart} AND #{timeStop}
- </if>
</where>
+ group by op_type
</select>
<!--鏍规嵁鍏抽榾鏂瑰紡鑾峰彇鎿嶄綔娆℃暟-->
- <select id="getCountByCloseType" resultType="java.lang.Integer">
- SELECT COUNT(*) AS recordCount
+ <select id="getCountByCloseType" resultType="com.dy.pipIrrGlobal.voSt.VoCountOfCloseType">
+ SELECT
+ COUNT(*) AS closeTypeCount,
+ cl_type AS closeType
FROM rm_open_close_valve_history
<where>
+ <if test="idStart != nul">
+ id <![CDATA[>=]]> #{idStart}
+ </if>
+ <if test="idEnd != nul">
+ AND id <![CDATA[<=]]> #{idEnd}
+ </if>
<if test="closeType != null">
AND cl_type = #{closeType}
</if>
- <if test="timeStart != null and timeStop != null">
- AND cl_dt BETWEEN #{timeStart} AND #{timeStop}
- </if>
</where>
+ group by cl_type
</select>
<!--涓烘寚瀹氾紙闃�鎺у櫒鍦板潃銆佹按鍗$紪鍙枫�佹棤鍏抽榾璁板綍锛夊紑鍏抽榾鏈�鏂拌褰曟坊鍔犲叧闃�鏃堕棿锛屼娇涔嬩笉鍦ㄦ湭鍏抽榾璁板綍涓樉绀�-->
--
Gitblit v1.8.0