| | |
| | | where t.status_cd = '0' |
| | | and t.community_id = #{communityId} |
| | | and bu.unit_id = #{unitId} |
| | | order by t.layer,t.room_num |
| | | order by CONVERT(t.layer,SIGNED),CONVERT(t.room_num,SIGNED) asc |
| | | </select> |
| | | |
| | | <select id="queryCarStructures" parameterType="Map" resultType="Map"> |
| | |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="leaseTypes !=null "> |
| | | and t.lease_type in |
| | | <foreach collection="leaseTypes" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | |
| | | where t.status_cd = '0' |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="leaseTypes !=null "> |
| | | and t.lease_type in |
| | | <foreach collection="leaseTypes" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询无效费用 add by wuxw 2018-07-03 --> |
| | | <select id="queryInvalidFeeMonthStatistics" parameterType="Map" resultType="Map"> |
| | | select t.fee_id feeId from pay_fee t |
| | | inner join pay_fee_config pfc on t.config_id = pfc.config_id |
| | | inner join report_fee_year_collection rfyc on t.fee_id = rfyc.fee_id and rfyc.status_cd = '0' |
| | | where (t.status_cd = '1' or pfc.status_cd = '1') |
| | | and t.community_id= #{communityId} |
| | | </select> |
| | | |
| | | <!--清理报表 无效数据--> |
| | | <update id="deleteInvalidFee" parameterType="Map"> |
| | | delete from report_fee_year_collection where fee_id in |
| | | <foreach collection="feeIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | and community_id = #{communityId} |
| | | </update> |
| | | |
| | | |
| | | |
| | | <!-- 查询无效费用 add by wuxw 2018-07-03 --> |
| | | <select id="queryRoomsTree" parameterType="Map" resultType="Map"> |
| | | SELECT t.room_id,t.room_id roomId,t.layer,t.room_num, |
| | | t.room_num roomNum,t.unit_id,u.`unit_num` unitNum, |
| | | u.unit_id unitId,f.floor_id floorId,f.floor_num floorNum,t.`community_id` communityId,bo.owner_id ownerId ,bo.`name` ownerName ,bo.link link |
| | | FROM building_room t |
| | | inner join building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0' |
| | | inner JOIN f_floor f on u.`floor_id` = f.`floor_id` AND f.`community_id` = t.`community_id` AND f.`status_cd` = |
| | | '0' |
| | | left join building_owner_room_rel borr on t.room_id = borr.room_id and borr.status_cd = '0' |
| | | left join building_owner bo on borr.owner_id = bo.member_id and bo.status_cd = '0' |
| | | WHERE 1 =1 |
| | | and t.status_cd = '0' |
| | | and u.unit_id = #{unitId} |
| | | and t.community_id= #{communityId} |
| | | order by CONVERT(t.layer,SIGNED),CONVERT(t.room_num,SIGNED) |
| | | </select> |
| | | |
| | | </mapper> |