From b06ccd76e50812d81ee689dcd609bb02ac5c4ed4 Mon Sep 17 00:00:00 2001
From: xiaogang <905166056@qq.com>
Date: 星期四, 11 八月 2022 14:48:52 +0800
Subject: [PATCH] 1、优化页面展示行问题

---
 service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java |  211 ++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 160 insertions(+), 51 deletions(-)

diff --git a/service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java b/service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
index 57351e0..8440ddd 100755
--- a/service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
+++ b/service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
@@ -20,12 +20,11 @@
 import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO;
 import com.java110.report.bmo.reportFeeMonthStatistics.IGetReportFeeMonthStatisticsBMO;
 import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
 import com.java110.utils.util.DateUtil;
 import com.java110.utils.util.StringUtil;
 import com.java110.vo.ResultVo;
 import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import com.java110.core.log.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
@@ -34,12 +33,16 @@
 import java.lang.reflect.Field;
 import java.math.BigDecimal;
 import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.*;
 
 @Service("getReportFeeMonthStatisticsBMOImpl")
 public class GetReportFeeMonthStatisticsBMOImpl implements IGetReportFeeMonthStatisticsBMO {
 
     private static final Logger logger = LoggerFactory.getLogger(GetReportFeeMonthStatisticsBMOImpl.class);
+
+
+    private int MAX_ROWS = 500;  // 鏈�澶ц鏁�
 
     @Autowired
     private IReportFeeMonthStatisticsInnerServiceSMO reportFeeMonthStatisticsInnerServiceSMOImpl;
@@ -84,6 +87,7 @@
 
     @Override
     public ResponseEntity<String> queryReportFeeSummary(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
+
         int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFeeSummaryCount(reportFeeMonthStatisticsDto);
 
         List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = new ArrayList<>();
@@ -229,6 +233,8 @@
 
     @Override
     public ResponseEntity<String> queryReportFloorUnitFeeSummary(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
+        reportFeeMonthStatisticsDto.setFeeYear(DateUtil.getYear() + "");
+        reportFeeMonthStatisticsDto.setFeeMonth(DateUtil.getMonth() + "");
         int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFloorUnitFeeSummaryCount(reportFeeMonthStatisticsDto);
 
         List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null;
@@ -259,17 +265,46 @@
 
     @Override
     public ResponseEntity<String> queryFeeBreakdown(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
+
+        if(StringUtil.isEmpty(reportFeeMonthStatisticsDto.getYearMonth())){
+            reportFeeMonthStatisticsDto.setFeeYear(DateUtil.getYear()+"");
+            reportFeeMonthStatisticsDto.setFeeMonth(DateUtil.getMonth()+"");
+        }
+
         int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryFeeBreakdownCount(reportFeeMonthStatisticsDto);
 
         List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null;
         if (count > 0) {
             reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryFeeBreakdown(reportFeeMonthStatisticsDto);
             ReportFeeMonthStatisticsDto tmpReportFeeMonthStatisticsDto = reportFeeMonthStatisticsInnerServiceSMOImpl.queryFeeBreakdownMajor(reportFeeMonthStatisticsDto);
+            reportFeeMonthStatisticsDto.setPage(PageDto.DEFAULT_PAGE);
+            List<ReportFeeMonthStatisticsDto> reportFeeMonthStatistics = reportFeeMonthStatisticsInnerServiceSMOImpl.queryFeeBreakdown(reportFeeMonthStatisticsDto);
+            BigDecimal allOweAmount = new BigDecimal(0.0);
+            BigDecimal allHisOweReceivedAmount = new BigDecimal(0.0);
+            for (ReportFeeMonthStatisticsDto reportFeeMonthStatistic : reportFeeMonthStatistics) {
+                //鑾峰彇鍘嗗彶娆犺垂
+                BigDecimal hisOweAmount = new BigDecimal(reportFeeMonthStatistic.getHisOweAmount());
+                //鑾峰彇褰撴湀搴旀敹
+                BigDecimal curReceivableAmount = new BigDecimal(reportFeeMonthStatistic.getCurReceivableAmount());
+                //鑾峰彇褰撴湀瀹炴敹
+                BigDecimal curReceivedAmount = new BigDecimal(reportFeeMonthStatistic.getCurReceivedAmount());
+                //鑾峰彇娆犲�鸿拷鍥�
+                BigDecimal hisOweReceivedAmount = new BigDecimal(reportFeeMonthStatistic.getHisOweReceivedAmount());
+                //璁$畻娆犺垂閲戦
+                BigDecimal oweAmount = hisOweAmount.add(curReceivableAmount).subtract(curReceivedAmount).subtract(hisOweReceivedAmount);
+                if (oweAmount.compareTo(BigDecimal.ZERO) == 1) { //娆犺垂閲戦澶т簬0
+                    allOweAmount = allOweAmount.add(oweAmount);
+                }
+                if (hisOweReceivedAmount.compareTo(BigDecimal.ZERO) == 1) { //娆犺垂杩藉洖澶т簬0
+                    allHisOweReceivedAmount = allHisOweReceivedAmount.add(hisOweReceivedAmount);
+                }
+            }
             if (reportFeeMonthStatisticsDtos != null && reportFeeMonthStatisticsDtos.size() > 0) {
                 for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto1 : reportFeeMonthStatisticsDtos) {
                     reportFeeMonthStatisticsDto1.setAllReceivableAmount(tmpReportFeeMonthStatisticsDto.getAllReceivableAmount());
                     reportFeeMonthStatisticsDto1.setAllReceivedAmount(tmpReportFeeMonthStatisticsDto.getAllReceivedAmount());
-                    reportFeeMonthStatisticsDto1.setAllOweAmount(tmpReportFeeMonthStatisticsDto.getAllOweAmount());
+                    reportFeeMonthStatisticsDto1.setAllOweAmount(allOweAmount.setScale(2, BigDecimal.ROUND_HALF_UP).toString());
+                    reportFeeMonthStatisticsDto1.setAllHisOweReceivedAmount(allHisOweReceivedAmount.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
                 }
             }
         } else {
@@ -285,51 +320,51 @@
 
     @Override
     public ResponseEntity<String> queryFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
+
+
+        reportFeeMonthStatisticsDto.setFeeYear(DateUtil.getYear() + "");
+        reportFeeMonthStatisticsDto.setFeeMonth(DateUtil.getMonth() + "");
+
         int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryFeeDetailCount(reportFeeMonthStatisticsDto);
 
         List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null;
-        //搴旀敹鎬婚噾棰�(澶ц)
-        Double allReceivableAmount = 0.0;
-        //瀹炴敹閲戦(澶ц)
-        Double allReceivedAmount = 0.0;
         if (count > 0) {
             reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryFeeDetail(reportFeeMonthStatisticsDto);
             List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsList = reportFeeMonthStatisticsInnerServiceSMOImpl.queryAllFeeDetail(reportFeeMonthStatisticsDto);
-            allReceivableAmount = Double.valueOf(reportFeeMonthStatisticsList.get(0).getAllReceivableAmount());
-            allReceivedAmount = Double.valueOf(reportFeeMonthStatisticsList.get(0).getAllReceivedAmount());
+            reportFeeMonthStatisticsDto.setPage(PageDto.DEFAULT_PAGE);
+            List<ReportFeeMonthStatisticsDto> reportFeeMonthStatistics = reportFeeMonthStatisticsInnerServiceSMOImpl.queryFeeDetail(reportFeeMonthStatisticsDto);
+            BigDecimal allOweAmount = new BigDecimal(0.0);
+            BigDecimal allHisOweReceivedAmount = new BigDecimal(0.0);
+            for (ReportFeeMonthStatisticsDto reportFeeMonthStatistic : reportFeeMonthStatistics) {
+                //鑾峰彇鍘嗗彶娆犺垂
+                BigDecimal hisOweAmount = new BigDecimal(reportFeeMonthStatistic.getHisOweAmount());
+                //鑾峰彇褰撴湀搴旀敹
+                BigDecimal curReceivableAmount = new BigDecimal(reportFeeMonthStatistic.getCurReceivableAmount());
+                //鑾峰彇褰撴湀瀹炴敹
+                BigDecimal curReceivedAmount = new BigDecimal(reportFeeMonthStatistic.getCurReceivedAmount());
+                //鑾峰彇娆犺垂杩藉洖
+                BigDecimal hisOweReceivedAmount = new BigDecimal(reportFeeMonthStatistic.getHisOweReceivedAmount());
+                //璁$畻娆犺垂閲戦
+                BigDecimal oweAmount = hisOweAmount.add(curReceivableAmount).subtract(curReceivedAmount).subtract(hisOweReceivedAmount);
+                if (oweAmount.compareTo(BigDecimal.ZERO) == 1) { //娆犺垂閲戦澶т簬0
+                    allOweAmount = allOweAmount.add(oweAmount);
+                }
+                if (hisOweReceivedAmount.compareTo(BigDecimal.ZERO) == 1) { //娆犺垂杩藉洖澶т簬0
+                    allHisOweReceivedAmount = allHisOweReceivedAmount.add(hisOweReceivedAmount);
+                }
+            }
+            if (reportFeeMonthStatisticsDtos != null && reportFeeMonthStatisticsDtos.size() > 0) {
+                for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto1 : reportFeeMonthStatisticsDtos) {
+                    reportFeeMonthStatisticsDto1.setAllReceivableAmount(reportFeeMonthStatisticsList.get(0).getAllReceivableAmount());
+                    reportFeeMonthStatisticsDto1.setAllReceivedAmount(reportFeeMonthStatisticsList.get(0).getAllReceivedAmount());
+                    reportFeeMonthStatisticsDto1.setAllOweAmount(allOweAmount.setScale(2, BigDecimal.ROUND_HALF_UP).toString());
+                    reportFeeMonthStatisticsDto1.setAllHisOweReceivedAmount(allHisOweReceivedAmount.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
+                }
+            }
         } else {
             reportFeeMonthStatisticsDtos = new ArrayList<>();
         }
-
-        //搴旀敹鎬婚噾棰�(灏忚)
-        Double totalReceivableAmount = 0.0;
-        //瀹炴敹鎬婚噾棰�(灏忚)
-        Double totalReceivedAmount = 0.0;
-        List<ReportFeeMonthStatisticsDto> reportList = new ArrayList<>();
-        for (ReportFeeMonthStatisticsDto reportFeeMonthStatistics : reportFeeMonthStatisticsDtos) {
-            //搴旀敹閲戦
-            Double receivableAmount = Double.valueOf(reportFeeMonthStatistics.getReceivableAmount());
-            //瀹炴敹閲戦
-            Double receivedAmount = Double.valueOf(reportFeeMonthStatistics.getReceivedAmount());
-            totalReceivableAmount = totalReceivableAmount + receivableAmount;
-            totalReceivedAmount = totalReceivedAmount + receivedAmount;
-        }
-
-        //鏌ヨ璇ュ皬鍖轰笅鐨勮垂鐢ㄩ」鐩�
-        FeeConfigDto feeConfigDto = new FeeConfigDto();
-        feeConfigDto.setCommunityId(reportFeeMonthStatisticsDto.getCommunityId());
-        List<FeeConfigDto> feeConfigDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto);
-
-        for (ReportFeeMonthStatisticsDto reportFeeMonthStatistics : reportFeeMonthStatisticsDtos) {
-            reportFeeMonthStatistics.setTotalReceivableAmount(String.format("%.2f", totalReceivableAmount));
-            reportFeeMonthStatistics.setTotalReceivedAmount(String.format("%.2f", totalReceivedAmount));
-            reportFeeMonthStatistics.setAllReceivableAmount(String.format("%.2f", allReceivableAmount));
-            reportFeeMonthStatistics.setAllReceivedAmount(String.format("%.2f", allReceivedAmount));
-            reportFeeMonthStatistics.setFeeConfigDtos(feeConfigDtos);
-            reportList.add(reportFeeMonthStatistics);
-        }
-
-        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportList);
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportFeeMonthStatisticsDtos);
 
         ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
 
@@ -391,6 +426,8 @@
         Double allVacantHousingDiscount = 0.0;
         //绌虹疆鎴垮噺鍏�(澶ц)
         Double allVacantHousingReduction = 0.0;
+        //璧犻�侀噾棰�(澶ц)
+        Double allGiftAmount = 0.0;
         //鍚村鏂� 娉ㄩ噴 鎰熻鍜屼笂闈㈢殑369 鍔熻兘閲嶅
         //int size = 0;
         if (count > 0) {
@@ -433,6 +470,10 @@
                 if (!StringUtil.isEmpty(reportFeeMonthStatistics.getDiscountSmallType()) && reportFeeMonthStatistics.getDiscountSmallType().equals("5")) {
                     allVacantHousingReduction = Double.valueOf(discountPrice);
                 }
+                //璧犻�侀噾棰�(澶ц)
+                if (!StringUtil.isEmpty(reportFeeMonthStatistics.getDiscountSmallType()) && reportFeeMonthStatistics.getDiscountSmallType().equals("6")) {
+                    allGiftAmount = Double.valueOf(discountPrice);
+                }
             }
             //搴旀敹鎬婚噾棰�(灏忚)
             Double totalReceivableAmount = 0.0;
@@ -446,8 +487,11 @@
             Double totalVacantHousingDiscount = 0.0;
             //绌虹疆鎴垮噺鍏嶉噾棰�(灏忚)
             Double totalVacantHousingReduction = 0.0;
+            //璧犻�侀噾棰�(灏忚)
+            Double totalGiftAmount = 0.0;
             //婊炵撼閲�(灏忚)
             Double totalLateFee = 0.0;
+            List<String> ownerIds = new ArrayList<>();
             for (ReportFeeMonthStatisticsDto reportFeeMonthStatistics : reportFeeMonthStatisticsDtos) {
                 //搴旀敹閲戦
                 Double receivableAmount = Double.valueOf(reportFeeMonthStatistics.getReceivableAmount());
@@ -455,6 +499,18 @@
                 Double receivedAmount = Double.valueOf(reportFeeMonthStatistics.getReceivedAmount());
                 totalReceivableAmount = totalReceivableAmount + receivableAmount;
                 totalReceivedAmount = totalReceivedAmount + receivedAmount;
+
+                if (FeeDto.PAYER_OBJ_TYPE_CAR.equals(reportFeeMonthStatistics.getPayerObjType())) {
+                    ownerIds.add(reportFeeMonthStatistics.getOwnerId());
+                }
+
+                // 鏈�澶ц褰曟椂 灏卞幓鍒锋柊
+                //濡傛灉鏄溅浣嶅埛鎴垮眿淇℃伅
+                if (ownerIds.size() == MAX_ROWS) {
+                    refreshReportFeeMonthStatistics(ownerIds, reportFeeMonthStatisticsDtos);
+                    ownerIds = new ArrayList<>();
+                }
+
                 //浼樻儬閲戦
                 if (!StringUtil.isEmpty(reportFeeMonthStatistics.getDiscountSmallType()) && reportFeeMonthStatistics.getDiscountSmallType().equals("1")) {
                     //鑾峰彇浼樻儬閲戦
@@ -478,7 +534,7 @@
                 //婊炵撼閲�
                 if (!StringUtil.isEmpty(reportFeeMonthStatistics.getDiscountSmallType()) && reportFeeMonthStatistics.getDiscountSmallType().equals("3")) {
                     //鑾峰彇婊炵撼閲戦噾棰�
-                    Double discountPrice = (Double.valueOf(reportFeeMonthStatistics.getDiscountPrice())) * (-1);
+                    Double discountPrice = (Double.valueOf(reportFeeMonthStatistics.getDiscountPrice()));
                     totalLateFee = totalLateFee + discountPrice;
                     //婊炵撼閲�
                     reportFeeMonthStatistics.setLateFee(reportFeeMonthStatistics.getDiscountPrice());
@@ -504,6 +560,16 @@
                     reportFeeMonthStatistics.setVacantHousingReduction(reportFeeMonthStatistics.getDiscountPrice());
                 } else {
                     reportFeeMonthStatistics.setVacantHousingReduction("0");
+                }
+                //璧犻�侀噾棰�
+                if (!StringUtil.isEmpty(reportFeeMonthStatistics.getDiscountSmallType()) && reportFeeMonthStatistics.getDiscountSmallType().equals("6")) {
+                    //璧犻�侀噾棰�
+                    Double discountPrice = Double.valueOf(reportFeeMonthStatistics.getDiscountPrice());
+                    totalGiftAmount = totalGiftAmount + discountPrice;
+                    //璧犻�侀噾棰�
+                    reportFeeMonthStatistics.setGiftAmount(reportFeeMonthStatistics.getDiscountPrice());
+                } else {
+                    reportFeeMonthStatistics.setGiftAmount("0");
                 }
                 if (FeeDto.PAYER_OBJ_TYPE_ROOM.equals(reportFeeMonthStatistics.getPayerObjType())) {
                     reportFeeMonthStatistics.setObjName(reportFeeMonthStatistics.getFloorNum()
@@ -582,34 +648,44 @@
                     reportList.add(reportFeeMonthStatistics);
                 }
             }
+
+            //濡傛灉鏄溅浣嶅埛鎴垮眿淇℃伅
+            if (ownerIds.size() > 0) {
+                refreshReportFeeMonthStatistics(ownerIds, reportFeeMonthStatisticsDtos);
+            }
+
             //搴旀敹鎬婚噾棰�(灏忚)
             reportFeeMonthStatisticsTotalDto.setTotalReceivableAmount(String.format("%.2f", totalReceivableAmount));
             //瀹炴敹閲戦(灏忚)
             reportFeeMonthStatisticsTotalDto.setTotalReceivedAmount(String.format("%.2f", totalReceivedAmount));
             //浼樻儬閲戦(灏忚)
-            reportFeeMonthStatisticsTotalDto.setTotalPreferentialAmount(String.valueOf(totalPreferentialAmount));
+            reportFeeMonthStatisticsTotalDto.setTotalPreferentialAmount(String.format("%.2f",totalPreferentialAmount));
             //鍑忓厤閲戦(灏忚)
-            reportFeeMonthStatisticsTotalDto.setTotalDeductionAmount(String.valueOf(totalDeductionAmount));
+            reportFeeMonthStatisticsTotalDto.setTotalDeductionAmount(String.format("%.2f",totalDeductionAmount));
             //婊炵撼閲�(灏忚)
-            reportFeeMonthStatisticsTotalDto.setTotalLateFee(String.valueOf(totalLateFee));
+            reportFeeMonthStatisticsTotalDto.setTotalLateFee(String.format("%.2f",totalLateFee));
             //绌虹疆鎴挎墦鎶�(灏忚)
-            reportFeeMonthStatisticsTotalDto.setTotalVacantHousingDiscount(String.valueOf(totalVacantHousingDiscount));
+            reportFeeMonthStatisticsTotalDto.setTotalVacantHousingDiscount(String.format("%.2f",totalVacantHousingDiscount));
             //绌虹疆鎴垮噺鍏�(灏忚)
-            reportFeeMonthStatisticsTotalDto.setTotalVacantHousingReduction(String.valueOf(totalVacantHousingReduction));
+            reportFeeMonthStatisticsTotalDto.setTotalVacantHousingReduction(String.format("%.2f",totalVacantHousingReduction));
+            //璧犻�佽鍒欓噾棰�(灏忚)
+            reportFeeMonthStatisticsTotalDto.setTotalGiftAmount(String.format("%.2f",totalGiftAmount));
             //搴旀敹閲戦(澶ц)
             reportFeeMonthStatisticsTotalDto.setAllReceivableAmount(String.format("%.2f", allReceivableAmount));
             //瀹炴敹閲戦(澶ц)
             reportFeeMonthStatisticsTotalDto.setAllReceivedAmount(String.format("%.2f", allReceivedAmount));
             //浼樻儬閲戦(澶ц)
-            reportFeeMonthStatisticsTotalDto.setAllPreferentialAmount(String.valueOf(allPreferentialAmount));
+            reportFeeMonthStatisticsTotalDto.setAllPreferentialAmount(String.format("%.2f",allPreferentialAmount));
             //鍑忓厤閲戦(澶ц)
-            reportFeeMonthStatisticsTotalDto.setAllDeductionAmount(String.valueOf(allDeductionAmount));
+            reportFeeMonthStatisticsTotalDto.setAllDeductionAmount(String.format("%.2f",allDeductionAmount));
             //婊炵撼閲�(澶ц)
-            reportFeeMonthStatisticsTotalDto.setAllLateFee(String.valueOf(allLateFee));
+            reportFeeMonthStatisticsTotalDto.setAllLateFee(String.format("%.2f",allLateFee));
             //绌虹疆鎴挎墦鎶橀噾棰�(澶ц)
-            reportFeeMonthStatisticsTotalDto.setAllVacantHousingDiscount(String.valueOf(allVacantHousingDiscount));
+            reportFeeMonthStatisticsTotalDto.setAllVacantHousingDiscount(String.format("%.2f",allVacantHousingDiscount));
             //绌虹疆鎴垮噺鍏嶉噾棰�(澶ц)
-            reportFeeMonthStatisticsTotalDto.setAllVacantHousingReduction(String.valueOf(allVacantHousingReduction));
+            reportFeeMonthStatisticsTotalDto.setAllVacantHousingReduction(String.format("%.2f",allVacantHousingReduction));
+            //璧犻�佽鍒欓噾棰�(澶ц)
+            reportFeeMonthStatisticsTotalDto.setAllGiftAmount(String.format("%.2f",allGiftAmount));
         } else {
             reportFeeMonthStatisticsDtos = new ArrayList<>();
             reportList.addAll(reportFeeMonthStatisticsDtos);
@@ -621,6 +697,34 @@
         ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
 
         return responseEntity;
+    }
+
+    /**
+     * @param ownerIds
+     * @param reportFeeMonthStatisticsDtos
+     */
+    private void refreshReportFeeMonthStatistics(List<String> ownerIds, List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) {
+
+        if (ownerIds == null || ownerIds.size() < 1) {
+            return;
+        }
+
+        OwnerDto ownerDto = new OwnerDto();
+        ownerDto.setOwnerIds(ownerIds.toArray(new String[ownerIds.size()]));
+        List<OwnerDto> ownerDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryRoomAndParkingSpace(ownerDto);
+        String objName = "";
+        for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) {
+            if (!FeeDto.PAYER_OBJ_TYPE_CAR.equals(reportFeeMonthStatisticsDto.getPayerObjType())) {
+                continue;
+            }
+            for (OwnerDto ownerDto1 : ownerDtos) {
+                if (!StringUtil.isEmpty(reportFeeMonthStatisticsDto.getOwnerId()) && !reportFeeMonthStatisticsDto.getOwnerId().equals(ownerDto1.getOwnerId())) {
+                    continue;
+                }
+                objName = reportFeeMonthStatisticsDto.getObjName() + "(" + ownerDto1.getFloorNum() + "鏍�" + ownerDto1.getUnitNum() + "鍗曞厓" + ownerDto1.getRoomNum() + "瀹�)";
+                reportFeeMonthStatisticsDto.setObjName(objName);
+            }
+        }
     }
 
     private boolean hasInReportListAndMerge(List<ReportFeeMonthStatisticsDto> reportList, ReportFeeMonthStatisticsDto reportFeeMonthStatistics) {
@@ -740,6 +844,8 @@
      */
     @Override
     public ResponseEntity<String> queryReportProficientCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
+        reportFeeMonthStatisticsDto.setFeeYear(DateUtil.getYear()+"");
+        reportFeeMonthStatisticsDto.setFeeMonth(DateUtil.getMonth()+"");
         JSONObject result = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportProficientCount(reportFeeMonthStatisticsDto);
         ResponseEntity<String> responseEntity = new ResponseEntity<String>(result.toString(), HttpStatus.OK);
 
@@ -1174,7 +1280,8 @@
     private void freshReportOweDay(List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) {
         for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) {
             try {
-                int day = DateUtil.daysBetween(DateUtil.getDateFromString(reportFeeMonthStatisticsDto.getDeadlineTime(), DateUtil.DATE_FORMATE_STRING_A), DateUtil.getDateFromString(reportFeeMonthStatisticsDto.getFeeCreateTime(),
+                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                int day = DateUtil.daysBetween(DateUtil.getDateFromString(format.format(new Date()), DateUtil.DATE_FORMATE_STRING_A), DateUtil.getDateFromString(reportFeeMonthStatisticsDto.getFeeCreateTime(),
                         DateUtil.DATE_FORMATE_STRING_A));
                 reportFeeMonthStatisticsDto.setOweDay(day);
             } catch (Exception e) {
@@ -1184,6 +1291,8 @@
         }
     }
 
+
+
     private void freshReportDeadlineDay(List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) {
 
         Date nowDate = DateUtil.getCurrentDate();

--
Gitblit v1.8.0