|
|
@@ -2270,30 +2270,38 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getReceivableInformation" parameterType="Map" resultType="Map">
|
|
|
- select a.receivableAmount,a.receivedAmount, IF(a.receivableAmount < a.receivedAmount,'0',a.receivableAmount-a.receivedAmount) oweAmount
|
|
|
+ select a.receivableAmount,a.receivedAmount, IF(a.receivableAmount <
|
|
|
+ a.receivedAmount,'0',a.receivableAmount-a.receivedAmount) oweAmount
|
|
|
from (
|
|
|
select sum(t.his_owe_amount+t.cur_receivable_amount)
|
|
|
receivableAmount,sum(t.cur_received_amount+t.his_owe_received_amount+t.pre_received_amount) receivedAmount
|
|
|
from report_fee_month_statistics t
|
|
|
inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
|
|
|
where 1=1
|
|
|
- and t.fee_year= #{feeYear}
|
|
|
- and t.fee_month= #{feeMonth}
|
|
|
+ and t.fee_year= #{feeYear}
|
|
|
+ and t.fee_month= #{feeMonth}
|
|
|
and t.community_id = #{communityId}
|
|
|
) a
|
|
|
</select>
|
|
|
|
|
|
<select id="getFloorReceivableInformation" parameterType="Map" resultType="Map">
|
|
|
- select f.floor_num floorNum,f.`name`,sum(t.receivable_amount) receivableAmount,SUM(t.received_amount)
|
|
|
- receivedAmount,SUM(t.owe_amount) oweAmount
|
|
|
+ select a.floorNum,a.`name`,a.receivableAmount,a.receivedAmount, IF(a.receivableAmount <
|
|
|
+ a.receivedAmount,'0',a.receivableAmount-a.receivedAmount) oweAmount
|
|
|
+ from (
|
|
|
+ select f.floor_num floorNum,f.`name`,sum(t.his_owe_amount+t.cur_receivable_amount)
|
|
|
+ receivableAmount,sum(t.cur_received_amount+t.his_owe_received_amount+t.pre_received_amount) receivedAmount
|
|
|
from report_fee_month_statistics t
|
|
|
inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
|
|
|
inner join building_room br on br.room_id = t.obj_id and t.obj_type = '3333' and br.community_id =
|
|
|
t.community_id and br.status_cd = '0'
|
|
|
inner join building_unit bu on bu.unit_id = br.unit_id and bu.status_cd = '0'
|
|
|
inner join f_floor f on f.floor_id = bu.floor_id and f.status_cd = '0'
|
|
|
- where t.community_id = #{communityId}
|
|
|
+ where 1=1
|
|
|
+ and t.fee_year= #{feeYear}
|
|
|
+ and t.fee_month= #{feeMonth}
|
|
|
+ and t.community_id = #{communityId}
|
|
|
group by f.floor_num ,f.`name`
|
|
|
+ ) a
|
|
|
</select>
|
|
|
|
|
|
<select id="getFeeConfigReceivableInformation" parameterType="Map" resultType="Map">
|
|
|
@@ -3000,7 +3008,7 @@
|
|
|
|
|
|
<!--清理报表 无效数据-->
|
|
|
<update id="deleteInvalidFee" parameterType="Map">
|
|
|
- delete from report_fee_month_statistics where fee_id in
|
|
|
+ delete from report_fee_month_statistics where fee_id in
|
|
|
<foreach collection="feeIds" item="item" open="(" close=")" separator=",">
|
|
|
#{item}
|
|
|
</foreach>
|