|
|
@@ -298,6 +298,51 @@
|
|
|
) a
|
|
|
</select>
|
|
|
|
|
|
+ <!-- 查询收费户数 -->
|
|
|
+ <select id="getFeeRoomCount" parameterType="Map" resultType="Map">
|
|
|
+ select count(1) oweRoomCount
|
|
|
+ from
|
|
|
+ (
|
|
|
+ select t.obj_id from pay_fee_detail_month t
|
|
|
+ INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
|
|
|
+ <if test="floorId != null and floorId != ''">
|
|
|
+ LEFT JOIN building_room br on t.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'
|
|
|
+ </if>
|
|
|
+ where
|
|
|
+ 1=1
|
|
|
+ <if test="floorId != null and floorId != ''">
|
|
|
+ and bu.floor_id = #{floorId}
|
|
|
+ </if>
|
|
|
+ <if test="configId != null and configId != ''">
|
|
|
+ and t.config_id = #{configId}
|
|
|
+ </if>
|
|
|
+ <if test="objName != null and objName != ''">
|
|
|
+ and t.obj_name like concat('%',#{objName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="ownerName != null and ownerName != ''">
|
|
|
+ and t.owner_name like concat('%',#{ownerName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="link != null and link != ''">
|
|
|
+ and t.link = #{link}
|
|
|
+ </if>
|
|
|
+ <if test="configIds !=null ">
|
|
|
+ and t.config_id in
|
|
|
+ <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="feeTypeCd != null and feeTypeCd != ''">
|
|
|
+ and pf.fee_type_cd = #{feeTypeCd}
|
|
|
+ </if>
|
|
|
+ and t.status_cd = '0'
|
|
|
+ and pf.payer_obj_type = '3333'
|
|
|
+ and t.community_id= #{communityId}
|
|
|
+ and t.cur_month_time < #{endDate}
|
|
|
+ group by t.obj_id
|
|
|
+ ) a
|
|
|
+ </select>
|
|
|
+
|
|
|
|
|
|
|
|
|
</mapper>
|