liurunyu
2024-10-25 f16c96a3bbd126dca21b254ceb018a0558f5ea1d
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml
@@ -476,7 +476,7 @@
                   WHEN oh.op_type = 3 THEN '中心站开阀'
                   WHEN oh.op_type = 5 THEN '余额不足关阀'
                   WHEN oh.op_type = 8 THEN '用户远程开阀'
                   WHEN oh.op_type = 11 THEN '开关阀卡开阀'
                   WHEN oh.op_type = 11 THEN '巡检卡开阀'
                   ELSE '未知'
                   END                 AS openType,
               oh.op_order_no          AS openOrderNo,
@@ -494,7 +494,7 @@
                   WHEN oh.cl_type = 6 THEN '流量计故障关阀'
                   WHEN oh.cl_type = 7 THEN '紧急关闭'
                   WHEN oh.cl_type = 9 THEN '用户远程关阀'
                   WHEN oh.cl_type = 10 THEN '开关阀卡关阀'
                   WHEN oh.cl_type = 10 THEN '巡检卡关阀'
                   WHEN oh.cl_type = 12 THEN '黑名单命令关阀'
                   WHEN oh.cl_type = 13 THEN '用户远程定时关阀'
                   WHEN oh.cl_type = 14 THEN '用户远程定量关阀'
@@ -1270,7 +1270,12 @@
        SELECT COUNT(*) AS recordCount
        FROM rm_open_close_valve_history his
                 LEFT JOIN pr_intake inta ON inta.id = his.intake_id
        WHERE op_type  = 1
        <where>
            AND op_type  = 1
            <if test = "clientId != null">
                AND his.client_id = #{clientId}
            </if>
        </where>
    </select>
    <!--获取物理卡开关阀记录,微信小程序使用-->
@@ -1286,7 +1291,12 @@
            '刷卡开阀' AS openType
        FROM rm_open_close_valve_history his
                 LEFT JOIN pr_intake inta ON inta.id = his.intake_id
        WHERE op_type  = 1
        <where>
            AND op_type  = 1
            <if test = "clientId != null">
                AND his.client_id = #{clientId}
            </if>
        </where>
        ORDER BY open_dt DESC
        <trim prefix="limit " >
            <if test="start != null and count != null">
@@ -1300,7 +1310,12 @@
        SELECT COUNT(*) AS recordCount
        FROM rm_open_close_valve_history his
                 LEFT JOIN pr_intake inta ON inta.id = his.intake_id
        WHERE op_type  = 8
        <where>
            AND op_type  = 8
            <if test = "clientId != null">
                AND his.client_id = #{clientId}
            </if>
        </where>
    </select>
    <!--获取虚拟卡开关阀记录,微信小程序使用-->
@@ -1320,7 +1335,12 @@
                END AS openType
        FROM rm_open_close_valve_history his
                 LEFT JOIN pr_intake inta ON inta.id = his.intake_id
        WHERE op_type  = 8
        <where>
            AND op_type  = 8
            <if test = "clientId != null">
                AND his.client_id = #{clientId}
            </if>
        </where>
        ORDER BY open_dt DESC
        <trim prefix="limit " >
            <if test="start != null and count != null">