From dde71728476a187db2251c522bc7fc37efbf5ff5 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 27 五月 2021 00:56:54 +0800
Subject: [PATCH] 优化代码

---
 service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java b/service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java
index 580efa7..28076bb 100755
--- a/service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java
+++ b/service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java
@@ -267,6 +267,7 @@
             reportFeeMonthStatisticsPo.setFeeId(tmpReportFeeDto.getFeeId());
             reportFeeMonthStatisticsPo.setFeeMonth(DateUtil.getMonth() + "");
             reportFeeMonthStatisticsPo.setFeeYear(DateUtil.getYear() + "");
+            reportFeeMonthStatisticsPo.setCurMaxTime(DateUtil.getNextMonthFirstDay(DateUtil.DATE_FORMATE_STRING_A));
             reportFeeMonthStatisticsPo.setObjId(tmpReportCarDto.getCarId());
             reportFeeMonthStatisticsPo.setObjType(FeeDto.PAYER_OBJ_TYPE_CAR);
             reportFeeMonthStatisticsPo.setFeeName(tmpReportFeeDto.getFeeName());
@@ -285,8 +286,7 @@
 
         ReportFeeMonthStatisticsPo tmpReportFeeMonthStatisticsPo = new ReportFeeMonthStatisticsPo();
         tmpReportFeeMonthStatisticsPo.setFeeId(tmpReportFeeDto.getFeeId());
-        tmpReportFeeMonthStatisticsPo.setFeeYear(year + "");
-        tmpReportFeeMonthStatisticsPo.setFeeMonth(month + "");
+        tmpReportFeeMonthStatisticsPo.setCurMaxTime(DateUtil.getFormatTimeString(endTime,DateUtil.DATE_FORMATE_STRING_A));
         tmpReportFeeMonthStatisticsPo.setOweAmount("0");
         reportFeeMonthStatisticsServiceDaoImpl.updateReportFeeMonthStatisticsOwe(BeanConvertUtil.beanCovertMap(tmpReportFeeMonthStatisticsPo));
     }
@@ -357,6 +357,7 @@
         reportFeeMonthStatisticsPo.setFeeId(tmpReportFeeDto.getFeeId());
         reportFeeMonthStatisticsPo.setFeeMonth((preMonthDate.get(Calendar.MONTH) + 1) + "");
         reportFeeMonthStatisticsPo.setFeeYear(preMonthDate.get(Calendar.YEAR) + "");
+        reportFeeMonthStatisticsPo.setCurMaxTime(DateUtil.getFormatTimeString(DateUtil.getFirstDate(),DateUtil.DATE_FORMATE_STRING_A));
         reportFeeMonthStatisticsPo.setObjId(tmpReportCarDto.getCarId());
         reportFeeMonthStatisticsPo.setObjType(FeeDto.PAYER_OBJ_TYPE_CAR);
         reportFeeMonthStatisticsPo.setFeeName(tmpReportFeeDto.getFeeName());
@@ -453,6 +454,7 @@
             reportFeeMonthStatisticsPo.setFeeId(tmpReportFeeDto.getFeeId());
             reportFeeMonthStatisticsPo.setFeeMonth(DateUtil.getMonth() + "");
             reportFeeMonthStatisticsPo.setFeeYear(DateUtil.getYear() + "");
+            reportFeeMonthStatisticsPo.setCurMaxTime(DateUtil.getNextMonthFirstDay(DateUtil.DATE_FORMATE_STRING_A));
             reportFeeMonthStatisticsPo.setObjId(reportRoomDto.getRoomId());
             reportFeeMonthStatisticsPo.setObjType(FeeDto.PAYER_OBJ_TYPE_ROOM);
             reportFeeMonthStatisticsPo.setFeeName(StringUtil.isEmpty(tmpReportFeeDto.getImportFeeName()) ? tmpReportFeeDto.getFeeName() : tmpReportFeeDto.getImportFeeName());
@@ -469,15 +471,9 @@
         //灏嗙即璐� 鍒版湡鏃堕棿涔嬪墠寰楁瑺璐瑰埛涓�0
         Date endTime = tmpReportFeeDto.getEndTime();
 
-        Calendar calender = Calendar.getInstance();
-        calender.setTime(endTime);
-        int year = calender.get(Calendar.YEAR);
-        int month = calender.get(Calendar.MONTH);
-
         ReportFeeMonthStatisticsPo tmpReportFeeMonthStatisticsPo = new ReportFeeMonthStatisticsPo();
         tmpReportFeeMonthStatisticsPo.setFeeId(tmpReportFeeDto.getFeeId());
-        tmpReportFeeMonthStatisticsPo.setFeeYear(year + "");
-        tmpReportFeeMonthStatisticsPo.setFeeMonth(month + "");
+        tmpReportFeeMonthStatisticsPo.setCurMaxTime(DateUtil.getFormatTimeString(endTime,DateUtil.DATE_FORMATE_STRING_A));
         tmpReportFeeMonthStatisticsPo.setOweAmount("0");
         reportFeeMonthStatisticsServiceDaoImpl.updateReportFeeMonthStatisticsOwe(BeanConvertUtil.beanCovertMap(tmpReportFeeMonthStatisticsPo));
     }
@@ -554,6 +550,8 @@
         reportFeeMonthStatisticsPo.setFeeId(tmpReportFeeDto.getFeeId());
         reportFeeMonthStatisticsPo.setFeeMonth((preMonthDate.get(Calendar.MONTH) + 1) + "");
         reportFeeMonthStatisticsPo.setFeeYear(preMonthDate.get(Calendar.YEAR) + "");
+        reportFeeMonthStatisticsPo.setCurMaxTime(DateUtil.getFormatTimeString(DateUtil.getFirstDate(),DateUtil.DATE_FORMATE_STRING_A));
+
         reportFeeMonthStatisticsPo.setObjId(reportRoomDto.getRoomId());
         reportFeeMonthStatisticsPo.setObjType(FeeDto.PAYER_OBJ_TYPE_ROOM);
         reportFeeMonthStatisticsPo.setFeeName(StringUtil.isEmpty(tmpReportFeeDto.getImportFeeName()) ? tmpReportFeeDto.getFeeName() : tmpReportFeeDto.getImportFeeName());

--
Gitblit v1.8.0