zhubaomin
2024-10-24 39c3762e13e83492ae98d3ef20f88f85f208bc95
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
@@ -543,8 +543,18 @@
            ) rtus ON con.rtuAddr = rtus.rtuAddr
        </if>
        WHERE con.intakeId is not null
        <if test="isOnLine != null">
            AND rtus.isOnLine = #{isOnLine}
        <if test="isOnLine != null and isOnLine == false">
            <choose>
                <when test="onLineMap != null and onLineMap !=''">
                    AND (rtus.isOnLine = false OR rtus.rtuAddr IS NULL)
                </when>
                <otherwise>
                    AND rtus.rtuAddr IS NULL
                </otherwise>
            </choose>
        </if>
        <if test="isOnLine != null and isOnLine == true">
            AND rtus.isOnLine = true
        </if>
        <if test="intakeNum != null and intakeNum != ''">
            AND inta.name = #{intakeNum}
@@ -561,6 +571,9 @@
        inta.lng,
        inta.lat,
        IFNULL(hou.total_amount, 0) AS totalAmount,
        <if test="onLineMap != null and onLineMap !='' and isOnLine != null">
            rtus.isOnLine,
        </if>
        alarm.alarm
        FROM pr_intake inta
        INNER JOIN pr_controller con ON con.intakeId = inta.id
@@ -588,8 +601,18 @@
            ) rtus ON con.rtuAddr = rtus.rtuAddr
        </if>
        WHERE con.intakeId is not null
        <if test="isOnLine != null">
            AND rtus.isOnLine = #{isOnLine}
        <if test="isOnLine != null and isOnLine == false">
            <choose>
                <when test="onLineMap != null and onLineMap !=''">
                    AND (rtus.isOnLine = false OR rtus.rtuAddr IS NULL)
                </when>
                <otherwise>
                    AND rtus.rtuAddr IS NULL
                </otherwise>
            </choose>
        </if>
        <if test="isOnLine != null and isOnLine == true">
            AND rtus.isOnLine = true
        </if>
        <if test="intakeNum != null and intakeNum != ''">
            AND inta.name = #{intakeNum}