diff --git a/src/main/java/com/interplug/qcast/biz/api/ApiController.java b/src/main/java/com/interplug/qcast/biz/api/ApiController.java new file mode 100644 index 00000000..9ec88d7a --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/api/ApiController.java @@ -0,0 +1,42 @@ +package com.interplug.qcast.biz.api; + +import com.interplug.qcast.biz.api.dto.*; +import io.swagger.v3.oas.annotations.Operation; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Slf4j +@RestController +@RequestMapping("/api/") +@RequiredArgsConstructor +public class ApiController { + private final ApiService apiService; + + @Operation(description = "과거데이터_견적 엑셀다운로드 조회") + @PostMapping("/quotExclDownData") + @ResponseStatus(HttpStatus.OK) + public QuotResponse quotExclDownData(@RequestBody QuotRequest quotRequest) { + + List quotPlanExclDownData = apiService.selectQuotPlanExclDownData(quotRequest); + List quotItemExclDownData = apiService.selectQuotItemExclDownData(quotRequest); + + QuotResponse quotRes = new QuotResponse(); + quotRes.setQuotPlanList(quotPlanExclDownData); + quotRes.setQuotItemList(quotItemExclDownData); + + return quotRes; + } + + @Operation(description = "과거데이터_자연재해보상입력 엑셀다운로드 조회") + @PostMapping("/ntrCtsCmpExclDownData") + @ResponseStatus(HttpStatus.OK) + public List ntrCtsCmpExclDownData(@RequestBody NtrCtsCmpRequest ntrCtsCmpRequest) { + return apiService.selectNtrCtsCmpExclDownData(ntrCtsCmpRequest); + } + + +} diff --git a/src/main/java/com/interplug/qcast/biz/api/ApiMapper.java b/src/main/java/com/interplug/qcast/biz/api/ApiMapper.java new file mode 100644 index 00000000..001b6d50 --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/api/ApiMapper.java @@ -0,0 +1,15 @@ +package com.interplug.qcast.biz.api; + +import com.interplug.qcast.biz.api.dto.*; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +interface ApiMapper { + List selectQuotPlanExclDownData(QuotRequest quotRequest); + + List selectQuotItemExclDownData(QuotRequest quotRequest); + + List selectNtrCtsCmpExclDownData(NtrCtsCmpRequest ntrCtsCmpRequest); +} diff --git a/src/main/java/com/interplug/qcast/biz/api/ApiService.java b/src/main/java/com/interplug/qcast/biz/api/ApiService.java new file mode 100644 index 00000000..6ddb7a5e --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/api/ApiService.java @@ -0,0 +1,27 @@ +package com.interplug.qcast.biz.api; + +import com.interplug.qcast.biz.api.dto.*; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Slf4j +@Service +@RequiredArgsConstructor +public class ApiService { + private final ApiMapper apiMapper; + + public List selectQuotPlanExclDownData(QuotRequest quotRequest) { + return apiMapper.selectQuotPlanExclDownData(quotRequest); + } + + public List selectQuotItemExclDownData(QuotRequest quotRequest) { + return apiMapper.selectQuotItemExclDownData(quotRequest); + } + + public List selectNtrCtsCmpExclDownData(NtrCtsCmpRequest ntrCtsCmpRequest) { + return apiMapper.selectNtrCtsCmpExclDownData(ntrCtsCmpRequest); + } +} diff --git a/src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpRequest.java b/src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpRequest.java new file mode 100644 index 00000000..c8e31a51 --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpRequest.java @@ -0,0 +1,17 @@ +package com.interplug.qcast.biz.api.dto; + +import lombok.Getter; +import lombok.Setter; + +//@Data + +@Getter +@Setter +public class NtrCtsCmpRequest { + private String sch_dtType; /* 기간 구분 ( 자연재해보상통지일, 보증서발급일, 설치일 ) */ + private String sch_startDt; /* 시작일 */ + private String sch_endDt; /* 종료일 */ + private String sch_objectNo; /* 물건번호 */ + private String sch_objectNm; /* 물건명 */ + private String sch_saleStoreId; /* 판매대리점Id */ +} \ No newline at end of file diff --git a/src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpResponse.java b/src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpResponse.java new file mode 100644 index 00000000..7472bbb3 --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpResponse.java @@ -0,0 +1,39 @@ +package com.interplug.qcast.biz.api.dto; + +import lombok.Getter; +import lombok.Setter; + +//@Data + +@Getter +@Setter +public class NtrCtsCmpResponse { + + private String guaranteeReceiveUser; /* 구매자 성명 購入者 */ + private String objectNo; /* 물건번호 お客様コード */ + private String guaranteeReceiveUserPrefName; /* 구매자 도도부현 都道府県 */ + private String guaranteeReceiveUserZipNo; /* 구매자 우편번호 購入者郵便番号 */ + private String guaranteeReceiveUserZipAddress; /* 구매자 주소 購入者住所 */ + private String setupPlaceObjectName; /* 견적 작성시 안건명 物件名 */ + private String prefName; /* 물건 광역자치단체 物件都道府県 */ + private String setupPlaceAddress; /* 물건 주소 物件住所 */ + private String guaranteeSendZipNo; /* 보증서 송부처 우편번호 保証書送付先郵便番号 */ + private String guaranteeSendAddress; /* 보증서 송부처 주소 保証書送付先住所 */ + private String cooperationDate; /* 설치일 設置日 */ + private String guaranteeIssueDate; /* 보증서 발급일 保証書発行日 */ + private String naturalDisasterCopensateNotifiedDate; /* 자연재해보상 통지일 自然災害補償通知日 */ + private String equipGuaranteeNotifiedDate; /* 연장기기보증 통지일 延長機器保証通知日 */ + private String totPnow; /* 태양전지용량 太陽電池容量 */ + private String item; /* 판낼수량/판넬형식 パネル数量 */ + private String outputCompSaleStoreName; /* 판매점명 販売店名 */ + private String guaranteeRewmarks; /* 비고 備考 */ + private String houseClassCd; /* 주택종류 住宅種別 */ + private String naturalDisasterCopensateApply; /* 자연재해보상가입(신청시) 自然災害補償_申請時 */ + private String naturalDisasterCopensate; /* 자연재해보상가입 自然災害補償 */ + private String naturalDisasterCopensateRetroact; /* 자연재해보상(소급) 自然災害補償_遡及 */ + private String maxPackage; /* MAXパッケージ */ + private String equipGuaranteeYears; /* 기기보증연수 機器保証年数 */ + private String equipGuaranteeYearsRetroact; /* 기기보증연수(소급) 機器保証年数_遡及 */ + private String sunshineCopensateYears; /* 일조보상연수 日照補償年数 */ + +} \ No newline at end of file diff --git a/src/main/java/com/interplug/qcast/biz/api/dto/QuotItemResponse.java b/src/main/java/com/interplug/qcast/biz/api/dto/QuotItemResponse.java new file mode 100644 index 00000000..ca994d40 --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/api/dto/QuotItemResponse.java @@ -0,0 +1,24 @@ +package com.interplug.qcast.biz.api.dto; + +import lombok.Getter; +import lombok.Setter; + +//@Data + +@Getter +@Setter +public class QuotItemResponse { + private String objectNo; /* 물건번호 物件番号 */ + private String planNo; /* 플랜 案件番号 */ + private String objectName; /* 물건명 案件名 */ + private String saleStoreName; /* 1차 판매점명 一次販売店名 */ + private String soldSaleStoreName; /*작성 판매점 作成販売店 */ + private String prefName; /* 도도부현 エリア */ + private String businessTeam; /* 영업팀(판매점등록) 担当課支店 */ + private String saleStoreId; /* 견적서작성 판매점 ID 販売店ID */ + private String estimateDetailCreateDate; /* 견적작성일 見積作成日*/ + private String itemNo; /* 고객용제품명 品番 */ + private String itemName; /* basicmaterial 品名 */ + private String amount; /* 수량 明細 */ + private String salePrice; /* 판매단가 販売単価 */ +} \ No newline at end of file diff --git a/src/main/java/com/interplug/qcast/biz/api/dto/QuotPlanResponse.java b/src/main/java/com/interplug/qcast/biz/api/dto/QuotPlanResponse.java new file mode 100644 index 00000000..fe9bc325 --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/api/dto/QuotPlanResponse.java @@ -0,0 +1,66 @@ +package com.interplug.qcast.biz.api.dto; + +import lombok.Getter; +import lombok.Setter; + +//@Data + +@Getter +@Setter +public class QuotPlanResponse { + private String objectNo; /* 물건번호 物件番号 */ + private String planNo; /* 플랜 案件番号 */ + private String lastEditDatetime; /* 플랜정보 최신 갱신일시 プラン情報最新更新日時 */ + private String saleStoreName; /* 판매대리점 販売代理店 */ + private String soldSaleStoreName; /* 1차대리점명 一次代理店名 */ + private String soldSaleStoreId; /* 1차대리점ID 一次代理店ID */ + private String objectName; /* 물건명 物件名 */ + private String northArrangement; /* 북면배치 北面配置 */ + private String workProgressStatusName; /* 수주예상 受注見込 */ + private String zipNo; /* 우편번호 郵便番号 */ + private String prefName; /* 도도부현 都道府県 */ + private String address; /* 주소 住所 */ + private String weatherPoint; /* 가상지점 気象地点 */ + private String capacity; /* 용량 容量 */ + private String remarks; /* 비고 備考 */ + private String estimateDetailCreateDate; /* 견적 작성일 見積作成日 */ + private String specificationConfirmDate; /* 사양 확인일 仕様確認日 */ + private String businessCharger; /* 영업 담당자(판매점 등록) 営業担当者_販売店登録 */ + private String businessTeam; /* 영업팀(판매점 등록) 営業チーム_販売店登録 */ + private String objectStatus; /* 주택구분 住宅区分 */ + private String managerLastEditDatetime; /* 관리자 최종 갱신일시 管理者最終更新日時 */ + private String saleStoreId; /* 최종갱신판매점ID 最終更新販売店ID */ + private String lastEditUser; /* 최종갱신자 最終更新者 */ + private String rofTyp; /* 지붕종류 屋根種類 */ + private String roofMaterialNm; /* 지붕재 屋根材*/ + private String supportMeakerNm; /* 가대메이커 架台メーカ */ + private String supportMethodNm; /* 지지금구 支持金具 */ + private String snowfall; /* 적설수준 積雪レベル */ + private String cnsLvl; /* 시공레벨 施工レベル */ + private String height; /* 설치높이 設置高さ */ + private String ctndClsf; /* 면조도구분 面粗度区分 */ + private String athCpc; /* 인정용량 認定容量 */ + private String saleStoreLevel; /* 판매점모녀관계 販売店親子関係 */ + private String direction; /* 방위 方位 */ + private String moduleType; /* 모듈종류 モジュール種類 */ + private String moduleNum; /* 설치매수 設置枚数 */ + private String roofAngle; /* 지붕경사 屋根勾配 */ + private String pcType; /* 파워콘종류 パワコン種類 */ + private String pcNum; /* 파워콘대수 パワコン台数 */ + private String boxType; /* 접속상자종류 接続箱種類 */ + private String boxNum; /* 접속상자수 接続箱数 */ + private String cableType; /* 케이블종류 ケーブル種類 */ + private String cableNum; /* 케이블개수 ケーブル本数 */ + private String boostType; /* 승압회로종류 昇圧回路種類 */ + private String boostNum; /* 승압회로대수 昇圧回路台数 */ + private String displayType; /* 표시유닛종류 表示ユニット種類 */ + private String displayNum; /* 표시유닛대수 表示ユニット数 */ + private String costAll; /* 재료구입가격(kW단가) 材料仕入価格 */ + private String costModule; /* 모듈구입가격(kW단가) モジュール仕入価格 */ + private String costOther; /* 주변기기구입가격 周辺機器仕入価格 */ + private String costStand; /* 가대구입가격(kW단가) 架台仕入価格 */ + private String saleAll; /* 판매단가(kW단가) 販売単価 */ + private String saleModule; /* 모듈판매가격(kW단가) モジュール販売価格 */ + private String saleOther; /* 주변기기 판매가격(kW단가) 周辺機器販売価格 */ + private String saleStand; /* 가대판매가격 架台販売価格 */ +} \ No newline at end of file diff --git a/src/main/java/com/interplug/qcast/biz/api/dto/QuotRequest.java b/src/main/java/com/interplug/qcast/biz/api/dto/QuotRequest.java new file mode 100644 index 00000000..0ee07b29 --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/api/dto/QuotRequest.java @@ -0,0 +1,16 @@ +package com.interplug.qcast.biz.api.dto; + +import lombok.Getter; +import lombok.Setter; + +//@Data + +@Getter +@Setter +public class QuotRequest { + private String langCd; /* 언어 */ + private String sch_startDt; /* 시작일 */ + private String sch_endDt; /* 종료일 */ + private String sch_saleStoreId; /* 판매대리점Id */ + private String sch_businessChargerCd; /* 영업 담당자명 */ +} \ No newline at end of file diff --git a/src/main/java/com/interplug/qcast/biz/api/dto/QuotResponse.java b/src/main/java/com/interplug/qcast/biz/api/dto/QuotResponse.java new file mode 100644 index 00000000..3a409815 --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/api/dto/QuotResponse.java @@ -0,0 +1,15 @@ +package com.interplug.qcast.biz.api.dto; + +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +//@Data + +@Getter +@Setter +public class QuotResponse { + private List quotItemList; + private List quotPlanList; +} \ No newline at end of file diff --git a/src/main/resources/mappers/api/apiMapper.xml b/src/main/resources/mappers/api/apiMapper.xml new file mode 100644 index 00000000..5c7359e3 --- /dev/null +++ b/src/main/resources/mappers/api/apiMapper.xml @@ -0,0 +1,379 @@ + + + + + + + + + + + \ No newline at end of file