chengf
2026-01-27 b6184e2ddf3db37a94f7efb3b619bbc64642a292
java110-db/src/main/resources/mapper/fee/PropertyWhiteListFlowDaoImplMapper.xml
@@ -26,7 +26,13 @@
            <if test="licensePlate != null">license_plate,</if>
            <if test="category22 != null">category_22,</if>
            <if test="chargeStart != null">charge_start,</if>
            <if test="chargeEnd != null">charge_end</if>
            <if test="chargeEnd != null">charge_end,</if>
            <if test="communityId != null">community_id,</if>
            <if test="frequency != null">frequency</if>
            <if test="receiptYearMonth != null">receipt_year_month,</if>
            <if test="receiptYear != null">receipt_year,</if>
            <if test="pendingProblem != null">pending_problem,</if>
            <if test="roomNumber != null">room_number</if>
        </trim> VALUES
        <trim prefix="(" suffix=")" suffixOverrides=",">
            #{chargeTime},
@@ -51,7 +57,13 @@
            <if test="licensePlate != null">#{licensePlate},</if>
            <if test="category22 != null">#{category22},</if>
            <if test="chargeStart != null">#{chargeStart},</if>
            <if test="chargeEnd != null">#{chargeEnd}</if>
            <if test="chargeEnd != null">#{chargeEnd},</if>
            <if test="communityId != null">#{communityId},</if>
            <if test="frequency != null">#{frequency}</if>
            <if test="receiptYearMonth != null">#{receiptYearMonth},</if>
            <if test="receiptYear != null">#{receiptYear},</if>
            <if test="pendingProblem != null">#{pendingProblem},</if>
            <if test="roomNumber != null">#{roomNumber}</if>
        </trim>
    </insert>
    <select id="queryPropertyWhiteListFlow" parameterType="Map" resultType="Map">
@@ -62,6 +74,9 @@
        room_id AS roomId,
        property_address AS propertyAddress,
        door_room_num AS doorRoomNum,
        SUBSTRING_INDEX(door_room_num, '-', 1) AS floorNum,
        SUBSTRING_INDEX(SUBSTRING_INDEX(door_room_num, '-', 2), '-', -1) AS unitNum,
        SUBSTRING_INDEX(door_room_num, '-', -1) AS roomNum,
        secondary_fee_type_cd AS secondaryFeeTypeCd,
        charge_amount AS chargeAmount,
        charger,
@@ -80,7 +95,9 @@
        category_22 AS category22,
        charge_start AS chargeStart,
        charge_end AS chargeEnd,
        community_id AS communityId
        community_id AS communityId,
        frequency,
        SUBSTRING_INDEX(frequency, '-', -1) as order_fre
        FROM
        property_white_list_flow
        <where>
@@ -91,7 +108,9 @@
            <if test="endChargeTime != null">
                AND charge_time &lt;= #{endChargeTime}
            </if>
            <if test="frequencyLike != null">
                AND frequency like concat(#{frequencyLike},"%")
            </if>
            <!-- 房号查询 -->
            <if test="roomId != null and roomId != ''">
                AND room_id = #{roomId}
@@ -101,7 +120,9 @@
            <if test="secondaryFeeTypeCd != null and secondaryFeeTypeCd != ''">
                AND secondary_fee_type_cd = #{secondaryFeeTypeCd}
            </if>
            <if test="invoice_receipt_no != null">
                AND invoice_receipt_no = #{invoiceReceiptNo}
            </if>
            <!-- 收费金额范围查询 -->
            <if test="minChargeAmount != null">
                AND charge_amount >= #{minChargeAmount}
@@ -125,16 +146,11 @@
            <if test="feeYear != null and feeYear != ''">
                and YEAR(charge_time) = #{feeYear}
            </if>
            <if test="communityId != null and communityId != ''">
                and community_id = #{communityId}
            </if>
        </where>
        <!-- 排序 -->
        <if test="orderBy != null and orderBy != ''">
            ORDER BY ${orderBy}
        </if>
        <if test="orderBy == null">
            ORDER BY charge_time DESC
        </if>
        order by order_fre desc,door_room_num,secondary_fee_type_cd,charge_start
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
@@ -186,6 +202,9 @@
            <if test="feeYear != null and feeYear != ''">
                and YEAR(charge_time) = #{feeYear}
            </if>
            <if test="communityId != null and communityId != ''">
                and community_id = #{communityId}
            </if>
        </where>
    </select>
    <select id="countPropertyWhiteListFlowFilter" parameterType="Map" resultType="Map">
@@ -221,6 +240,12 @@
            <if test="chargeEnd != null">
                AND charge_end = #{chargeEnd}
            </if>
            <if test="communityId != null and communityId != ''">
                and community_id = #{communityId}
            </if>
        </where>
    </select>
    <update id="updatePropertyWhiteListFlow">
        update property_white_list_flow set frequency = #{frequency} where id = #{id}
    </update>
</mapper>