From 2a31b6bf020f10d23ade9d09a656dca86f301f3f Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期一, 19 十月 2020 15:25:01 +0800
Subject: [PATCH] 优化代码
---
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
index 770f445..2adab2a 100644
--- a/java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
@@ -762,5 +762,65 @@
limit #{page}, #{row}
</if>
</select>
+ <select id="queryPrePaymentNewCount" parameterType="Map" resultType="Map">
+ select count(1) count
+ from (
+ select pfc.fee_name feeName, f.floor_num floorNum,bu.unit_num unitNum,br.room_num roomNum,t.end_time endTime ,oc.car_num carNum
+ from pay_fee 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.payer_obj_id = br.room_id and t.payer_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 f.floor_id = bu.floor_id and f.status_cd = '0'
+ left join owner_car oc on t.payer_obj_id = oc.car_id and t.payer_obj_type = '6666' and oc.status_cd = '0'
+ where t.state = '2008001'
+ and t.status_cd = '0'
+ <if test="communityId !=null and communityId != ''">
+ and t.community_id= #{communityId}
+ </if>
+ <if test="startTime !=null">
+ and t.create_time >= #{startTime}
+ </if>
+ <if test="endTime !=null">
+ and t.create_time <= #{endTime}
+ </if>
+ ) t
+ </select>
+
+ <!-- 鏌ヨ璐圭敤鏈堢粺璁′俊鎭� add by wuxw 2018-07-03 -->
+ <select id="queryPrePayment" parameterType="Map" resultType="Map">
+ select pfc.fee_name feeName, f.floor_num floorNum,bu.unit_num unitNum,br.room_num roomNum,t.end_time endTime ,
+ oc.car_num carNum,t.payer_obj_type payerObjType
+ from pay_fee 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.payer_obj_id = br.room_id and t.payer_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 f.floor_id = bu.floor_id and f.status_cd = '0'
+ left join owner_car oc on t.payer_obj_id = oc.car_id and t.payer_obj_type = '6666' and oc.status_cd = '0'
+ where t.state = '2008001'
+ and t.status_cd = '0'
+ <if test="communityId !=null and communityId != ''">
+ and t.community_id= #{communityId}
+ </if>
+ <if test="startTime !=null">
+ and t.create_time >= #{startTime}
+ </if>
+ <if test="endTime !=null">
+ and t.create_time <= #{endTime}
+ </if>
+ <if test="page != -1 and page != null ">
+ limit #{page}, #{row}
+ </if>
+ </select>
+
+ <select id="queryPrePaymentCount" parameterType="Map" resultType="Map">
+ select pfc.fee_name feeName,count(t.payer_obj_id) from pay_fee t
+ left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
+ where t.state = '2008001'
+ and t.status_cd = '0'
+ and t.end_time > #{startTime}
+ and t.end_time < #{endTime}
+ and t.community_id= #{communityId}
+ group by pfc.fee_name ,pfc.config_id
+ </select>
</mapper>
--
Gitblit v1.8.0