From bb6c7d83619530e20584636e658ef18d2718c24b Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Tue, 7 May 2024 11:26:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E6=82=A3=E6=B1=87=E6=80=BB=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=86=85=E5=AE=B9=E5=B9=B6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hiddenApi/HiddenApiController.java | 15 ++++++++++++++- .../datasource/hiddenApi/HiddenApiMapper.java | 3 +++ .../service/hiddenApi/HiddenApiService.java | 2 ++ .../hiddenApi/impl/HiddenApiServiceImpl.java | 16 ++++++++++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java b/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java index 3486215d..6188c3a9 100644 --- a/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java +++ b/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java @@ -1771,10 +1771,23 @@ public class HiddenApiController extends BaseController { PageData pd = new PageData(); pd = this.getPageData(); if (pd.get("YEAR").equals("")){ - pd.put("YEAR","2024"); + String year = DateUtil.getYear(); + pd.put("YEAR",year); } List dataList = hiddenApiService.goSummaryTable(pd); + List dataTypeList = hiddenApiService.goSummaryTypeTable(pd); List varList = hiddenApiService.dealData(dataList); + List varTypeList = hiddenApiService.dealData(dataTypeList); + for(PageData pdDate:varList){ + for(PageData pdTypeDate:varTypeList){ + if(pdDate.getString("MONTH").equals(pdTypeDate.getString("MONTH"))){ + pdDate.put("wdbaqztCount",pdTypeDate.getString("wdbaqztCount")); + pdDate.put("gldqxCount",pdTypeDate.getString("gldqxCount")); + pdDate.put("hjdbaqysCount",pdTypeDate.getString("hjdbaqysCount")); + pdDate.put("rdbaqysCount",pdTypeDate.getString("rdbaqysCount")); + } + } + } map.put("varList", varList); map.put("result", errInfo); return map; diff --git a/src/main/java/com/zcloud/mapper/datasource/hiddenApi/HiddenApiMapper.java b/src/main/java/com/zcloud/mapper/datasource/hiddenApi/HiddenApiMapper.java index 92de566b..9d216829 100644 --- a/src/main/java/com/zcloud/mapper/datasource/hiddenApi/HiddenApiMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/hiddenApi/HiddenApiMapper.java @@ -87,5 +87,8 @@ public interface HiddenApiMapper { List goSummaryTable(PageData pd); List listForExcel(PageData pd); + + List goSummaryTypeTable(PageData pd); + } diff --git a/src/main/java/com/zcloud/service/hiddenApi/HiddenApiService.java b/src/main/java/com/zcloud/service/hiddenApi/HiddenApiService.java index 555bdd7c..fd5757d9 100644 --- a/src/main/java/com/zcloud/service/hiddenApi/HiddenApiService.java +++ b/src/main/java/com/zcloud/service/hiddenApi/HiddenApiService.java @@ -111,5 +111,7 @@ public interface HiddenApiService { public List dealData (List pd) throws Exception; public List listForExcel (PageData pd) throws Exception; + + public List goSummaryTypeTable (PageData pd) throws Exception; } diff --git a/src/main/java/com/zcloud/service/hiddenApi/impl/HiddenApiServiceImpl.java b/src/main/java/com/zcloud/service/hiddenApi/impl/HiddenApiServiceImpl.java index bba2bf79..f12a0576 100644 --- a/src/main/java/com/zcloud/service/hiddenApi/impl/HiddenApiServiceImpl.java +++ b/src/main/java/com/zcloud/service/hiddenApi/impl/HiddenApiServiceImpl.java @@ -281,6 +281,17 @@ public class HiddenApiServiceImpl implements HiddenApiService{ return hiddenApiMapper.listForExcel(pd); } + /** + * 根据类型获取统计数据 + * @param pd + * @return + * @throws Exception + */ + @Override + public List goSummaryTypeTable(PageData pd) throws Exception { + return hiddenApiMapper.goSummaryTypeTable(pd); + } + public List dealData (List pdList) throws Exception{ ArrayList varList = new ArrayList<>(); PageData pd1 = new PageData(); @@ -372,6 +383,11 @@ public class HiddenApiServiceImpl implements HiddenApiService{ pd.put("TOTAL_COUNT_OTHER",pageData.getString("TOTAL_COUNT")); pd.put("REVISED_COUNT_OTHER",pageData.getString("REVISED_COUNT")); pd.put("COMPLERATE_OTHER",pageData.getString("COMPLERATE")); + }else { + pd.put("wdbaqztCount",pageData.getString("wdbaqztCount")); + pd.put("gldqxCount",pageData.getString("gldqxCount")); + pd.put("hjdbaqysCount",pageData.getString("hjdbaqysCount")); + pd.put("rdbaqysCount",pageData.getString("rdbaqysCount")); } pd.put("CREATE_MONTH",pageData.getString("CREATE_MONTH")); return pd;