Browse Source

优化报表查询慢问题

wuxw 2 years ago
parent
commit
8ffe22beae

+ 143 - 315
java110-db/src/main/resources/mapper/report/ReportFeeStatisticsServiceDaoImplMapper.xml

@@ -318,137 +318,64 @@
     <select id="getFeeRoomCount" parameterType="Map" resultType="Map">
         select count(1) feeRoomCount
         from (
-            select t.payer_obj_id
-            from report_owe_fee t
-            inner join building_room br on t.payer_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 test="feeTypeCd != null and feeTypeCd != ''">
-                left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
-            </if>
-            where
-            1=1
-            and t.payer_obj_type = '3333'
-            and t.community_id=  #{communityId}
-            and t.end_time &lt; #{endDate}
-            <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.payer_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.owner_tel = #{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 pfc.fee_type_cd = #{feeTypeCd}
-            </if>
-            group by t.payer_obj_id
-        ) a
-    </select>
-
-
-    <select id="getFloorFeeSummary" parameterType="Map" resultType="Map">
-        select a.floor_id floorId,a.floor_num floorNum,a.name floorName,
-        (
-        select count(1) from (
-            select bu.floor_id,t.payer_obj_id
-            from report_owe_fee t
-            inner join building_room br on t.payer_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 test="feeTypeCd != null and feeTypeCd != ''">
-                left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
-            </if>
-            where
-            1=1
-            and t.payer_obj_type = '3333'
-            and t.community_id= #{communityId}
-            and t.end_time &lt;= #{endDate}
-            and t.amount_owed != 0
-            <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 pfc.fee_type_cd = #{feeTypeCd}
-            </if>
-            group by bu.floor_id,t.payer_obj_id
-        ) b
-        where b.floor_id = a.floor_id
-        ) oweRoomCount,
-        (
-        select count(1) from (
-            select bu.floor_id,t.payer_obj_id
-            from report_owe_fee t
-            inner join pay_fee pf on pf.fee_id = t.fee_id and pf.status_cd = '0' and pf.state = '2008001'
+        select t.payer_obj_id
+        from report_owe_fee t
         inner join building_room br on t.payer_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 t.payer_obj_type = '3333'
-            and t.community_id= #{communityId}
-            and pf.community_id=  #{communityId}
-            and t.end_time &lt;= #{endDate}
-            <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>
-            group by bu.floor_id,t.payer_obj_id
-        ) b
-        where b.floor_id = a.floor_id
-        ) feeRoomCount,
-        (
-        select ifnull(sum(t.received_amount),0.0) receivedFee
-        from pay_fee_detail t
-        INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
-        LEFT JOIN building_room br on pf.payer_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 test="feeTypeCd != null and feeTypeCd != ''">
+            left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
+        </if>
         where
         1=1
-        and bu.floor_id = a.floor_id
-        and t.status_cd = '0'
-        and t.community_id= a.community_id
-        and t.create_time &gt; #{startDate}
-        and t.create_time &lt; #{endDate}
+        and t.payer_obj_type = '3333'
+        and t.community_id=  #{communityId}
+        and t.end_time &lt; #{endDate}
+        <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.payer_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.owner_tel = #{link}
+        </if>
         <if test="configIds !=null ">
-            and pf.config_id in
+            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}
+            and pfc.fee_type_cd = #{feeTypeCd}
         </if>
