<?xml version="1.0" encoding="UTF-8" ?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="propertyWhiteListFlowDaoImplMapper">
|
<insert id="savePropertyWhiteListFlow" parameterType="Map">
|
INSERT INTO property_white_list_flow
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
charge_time,
|
<if test="invoiceReceiptNo != null">invoice_receipt_no,</if>
|
<if test="roomId != null">room_id,</if>
|
<if test="propertyAddress != null">property_address,</if>
|
<if test="doorRoomNum != null">door_room_num,</if>
|
<if test="secondaryFeeTypeCd != null">secondary_fee_type_cd,</if>
|
<if test="chargeAmount != null">charge_amount,</if>
|
<if test="charger != null">charger,</if>
|
<if test="bankDepositDate != null">bank_deposit_date,</if>
|
<if test="bankDepositor != null">bank_depositor,</if>
|
<if test="splitBankDepositAmount != null">split_bank_deposit_amount,</if>
|
<if test="bankDepositAmount != null">bank_deposit_amount,</if>
|
<if test="checkAmount != null">check_amount,</if>
|
<if test="whiteListArchiveNo != null">white_list_archive_no,</if>
|
<if test="sheetCount != null">sheet_count,</if>
|
<if test="financialReceiver != null">financial_receiver,</if>
|
<if test="inputTime != null">input_time,</if>
|
<if test="inputPerson != null">input_person,</if>
|
<if test="orderNo != null">order_no,</if>
|
<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="communityId != null">community_id</if>
|
</trim> VALUES
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
#{chargeTime},
|
<if test="invoiceReceiptNo != null">#{invoiceReceiptNo},</if>
|
<if test="roomId != null">#{roomId},</if>
|
<if test="propertyAddress != null">#{propertyAddress},</if>
|
<if test="doorRoomNum != null">#{doorRoomNum},</if>
|
<if test="secondaryFeeTypeCd != null">#{secondaryFeeTypeCd},</if>
|
<if test="chargeAmount != null">#{chargeAmount},</if>
|
<if test="charger != null">#{charger},</if>
|
<if test="bankDepositDate != null">#{bankDepositDate},</if>
|
<if test="bankDepositor != null">#{bankDepositor},</if>
|
<if test="splitBankDepositAmount != null">#{splitBankDepositAmount},</if>
|
<if test="bankDepositAmount != null">#{bankDepositAmount},</if>
|
<if test="checkAmount != null">#{checkAmount},</if>
|
<if test="whiteListArchiveNo != null">#{whiteListArchiveNo},</if>
|
<if test="sheetCount != null">#{sheetCount},</if>
|
<if test="financialReceiver != null">#{financialReceiver},</if>
|
<if test="inputTime != null">#{inputTime},</if>
|
<if test="inputPerson != null">#{inputPerson},</if>
|
<if test="orderNo != null">#{orderNo},</if>
|
<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="communityId != null">#{communityId}</if>
|
</trim>
|
</insert>
|
<select id="queryPropertyWhiteListFlow" parameterType="Map" resultType="Map">
|
SELECT
|
id,
|
charge_time AS chargeTime,
|
invoice_receipt_no AS invoiceReceiptNo,
|
room_id AS roomId,
|
property_address AS propertyAddress,
|
door_room_num AS doorRoomNum,
|
secondary_fee_type_cd AS secondaryFeeTypeCd,
|
charge_amount AS chargeAmount,
|
charger,
|
bank_deposit_date AS bankDepositDate,
|
bank_depositor AS bankDepositor,
|
split_bank_deposit_amount AS splitBankDepositAmount,
|
bank_deposit_amount AS bankDepositAmount,
|
check_amount AS checkAmount,
|
white_list_archive_no AS whiteListArchiveNo,
|
sheet_count AS sheetCount,
|
financial_receiver AS financialReceiver,
|
input_time AS inputTime,
|
input_person AS inputPerson,
|
order_no AS orderNo,
|
license_plate AS licensePlate,
|
category_22 AS category22,
|
charge_start AS chargeStart,
|
charge_end AS chargeEnd,
|
community_id AS communityId
|
FROM
|
property_white_list_flow
|
<where>
|
<!-- 收费日期范围查询 -->
|
<if test="startChargeTime != null">
|
AND charge_time >= #{startChargeTime}
|
</if>
|
<if test="endChargeTime != null">
|
AND charge_time <= #{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 <= #{maxChargeAmount}
|
</if>
|
|
<!-- 单号查询 -->
|
<if test="orderNo != null and orderNo != ''">
|
AND order_no = #{orderNo}
|
</if>
|
|
<!-- 车牌号查询(适用于停车费等场景) -->
|
<if test="licensePlate != null and licensePlate != ''">
|
AND license_plate = #{licensePlate}
|
</if>
|
<if test="category22 != null and category22 != ''">
|
AND category_22 = #{category22}
|
</if>
|
<if test="feeYear != null and feeYear != ''">
|
and YEAR(charge_time) = #{feeYear}
|
</if>
|
<if test="communityId != null and communityId != ''">
|
and community_id = #{communityId}
|
</if>
|
</where>
|
order by 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 <= #{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 <= #{maxChargeAmount}
|
</if>
|
|
<!-- 单号查询 -->
|
<if test="orderNo != null and orderNo != ''">
|
AND order_no = #{orderNo}
|
</if>
|
|
<!-- 车牌号查询(适用于停车费等场景) -->
|
<if test="licensePlate != null and licensePlate != ''">
|
AND license_plate = #{licensePlate}
|
</if>
|
<if test="category22 != null and category22 != ''">
|
AND category_22 = #{category22}
|
</if>
|
<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">
|
SELECT
|
count(1)
|
FROM
|
property_white_list_flow
|
<where>
|
<if test="communityId != null">
|
AND community_id = #{communityId}
|
</if>
|
<if test="secondaryFeeTypeCd != null">
|
AND secondary_fee_type_cd = #{secondaryFeeTypeCd}
|
</if>
|
<if test="roomId != null">
|
AND room_id = #{roomId}
|
</if>
|
<if test="licensePlate != null">
|
AND license_plate = #{licensePlate}
|
</if>
|
<if test="chargeAmount != null">
|
AND charge_amount = #{chargeAmount}
|
</if>
|
<if test="chargeTime != null">
|
AND charge_time = #{chargeTime}
|
</if>
|
<if test="invoiceReceiptNo != null">
|
AND invoice_receipt_no = #{invoiceReceiptNo}
|
</if>
|
<if test="chargeStart != null">
|
AND charge_start = #{chargeStart}
|
</if>
|
<if test="chargeEnd != null">
|
AND charge_end = #{chargeEnd}
|
</if>
|
<if test="communityId != null and communityId != ''">
|
and community_id = #{communityId}
|
</if>
|
</where>
|
</select>
|
</mapper>
|