From b4c6816d3016e26d908c55d3a194d972b998e952 Mon Sep 17 00:00:00 2001 From: wuzeyu <1223318623@qq.com> Date: 星期三, 08 一月 2025 14:42:30 +0800 Subject: [PATCH] 优化接口 水卡使用情况(充值、消费、余额) --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml | 36 ++++++++++++++++++++++-------------- 1 files changed, 22 insertions(+), 14 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml index 9c251e9..7f1859a 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml @@ -285,11 +285,13 @@ <!--鑾峰彇绱娴侀噺瓒呰繃鎸囧畾鍊肩殑鍙栨按鍙�--> <select id="getLargeFlowIntakes" resultType="com.dy.pipIrrGlobal.voSt.VoCumulativeFlow"> - SELECT inta.id AS intakeId, - inta.name AS intakeNum, - blo.name AS blockName, - CAST(hou.total_amount AS DECIMAL(10, 2)) AS cumulativeFlow, - hou.dt AS getDate + SELECT inta.id AS intakeId, + inta.name AS intakeNum, + inta.lng AS lng, + inta.lat AS lat, + blo.name AS blockName, + hou.total_amount AS cumulativeFlow, + hou.dt AS getDate FROM pr_intake inta INNER JOIN rm_on_hour_report_last hou ON hou.intake_id = inta.id INNER JOIN ba_block blo ON blo.id = inta.blockId @@ -317,10 +319,11 @@ <select id="getSmallFlowIntakes" resultType="com.dy.pipIrrGlobal.voSt.VoCumulativeFlow"> SELECT inta.id AS intakeId, inta.name AS intakeNum, + inta.lng AS lng, + inta.lat AS lat, blo.name AS blockName, - <!-- FORMAT(hou.total_amount,2) AS cumulativeFlow,--> - CAST(hou.total_amount AS DECIMAL(10, 2)) AS cumulativeFlow, - hou.dt AS getDate + hou.total_amount AS cumulativeFlow, + hou.dt AS getDate FROM pr_intake inta INNER JOIN rm_on_hour_report_last hou ON hou.intake_id = inta.id INNER JOIN ba_block blo ON blo.id = inta.blockId @@ -428,9 +431,9 @@ <if test="timeStart != null and timeStart != '' "> OR rohrl.rtu_dt < #{timeStart} </if> - <if test="timeStop != null and timeStop != '' "> - OR rohrl.rtu_dt > #{timeStop} - </if> +<!-- <if test="timeStop != null and timeStop != '' ">--> +<!-- OR rohrl.rtu_dt > #{timeStop}--> +<!-- </if>--> ORDER BY rtu_dt ASC </select> <!--鑾峰彇鏈�杩戞湭鎶ユ暟鐨勫彇姘村彛--> @@ -446,9 +449,14 @@ <if test="timeStart != null"> OR rohrl.rtu_dt < #{timeStart} </if> - <if test="timeStop != null"> - OR rohrl.rtu_dt > #{timeStop} - </if> +<!-- <if test="timeStop != null">--> +<!-- OR rohrl.rtu_dt > #{timeStop}--> +<!-- </if>--> ORDER BY rtu_dt ASC + <trim prefix="limit "> + <if test="start != null and count != null"> + #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} + </if> + </trim> </select> </mapper> \ No newline at end of file -- Gitblit v1.8.0