-        ) receivedFee,
+        group by t.payer_obj_id
+        ) a
+    </select>
+
+
+    <select id="getFloorFeeSummary" parameterType="Map" resultType="Map">
+        select a.floor_id floorId,a.floor_num floorNum,a.name floorName,
         (
-        select ifnull(sum(t.received_amount),0.0) preReceivedFee
-        from pay_fee_detail_month t
+        select count(1) from (
+        select bu.floor_id,t.payer_obj_id
+        from report_owe_fee t
+        inner join building_room br on t.payer_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 test="feeTypeCd != null and feeTypeCd != ''">
+            left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
+        </if>
         where
         1=1
-        and t.obj_fpc_id = a.floor_id
-        and t.status_cd = '0'
-        and t.community_id= a.community_id
-        and t.pay_fee_time &gt; #{startDate}
-        and t.pay_fee_time &lt; #{endDate}
-        and t.cur_month_time &gt;= #{endDate}
+        and t.payer_obj_type = '3333'
+        and t.community_id= #{communityId}
+        and t.end_time &lt;= #{endDate}
+        and t.amount_owed != 0
         <if test="configIds !=null ">
             and t.config_id in
             <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=",">
@@ -456,19 +383,25 @@
             </foreach>
         </if>
         <if test="feeTypeCd != null and feeTypeCd != ''">
-            and t.fee_type_cd = #{feeTypeCd}
+            and pfc.fee_type_cd = #{feeTypeCd}
         </if>
-        ) preReceivedFee,
+        group by bu.floor_id,t.payer_obj_id
+        ) b
+        where b.floor_id = a.floor_id
+        ) oweRoomCount,
         (
-        select ifnull(sum(t.receivable_amount),0.0) hisOweFee
-        from pay_fee_detail_month t
+        select count(1) from (
+        select bu.floor_id,t.payer_obj_id
+        from report_owe_fee t
+        inner join pay_fee pf on pf.fee_id = t.fee_id and pf.status_cd = '0' and pf.state = '2008001'
+        inner join building_room br on t.payer_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 t.obj_fpc_id = a.floor_id
-        and t.status_cd = '0'
-        and t.community_id= a.community_id
-        and t.detail_id = '-1'
-        and t.cur_month_time &lt; #{startDate}
+        and t.payer_obj_type = '3333'
+        and t.community_id= #{communityId}
+        and pf.community_id=  #{communityId}
+        and t.end_time &lt;= #{endDate}
         <if test="configIds !=null ">
             and t.config_id in
             <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=",">
@@ -476,9 +409,12 @@
             </foreach>
         </if>
         <if test="feeTypeCd != null and feeTypeCd != ''">
-            and t.fee_type_cd = #{feeTypeCd}
+            and pf.fee_type_cd = #{feeTypeCd}
         </if>
-        ) hisOweFee,
+        group by bu.floor_id,t.payer_obj_id
+        ) b
+        where b.floor_id = a.floor_id
+        ) feeRoomCount,
         (
         select ifnull(sum(t.receivable_amount),0.0) curReceivableFee
         from pay_fee_detail_month t
@@ -519,140 +455,22 @@
         <if test="feeTypeCd != null and feeTypeCd != ''">
             and t.fee_type_cd = #{feeTypeCd}
         </if>
-        ) curReceivedFee,
-        (
-        select ifnull(sum(t.received_amount),0.0) hisReceivedFee
-        from pay_fee_detail_month t
-        where
-        1=1
-        and t.obj_fpc_id = a.floor_id
-        and t.status_cd = '0'
-        and t.community_id= a.community_id
-        and t.pay_fee_time &gt; #{startDate}
-        and t.pay_fee_time &lt; #{endDate}
-        and t.cur_month_time &lt; #{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 t.fee_type_cd = #{feeTypeCd}
-        </if>
-        ) hisReceivedFee
+        ) curReceivedFee
         from f_floor a
         where 1=1
         and a.status_cd = '0'
         and a.community_id = #{communityId}
