From 288e72b8bc97a0dfb92f7bff07d51e5f2577356d Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期三, 24 二月 2021 19:06:47 +0800
Subject: [PATCH] 优化报表代码

---
 service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java b/service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java
index 38f7cf7..205635a 100644
--- a/service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java
+++ b/service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java
@@ -1,6 +1,7 @@
 package com.java110.report.smo.impl;
 
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.core.base.smo.BaseServiceSMO;
 import com.java110.dto.PageDto;
@@ -11,10 +12,12 @@
 import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
 import com.java110.report.dao.IReportFeeMonthStatisticsServiceDao;
 import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.DateUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Calendar;
 import java.util.List;
 import java.util.Map;
 
@@ -296,6 +299,38 @@
     }
 
     @Override
+    public JSONObject queryReportProficientCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
+
+        JSONObject result = new JSONObject();
+        Map info = reportFeeMonthStatisticsServiceDaoImpl.getReceivableInformation(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto));
+        result.put("receivableInformation", info);
+
+        List<Map> infos = reportFeeMonthStatisticsServiceDaoImpl.getFloorReceivableInformation(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto));
+        result.put("floorReceivableInformations", JSONArray.parseArray(JSONArray.toJSONString(infos)));
+
+        List<Map> tempInfos = reportFeeMonthStatisticsServiceDaoImpl.getFeeConfigReceivableInformation(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto));
+        result.put("feeConfigReceivableInformations", JSONArray.parseArray(JSONArray.toJSONString(tempInfos)));
+
+
+        reportFeeMonthStatisticsDto.setStartTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
+        Calendar calendar = Calendar.getInstance();
+        calendar.add(Calendar.DAY_OF_MONTH, 7);
+        reportFeeMonthStatisticsDto.setEndTime(DateUtil.getFormatTimeString(calendar.getTime(), DateUtil.DATE_FORMATE_STRING_A));
+
+        int deadlineFeeCount = reportFeeMonthStatisticsServiceDaoImpl.queryDeadlineFeeCount(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto));
+        int  prePaymentCount = reportFeeMonthStatisticsServiceDaoImpl.queryPrePaymentNewCount(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto));
+
+
+        JSONObject remindInfomation = new JSONObject();
+        remindInfomation.put("deadlineFeeCount", deadlineFeeCount);
+        remindInfomation.put("prePaymentCount", prePaymentCount);
+
+        result.put("remindInfomation", remindInfomation);
+
+        return result;
+    }
+
+    @Override
     public List<FeeConfigDto> queryFeeConfigs(FeeConfigDto feeConfigDto) {
         List<FeeConfigDto> feeConfigs = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.getFeeConfigInfo(BeanConvertUtil.beanCovertMap(feeConfigDto)), FeeConfigDto.class);
         return feeConfigs;

--
Gitblit v1.8.0