liurunyu
2024-10-24 3a6ac2949244e6a3f70e165cd3802f1d90b78819
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmAlarmStateHistoryMapper.xml
@@ -353,7 +353,7 @@
<select id="getRecordCount" resultType="java.lang.Long">
    select count(*)
    from rm_alarm_state_history rash
    Left join pr_intake pint on intake_id = pint.id
    Left join pr_intake pint on rash.intake_id = pint.id
    <where>
       <if test="alarmState == 1">
                and (
@@ -396,8 +396,11 @@
        <if test="valveState != null">
            and rash.valve_state = #{valveState,jdbcType=TINYINT}
        </if>
        <if test="intakeName != null">
             and pint.name = #{intakeName,jdbcType=VARCHAR}
        <if test="intakeId != null and intakeId != '' ">
            and rash.intake_id = #{intakeId}
        </if>
        <if test="intakeName != null and intakeName != '' ">
            and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
        </if>
        <if test="startDt != null">
             and rash.dt &gt;= #{startDt,jdbcType=TIMESTAMP}
@@ -434,7 +437,7 @@
        rash.alarm_valve as alarmValve,
        rash.power_type as powerType
        from rm_alarm_state_history rash
        Left join pr_intake pint on intake_id = pint.id
        Left join pr_intake pint on rash.intake_id = pint.id
        <where>
            <if test="alarmState == 1">
                and (
@@ -477,7 +480,10 @@
            <if test="valveState != null">
                and rash.valve_state = #{valveState,jdbcType=TINYINT}
            </if>
            <if test="intakeName != null">
            <if test="intakeId != null and intakeId != '' ">
                and rash.intake_id = #{intakeId}
            </if>
            <if test="intakeName != null and intakeName != '' ">
                and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
            </if>
            <if test="startDt != null">
@@ -487,7 +493,7 @@
                and rash.dt &lt;= #{endDt,jdbcType=TIMESTAMP}
            </if>
        </where>
        ORDER BY rash.dt DESC
        ORDER BY rash.id DESC
        <if test="pageCurr != null and pageSize != null">
            LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
        </if>