From 0b04f664887c73e90bf684a4e69c0fdbfe26349d Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期三, 29 三月 2023 13:35:20 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

---
 java110-db/src/main/resources/mapper/fee/FeeReceiptServiceDaoImplMapper.xml |   61 ++++++++++++++++++++++++------
 1 files changed, 48 insertions(+), 13 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/fee/FeeReceiptServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/fee/FeeReceiptServiceDaoImplMapper.xml
old mode 100644
new mode 100755
index b18ff92..8e7fd12
--- a/java110-db/src/main/resources/mapper/fee/FeeReceiptServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/fee/FeeReceiptServiceDaoImplMapper.xml
@@ -8,9 +8,15 @@
     <!-- 淇濆瓨鏀舵嵁淇℃伅 add by wuxw 2018-07-03 -->
     <insert id="saveFeeReceiptInfo" parameterType="Map">
         insert into fee_receipt(
-        amount,obj_id,remark,obj_name,community_id,receipt_id,obj_type
+        amount,obj_id,remark,obj_name,community_id,receipt_id,obj_type,pay_obj_id,pay_obj_name
+        <if test="createTime != null">
+            ,create_time
+        </if>
         ) values (
-        #{amount},#{objId},#{remark},#{objName},#{communityId},#{receiptId},#{objType}
+        #{amount},#{objId},#{remark},#{objName},#{communityId},#{receiptId},#{objType},#{payObjId},#{payObjName}
+        <if test="createTime != null">
+            ,#{createTime}
+        </if>
         )
     </insert>
 
@@ -18,10 +24,10 @@
     <!-- 鎵归噺鎻掑叆璐圭敤 -->
     <insert id="saveFeeReceipts" parameterType="Map">
         insert into fee_receipt(
-        amount,obj_id,remark,obj_name,community_id,receipt_id,obj_type
+        amount,obj_id,remark,obj_name,community_id,receipt_id,obj_type,pay_obj_id,pay_obj_name
         ) values
         <foreach collection="feeReceiptPos" item="item" separator=",">
-            (#{item.amount},#{item.objId},#{item.remark},#{item.objName},#{item.communityId},#{item.receiptId},#{item.objType})
+            (#{item.amount},#{item.objId},#{item.remark},#{item.objName},#{item.communityId},#{item.receiptId},#{item.objType},#{item.payObjId},#{item.payObjName})
         </foreach>
     </insert>
 
@@ -30,7 +36,8 @@
     <select id="getFeeReceiptInfo" parameterType="Map" resultType="Map">
         select t.amount,t.obj_id,t.obj_id objId,t.remark,t.status_cd,t.status_cd statusCd,t.obj_name,t.obj_name
         objName,t.community_id,t.community_id communityId,t.receipt_id,t.receipt_id receiptId,t.obj_type,t.obj_type
-        objType,t.create_time createTime,frd.fee_name feeName
+        objType,t.create_time createTime,frd.fee_name feeName,t.pay_obj_id payObjId,t.pay_obj_name payObjName,pf.fee_type_cd feeTypeCd,
+        frd.start_time startTime,frd.end_time endTime,pf.fee_flag feeFlag
         from fee_receipt t
         inner join fee_receipt_detail frd on t.receipt_id = frd.receipt_id and frd.status_cd = '0'
         inner join pay_fee pf on frd.fee_id = pf.fee_id and pf.status_cd = '0'
@@ -40,6 +47,12 @@
         </if>
         <if test="objId !=null and objId != ''">
             and t.obj_id= #{objId}
+        </if>
+        <if test="payObjId !=null and payObjId != ''">
+            and t.pay_obj_id= #{payObjId}
+        </if>
+        <if test="payObjName !=null and payObjName != ''">
+            and t.pay_obj_name= #{payObjName}
         </if>
         <if test="remark !=null and remark != ''">
             and t.remark= #{remark}
@@ -62,14 +75,25 @@
                 #{item}
             </foreach>
         </if>
+        <if test="detailIds !=null">
+            and frd.detail_id in
+            <foreach collection="detailIds" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         <if test="objType !=null and objType != ''">
             and t.obj_type= #{objType}
+        </if>
+        <if test="qstartTime !=null and qstartTime != ''">
+            and t.create_time &gt;= #{qstartTime}
+        </if>
+        <if test="qendTime !=null and qendTime != ''">
+            and t.create_time &lt;= #{qendTime}
         </if>
         order by t.create_time desc
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
         </if>
-
     </select>
 
 
@@ -130,9 +154,7 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
-
         UNION ALL
-
         SELECT
         CONCAT( f.floor_num, '鏍�', bu.unit_num, '鍗曞厓', b.room_num, '瀹�' ) AS objName,
         oc.car_num AS carNum,
@@ -234,7 +256,6 @@
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
         </if>
-
     </select>
 
 
@@ -266,7 +287,6 @@
         <if test="receiptId !=null and receiptId != ''">
             and t.receipt_id= #{receiptId}
         </if>
-
     </update>
 
     <!-- 鏌ヨ鏀舵嵁鏁伴噺 add by wuxw 2018-07-03 -->
@@ -281,6 +301,12 @@
         </if>
         <if test="objId !=null and objId != ''">
             and t.obj_id= #{objId}
+        </if>
+        <if test="payObjId !=null and payObjId != ''">
+            and t.pay_obj_id= #{payObjId}
+        </if>
+        <if test="payObjName !=null and payObjName != ''">
+            and t.pay_obj_name= #{payObjName}
         </if>
         <if test="remark !=null and remark != ''">
             and t.remark= #{remark}
@@ -303,11 +329,20 @@
                 #{item}
             </foreach>
         </if>
+        <if test="detailIds !=null">
+            and frd.detail_id in
+            <foreach collection="detailIds" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         <if test="objType !=null and objType != ''">
             and t.obj_type= #{objType}
         </if>
-
-
+        <if test="qstartTime !=null and qstartTime != ''">
+            and t.create_time &gt;= #{qstartTime}
+        </if>
+        <if test="qendTime !=null and qendTime != ''">
+            and t.create_time &lt;= #{qendTime}
+        </if>
     </select>
-
 </mapper>

--
Gitblit v1.8.0