|
|
@@ -85,11 +85,10 @@
|
|
|
</select>
|
|
|
|
|
|
|
|
|
-
|
|
|
<!-- 修改费用月统计信息 add by wuxw 2018-07-03 -->
|
|
|
<update id="updateReportFeeMonthStatisticsOwe" parameterType="Map">
|
|
|
update report_fee_month_statistics t set
|
|
|
- t.owe_amount= #{oweAmount}
|
|
|
+ t.owe_amount= #{oweAmount}
|
|
|
where 1=1
|
|
|
<if test="statisticsId !=null and statisticsId != ''">
|
|
|
and t.statistics_id= #{statisticsId}
|
|
|
@@ -230,49 +229,74 @@
|
|
|
<select id="queryReportFeeSummaryCount" parameterType="Map" resultType="Map">
|
|
|
select count(1) count
|
|
|
from (
|
|
|
- select t.fee_year,t.fee_month
|
|
|
- from report_fee_month_statistics t
|
|
|
- where t.status_cd = '0'
|
|
|
- <if test="objName !=null and objName != ''">
|
|
|
- and t.obj_name= #{objName}
|
|
|
- </if>
|
|
|
- <if test="feeYear !=null and feeYear != ''">
|
|
|
- and t.fee_year= #{feeYear}
|
|
|
- </if>
|
|
|
- <if test="feeMonth !=null and feeMonth != ''">
|
|
|
- and t.fee_month= #{feeMonth}
|
|
|
- </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>
|
|
|
- <if test="objId !=null and objId != ''">
|
|
|
- and t.obj_id= #{objId}
|
|
|
- </if>
|
|
|
- <if test="feeName !=null and feeName != ''">
|
|
|
- and t.fee_name= #{feeName}
|
|
|
- </if>
|
|
|
- <if test="communityId !=null and communityId != ''">
|
|
|
- and t.community_id= #{communityId}
|
|
|
- </if>
|
|
|
- <if test="startTime !=null">
|
|
|
- and t.create_time >= #{startTime}
|
|
|
- </if>
|
|
|
- <if test="endTime !=null">
|
|
|
- and t.create_time <= #{endTime}
|
|
|
- </if>
|
|
|
- group by t.fee_year,t.fee_month
|
|
|
+ select t.fee_year,t.fee_month
|
|
|
+ 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'
|
|
|
+ left join f_floor f on bu.floor_id = f.floor_id and f.status_cd
|
|
|
+ where t.status_cd = '0'
|
|
|
+ <if test="roomNum !=null and roomNum != ''">
|
|
|
+ and br.room_num= #{roomNum}
|
|
|
+ </if>
|
|
|
+ <if test="unitId !=null and unitId != ''">
|
|
|
+ and bu.unit_id= #{unitId}
|
|
|
+ </if>
|
|
|
+ <if test="floorId !=null and floorId != ''">
|
|
|
+ and f.floor_id = #{floorId}
|
|
|
+ </if>
|
|
|
+ <if test="objName !=null and objName != ''">
|
|
|
+ and t.obj_name= #{objName}
|
|
|
+ </if>
|
|
|
+ <if test="feeYear !=null and feeYear != ''">
|
|
|
+ and t.fee_year= #{feeYear}
|
|
|
+ </if>
|
|
|
+ <if test="feeMonth !=null and feeMonth != ''">
|
|
|
+ and t.fee_month= #{feeMonth}
|
|
|
+ </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>
|
|
|
+ <if test="objId !=null and objId != ''">
|
|
|
+ and t.obj_id= #{objId}
|
|
|
+ </if>
|
|
|
+ <if test="feeName !=null and feeName != ''">
|
|
|
+ and t.fee_name= #{feeName}
|
|
|
+ </if>
|
|
|
+ <if test="communityId !=null and communityId != ''">
|
|
|
+ and t.community_id= #{communityId}
|
|
|
+ </if>
|
|
|
+ <if test="startTime !=null">
|
|
|
+ and t.create_time >= #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime !=null">
|
|
|
+ and t.create_time <= #{endTime}
|
|
|
+ </if>
|
|
|
+ group by t.fee_year,t.fee_month
|
|
|
) t
|
|
|
</select>
|
|
|
|
|
|
|
|
|
<!-- 查询费用月统计信息 add by wuxw 2018-07-03 -->
|
|
|
<select id="queryReportFeeSummary" parameterType="Map" resultType="Map">
|
|
|
- select t.fee_year feeYear,t.fee_month feeMonth,SUM(t.receivable_amount) receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount
|
|
|
+ select t.fee_year feeYear,t.fee_month feeMonth,SUM(t.receivable_amount) receivableAmount,SUM(t.received_amount)
|
|
|
+ receivedAmount,SUM(t.owe_amount) oweAmount
|
|
|
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'
|
|
|
+ left join f_floor f on bu.floor_id = f.floor_id and f.status_cd
|
|
|
where t.status_cd = '0'
|
|
|
+ <if test="roomNum !=null and roomNum != ''">
|
|
|
+ and br.room_num= #{roomNum}
|
|
|
+ </if>
|
|
|
+ <if test="unitId !=null and unitId != ''">
|
|
|
+ and bu.unit_id= #{unitId}
|
|
|
+ </if>
|
|
|
+ <if test="floorId !=null and floorId != ''">
|
|
|
+ and f.floor_id = #{floorId}
|
|
|
+ </if>
|
|
|
<if test="objName !=null and objName != ''">
|
|
|
and t.obj_name= #{objName}
|
|
|
</if>
|
|
|
@@ -440,7 +464,8 @@
|
|
|
|
|
|
<!-- 查询费用月统计信息 add by wuxw 2018-07-03 -->
|
|
|
<select id="queryFeeBreakdown" parameterType="Map" resultType="Map">
|
|
|
- select t.fee_name feeName,pfc.start_time feeCreateTime,SUM(t.receivable_amount) receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount
|
|
|
+ select t.fee_name feeName,pfc.start_time feeCreateTime,SUM(t.receivable_amount)
|
|
|
+ receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount
|
|
|
from report_fee_month_statistics t
|
|
|
inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
|
|
|
where t.status_cd = '0'
|
|
|
@@ -522,7 +547,8 @@
|
|
|
|
|
|
<!-- 查询费用月统计信息 add by wuxw 2018-07-03 -->
|
|
|
<select id="queryFeeDetail" parameterType="Map" resultType="Map">
|
|
|
- select t.obj_name objName,t.fee_name feeName,pfc.start_time feeCreateTime,SUM(t.receivable_amount) receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount
|
|
|
+ select t.obj_name objName,t.fee_name feeName,pfc.start_time feeCreateTime,SUM(t.receivable_amount)
|
|
|
+ receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount
|
|
|
from report_fee_month_statistics t
|
|
|
inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
|
|
|
where t.status_cd = '0'
|
|
|
@@ -605,7 +631,8 @@
|
|
|
|
|
|
<!-- 查询费用月统计信息 add by wuxw 2018-07-03 -->
|
|
|
<select id="queryOweFeeDetail" parameterType="Map" resultType="Map">
|
|
|
- select t.obj_name objName,t.fee_name feeName,pfc.start_time feeCreateTime,SUM(t.receivable_amount) receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount
|
|
|
+ select t.obj_name objName,t.fee_name feeName,pfc.start_time feeCreateTime,SUM(t.receivable_amount)
|
|
|
+ receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount
|
|
|
from report_fee_month_statistics t
|
|
|
inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
|
|
|
where t.status_cd = '0'
|