From 1a2b07f01ba4616fd9e894dddf474b56d020158c Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期一, 07 四月 2025 15:18:51 +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