From 6e8c95d31d85b53857e4e3ce12ea303eb0ea42eb Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 19 八月 2021 00:47:48 +0800
Subject: [PATCH] 优化代码

---
 service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 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 b138512..7522812 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
@@ -880,7 +880,7 @@
             reportFeeMonthStatisticsDtos = new ArrayList<>();
         }
 
-        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) paramInfo.get("row")), count, reportFeeMonthStatisticsDtos);
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (int) paramInfo.get("row")), count, reportFeeMonthStatisticsDtos);
 
         ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
 
@@ -900,7 +900,7 @@
 
             startTime = (Date) paramIn.get("startTime");
             endTime = (Date) paramIn.get("startTime");
-            double money = (double) paramIn.get("oweAmount");
+            BigDecimal money = (BigDecimal) paramIn.get("oweAmount");
             double month = Math.ceil(computeFeeSMOImpl.dayCompare(startTime, endTime));
             if (month < 1) {
                 paramIn.put("btAmount", 0);
@@ -909,7 +909,7 @@
             }
 
             //姣忔湀閲戦
-            BigDecimal monthAmount = new BigDecimal(money).divide(new BigDecimal(month), 2, BigDecimal.ROUND_HALF_EVEN);
+            BigDecimal monthAmount = money.divide(new BigDecimal(month), 2, BigDecimal.ROUND_HALF_EVEN);
 
             if (startTime.getTime() < curStart.getTime()) {
                 BigDecimal btAmountDec = monthAmount.multiply(new BigDecimal(curMonth)).setScale(2, BigDecimal.ROUND_HALF_EVEN);
@@ -921,7 +921,7 @@
             }
 
             if (startTime.getTime() >= curStart.getTime()) {
-                paramIn.put("btAmount", money);
+                paramIn.put("btAmount", money.doubleValue());
                 paramIn.put("bfAmount", 0);
             }
         }

--
Gitblit v1.8.0