+        <if test="floorId != null and floorId != ''">
+            and a.floor_id = #{floorId}
+        </if>
         order by a.seq
     </select>
 
     <select id="getConfigFeeSummary" parameterType="Map" resultType="Map">
         select a.name,
         (
-        select count(1) from (
-            select pfc.fee_type_cd,t.payer_obj_id
-            from report_owe_fee t
-        inner join building_room br on t.payer_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'
-            left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
-            where
-            1=1
-            and t.payer_obj_type = '3333'
-            and t.community_id=  #{communityId}
-            and t.end_time &lt;= #{endDate}
-            and t.amount_owed != 0
-            <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 pfc.fee_type_cd = #{feeTypeCd}
-            </if>
-            group by pfc.fee_type_cd,t.payer_obj_id
-        ) b
-        where b.fee_type_cd = a.status_cd
-        ) oweRoomCount,
-        (
-        select count(1) from (
-        select pf.fee_type_cd,t.payer_obj_id
-        from report_owe_fee t
-        inner join pay_fee pf on pf.fee_id = t.fee_id and pf.status_cd = '0' and pf.state = '2008001'
-        inner join building_room br on t.payer_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 t.payer_obj_type = '3333'
-        and t.community_id=  #{communityId}
-        and pf.community_id=  #{communityId}
-        and t.end_time &lt;= #{endDate}
-        <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>
-        group by pf.fee_type_cd,t.payer_obj_id
-        ) b
-        where b.fee_type_cd = a.status_cd
-        ) feeRoomCount,
-        (
-        select ifnull(sum(t.received_amount),0.0) receivedFee
-        from pay_fee_detail 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 pf.payer_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.create_time &gt; #{startDate}
-        and t.create_time &lt; #{endDate}
-        <if test="configIds !=null ">
-            and pf.config_id in
-            <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=",">
-                #{item}
-            </foreach>
-        </if>
-        and pf.fee_type_cd = a.status_cd
-        ) receivedFee,
-        (
-        select ifnull(sum(t.received_amount),0.0) preReceivedFee
-        from pay_fee_detail_month t
-        where
-        1=1
-        <if test="floorId != null and floorId != ''">
-            and t.obj_fpc_id = #{floorId}
-        </if>
-        and t.status_cd = '0'
-        and t.community_id= #{communityId}
-        and t.pay_fee_time &gt; #{startDate}
-        and t.pay_fee_time &lt; #{endDate}
-        and t.cur_month_time &gt;= #{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=",">
-                #{item}
-            </foreach>
-        </if>
-        and t.fee_type_cd = a.status_cd
-        ) preReceivedFee,
-        (
-        select ifnull(sum(t.receivable_amount),0.0) hisOweFee
-        from pay_fee_detail_month t
+        select ifnull(sum(t.receivable_amount),0.0) curReceivableFee
+        from pay_fee_detail_month t force index(i_fc)
         where
         1=1
         <if test="floorId != null and floorId != ''">
@@ -660,8 +478,8 @@
         </if>
         and t.status_cd = '0'
         and t.community_id= #{communityId}
-        and t.detail_id = '-1'
-        and t.cur_month_time &lt; #{startDate}
+        and t.cur_month_time &gt;= #{startDate}
+        and t.cur_month_time &lt; #{endDate}
         <if test="configIds !=null ">
             and t.config_id in
             <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=",">
@@ -669,10 +487,10 @@
             </foreach>
         </if>
         and t.fee_type_cd = a.status_cd
-        ) hisOweFee,
+        ) curReceivableFee,
         (
-        select ifnull(sum(t.receivable_amount),0.0) curReceivableFee
-        from pay_fee_detail_month t
+        select ifnull(sum(t.receivable_amount),0.0) curReceivedFee
+        from pay_fee_detail_month t force index(i_fc)
         where
         1=1
         <if test="floorId != null and floorId != ''">
@@ -682,6 +500,7 @@
         and t.community_id= #{communityId}
         and t.cur_month_time &gt;= #{startDate}
         and t.cur_month_time &lt; #{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=",">
@@ -689,50 +508,59 @@
             </foreach>
         </if>
         and t.fee_type_cd = a.status_cd
-        ) curReceivableFee,
+        ) curReceivedFee,
         (
-        select ifnull(sum(t.receivable_amount),0.0) curReceivedFee
-        from pay_fee_detail_month t
+        select count(1) from (
+        select pfc.fee_type_cd,t.payer_obj_id
+        from report_owe_fee t
+        inner join building_room br on t.payer_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'
+        left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
         where
         1=1
-        <if test="floorId != null and floorId != ''">
-            and t.obj_fpc_id = #{floorId}
-        </if>
-        and t.status_cd = '0'
-        and t.community_id= #{communityId}
-        and t.cur_month_time &gt;= #{startDate}
-        and t.cur_month_time &lt; #{endDate}
-        and t.detail_id != '-1'
+        and t.payer_obj_type = '3333'
+        and t.community_id=  #{communityId}
+        and t.end_time &lt;= #{endDate}
+        and t.amount_owed != 0
         <if test="configIds !=null ">
             and t.config_id in
             <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=",">
                 #{item}
             </foreach>
         </if>
-        and t.fee_type_cd = a.status_cd
-        ) curReceivedFee,
+        <if test="feeTypeCd != null and feeTypeCd != ''">
+            and pfc.fee_type_cd = #{feeTypeCd}
+        </if>
+        group by pfc.fee_type_cd,t.payer_obj_id
+        ) b
+        where b.fee_type_cd = a.status_cd
+        ) oweRoomCount,
         (
-        select ifnull(sum(t.received_amount),0.0) hisReceivedFee
-        from pay_fee_detail_month t
+        select count(1) from (
+        select pf.fee_type_cd,t.payer_obj_id
+        from report_owe_fee t
+        inner join pay_fee pf on pf.fee_id = t.fee_id and pf.status_cd = '0' and pf.state = '2008001'
+        inner join building_room br on t.payer_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
-        <if test="floorId != null and floorId != ''">
-            and t.obj_fpc_id = #{floorId}
-        </if>
-        and t.status_cd = '0'
-        and t.community_id= #{communityId}
-        and t.pay_fee_time &gt; #{startDate}
-        and t.pay_fee_time &lt; #{endDate}
-        and t.cur_month_time &lt; #{startDate}
-        and t.detail_id != '-1'
+        and t.payer_obj_type = '3333'
+        and t.community_id=  #{communityId}
+        and pf.community_id=  #{communityId}
+        and t.end_time &lt;= #{endDate}
         <if test="configIds !=null ">
             and t.config_id in
             <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=",">
                 #{item}
             </foreach>
         </if>
-        and t.fee_type_cd = a.status_cd
-        ) hisReceivedFee
+        <if test="feeTypeCd != null and feeTypeCd != ''">
+            and pf.fee_type_cd = #{feeTypeCd}
+        </if>
+        group by pf.fee_type_cd,t.payer_obj_id
+        ) b
+        where b.fee_type_cd = a.status_cd
+        ) feeRoomCount
         from t_dict a
         where 1=1
         and a.table_name = 'pay_fee_config'
