|
|
@@ -535,7 +535,32 @@
|
|
|
<if test="feeTypeCd != null and feeTypeCd != ''">
|
|
|
and pf.fee_type_cd = #{feeTypeCd}
|
|
|
</if>
|
|
|
- ) curReceivableFee
|
|
|
+ ) curReceivableFee,
|
|
|
+ (
|
|
|
+ select ifnull(sum(t.received_amount),0.0) hisReceivedFee
|
|
|
+ from pay_fee_detail_month t
|
|
|
+ INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
|
|
|
+ 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'
|
|
|
+ where
|
|
|
+ 1=1
|
|
|
+ and bu.floor_id = a.floor_id
|
|
|
+ and t.status_cd = '0'
|
|
|
+ and t.community_id= a.community_id
|
|
|
+ and t.pay_fee_time > #{startDate}
|
|
|
+ and t.pay_fee_time < #{endDate}
|
|
|
+ and t.cur_month_time < #{startDate}
|
|
|
+ and t.detail_id != '-1'
|
|
|
+ <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>
|
|
|
+ ) hisReceivedFee
|
|
|
from f_floor a
|
|
|
where 1=1
|
|
|
and a.status_cd = '0'
|
|
|
@@ -613,8 +638,9 @@
|
|
|
</if>
|
|
|
and t.status_cd = '0'
|
|
|
and t.community_id= #{communityId}
|
|
|
- and t.create_time > #{startDate}
|
|
|
- and t.create_time < #{endDate}
|
|
|
+ and t.pay_fee_time > #{startDate}
|
|
|
+ and t.pay_fee_time < #{endDate}
|
|
|
+ and t.detail_id != '-1'
|
|
|
<if test="configIds !=null ">
|
|
|
and pf.config_id in
|
|
|
<foreach collection="configIds" item="item" index="index" open="(" close=")" separator=",">
|
|
|
@@ -641,6 +667,7 @@
|
|
|
and t.pay_fee_time > #{startDate}
|
|
|
and t.pay_fee_time < #{endDate}
|
|
|
and t.cur_month_time > #{endDate}
|
|
|
+ and t.detail_id != '-1'
|
|
|
<if test="configIds !=null ">
|
|
|
and t.config_id in
|
|
|
<foreach collection="configIds" item="item" index="index" open="(" close=")" separator=",">
|
|
|
@@ -698,7 +725,34 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
and pf.fee_type_cd = a.status_cd
|
|
|
- ) curReceivableFee
|
|
|
+ ) curReceivableFee,
|
|
|
+ (
|
|
|
+ select ifnull(sum(t.received_amount),0.0) hisReceivedFee
|
|
|
+ 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>
|
|
|
+ and t.status_cd = '0'
|
|
|
+ and t.community_id= #{communityId}
|
|
|
+ and t.pay_fee_time > #{startDate}
|
|
|
+ and t.pay_fee_time < #{endDate}
|
|
|
+ and t.cur_month_time < #{startDate}
|
|
|
+ and t.detail_id != '-1'
|
|
|
+ <if test="configIds !=null ">
|
|
|
+ and t.config_id in
|
|
|
+ <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ and pf.fee_type_cd = a.status_cd
|
|
|
+ ) hisReceivedFee
|
|
|
from t_dict a
|
|
|
where 1=1
|
|
|
and a.table_name = 'pay_fee_config'
|