From d93ba1d1ba53449e2a88249ed8b7d1b74c242cdc Mon Sep 17 00:00:00 2001 From: hrham Date: Thu, 28 May 2026 17:56:53 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8B=9C=EC=B6=94=EA=B3=B5=EC=88=98=20?= =?UTF-8?q?=ED=91=9C=EA=B8=B0(=20=EB=82=A0=EC=A7=9C=EB=B3=84=20=EC=82=AC?= =?UTF-8?q?=EC=97=85=EB=B3=84=20=EB=AA=A9=EC=A0=81=EB=B3=84)=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EB=B0=8F=20=EB=A7=A4=ED=81=AC=EB=A1=9C=EC=88=98=20?= =?UTF-8?q?=EC=A0=9C=EC=99=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admins/chLog/ChInfoController.java | 60 +++- .../admins/chLog/service/ChInfoMapper.java | 2 +- .../admins/chLog/service/ChInfoService.java | 2 +- .../chLog/service/impl/ChInfoServiceImpl.java | 4 +- .../mappers/admins/chLog/ChInfo_SQL.xml | 326 +++++++++++------- .../webapp/WEB-INF/views/admins/chLog/00.jsp | 75 +++- .../webapp/WEB-INF/views/admins/chLog/01.jsp | 62 +++- .../webapp/WEB-INF/views/admins/chLog/03.jsp | 59 +++- 8 files changed, 414 insertions(+), 176 deletions(-) diff --git a/src/main/java/geoinfo/admins/chLog/ChInfoController.java b/src/main/java/geoinfo/admins/chLog/ChInfoController.java index 5befc3b..8b3c39b 100644 --- a/src/main/java/geoinfo/admins/chLog/ChInfoController.java +++ b/src/main/java/geoinfo/admins/chLog/ChInfoController.java @@ -90,6 +90,10 @@ public class ChInfoController { return ""; } + if (params.get("type") == null || "".equals(params.get("type"))) { + params.put("type", "hole"); + } + List getYear_date = masterService.getYear_date(); if ("".equals(params.get("year")) || params.get("year") == null) { @@ -192,14 +196,23 @@ public class ChInfoController { HashMap map = new HashMap(); + if (params.get("type") == null || "".equals(params.get("type"))) { + params.put("type", "hole"); + } + List selectInfoListExcel = masterService.selectInfoListDateExcel(params); String[] arrHeader = { "번호", "사업명", "다운로드 수" }; map.put("selectInfoListExcel", selectInfoListExcel); map.put("arrHeader", arrHeader); - map.put("sheetName", "날짜별 유통정보"); - map.put("fileName", "날짜별유통정보_"); + if ("hole".equals(params.get("type"))) { + map.put("sheetName", "날짜별 유통정보(시추공)"); + map.put("fileName", "날짜별유통정보_시추공_"); + } else { + map.put("sheetName", "날짜별 유통정보(프로젝트)"); + map.put("fileName", "날짜별유통정보_프로젝트_"); + } buildExcelDocument(map, workbook, request, response); } @@ -220,6 +233,10 @@ public class ChInfoController { return ""; } + if (params.get("type") == null || "".equals(params.get("type"))) { + params.put("type", "hole"); + } + /** pageing */ PaginationInfo paginationInfo = new PaginationInfo(); @@ -263,14 +280,23 @@ public class ChInfoController { HashMap map = new HashMap(); + if (params.get("type") == null || "".equals(params.get("type"))) { + params.put("type", "hole"); + } + List selectInfoListExcel = masterService.selectInfoListBusinessExcel(params); String[] arrHeader = { "번호", "사업명", "다운로드 수" }; map.put("selectInfoListExcel", selectInfoListExcel); map.put("arrHeader", arrHeader); - map.put("sheetName", "사업별 유통정보"); - map.put("fileName", "사업별유통정보_"); + if ("hole".equals(params.get("type"))) { + map.put("sheetName", "사업별 유통정보(시추공)"); + map.put("fileName", "사업별유통정보_시추공_"); + } else { + map.put("sheetName", "사업별 유통정보(프로젝트)"); + map.put("fileName", "사업별유통정보_프로젝트_"); + } buildExcelDocument(map, workbook, request, response); } @@ -321,24 +347,33 @@ public class ChInfoController { } @RequestMapping(value = "admins/chLog/03.do") - public String selectInfoListPurpose(ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception { + public String selectInfoListPurpose(@RequestParam HashMap params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception { if (!UserInfo.isValidSession(request, response, "admin")) { return ""; } - List resultList = masterService.selectInfoListPurpose(); + if (params.get("type") == null || "".equals(params.get("type"))) { + params.put("type", "hole"); + } + + List resultList = masterService.selectInfoListPurpose(params); model.addAttribute("resultList", resultList); + model.addAttribute("params", params); return "admins/chLog/03"; } @RequestMapping(value = "admins/chLog/03_excel.do") - public void selectInfoListPurposeExcel(HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception { + public void selectInfoListPurposeExcel(@RequestParam HashMap params, HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception { HashMap map = new HashMap(); - List selectInfoListExcel = masterService.selectInfoListPurpose(); + if (params.get("type") == null || "".equals(params.get("type"))) { + params.put("type", "hole"); + } + + List selectInfoListExcel = masterService.selectInfoListPurpose(params); String[] arrHeader = { "년도", "정책입안", "학술연구", "공사계획 및 예비조사", "기본설계", "실시설계", "시공 및 유지관리", "사업비산정", "지하시설물 유지관리", "스마트시티","도시재생","지진 예방","산사태 예방","급경사지 관리","홍수 예방","지하안전영향평가","소규모지하안전영향평가","사후지하안전영향조사","지반침하위험도평가","지하안전점검", @@ -346,8 +381,13 @@ public class ChInfoController { map.put("selectInfoListExcel", selectInfoListExcel); map.put("arrHeader", arrHeader); - map.put("sheetName", "목적별 유통정보"); - map.put("fileName", "목적별유통정보_"); + if ("hole".equals(params.get("type"))) { + map.put("sheetName", "목적별 유통정보(시추공)"); + map.put("fileName", "목적별유통정보_시추공_"); + } else { + map.put("sheetName", "목적별 유통정보(프로젝트)"); + map.put("fileName", "목적별유통정보_프로젝트_"); + } buildExcelDocument(map, workbook, request, response); } diff --git a/src/main/java/geoinfo/admins/chLog/service/ChInfoMapper.java b/src/main/java/geoinfo/admins/chLog/service/ChInfoMapper.java index 83de360..0d81ebc 100644 --- a/src/main/java/geoinfo/admins/chLog/service/ChInfoMapper.java +++ b/src/main/java/geoinfo/admins/chLog/service/ChInfoMapper.java @@ -21,7 +21,7 @@ public interface ChInfoMapper { public List selectInfoListDateLogPop(HashMap params) throws Exception; - public List selectInfoListPurpose() throws Exception; + public List selectInfoListPurpose(HashMap params) throws Exception; /** 2023.11.01 LHJ 유통/공급 통계분석 > 유통정보 > 공종별 시추공등록 통계 추가 **/ public List> selectInfoListGongjong() throws Exception; diff --git a/src/main/java/geoinfo/admins/chLog/service/ChInfoService.java b/src/main/java/geoinfo/admins/chLog/service/ChInfoService.java index 3fb0056..5e8457b 100644 --- a/src/main/java/geoinfo/admins/chLog/service/ChInfoService.java +++ b/src/main/java/geoinfo/admins/chLog/service/ChInfoService.java @@ -19,7 +19,7 @@ public interface ChInfoService { public List selectInfoListDateLogPop(HashMap params) throws Exception; - public List selectInfoListPurpose() throws Exception; + public List selectInfoListPurpose(HashMap params) throws Exception; /** 2023.11.01 LHJ 유통/공급 통계분석 > 유통정보 > 공종별 시추공등록 통계 추가 **/ public List> selectInfoListGongjong() throws Exception; diff --git a/src/main/java/geoinfo/admins/chLog/service/impl/ChInfoServiceImpl.java b/src/main/java/geoinfo/admins/chLog/service/impl/ChInfoServiceImpl.java index 1e8e39e..27444a4 100644 --- a/src/main/java/geoinfo/admins/chLog/service/impl/ChInfoServiceImpl.java +++ b/src/main/java/geoinfo/admins/chLog/service/impl/ChInfoServiceImpl.java @@ -60,8 +60,8 @@ public class ChInfoServiceImpl implements ChInfoService { } @Override - public List selectInfoListPurpose() throws Exception { - return masterMapper.selectInfoListPurpose(); + public List selectInfoListPurpose(HashMap params) throws Exception { + return masterMapper.selectInfoListPurpose(params); } /** 2023.11.01 LHJ 유통/공급 통계분석 > 유통정보 > 공종별 시추공등록 통계 추가 **/ diff --git a/src/main/resources/geoinfo/sqlmap/mappers/admins/chLog/ChInfo_SQL.xml b/src/main/resources/geoinfo/sqlmap/mappers/admins/chLog/ChInfo_SQL.xml index 361ec7c..e7381e8 100644 --- a/src/main/resources/geoinfo/sqlmap/mappers/admins/chLog/ChInfo_SQL.xml +++ b/src/main/resources/geoinfo/sqlmap/mappers/admins/chLog/ChInfo_SQL.xml @@ -5,6 +5,12 @@ + = 10000 + ) SELECT NUM, NAME, CNT @@ -153,48 +184,66 @@ METADATAID, ROW_NUMBER() OVER ( ORDER BY CNT DESC, NAME DESC) AS NUM + ]]> + + + + + + + AND TO_CHAR(A.DATETIME, 'YYYYMMDD') NOT IN (SELECT DAILY_DT FROM MACRO_DAYS) + ]]> + + - + - + - + - + - + - + - + - + - + - + - + + = 10000 + ) SELECT NUM, NAME, CNT @@ -245,16 +326,35 @@ METADATAID, ROW_NUMBER() OVER ( ORDER BY CNT DESC, NAME DESC) AS NUM + ]]> + + + + + + + ]]> + + - + @@ -263,6 +363,7 @@ ]]> + - = 10000 + ) + SELECT + NVL(TO_CHAR(A.DATETIME, 'YYYY'), '합계') AS ZZ, + ]]> + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/views/admins/chLog/00.jsp b/src/main/webapp/WEB-INF/views/admins/chLog/00.jsp index 19a68f4..817a818 100644 --- a/src/main/webapp/WEB-INF/views/admins/chLog/00.jsp +++ b/src/main/webapp/WEB-INF/views/admins/chLog/00.jsp @@ -9,6 +9,34 @@ + @@ -50,12 +79,13 @@ function excelDownload(){ + - + + 활용 : - - - + + - +
 
+ 다운 : +
- + - - + + - + - + diff --git a/src/main/webapp/WEB-INF/views/admins/chLog/01.jsp b/src/main/webapp/WEB-INF/views/admins/chLog/01.jsp index a0bf3f1..094253c 100644 --- a/src/main/webapp/WEB-INF/views/admins/chLog/01.jsp +++ b/src/main/webapp/WEB-INF/views/admins/chLog/01.jsp @@ -9,6 +9,34 @@ + +
순위사업명다운로드 수사업명 + + 시추공 수 + 다운로드 수 + +
${resultList.num}  ${resultList.name}${resultList.cnt}회${resultList.cnt}
- - - - + + + -
 
+ +
- + - + - + - + diff --git a/src/main/webapp/WEB-INF/views/admins/chLog/03.jsp b/src/main/webapp/WEB-INF/views/admins/chLog/03.jsp index 8385315..905ffe5 100644 --- a/src/main/webapp/WEB-INF/views/admins/chLog/03.jsp +++ b/src/main/webapp/WEB-INF/views/admins/chLog/03.jsp @@ -8,12 +8,48 @@ + @@ -21,17 +57,22 @@ function excelDownload(){ - + - - + + - - -
순위 사업명다운로드 수 + + 시추공 수 + 다운로드 수 + +
${resultList.num}  ${resultList.name}${resultList.cnt}회${resultList.cnt}
 
- + +
+ + + + +
+