From c7253388098be0c312939b1a0207bb6ba61aea66 Mon Sep 17 00:00:00 2001 From: "DESKTOP-6E8S9S5\\LEE" Date: Tue, 21 Apr 2026 17:48:10 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=9C=EC=A0=84=EC=8B=9C=EB=AE=AC=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=85=98=20=EB=AC=BC=EA=B1=B4=EB=B2=88=ED=98=B8=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EC=A1=B0=ED=9A=8C=20API=20=EA=B0=9C?= =?UTF-8?q?=EB=B0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/estimate/EstimateController.java | 10 ++- .../qcast/biz/estimate/EstimateMapper.java | 6 ++ .../qcast/biz/estimate/EstimateService.java | 28 ++++++ .../dto/SimulationEstimateListResponse.java | 13 +++ .../mappers/estimate/estimateMapper.xml | 88 +++++++++++++++++++ 5 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/interplug/qcast/biz/estimate/dto/SimulationEstimateListResponse.java diff --git a/src/main/java/com/interplug/qcast/biz/estimate/EstimateController.java b/src/main/java/com/interplug/qcast/biz/estimate/EstimateController.java index da424ea5..38978c47 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateController.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateController.java @@ -1,6 +1,7 @@ package com.interplug.qcast.biz.estimate; import com.interplug.qcast.biz.estimate.dto.*; +import com.interplug.qcast.biz.object.dto.ObjectRequest; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.servlet.http.HttpServletRequest; @@ -111,7 +112,14 @@ public class EstimateController { estimateService.deleteEstimate(estimateRequest); } - @Operation(description = "발전시뮬레이션 필요 데이터 상세 조회를 조회한다.") + @Operation(description = "발전시뮬레이션 필요 데이터 목록을 조회한다.") + @GetMapping("/simulation-estimate-list") + @ResponseStatus(HttpStatus.OK) + public SimulationEstimateListResponse selectSimulationEstimateList(ObjectRequest objectRequest) throws Exception { + return estimateService.selectSimulationEstimateList(objectRequest); + } + + @Operation(description = "발전시뮬레이션 필요 데이터 상세 정보를 조회한다.") @GetMapping("/simulation-estimate-info") @ResponseStatus(HttpStatus.OK) public SimulationEstimateResponse selectSimulationEstimateInfo(EstimateRequest estimateRequest) throws Exception { diff --git a/src/main/java/com/interplug/qcast/biz/estimate/EstimateMapper.java b/src/main/java/com/interplug/qcast/biz/estimate/EstimateMapper.java index 2b9fdde6..2a5e56f3 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateMapper.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateMapper.java @@ -2,6 +2,9 @@ package com.interplug.qcast.biz.estimate; import com.interplug.qcast.biz.estimate.dto.*; import java.util.List; + +import com.interplug.qcast.biz.object.dto.ObjectRequest; +import com.interplug.qcast.biz.object.dto.ObjectResponse; import org.apache.ibatis.annotations.Mapper; @Mapper @@ -153,6 +156,9 @@ public interface EstimateMapper { public int insertCanvasPopupStatusCopy(EstimateCopyRequest estimateCopyRequest); + // 발전시뮬레이션 물건번호 목록 조회 + public List selectSimulationEstimateList(ObjectRequest objectRequest); + // 발전시뮬레이션 지붕재 목록 조회 public List selectSimulationEstimateRoofList(EstimateRequest estimateRequest); diff --git a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java index 210d1684..8d39b40f 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -3164,6 +3164,34 @@ public class EstimateService { } } + /** + * 발전시뮬레이션 견적서 목록 조회 + * + * @param objectRequest 견적서 정보(물건번호, 플랜번호) + * @return EstimateResponse 견적서 상세 정보 + * @throws Exception + */ + public SimulationEstimateListResponse selectSimulationEstimateList(ObjectRequest objectRequest) throws Exception { + // Validation + if (StringUtils.isEmpty(objectRequest.getSaleStoreId())) { + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, + message.getMessage("common.message.required.data", "Sales Store ID")); + } + + SimulationEstimateListResponse response = new SimulationEstimateListResponse(); + + // 견적서 목록 조회 + List objectList = estimateMapper.selectSimulationEstimateList(objectRequest); + + if (objectList == null) { + throw new QcastException(ErrorCode.NOT_FOUND, message.getMessage("common.message.no.data")); + } else { + response.setObjectList(objectList); + } + + return response; + } + /** * 발전시뮬레이션 견적서 상세 조회 * diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/SimulationEstimateListResponse.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/SimulationEstimateListResponse.java new file mode 100644 index 00000000..090fad0f --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/estimate/dto/SimulationEstimateListResponse.java @@ -0,0 +1,13 @@ +package com.interplug.qcast.biz.estimate.dto; + +import com.interplug.qcast.biz.object.dto.ObjectResponse; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Data +public class SimulationEstimateListResponse { + @Schema(description = "물건정보 목록") + List objectList; +} diff --git a/src/main/resources/mappers/estimate/estimateMapper.xml b/src/main/resources/mappers/estimate/estimateMapper.xml index 2a18bfd8..797cfa02 100644 --- a/src/main/resources/mappers/estimate/estimateMapper.xml +++ b/src/main/resources/mappers/estimate/estimateMapper.xml @@ -1544,6 +1544,94 @@ AND PLAN_NO = #{planNo} + +