Your Name лет назад: 2
Родитель
Сommit
8e81f2c1fa

+ 2 - 3
java110-db/src/main/resources/mapper/report/ReportFeeStatisticsServiceDaoImplMapper.xml

@@ -967,20 +967,19 @@
         ) roomCount,
         (
         select count(1) from (
-        select br.room_id
+        select a.floor_id,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 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
+        group by bu.floor_id,br.room_id
         ) b
         where b.floor_id = a.floor_id
         ) feeRoomCount,