liurunyu
2025-07-29 86eba8eaec4494bf29657333ea7b0385cb818578
修改用水户年用水量统计查询中的bug
1个文件已修改
20 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml
@@ -696,11 +696,9 @@
            FROM rm_open_close_valve_history his
            WHERE his.client_id = cli.id
            <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != ''">
                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) > #{openCount}
                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}
            </if>
            <if test="openCount != null">
                > #{openCount}
            </if>
            ) > #{openCount}
        </where>
    </select>
@@ -725,12 +723,10 @@
            (SELECT COUNT(*)
            FROM rm_open_close_valve_history his
            WHERE his.client_id = cli.id
            <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != ''">
                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) > #{openCount}
            <if test="timeStart != null and timeStart != '' and timeStop != null">
                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}
            </if>
            <if test="openCount != null">
                > #{openCount}
            </if>
            ) > #{openCount}
        </where>
        ORDER BY cli.id
        <trim prefix="limit ">
@@ -749,10 +745,10 @@
            FROM rm_open_close_valve_history his
            WHERE his.client_id = cli.id
            <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != ''">
                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) > #{openCount}
                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}
            </if>
            <if test="openCount != null">
                &lt; #{openCount}
                ) &lt; #{openCount}
            </if>
        </where>
    </select>
@@ -779,7 +775,7 @@
            FROM rm_open_close_valve_history his
            WHERE his.client_id = cli.id
            <if test="timeStart != null and timeStart != '' and timeStop != null and timeStop != ''">
                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}) > #{openCount}
                AND his.op_dt BETWEEN #{timeStart} AND #{timeStop}
            </if>
            <if test="openCount != null">
                &lt; #{openCount}