@@ -743,17 +571,17 @@
         select count(1) feeRoomCount
         from
         (
-            select t.payer_ob_id
-            from report_owe_fee t
-            inner join pay_fee pf on pf.fee_id = t.fee_id and pf.status_cd = '0' and pf.state = '2008001'
+        select t.payer_ob_id
+        from report_owe_fee t
+        inner join pay_fee pf on pf.fee_id = t.fee_id and pf.status_cd = '0' and pf.state = '2008001'
         inner join building_room br on t.payer_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 t.payer_obj_type = '3333'
-            and t.community_id= #{communityId}
-            and pf.community_id=  #{communityId}
-            group by a.payer_ob_id
+        left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
+        where
+        1=1
+        and t.payer_obj_type = '3333'
+        and t.community_id= #{communityId}
+        and pf.community_id=  #{communityId}
+        group by a.payer_ob_id
         ) b
     </select>
     <!-- 查询房屋费用明细表-->
@@ -1013,35 +841,35 @@
         ) roomCount,
         (
         select count(1) from (
-            select bu.floor_id,br.room_id
-            from report_owe_fee t
-            inner join pay_fee pf on pf.fee_id = t.fee_id and pf.status_cd = '0' and pf.state = '2008001'
+        select bu.floor_id,br.room_id
+        from report_owe_fee t
+        inner join pay_fee pf on pf.fee_id = t.fee_id and pf.status_cd = '0' and pf.state = '2008001'
         inner join building_room br on t.payer_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 t.payer_obj_type = '3333'
-            and t.community_id= #{communityId}
+        left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
+        where
+        1=1
+        and t.payer_obj_type = '3333'
+        and t.community_id= #{communityId}
         and pf.community_id=  #{communityId}
-            and t.end_time &lt; #{endDate}
-            group by bu.floor_id,br.room_id
+        and t.end_time &lt; #{endDate}
+        group by bu.floor_id,br.room_id
         ) b
         where b.floor_id = a.floor_id
         ) feeRoomCount,
         (
         select count(1) from (
-            select bu.floor_id,br.room_id
-            from report_owe_fee t
+        select bu.floor_id,br.room_id
+        from report_owe_fee t
         inner join building_room br on t.payer_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'
-            left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
-            where
-            1=1
-            and t.payer_obj_type = '3333'
-            and t.community_id= #{communityId}
-            and t.end_time &lt; #{endDate}
-            and t.amount_owed != 0
-            group by bu.floor_id,br.room_id
+        left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
+        left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
+        where
+        1=1
+        and t.payer_obj_type = '3333'
+        and t.community_id= #{communityId}
+        and t.end_time &lt; #{endDate}
+        and t.amount_owed != 0
+        group by bu.floor_id,br.room_id
         ) b
         where b.floor_id = a.floor_id
         ) oweRoomCount,
