Your Name 2 lat temu
rodzic
commit
a97a58b68e

+ 9 - 1
java110-db/src/main/resources/mapper/report/ReportFeeStatisticsServiceDaoImplMapper.xml

@@ -1124,13 +1124,21 @@
         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
-        bu.floor_id = #{floorId}
+        <if test="floorId != null and floorId != ''">
+            bu.floor_id = #{floorId}
+        </if>
         and t.community_id = #{communityId}
         and t.create_time &gt; #{startDate}
         and t.create_time &lt; #{endDate}
         <if test="feeTypeCd != null and feeTypeCd != ''">
             and pf.fee_type_cd = #{feeTypeCd}
         </if>
+        <if test="configIds !=null ">
+            and pf.config_id in
+            <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
     </select>
     <!-- 已收房屋金额 -->
     <select id="getReceivedRoomAmount" parameterType="Map" resultType="Map">

+ 4 - 3
service-report/src/main/java/com/java110/report/cmd/reportFeeMonthStatistics/QueryReportFeeSummaryCmd.java

@@ -94,8 +94,9 @@ public class QueryReportFeeSummaryCmd extends Cmd {
         //todo 空闲房屋数
         long feeRoomCount = feeStatisticsImpl.getFeeRoomCount(queryStatisticsDto);
 
-        //todo 欠费户数
-        int oweRoomCount = feeStatisticsImpl.getOweRoomCount(queryStatisticsDto);
+        //todo 已收费户数
+        double monthReceivedRoomCount = feeStatisticsImpl.getReceivedRoomCount(queryStatisticsDto);
+        //int oweRoomCount = feeStatisticsImpl.getOweRoomCount(queryStatisticsDto);
 
         JSONObject data = new JSONObject();
         data.put("hisOweFee", hisOweFee);
@@ -105,7 +106,7 @@ public class QueryReportFeeSummaryCmd extends Cmd {
         data.put("receivedFee", receivedFee);
         data.put("roomCount", roomCount);
         data.put("feeRoomCount", feeRoomCount);
-        data.put("oweRoomCount", oweRoomCount);
+        data.put("oweRoomCount", feeRoomCount-monthReceivedRoomCount);
         data.put("curReceivableFee", curReceivableFee);
 
         JSONArray datas = new JSONArray();