jialh
7 小时以前 d0b19298e28a9b8b50c778704b77160f17e73950
java110-db/src/main/resources/mapper/fee/PropertyWhiteListFlowDaoImplMapper.xml
@@ -9,6 +9,9 @@
            <if test="roomId != null">room_id,</if>
            <if test="propertyAddress != null">property_address,</if>
            <if test="doorRoomNum != null">door_room_num,</if>
            <if test="doorRoomNum != null">nong,</if>
            <if test="doorRoomNum != null">men,</if>
            <if test="doorRoomNum != null">shi,</if>
            <if test="secondaryFeeTypeCd != null">secondary_fee_type_cd,</if>
            <if test="chargeAmount != null">charge_amount,</if>
            <if test="charger != null">charger,</if>
@@ -28,7 +31,11 @@
            <if test="chargeStart != null">charge_start,</if>
            <if test="chargeEnd != null">charge_end,</if>
            <if test="communityId != null">community_id,</if>
            <if test="frequency != null">frequency</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},
@@ -36,6 +43,9 @@
            <if test="roomId != null">#{roomId},</if>
            <if test="propertyAddress != null">#{propertyAddress},</if>
            <if test="doorRoomNum != null">#{doorRoomNum},</if>
            <if test="doorRoomNum != null">SUBSTRING_INDEX(#{doorRoomNum}, '-', 1),</if>
            <if test="doorRoomNum != null">SUBSTRING_INDEX(SUBSTRING_INDEX(#{doorRoomNum}, '-', 2), '-', -1),</if>
            <if test="doorRoomNum != null">SUBSTRING_INDEX(#{doorRoomNum}, '-', -1),</if>
            <if test="secondaryFeeTypeCd != null">#{secondaryFeeTypeCd},</if>
            <if test="chargeAmount != null">#{chargeAmount},</if>
            <if test="charger != null">#{charger},</if>
@@ -55,9 +65,14 @@
            <if test="chargeStart != null">#{chargeStart},</if>
            <if test="chargeEnd != null">#{chargeEnd},</if>
            <if test="communityId != null">#{communityId},</if>
            <if test="frequency != null">#{frequency}</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">
        SELECT
        id,
@@ -86,11 +101,30 @@
        charge_end AS chargeEnd,
        community_id AS communityId,
        frequency,
        receipt_year_month AS receiptYearMonth,
        receipt_year AS receiptYear,
        pending_problem AS pendingProblem,
        room_number AS roomNumber,
        financial_check AS financialCheck,
        check_date AS checkDate,
        nong,
        men,
        shi,
        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,
        SUBSTRING_INDEX(frequency, '-', -1) as order_fre
        FROM
        property_white_list_flow
        <where>
            <!-- 收费日期范围查询 -->
            <!-- 新增:银行到账日期开始时间 -->
            <if test="startBankDepositDate != null">
                AND bank_deposit_date >= #{startBankDepositDate}
            </if>
            <!-- 新增:银行到账日期结束时间 -->
            <if test="endBankDepositDate != null">
                AND bank_deposit_date &lt;= #{endBankDepositDate}
            </if>
            <if test="startChargeTime != null">
                AND charge_time >= #{startChargeTime}
            </if>
@@ -100,32 +134,24 @@
            <if test="frequencyLike != null">
                AND frequency like concat(#{frequencyLike},"%")
            </if>
            <!-- 房号查询 -->
            <if test="roomId != null and roomId != ''">
                AND room_id = #{roomId}
            </if>
            <!-- 收费内容查询 -->
            <if test="secondaryFeeTypeCd != null and secondaryFeeTypeCd != ''">
                AND secondary_fee_type_cd = #{secondaryFeeTypeCd}
            </if>
            <if test="invoice_receipt_no != null">
            <if test="invoiceReceiptNo != null">
                AND invoice_receipt_no = #{invoiceReceiptNo}
            </if>
            <!-- 收费金额范围查询 -->
            <if test="minChargeAmount != null">
                AND charge_amount >= #{minChargeAmount}
            </if>
            <if test="maxChargeAmount != null">
                AND charge_amount &lt;= #{maxChargeAmount}
            </if>
            <!-- 单号查询 -->
            <if test="orderNo != null and orderNo != ''">
                AND order_no = #{orderNo}
            </if>
            <!-- 车牌号查询(适用于停车费等场景) -->
            <if test="licensePlate != null and licensePlate != ''">
                AND license_plate = #{licensePlate}
            </if>
@@ -137,6 +163,21 @@
            </if>
            <if test="communityId != null and communityId != ''">
                and community_id = #{communityId}
            </if>
            <if test="nong != null and nong != ''">
                AND nong = #{nong}
            </if>
            <if test="men != null and men != ''">
                AND men = #{men}
            </if>
            <if test="shi != null and shi != ''">
                AND shi = #{shi}
            </if>
            <if test="financialCheck != null">
                AND financial_check = #{financialCheck}
            </if>
            <if test="checkDate != null">
                AND check_date = #{checkDate}
            </if>
        </where>
        order by order_fre desc,door_room_num,secondary_fee_type_cd,charge_start
@@ -144,44 +185,35 @@
            limit #{page}, #{row}
        </if>
    </select>
    <select id="countPropertyWhiteListFlow" parameterType="Map" resultType="Map">
        SELECT
        count(1)
        FROM
        property_white_list_flow
        <where>
            <!-- 收费日期范围查询 -->
            <if test="startChargeTime != null">
                AND charge_time >= #{startChargeTime}
            </if>
            <if test="endChargeTime != null">
                AND charge_time &lt;= #{endChargeTime}
            </if>
            <!-- 房号查询 -->
            <if test="roomId != null and roomId != ''">
                AND room_id = #{roomId}
            </if>
            <!-- 收费内容查询 -->
            <if test="secondaryFeeTypeCd != null and secondaryFeeTypeCd != ''">
                AND secondary_fee_type_cd = #{secondaryFeeTypeCd}
            </if>
            <!-- 收费金额范围查询 -->
            <if test="minChargeAmount != null">
                AND charge_amount >= #{minChargeAmount}
            </if>
            <if test="maxChargeAmount != null">
                AND charge_amount &lt;= #{maxChargeAmount}
            </if>
            <!-- 单号查询 -->
            <if test="orderNo != null and orderNo != ''">
                AND order_no = #{orderNo}
            </if>
            <!-- 车牌号查询(适用于停车费等场景) -->
            <if test="licensePlate != null and licensePlate != ''">
                AND license_plate = #{licensePlate}
            </if>
@@ -194,8 +226,18 @@
            <if test="communityId != null and communityId != ''">
                and community_id = #{communityId}
            </if>
            <if test="nong != null and nong != ''">
                AND nong = #{nong}
            </if>
            <if test="men != null and men != ''">
                AND men = #{men}
            </if>
            <if test="shi != null and shi != ''">
                AND shi = #{shi}
            </if>
        </where>
    </select>
    <select id="countPropertyWhiteListFlowFilter" parameterType="Map" resultType="Map">
        SELECT
        count(1)
@@ -229,12 +271,19 @@
            <if test="chargeEnd != null">
                AND charge_end = #{chargeEnd}
            </if>
            <if test="communityId != null and communityId != ''">
                and community_id = #{communityId}
            <if test="nong != null">
                AND nong = #{nong}
            </if>
            <if test="men != null">
                AND men = #{men}
            </if>
            <if test="shi != null">
                AND shi = #{shi}
            </if>
        </where>
    </select>
    <update id="updatePropertyWhiteListFlow">
        update property_white_list_flow set frequency = #{frequency} where id = #{id}
    </update>
</mapper>
</mapper>