|
|
@@ -1976,113 +1976,56 @@
|
|
|
|
|
|
<select id="queryDeadlineFeeCount" parameterType="Map" resultType="Map">
|
|
|
select count(1) count
|
|
|
- from (
|
|
|
- SELECT
|
|
|
- t.obj_name objName,
|
|
|
- t.fee_name feeName,
|
|
|
- t.deadline_time deadlineTime
|
|
|
- FROM
|
|
|
- report_fee_month_statistics t
|
|
|
- inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
|
|
|
- left join building_room br on t.obj_id = br.room_id and t.obj_type = '3333' and br.status_cd = '0'
|
|
|
- left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
|
|
|
- left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
|
|
|
- inner join pay_fee pf on t.fee_id = pf.fee_id and pf.community_id = t.community_id and pf.status_cd = '0'
|
|
|
- where t.status_cd = '0'
|
|
|
- <if test="roomNum !=null and roomNum != ''">
|
|
|
- and br.room_num= #{roomNum}
|
|
|
- </if>
|
|
|
- <if test="unitId !=null and unitId != ''">
|
|
|
- and bu.unit_id= #{unitId}
|
|
|
- </if>
|
|
|
- <if test="floorId !=null and floorId != ''">
|
|
|
- and f.floor_id = #{floorId}
|
|
|
+ from pay_fee_detail_month t
|
|
|
+ inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
|
|
|
+ where 1=1
|
|
|
+ and t.detail_id = '-1'
|
|
|
+ <if test="configId !=null and configId != ''">
|
|
|
+ and t.config_id = #{configId}
|
|
|
</if>
|
|
|
<if test="objName !=null and objName != ''">
|
|
|
- and t.obj_name= #{objName}
|
|
|
- </if>
|
|
|
- <if test="objNameNum != null and objNameNum != ''">
|
|
|
- and t.obj_name_num= #{objNameNum}
|
|
|
- </if>
|
|
|
- <if test="feeYear !=null and feeYear != ''">
|
|
|
- and t.fee_year= #{feeYear}
|
|
|
- </if>
|
|
|
- <if test="feeMonth !=null and feeMonth != ''">
|
|
|
- and t.fee_month= #{feeMonth}
|
|
|
+ and t.obj_name like CONCAT('%',#{objName},'%')
|
|
|
</if>
|
|
|
- <if test="feeId !=null and feeId != ''">
|
|
|
- and t.fee_id= #{feeId}
|
|
|
+ <if test="ownerName !=null and ownerName != ''">
|
|
|
+ and t.owner_name like CONCAT('%',#{ownerName},'%')
|
|
|
</if>
|
|
|
- <if test="configId !=null and configId != ''">
|
|
|
- and t.config_id= #{configId}
|
|
|
- </if>
|
|
|
- <if test="objId !=null and objId != ''">
|
|
|
- and t.obj_id= #{objId}
|
|
|
- </if>
|
|
|
- <if test="feeName !=null and feeName != ''">
|
|
|
- and t.fee_name= #{feeName}
|
|
|
+ <if test="link !=null and link != ''">
|
|
|
+ and t.link = #{link}
|
|
|
</if>
|
|
|
<if test="communityId !=null and communityId != ''">
|
|
|
and t.community_id= #{communityId}
|
|
|
</if>
|
|
|
- <if test="startTime !=null and startTime != ''">
|
|
|
+ <if test="startTime !=null and startTime !=''">
|
|
|
and t.deadline_time >= #{startTime}
|
|
|
</if>
|
|
|
<if test="endTime !=null and endTime != ''">
|
|
|
and t.deadline_time <= #{endTime}
|
|
|
</if>
|
|
|
- ) t
|
|
|
</select>
|
|
|
|
|
|
<!-- 查询费用月统计信息 add by wuxw 2018-07-03 -->
|
|
|
<select id="queryDeadlineFee" parameterType="Map" resultType="Map">
|
|
|
- SELECT
|
|
|
+
|
|
|
+ select
|
|
|
t.obj_name objName,
|
|
|
- t.obj_name_num objNameNum,
|
|
|
- t.obj_type objType,
|
|
|
+ pf.payer_obj_type objType,
|
|
|
t.fee_name feeName,
|
|
|
- t.deadline_time deadlineTime,
|
|
|
- t.update_time updateTime
|
|
|
- FROM
|
|
|
- report_fee_month_statistics t
|
|
|
- inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
|
|
|
- left join building_room br on t.obj_id = br.room_id and t.obj_type = '3333' and br.status_cd = '0'
|
|
|
- left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
|
|
|
- left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
|
|
|
- inner join pay_fee pf on t.fee_id = pf.fee_id and pf.community_id = t.community_id and pf.status_cd = '0'
|
|
|
- where t.status_cd = '0'
|
|
|
- <if test="roomNum !=null and roomNum != ''">
|
|
|
- and br.room_num= #{roomNum}
|
|
|
- </if>
|
|
|
- <if test="unitId !=null and unitId != ''">
|
|
|
- and bu.unit_id= #{unitId}
|
|
|
- </if>
|
|
|
- <if test="floorId !=null and floorId != ''">
|
|
|
- and f.floor_id = #{floorId}
|
|
|
+ t.deadline_time deadlineTime
|
|
|
+ from pay_fee_detail_month t
|
|
|
+ inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
|
|
|
+ where 1=1
|
|
|
+ and t.detail_id = '-1'
|
|
|
+ <if test="configId !=null and configId != ''">
|
|
|
+ and t.config_id = #{configId}
|
|
|
</if>
|
|
|
<if test="objName !=null and objName != ''">
|
|
|
- and t.obj_name= #{objName}
|
|
|
- </if>
|
|
|
- <if test="objNameNum != null and objNameNum != ''">
|
|
|
- and t.obj_name_num= #{objNameNum}
|
|
|
- </if>
|
|
|
- <if test="feeYear !=null and feeYear != ''">
|
|
|
- and t.fee_year= #{feeYear}
|
|
|
- </if>
|
|
|
- <if test="feeMonth !=null and feeMonth != ''">
|
|
|
- and t.fee_month= #{feeMonth}
|
|
|
- </if>
|
|
|
- <if test="feeId !=null and feeId != ''">
|
|
|
- and t.fee_id= #{feeId}
|
|
|
+ and t.obj_name like CONCAT('%',#{objName},'%')
|
|
|
</if>
|
|
|
- <if test="configId !=null and configId != ''">
|
|
|
- and t.config_id= #{configId}
|
|
|
+ <if test="ownerName !=null and ownerName != ''">
|
|
|
+ and t.owner_name like CONCAT('%',#{ownerName},'%')
|
|
|
</if>
|
|
|
- <if test="objId !=null and objId != ''">
|
|
|
- and t.obj_id= #{objId}
|
|
|
- </if>
|
|
|
- <if test="feeName !=null and feeName != ''">
|
|
|
- and t.fee_name= #{feeName}
|
|
|
+ <if test="link !=null and link != ''">
|
|
|
+ and t.link = #{link}
|
|
|
</if>
|
|
|
<if test="communityId !=null and communityId != ''">
|
|
|
and t.community_id= #{communityId}
|