From d8ee216dd25342bf4d718495164b7c0efda08e2e Mon Sep 17 00:00:00 2001 From: "DESKTOP-6E8S9S5\\LEE" Date: Thu, 18 Jun 2026 14:59:47 +0900 Subject: [PATCH] =?UTF-8?q?QSP=20=EC=97=91=EC=85=80=EB=8B=A4=EC=9A=B4?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20API=20=ED=8E=98=EC=9D=B4=EC=A7=95=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/excelDown/ExcelDownController.java | 27 +- .../qcast/biz/excelDown/ExcelDownMapper.java | 18 - .../qcast/biz/excelDown/ExcelDownService.java | 26 - .../qcast/biz/excelDown/dto/QuotRequest.java | 4 - .../qcast/biz/excelDown/dto/QuotResponse.java | 4 - .../mappers/excelDown/excelDownMapper.xml | 578 ++++++++---------- 6 files changed, 262 insertions(+), 395 deletions(-) diff --git a/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownController.java b/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownController.java index 09b8d5ce..1b39a02b 100644 --- a/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownController.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownController.java @@ -1,8 +1,6 @@ package com.interplug.qcast.biz.excelDown; import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -38,29 +36,8 @@ public class ExcelDownController { QuotResponse quotRes = new QuotResponse(); if ("1".equals(quotRequest.getSch_selectType())) { - boolean isPaged = quotRequest.getPageNo() != null && quotRequest.getPageSize() != null; - - if (isPaged) { - int totalCount = excelDownService.selectQuotPlanExclDownDataCount(quotRequest); - int totalPages = (int) Math.ceil((double) totalCount / quotRequest.getPageSize()); - quotRes.setTotalCount(totalCount); - quotRes.setTotalPages(totalPages); - } - - List quotPlanExclDownData = - excelDownService.selectQuotPlanExclDownData(quotRequest); - quotRes.setQuotPlanList(quotPlanExclDownData); - - if (isPaged) { - List objectNos = quotPlanExclDownData.stream() - .map(QuotPlanResponse::getObjectNo) - .filter(Objects::nonNull) - .distinct() - .collect(Collectors.toList()); - quotRes.setQuotItemList(excelDownService.selectQuotItemExclDownDataByObjectNos(objectNos)); - } else { - quotRes.setQuotItemList(excelDownService.selectQuotItemExclDownData(quotRequest)); - } + quotRes.setQuotPlanList(excelDownService.selectQuotPlanExclDownData(quotRequest)); + quotRes.setQuotItemList(excelDownService.selectQuotItemExclDownData(quotRequest)); } else { List quotPlanExclDownData = excelDownService.selectQuotPlanExclDownData2(quotRequest); diff --git a/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownMapper.java b/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownMapper.java index 9784f458..b96ed7a2 100644 --- a/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownMapper.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownMapper.java @@ -33,15 +33,6 @@ interface ExcelDownMapper { */ List selectQuotPlanExclDownData2(QuotRequest quotRequest) throws Exception; - /** - * 과거데이터_견적 엑셀다운로드 플랜 건수 조회 (페이징용) - * - * @param quotRequest - * @return - * @throws Exception - */ - int selectQuotPlanExclDownDataCount(QuotRequest quotRequest) throws Exception; - /** * 과거데이터_견적 엑셀다운로드 조회(아이템) * @@ -51,15 +42,6 @@ interface ExcelDownMapper { */ List selectQuotItemExclDownData(QuotRequest quotRequest) throws Exception; - /** - * 과거데이터_견적 엑셀다운로드 조회(아이템) - 물건번호 목록으로 필터링 (페이징용) - * - * @param objectNos - * @return - * @throws Exception - */ - List selectQuotItemExclDownDataByObjectNos( - @Param("objectNos") List objectNos) throws Exception; /** * 과거데이터_자연재해보상입력 엑셀다운로드 조회 diff --git a/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownService.java b/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownService.java index 5fae4966..65026cd5 100644 --- a/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownService.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownService.java @@ -65,32 +65,6 @@ public class ExcelDownService { return excelDownMapper.selectQuotItemExclDownData(quotRequest); } - /** - * 과거데이터_견적 엑셀다운로드 플랜 건수 조회 (페이징용) - * - * @param quotRequest - * @return - * @throws Exception - */ - public int selectQuotPlanExclDownDataCount(QuotRequest quotRequest) throws Exception { - return excelDownMapper.selectQuotPlanExclDownDataCount(quotRequest); - } - - /** - * 과거데이터_견적 엑셀다운로드 조회(아이템) - 물건번호 목록으로 필터링 (페이징용) - * - * @param objectNos - * @return - * @throws Exception - */ - public List selectQuotItemExclDownDataByObjectNos(List objectNos) - throws Exception { - if (objectNos == null || objectNos.isEmpty()) { - return Collections.emptyList(); - } - return excelDownMapper.selectQuotItemExclDownDataByObjectNos(objectNos); - } - /** * 과거데이터_자연재해보상입력 엑셀다운로드 조회 * diff --git a/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotRequest.java b/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotRequest.java index cc4de9e6..14726807 100644 --- a/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotRequest.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotRequest.java @@ -26,8 +26,4 @@ public class QuotRequest { @Schema(description = "페이지당 건수") private Integer pageSize; - public int getOffset() { - if (pageNo == null || pageSize == null) return 0; - return (pageNo - 1) * pageSize; - } } \ No newline at end of file diff --git a/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotResponse.java b/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotResponse.java index 2799fc9a..14f78fa4 100644 --- a/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotResponse.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotResponse.java @@ -15,8 +15,4 @@ public class QuotResponse { private List quotItemList; @Schema(description = "플랜정보 목록") private List quotPlanList; - @Schema(description = "전체 플랜 건수 (페이징 시에만 반환)") - private Integer totalCount; - @Schema(description = "전체 페이지 수 (페이징 시에만 반환)") - private Integer totalPages; } \ No newline at end of file diff --git a/src/main/resources/mappers/excelDown/excelDownMapper.xml b/src/main/resources/mappers/excelDown/excelDownMapper.xml index 45c98315..ce49a2ab 100644 --- a/src/main/resources/mappers/excelDown/excelDownMapper.xml +++ b/src/main/resources/mappers/excelDown/excelDownMapper.xml @@ -6,184 +6,186 @@ @@ -200,22 +202,6 @@ - - - -