From 1024666b99a24bd7d5e4dc442d6b0c0319fa2f29 Mon Sep 17 00:00:00 2001
From: xiaogang <905166056@qq.com>
Date: 星期六, 17 七月 2021 22:56:48 +0800
Subject: [PATCH] 1、优化细节性问题2、优化采购细节问题

---
 service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 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 7c40263..69f646c 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
@@ -59,9 +59,18 @@
     public ResponseEntity<String> queryReportFeeSummary(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
         int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFeeSummaryCount(reportFeeMonthStatisticsDto);
 
-        List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null;
+        List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = new ArrayList<>();
         if (count > 0) {
-            reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFeeSummary(reportFeeMonthStatisticsDto);
+            List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsList = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFeeSummary(reportFeeMonthStatisticsDto);
+            for (ReportFeeMonthStatisticsDto reportFeeMonthStatistics : reportFeeMonthStatisticsList) {
+                //鑾峰彇搴旀敹閲戦
+                double receivableAmount = Double.parseDouble(reportFeeMonthStatistics.getReceivableAmount());
+                //鑾峰彇瀹炴敹閲戦
+                double receivedAmount = Double.parseDouble(reportFeeMonthStatistics.getReceivedAmount());
+                double chargeRate = (receivedAmount / receivableAmount) * 100.0;
+                reportFeeMonthStatistics.setChargeRate(String.format("%.2f", chargeRate) + "%");
+                reportFeeMonthStatisticsDtos.add(reportFeeMonthStatistics);
+            }
         } else {
             reportFeeMonthStatisticsDtos = new ArrayList<>();
         }
@@ -195,6 +204,7 @@
 
     @Override
     public ResponseEntity<String> queryPayFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
+
         JSONObject countInfo = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPayFeeDetailCount(reportFeeMonthStatisticsDto);
 
         int count = Integer.parseInt(countInfo.get("count").toString());
@@ -283,7 +293,6 @@
                     reportFeeMonthStatistics.setPreferentialAmount(reportFeeMonthStatistics.getDiscountPrice());
                 } else {
                     reportFeeMonthStatistics.setPreferentialAmount("0");
-
                 }
                 //鍑忓厤閲戦
                 if (!StringUtil.isEmpty(reportFeeMonthStatistics.getDiscountSmallType()) && reportFeeMonthStatistics.getDiscountSmallType().equals("2")) {
@@ -325,7 +334,6 @@
                 } else {
                     reportFeeMonthStatistics.setVacantHousingReduction("0");
                 }
-
                 if (FeeDto.PAYER_OBJ_TYPE_ROOM.equals(reportFeeMonthStatistics.getPayerObjType())) {
                     reportFeeMonthStatistics.setObjName(reportFeeMonthStatistics.getFloorNum()
                             + "鏍�" + reportFeeMonthStatistics.getUnitNum()
@@ -336,11 +344,9 @@
                     reportFeeMonthStatistics.setObjName(reportFeeMonthStatistics.getContractCode());
 
                 }
-
                 if (!StringUtil.isEmpty(reportFeeMonthStatistics.getImportFeeName())) {
                     reportFeeMonthStatistics.setFeeName(reportFeeMonthStatistics.getImportFeeName());
                 }
-
                 //璐圭敤椤圭洰
                 reportFeeMonthStatistics.setFeeConfigDtos(feeConfigDtos);
                 reportList.add(reportFeeMonthStatistics);
@@ -530,6 +536,8 @@
                     int dispatchAmount = 0;
                     //鍥炶鏁伴噺
                     int returnAmount = 0;
+                    //璇勫垎
+                    String score = "";
                     for (RepairUserDto repair : repairUserDtoList) {
                         //澶勭悊涓姸鎬�
                         if (repair.getState().equals("10001")) {
@@ -554,6 +562,9 @@
                         } else if (repair.getState().equals("10008")) {  //宸插洖璁跨姸鎬�
                             int amount = Integer.parseInt(repair.getAmount());
                             returnAmount = returnAmount + amount;
+                        }
+                        if (!StringUtil.isEmpty(repair.getScore())) {
+                            score = repair.getScore();
                         }
                     }
                     //鍛樺伐id
@@ -586,6 +597,8 @@
                     repairUserInfo.setReturnNumber(Integer.toString(returnNumber));
                     //鍛樺伐id鍜屽鍚嶄俊鎭泦鍚�
                     repairUserInfo.setRepairList(staffs);
+                    //鍛樺伐璇勫垎
+                    repairUserInfo.setScore(score);
                     repairUserList.add(repairUserInfo);
                 } else {
                     continue;

--
Gitblit v1.8.0