jialh
1 天以前 dd6687b118561100e1677e88a9c2f5842a54c531
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>
@@ -27,7 +30,12 @@
            <if test="category22 != null">category_22,</if>
            <if test="chargeStart != null">charge_start,</if>
            <if test="chargeEnd != null">charge_end,</if>
            <if test="communityId != null">community_id</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},
@@ -35,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>
@@ -53,9 +64,15 @@
            <if test="category22 != null">#{category22},</if>
            <if test="chargeStart != null">#{chargeStart},</if>
            <if test="chargeEnd != null">#{chargeEnd},</if>
            <if test="communityId != null">#{communityId}</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">
        SELECT
        id,
@@ -82,42 +99,51 @@
        category_22 AS category22,
        charge_start AS chargeStart,
        charge_end AS chargeEnd,
        community_id AS communityId
        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="startChargeTime != null">
                AND charge_time >= #{startChargeTime}
            </if>
            <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}
            </if>
            <!-- 收费内容查询 -->
            <if test="secondaryFeeTypeCd != null and secondaryFeeTypeCd != ''">
                AND secondary_fee_type_cd = #{secondaryFeeTypeCd}
            </if>
            <!-- 收费金额范围查询 -->
            <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>
@@ -130,58 +156,56 @@
            <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>
        <!-- 排序 -->
        <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>
    </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 +218,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,9 +263,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>
</mapper>
    <update id="updatePropertyWhiteListFlow">
        update property_white_list_flow set frequency = #{frequency} where id = #{id}
    </update>
</mapper>