@@ -1159,7 +987,7 @@
         LEFT JOIN building_room br on pf.payer_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 = #{floorId}
+        and bu.floor_id = #{floorId}
         and t.community_id =  #{communityId}
         and pf.community_id=  #{communityId}
         and t.pay_fee_time &gt; #{startDate}

+ 7 - 1
service-report/src/main/java/com/java110/report/cmd/reportFeeMonthStatistics/QueryReportFeeSummaryCmd.java

@@ -80,7 +80,7 @@ public class QueryReportFeeSummaryCmd extends Cmd {
 
         Java110ThreadPoolFactory java110ThreadPoolFactory = null;
         try {
-            java110ThreadPoolFactory = Java110ThreadPoolFactory.getInstance().createThreadPool(7);
+            java110ThreadPoolFactory = Java110ThreadPoolFactory.getInstance().createThreadPool(5);
             java110ThreadPoolFactory.submit(() -> {
                 //todo 查询历史欠费
                 double hisOweFee = feeStatisticsImpl.getHisMonthOweFee(queryStatisticsDto);
@@ -127,9 +127,15 @@ public class QueryReportFeeSummaryCmd extends Cmd {
                 //todo 房屋数
                 long roomCount = baseDataStatisticsImpl.getRoomCount(queryStatisticsDto);
                 data.put("roomCount", roomCount);
+                return roomCount;
+            });
+            java110ThreadPoolFactory.submit(() -> {
                 //todo 收费房屋数
                 long feeRoomCount = feeStatisticsImpl.getFeeRoomCount(queryStatisticsDto);
                 data.put("feeRoomCount", feeRoomCount);
+                return feeRoomCount;
+            });
+            java110ThreadPoolFactory.submit(() -> {
                 //todo 欠费户数
                 int oweRoomCount = feeStatisticsImpl.getOweRoomCount(queryStatisticsDto);
                 data.put("oweRoomCount", oweRoomCount);

+ 1 - 1
service-report/src/main/java/com/java110/report/cmd/reportFeeMonthStatistics/QueryReportFloorFeeSummaryCmd.java

@@ -103,7 +103,7 @@ public class QueryReportFloorFeeSummaryCmd extends Cmd {
 
         //List<Map> datas = feeStatisticsImpl.getFloorFeeSummary(queryStatisticsDto);
 
-        if (datas == null || datas.size() < 1) {
+        if (ListUtil.isNull(datas)) {
             context.setResponseEntity(ResultVo.createResponseEntity(datas));
             return;
         }