From dd6687b118561100e1677e88a9c2f5842a54c531 Mon Sep 17 00:00:00 2001
From: jialh <1972868360@qq.com>
Date: 星期四, 16 四月 2026 18:14:14 +0800
Subject: [PATCH] 水电话费

---
 java110-db/src/main/resources/mapper/fee/PropertyWhiteListFlowDaoImplMapper.xml |  131 ++++++++++++++++++++++++++++++++-----------
 1 files changed, 96 insertions(+), 35 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/fee/PropertyWhiteListFlowDaoImplMapper.xml b/java110-db/src/main/resources/mapper/fee/PropertyWhiteListFlowDaoImplMapper.xml
index 2fab116..50f491e 100644
--- a/java110-db/src/main/resources/mapper/fee/PropertyWhiteListFlowDaoImplMapper.xml
+++ b/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>
@@ -26,7 +29,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},
@@ -34,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>
@@ -51,9 +63,16 @@
             <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">
         SELECT
         id,
@@ -80,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>
@@ -125,58 +153,59 @@
             <if test="feeYear != null and feeYear != ''">
                 and YEAR(charge_time) = #{feeYear}
             </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>
-
-        <!-- 鎺掑簭 -->
-        <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>
@@ -186,8 +215,21 @@
             <if test="feeYear != null and feeYear != ''">
                 and YEAR(charge_time) = #{feeYear}
             </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>
         </where>
     </select>
+
     <select id="countPropertyWhiteListFlowFilter" parameterType="Map" resultType="Map">
         SELECT
         count(1)
@@ -215,6 +257,25 @@
             <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="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>
\ No newline at end of file

--
Gitblit v1.8.0