pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml
@@ -504,7 +504,7 @@
        oh.op_ic_card_no        AS openIcNum,
        oh.op_ic_card_addr      AS openIcAddr,
        oh.open_dt              AS openTime,
        oh.op_type              AS openType_,
        oh.op_type              AS opType,
        oh.op_order_no          AS openOrderNo,
        oh.op_total_amount      AS openTotalAmount,
        oh.op_remain_money      AS openRemainMoney,
@@ -513,7 +513,7 @@
        oh.cl_ic_card_no        AS closeIcNum,
        oh.cl_ic_card_addr      AS closeIcAddr,
        oh.close_dt             AS closeTime,
        oh.cl_type              AS closeType_,
        oh.cl_type              AS clType,
        oh.cl_this_amount       AS closeThisAmount,
        oh.cl_this_time         AS thisTime,
        oh.cl_price             AS closePrice,
@@ -522,7 +522,7 @@
        oh.cl_total_amount      AS closeTotalAmount
        FROM rm_open_close_valve_last oh
        LEFT JOIN pr_intake inta ON inta.id = oh.intake_id
        LEFT JOIN ba_client cl ON cl.id = oh.client_id
        LEFT JOIN se_client cl ON cl.id = oh.client_id
        <where>
            <if test="intakeId != null and intakeId > 0">
                AND oh.intake_id = #{intakeId}
@@ -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>
    <!--为指定(阀控器地址、水卡编号、无关阀记录)开关阀最新记录添加关阀时间,使之不在未关阀记录中显示-->