From 1caf340db66dbcf1c3cef2ed5d276459cf236c63 Mon Sep 17 00:00:00 2001
From: 1098226878 <1098226878@qq.com>
Date: 星期六, 11 九月 2021 12:31:28 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity
---
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml | 62 ++++++++++++++++++++----------
1 files changed, 41 insertions(+), 21 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
index 1786bec..d529033 100755
--- a/java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
@@ -89,9 +89,7 @@
update report_fee_month_statistics t set
t.owe_amount= #{oweAmount}
where 1=1
- <if test="statisticsId !=null and statisticsId != ''">
and t.statistics_id= #{statisticsId}
- </if>
<if test="curMaxTime !=null ">
and t.cur_max_time <= #{curMaxTime}
</if>
@@ -145,9 +143,7 @@
<if test="oweAmount !=null and oweAmount != ''">
, t.owe_amount= #{oweAmount}
</if>
- <if test="communityId !=null and communityId != ''">
- , t.community_id= #{communityId}
- </if>
+
<if test="feeCreateTime !=null and feeCreateTime != ''">
, t.fee_create_time= #{feeCreateTime}
</if>
@@ -155,10 +151,32 @@
, t.obj_type= #{objType}
</if>
where 1=1
+ and t.statistics_id= #{statisticsId}
+ <if test="communityId !=null and communityId != ''">
+ and t.community_id= #{communityId}
+ </if>
+
+ </update>
+
+ <!-- 淇敼璐圭敤鏈堢粺璁′俊鎭� add by wuxw 2018-07-03 -->
+ <update id="deleteReportFeeMonthStatisticsInfo" parameterType="Map">
+ update report_fee_month_statistics t set t.status_cd = '1'
+ where 1=1
<if test="statisticsId !=null and statisticsId != ''">
and t.statistics_id= #{statisticsId}
</if>
+ <if test="communityId !=null and communityId != ''">
+ and t.community_id= #{communityId}
+ </if>
+ <if test="feeId !=null and feeId != ''">
+ and t.fee_id= #{feeId}
+ </if>
+ <if test="configId !=null and configId != ''">
+ and t.config_id= #{configId}
+ </if>
+
</update>
+
<!-- 鏌ヨ璐圭敤鏈堢粺璁℃暟閲� add by wuxw 2018-07-03 -->
<select id="queryReportFeeMonthStatisticssCount" parameterType="Map" resultType="Map">
@@ -277,7 +295,7 @@
<select id="queryReportFeeSummary" parameterType="Map" resultType="Map">
select t.fee_year feeYear,t.fee_month feeMonth,t.create_time createTime,SUM(t.receivable_amount)
receivableAmount,SUM(t.received_amount)
- receivedAmount,SUM(t.owe_amount) oweAmount
+ receivedAmount,SUM(t.owe_amount) oweAmount,max(t.update_time) updateTime
from report_fee_month_statistics t
left join building_room br on t.obj_id = br.room_id and t.obj_type = '3333' and br.status_cd = '0'
left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
@@ -436,8 +454,8 @@
<!-- 鏌ヨ璐圭敤鏈堢粺璁′俊鎭� add by wuxw 2018-07-03 -->
<select id="queryReportFloorUnitFeeSummary" parameterType="Map" resultType="Map">
- select t.fee_year feeYear,t.fee_month feeMonth, f.floor_num floorNum, bu.unit_num unitNum,t.create_time
- createTime,
+ select t.fee_year feeYear,t.fee_month feeMonth, f.floor_num floorNum, bu.unit_num unitNum,max(t.update_time)
+ updateTime,
SUM(t.receivable_amount) receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount
from report_fee_month_statistics t
INNER JOIN building_room br on t.obj_id = br.room_id and br.status_cd = '0'
@@ -609,7 +627,7 @@
<select id="queryFeeBreakdown" parameterType="Map" resultType="Map">
select t.fee_name feeName,td.name feeTypeCd,pfc.fee_type_cd,pfc.start_time feeStartTime,pfc.end_time
feeEndTime,SUM(t.receivable_amount)
- receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount
+ receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount,max(t.update_time) updateTime
from report_fee_month_statistics t
inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
left join building_room br on t.obj_id = br.room_id and t.obj_type = '3333' and br.status_cd = '0'
@@ -940,8 +958,8 @@
<!-- 鏌ヨ璐圭敤鏈堢粺璁′俊鎭� add by wuxw 2018-07-03 -->
<select id="queryOweFeeDetail" parameterType="Map" resultType="Map">
- select t.payer_obj_name objName,t.fee_name feeName,pf.end_time feeCreateTime,t.create_time
- createTime,SUM(t.amount_owed) oweAmount,max(t.deadline_time) deadlineTime
+ select t.payer_obj_name objName,t.fee_name feeName,pf.end_time feeCreateTime,t.update_time
+ updateTime,SUM(t.amount_owed) oweAmount,max(t.deadline_time) deadlineTime
from report_owe_fee t
inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
left join building_room br on t.payer_obj_id = br.room_id and t.payer_obj_type = '3333' and br.status_cd = '0'
@@ -1083,7 +1101,7 @@
and pfc.config_id= #{configId}
</if>
<if test="objId !=null and objId != ''">
- and t.obj_id= #{objId}
+ and pf.payer_obj_id= #{objId}
</if>
<if test="feeName !=null and feeName != ''">
and t.fee_name= #{feeName}
@@ -1164,7 +1182,7 @@
and pfc.config_id= #{configId}
</if>
<if test="objId !=null and objId != ''">
- and t.obj_id= #{objId}
+ and pf.payer_obj_id = #{objId}
</if>
<if test="feeName !=null and feeName != ''">
and t.fee_name= #{feeName}
@@ -1229,7 +1247,7 @@
and pfc.config_id= #{configId}
</if>
<if test="objId !=null and objId != ''">
- and t.obj_id= #{objId}
+ and pf.payer_obj_id= #{objId}
</if>
<if test="feeName !=null and feeName != ''">
and t.fee_name= #{feeName}
@@ -1294,7 +1312,7 @@
and pfc.config_id= #{configId}
</if>
<if test="objId !=null and objId != ''">
- and t.obj_id= #{objId}
+ and pf.payer_obj_id= #{objId}
</if>
<if test="feeName !=null and feeName != ''">
and t.fee_name= #{feeName}
@@ -2272,7 +2290,7 @@
<select id="queryHuaningPayFeeTwoCount" parameterType="Map" resultType="Map">
select count(1) count
from (
- select t.floor_num floorNum,d.receivableAmount ,
+ select a.floorNum,d.receivableAmount ,
a.receivedAmount,b.receivedAmount1,
c.receivedAmount2
from
@@ -2301,7 +2319,7 @@
and t.community_id= #{communityId}
GROUP BY floor_num
) b,
- (select t.floor_num floorNum,receivedAmount2
+ (select t.floor_num floorNum,SUM(pfdm2.received_amount) receivedAmount2
from f_floor t
inner JOIN building_unit bu on t.floor_id = bu.floor_id and bu.status_cd = '0'
inner JOIN building_room br on br.unit_id = bu.unit_id and br.status_cd = '0'
@@ -2330,7 +2348,7 @@
<!-- 鏌ヨ璐圭敤鏈堢粺璁′俊鎭� add by wuxw 2018-07-03 -->
<select id="queryHuaningPayFeeTwo" parameterType="Map" resultType="Map">
- select t.floor_num floorNum,d.receivableAmount ,
+ select a.floorNum,d.receivableAmount ,
a.receivedAmount,b.receivedAmount1,
c.receivedAmount2
from
@@ -2359,7 +2377,7 @@
and t.community_id= #{communityId}
GROUP BY floor_num
) b,
- (select t.floor_num floorNum,receivedAmount2
+ (select t.floor_num floorNum,SUM(pfdm2.received_amount) receivedAmount2
from f_floor t
inner JOIN building_unit bu on t.floor_id = bu.floor_id and bu.status_cd = '0'
inner JOIN building_room br on br.unit_id = bu.unit_id and br.status_cd = '0'
@@ -2390,7 +2408,8 @@
<select id="queryHuaningOweFeeDetailCount" parameterType="Map" resultType="Map">
select count(1) count
from (
- select t.payer_obj_name payerObjName,br.built_up_area builtUpArea,pfc.square_price squarePrice, t.fee_id feeId,t.end_time startTime,t.deadline_time endTime,t.amount_owed oweAmount
+ select t.payer_obj_name payerObjName,br.built_up_area builtUpArea,pfc.square_price squarePrice, t.fee_id
+ feeId,t.end_time startTime,t.deadline_time endTime,t.amount_owed oweAmount
from report_owe_fee t
left join building_room br on t.payer_obj_id = br.room_id and br.status_cd = '0'
left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
@@ -2404,7 +2423,8 @@
<!-- 鏌ヨ璐圭敤鏈堢粺璁′俊鎭� add by wuxw 2018-07-03 -->
<select id="queryHuaningOweFeeDetail" parameterType="Map" resultType="Map">
- select t.payer_obj_name payerObjName,br.built_up_area builtUpArea,pfc.square_price squarePrice, t.fee_id feeId,t.end_time startTime,t.deadline_time endTime,t.amount_owed oweAmount
+ select t.payer_obj_name payerObjName,br.built_up_area builtUpArea,pfc.square_price squarePrice, t.fee_id
+ feeId,t.end_time startTime,t.deadline_time endTime,t.amount_owed oweAmount
from report_owe_fee t
left join building_room br on t.payer_obj_id = br.room_id and br.status_cd = '0'
left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
--
Gitblit v1.8.0