|
|
@@ -967,15 +967,20 @@
|
|
|
) roomCount,
|
|
|
(
|
|
|
select count(1) from (
|
|
|
- select bu.floor_id,br.room_id
|
|
|
- from building_room br
|
|
|
- INNER JOIN pay_fee pf on br.room_id = pf.payer_obj_id and pf.payer_obj_type = '3333' and pf.status_cd = '0'
|
|
|
+ select br.room_id
|
|
|
+ from pay_fee_detail t
|
|
|
+ INNER JOIN pay_fee pf1 on t.fee_id = pf1.fee_id and pf1.payer_obj_type='3333' and pf1.status_cd = '0'
|
|
|
+ LEFT JOIN building_room br on pf1.payer_obj_id = br.room_id and br.status_cd = '0'
|
|
|
left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
|
|
|
where
|
|
|
1=1
|
|
|
- and br.status_cd = '0'
|
|
|
- and br.community_id= #{communityId}
|
|
|
- group by bu.floor_id,br.room_id
|
|
|
+ and bu.floor_id = a.floor_id
|
|
|
+ and t.status_cd = '0'
|
|
|
+ and t.community_id = #{communityId}
|
|
|
+ and t.create_time > #{startDate}
|
|
|
+ and t.create_time < #{endDate}
|
|
|
+ and pf1.fee_type_cd = td.status_cd
|
|
|
+ group by br.room_id
|
|
|
) b
|
|
|
where b.floor_id = a.floor_id
|
|
|
) feeRoomCount,
|