From 689e62ea0b755560fe7dceb5ab66150f1488c742 Mon Sep 17 00:00:00 2001 From: "DESKTOP-6ARNG1Q\\dlsgk" Date: Wed, 28 Aug 2024 16:35:56 +0900 Subject: [PATCH 1/5] =?UTF-8?q?QSP=EC=97=90=EC=84=9C=20=ED=98=B8=EC=B6=9C?= =?UTF-8?q?=ED=95=98=EB=8A=94=20API=20=EA=B0=9C=EB=B0=9C=20-=20=EA=B3=BC?= =?UTF-8?q?=EA=B1=B0=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20(=EA=B2=AC=EC=A0=81?= =?UTF-8?q?=20=EC=97=91=EC=85=80=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C,=20?= =?UTF-8?q?=EC=9E=90=EC=97=B0=EC=9E=AC=ED=95=B4=20=EB=B3=B4=EC=83=81?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=20=EC=97=91=EC=85=80=EB=8B=A4=EC=9A=B4?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/biz/api/ApiController.java | 42 ++ .../interplug/qcast/biz/api/ApiMapper.java | 15 + .../interplug/qcast/biz/api/ApiService.java | 27 ++ .../qcast/biz/api/dto/NtrCtsCmpRequest.java | 17 + .../qcast/biz/api/dto/NtrCtsCmpResponse.java | 39 ++ .../qcast/biz/api/dto/QuotItemResponse.java | 24 ++ .../qcast/biz/api/dto/QuotPlanResponse.java | 66 +++ .../qcast/biz/api/dto/QuotRequest.java | 16 + .../qcast/biz/api/dto/QuotResponse.java | 15 + src/main/resources/mappers/api/apiMapper.xml | 379 ++++++++++++++++++ 10 files changed, 640 insertions(+) create mode 100644 src/main/java/com/interplug/qcast/biz/api/ApiController.java create mode 100644 src/main/java/com/interplug/qcast/biz/api/ApiMapper.java create mode 100644 src/main/java/com/interplug/qcast/biz/api/ApiService.java create mode 100644 src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpRequest.java create mode 100644 src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpResponse.java create mode 100644 src/main/java/com/interplug/qcast/biz/api/dto/QuotItemResponse.java create mode 100644 src/main/java/com/interplug/qcast/biz/api/dto/QuotPlanResponse.java create mode 100644 src/main/java/com/interplug/qcast/biz/api/dto/QuotRequest.java create mode 100644 src/main/java/com/interplug/qcast/biz/api/dto/QuotResponse.java create mode 100644 src/main/resources/mappers/api/apiMapper.xml 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 From 7e1cc54ae1a3ff700d85b7e172781cd47d34250a Mon Sep 17 00:00:00 2001 From: changkyu choi Date: Thu, 29 Aug 2024 17:22:03 +0900 Subject: [PATCH 2/5] Canvas Setting CRU API --- .../CanvasSettingController.java | 45 +++++++ .../canvasSetting/CanvasSettingMapper.java | 21 ++++ .../canvasSetting/CanvasSettingService.java | 42 +++++++ .../canvasSetting/dto/CanvasSettingInfo.java | 31 +++++ .../canvasSetting/canvasSettingMapper.xml | 117 ++++++++++++++++++ 5 files changed, 256 insertions(+) create mode 100644 src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingController.java create mode 100644 src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingMapper.java create mode 100644 src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingService.java create mode 100644 src/main/java/com/interplug/qcast/biz/canvasSetting/dto/CanvasSettingInfo.java create mode 100644 src/main/resources/mappers/canvasSetting/canvasSettingMapper.xml diff --git a/src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingController.java b/src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingController.java new file mode 100644 index 00000000..5803b21c --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingController.java @@ -0,0 +1,45 @@ +package com.interplug.qcast.biz.canvasSetting; + +import com.interplug.qcast.biz.canvasSetting.dto.CanvasSettingInfo; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +import java.util.List; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.*; + +@Slf4j +@RestController +@RequestMapping("/api/canvas-management") +@RequiredArgsConstructor +@Tag(name = "CanvasSettingController", description = "Canvas Setting 관련 API") +public class CanvasSettingController { + private final CanvasSettingService canvasSettingService; + + @Operation(description = "Canvas Setting 정보를 조회 한다.") + @GetMapping("/canvas-settings/by-object/{objectNo}") + public List selectCanvasSetting(@PathVariable String objectNo) { + return canvasSettingService.selectCanvasSetting(objectNo); + } + + @Operation(description = "Canvas Setting 정보를 등록 한다.") + @PostMapping("/canvas-settings") + @ResponseStatus(HttpStatus.CREATED) + public String insertCanvasStatus(@RequestBody CanvasSettingInfo csi) { + + log.debug("Setting 등록 ::::: " + csi.getObjectNo()); + + return canvasSettingService.insertCanvasSetting(csi); + } + + @Operation(description = "Canvas Setting 정보를 수정 한다.") + @PutMapping("/canvas-settings") + public void updateCanvasStatus(@RequestBody CanvasSettingInfo csi) { + canvasSettingService.updateCanvasSetting(csi); + } + +} diff --git a/src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingMapper.java b/src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingMapper.java new file mode 100644 index 00000000..805ef51f --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingMapper.java @@ -0,0 +1,21 @@ +package com.interplug.qcast.biz.canvasSetting; + +import com.interplug.qcast.biz.canvasSetting.dto.CanvasSettingInfo; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface CanvasSettingMapper { + + // Canvas Setting 조회(objectNo) + public List selectCanvasSetting(String objectNo); + + // Canvas Setting 등록 + public void insertCanvasSetting(CanvasSettingInfo csi); + + // Canvas Setting 수정 + public void updateCanvasSetting(CanvasSettingInfo csi); + +} \ No newline at end of file diff --git a/src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingService.java b/src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingService.java new file mode 100644 index 00000000..4621db46 --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingService.java @@ -0,0 +1,42 @@ +package com.interplug.qcast.biz.canvasSetting; + +import com.interplug.qcast.biz.MainController; +import com.interplug.qcast.biz.canvasSetting.dto.CanvasSettingInfo; + +import lombok.RequiredArgsConstructor; + +import java.util.List; + +import org.springframework.stereotype.Service; + +@Service +@RequiredArgsConstructor +public class CanvasSettingService { + // @Autowired CanvasSettingMapper canvasSettingMapper; + private final CanvasSettingMapper canvasSettingMapper; + + // Canvas Setting 조회(objectNo) + public List selectCanvasSetting(String objectNo) { + return canvasSettingMapper.selectCanvasSetting(objectNo); + } + + // Canvas Setting 등록 + public String insertCanvasSetting(CanvasSettingInfo csi) { + + try { + canvasSettingMapper.insertCanvasSetting(csi); + } catch (Exception e) { + System.out.println("오류 발생 : " + e.getMessage()); + } + + // 생성된 objectNo 반환 + return csi.getObjectNo(); + + } + + // Canvas Setting 수정 + public void updateCanvasSetting(CanvasSettingInfo csi) { + canvasSettingMapper.updateCanvasSetting(csi); + } + +} diff --git a/src/main/java/com/interplug/qcast/biz/canvasSetting/dto/CanvasSettingInfo.java b/src/main/java/com/interplug/qcast/biz/canvasSetting/dto/CanvasSettingInfo.java new file mode 100644 index 00000000..61d9099f --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/canvasSetting/dto/CanvasSettingInfo.java @@ -0,0 +1,31 @@ +package com.interplug.qcast.biz.canvasSetting.dto; + +import java.sql.Date; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class CanvasSettingInfo { + + private String objectNo; //견적서 번호 + private String assignDisplay; //할당 표시 + private String drawDisplay; //도면 표시 + private String gridDisplay; //그리드 표시 + private String charDisplay; //문자 표시 + private String flowDisplay; //흐름방향 표시 + private String hallwayDimenDisplay; //복도치수 표시 + private String actualDimenDisplay; //실제치수 표시 + private String noDimenDisplay; //치수 표시 없음 + private String trestleDisplay; //가대 표시 + private String coordiDisplay; //좌표 표시 + private String drawConverDisplay; //도면전환 표시 + private String onlyBorder; //화면표시 테두리만 + private String lineHatch; //화면표시 라인해치 + private String allPainted; //화면표시 모두칠함 + private String adsorpRangeSetting; //흡착범위 설정 + private Date registDatetime; //생성일시 + private Date lastEditDatetime; //수정일시 + +} diff --git a/src/main/resources/mappers/canvasSetting/canvasSettingMapper.xml b/src/main/resources/mappers/canvasSetting/canvasSettingMapper.xml new file mode 100644 index 00000000..9b299234 --- /dev/null +++ b/src/main/resources/mappers/canvasSetting/canvasSettingMapper.xml @@ -0,0 +1,117 @@ + + + + + + + + + /* sqlid : com.interplug.qcast.canvasSetting.insertCanvasSetting Canvas Setting 등록 */ + MERGE TB_CANVAS_SETTING AS target + USING (SELECT #{objectNo} AS object_no) AS source + ON (target.object_no = source.object_no) + WHEN MATCHED THEN + UPDATE + SET assign_display = #{assignDisplay} + , draw_display = #{drawDisplay} + , grid_display = #{gridDisplay} + , char_display = #{charDisplay} + , flow_display = #{flowDisplay} + , hallway_dimen_display = #{hallwayDimenDisplay} + , actual_dimen_display = #{actualDimenDisplay} + , no_dimen_display = #{noDimenDisplay} + , trestle_display = #{trestleDisplay} + , coordi_display = #{coordiDisplay} + , draw_conver_display = #{drawConverDisplay} + , only_border = #{onlyBorder} + , line_hatch = #{lineHatch} + , all_painted = #{allPainted} + , last_edit_datetime = GETDATE() + + WHEN NOT MATCHED THEN + INSERT + ( + object_no + , assign_display + , draw_display + , grid_display + , char_display + , flow_display + , hallway_dimen_display + , actual_dimen_display + , no_dimen_display + , trestle_display + , coordi_display + , draw_conver_display + , only_border + , line_hatch + , all_painted + , adsorp_range_setting + , regist_datetime + ) + VALUES ( + #{objectNo} + , #{assignDisplay} + , #{drawDisplay} + , #{gridDisplay} + , #{charDisplay} + , #{flowDisplay} + , #{hallwayDimenDisplay} + , #{actualDimenDisplay} + , #{noDimenDisplay} + , #{trestleDisplay} + , #{coordiDisplay} + , #{drawConverDisplay} + , #{onlyBorder} + , #{lineHatch} + , #{allPainted} + , #{adsorpRangeSetting} + , GETDATE() + ); + + + + /* sqlid : com.interplug.qcast.canvasSetting.updateCanvasSetting Canvas Setting 수정 */ + UPDATE TB_CANVAS_SETTING + SET assign_display = #{assignDisplay} + , draw_display = #{drawDisplay} + , grid_display = #{gridDisplay} + , char_display = #{charDisplay} + , flow_display = #{flowDisplay} + , hallway_dimen_display = #{hallwayDimenDisplay} + , actual_dimen_display = #{actualDimenDisplay} + , no_dimen_display = #{noDimenDisplay} + , trestle_display = #{trestleDisplay} + , coordi_display = #{coordiDisplay} + , draw_conver_display = #{drawConverDisplay} + , only_border = #{onlyBorder} + , line_hatch = #{lineHatch} + , all_painted = #{allPainted} + , last_edit_datetime = GETDATE() + WHERE object_no = #{objectNo} + + + \ No newline at end of file From 1fe0f00d54a2bc6c3344cd08673a75cc4d3fc813 Mon Sep 17 00:00:00 2001 From: changkyu choi Date: Mon, 2 Sep 2024 10:40:55 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=EC=88=98=EC=A0=95API=20=EC=BF=BC=EB=A6=AC?= =?UTF-8?q?=20=EB=88=84=EB=9D=BD=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/biz/canvasSetting/CanvasSettingController.java | 8 +++++++- .../mappers/canvasSetting/canvasSettingMapper.xml | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingController.java b/src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingController.java index 5803b21c..1b757865 100644 --- a/src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingController.java +++ b/src/main/java/com/interplug/qcast/biz/canvasSetting/CanvasSettingController.java @@ -23,7 +23,10 @@ public class CanvasSettingController { @Operation(description = "Canvas Setting 정보를 조회 한다.") @GetMapping("/canvas-settings/by-object/{objectNo}") public List selectCanvasSetting(@PathVariable String objectNo) { - return canvasSettingService.selectCanvasSetting(objectNo); + + log.debug("Setting 조회 ::::: " + objectNo); + + return canvasSettingService.selectCanvasSetting(objectNo); } @Operation(description = "Canvas Setting 정보를 등록 한다.") @@ -39,6 +42,9 @@ public class CanvasSettingController { @Operation(description = "Canvas Setting 정보를 수정 한다.") @PutMapping("/canvas-settings") public void updateCanvasStatus(@RequestBody CanvasSettingInfo csi) { + + log.debug("Setting 수정 ::::: " + csi.getObjectNo()); + canvasSettingService.updateCanvasSetting(csi); } diff --git a/src/main/resources/mappers/canvasSetting/canvasSettingMapper.xml b/src/main/resources/mappers/canvasSetting/canvasSettingMapper.xml index 9b299234..e0a1d6d9 100644 --- a/src/main/resources/mappers/canvasSetting/canvasSettingMapper.xml +++ b/src/main/resources/mappers/canvasSetting/canvasSettingMapper.xml @@ -110,6 +110,7 @@ , only_border = #{onlyBorder} , line_hatch = #{lineHatch} , all_painted = #{allPainted} + , adsorp_range_setting = #{adsorpRangeSetting} , last_edit_datetime = GETDATE() WHERE object_no = #{objectNo} From 40036421285f518130d6de95df67d5c92b3aeb8e Mon Sep 17 00:00:00 2001 From: changkyu choi Date: Mon, 2 Sep 2024 10:48:01 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=EB=8B=A4=EC=8B=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/mappers/canvasSetting/canvasSettingMapper.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/mappers/canvasSetting/canvasSettingMapper.xml b/src/main/resources/mappers/canvasSetting/canvasSettingMapper.xml index e0a1d6d9..91008a6b 100644 --- a/src/main/resources/mappers/canvasSetting/canvasSettingMapper.xml +++ b/src/main/resources/mappers/canvasSetting/canvasSettingMapper.xml @@ -49,6 +49,7 @@ , only_border = #{onlyBorder} , line_hatch = #{lineHatch} , all_painted = #{allPainted} + , adsorp_range_setting = #{adsorpRangeSetting} , last_edit_datetime = GETDATE() WHEN NOT MATCHED THEN From 34f9038b02c547c12ad0ee26416403f44294627d Mon Sep 17 00:00:00 2001 From: "DESKTOP-6ARNG1Q\\dlsgk" Date: Mon, 2 Sep 2024 12:48:30 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=EA=B3=BC=EA=B1=B0=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20api=20=ED=8C=8C=EC=9D=BC=EB=AA=85=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExcelDownController.java} | 18 +++++++++------- .../ExcelDownMapper.java} | 6 +++--- .../ExcelDownService.java} | 14 ++++++------- .../dto/NtrCtsCmpRequest.java | 2 +- .../dto/NtrCtsCmpResponse.java | 2 +- .../dto/QuotItemResponse.java | 2 +- .../dto/QuotPlanResponse.java | 2 +- .../{api => excelDown}/dto/QuotRequest.java | 2 +- .../{api => excelDown}/dto/QuotResponse.java | 2 +- .../excelDownMapper.xml} | 21 ++++++++++--------- 10 files changed, 37 insertions(+), 34 deletions(-) rename src/main/java/com/interplug/qcast/biz/{api/ApiController.java => excelDown/ExcelDownController.java} (60%) rename src/main/java/com/interplug/qcast/biz/{api/ApiMapper.java => excelDown/ExcelDownMapper.java} (73%) rename src/main/java/com/interplug/qcast/biz/{api/ApiService.java => excelDown/ExcelDownService.java} (56%) rename src/main/java/com/interplug/qcast/biz/{api => excelDown}/dto/NtrCtsCmpRequest.java (91%) rename src/main/java/com/interplug/qcast/biz/{api => excelDown}/dto/NtrCtsCmpResponse.java (98%) rename src/main/java/com/interplug/qcast/biz/{api => excelDown}/dto/QuotItemResponse.java (96%) rename src/main/java/com/interplug/qcast/biz/{api => excelDown}/dto/QuotPlanResponse.java (99%) rename src/main/java/com/interplug/qcast/biz/{api => excelDown}/dto/QuotRequest.java (89%) rename src/main/java/com/interplug/qcast/biz/{api => excelDown}/dto/QuotResponse.java (82%) rename src/main/resources/mappers/{api/apiMapper.xml => excelDown/excelDownMapper.xml} (96%) diff --git a/src/main/java/com/interplug/qcast/biz/api/ApiController.java b/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownController.java similarity index 60% rename from src/main/java/com/interplug/qcast/biz/api/ApiController.java rename to src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownController.java index 9ec88d7a..eeec4138 100644 --- a/src/main/java/com/interplug/qcast/biz/api/ApiController.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownController.java @@ -1,7 +1,8 @@ -package com.interplug.qcast.biz.api; +package com.interplug.qcast.biz.excelDown; -import com.interplug.qcast.biz.api.dto.*; +import com.interplug.qcast.biz.excelDown.dto.*; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; @@ -11,18 +12,19 @@ import java.util.List; @Slf4j @RestController -@RequestMapping("/api/") +@RequestMapping("/api/excel-down/") @RequiredArgsConstructor -public class ApiController { - private final ApiService apiService; +@Tag(name = "ExcelDownController", description = "과거데이터 엑셀다운로드 API") +public class ExcelDownController { + private final ExcelDownService excelDownService; @Operation(description = "과거데이터_견적 엑셀다운로드 조회") @PostMapping("/quotExclDownData") @ResponseStatus(HttpStatus.OK) public QuotResponse quotExclDownData(@RequestBody QuotRequest quotRequest) { - List quotPlanExclDownData = apiService.selectQuotPlanExclDownData(quotRequest); - List quotItemExclDownData = apiService.selectQuotItemExclDownData(quotRequest); + List quotPlanExclDownData = excelDownService.selectQuotPlanExclDownData(quotRequest); + List quotItemExclDownData = excelDownService.selectQuotItemExclDownData(quotRequest); QuotResponse quotRes = new QuotResponse(); quotRes.setQuotPlanList(quotPlanExclDownData); @@ -35,7 +37,7 @@ public class ApiController { @PostMapping("/ntrCtsCmpExclDownData") @ResponseStatus(HttpStatus.OK) public List ntrCtsCmpExclDownData(@RequestBody NtrCtsCmpRequest ntrCtsCmpRequest) { - return apiService.selectNtrCtsCmpExclDownData(ntrCtsCmpRequest); + return excelDownService.selectNtrCtsCmpExclDownData(ntrCtsCmpRequest); } diff --git a/src/main/java/com/interplug/qcast/biz/api/ApiMapper.java b/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownMapper.java similarity index 73% rename from src/main/java/com/interplug/qcast/biz/api/ApiMapper.java rename to src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownMapper.java index 001b6d50..b4a35179 100644 --- a/src/main/java/com/interplug/qcast/biz/api/ApiMapper.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownMapper.java @@ -1,12 +1,12 @@ -package com.interplug.qcast.biz.api; +package com.interplug.qcast.biz.excelDown; -import com.interplug.qcast.biz.api.dto.*; +import com.interplug.qcast.biz.excelDown.dto.*; import org.apache.ibatis.annotations.Mapper; import java.util.List; @Mapper -interface ApiMapper { +interface ExcelDownMapper { List selectQuotPlanExclDownData(QuotRequest quotRequest); List selectQuotItemExclDownData(QuotRequest quotRequest); diff --git a/src/main/java/com/interplug/qcast/biz/api/ApiService.java b/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownService.java similarity index 56% rename from src/main/java/com/interplug/qcast/biz/api/ApiService.java rename to src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownService.java index 6ddb7a5e..96f8b5ba 100644 --- a/src/main/java/com/interplug/qcast/biz/api/ApiService.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/ExcelDownService.java @@ -1,6 +1,6 @@ -package com.interplug.qcast.biz.api; +package com.interplug.qcast.biz.excelDown; -import com.interplug.qcast.biz.api.dto.*; +import com.interplug.qcast.biz.excelDown.dto.*; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -10,18 +10,18 @@ import java.util.List; @Slf4j @Service @RequiredArgsConstructor -public class ApiService { - private final ApiMapper apiMapper; +public class ExcelDownService { + private final ExcelDownMapper excelDownMapper; public List selectQuotPlanExclDownData(QuotRequest quotRequest) { - return apiMapper.selectQuotPlanExclDownData(quotRequest); + return excelDownMapper.selectQuotPlanExclDownData(quotRequest); } public List selectQuotItemExclDownData(QuotRequest quotRequest) { - return apiMapper.selectQuotItemExclDownData(quotRequest); + return excelDownMapper.selectQuotItemExclDownData(quotRequest); } public List selectNtrCtsCmpExclDownData(NtrCtsCmpRequest ntrCtsCmpRequest) { - return apiMapper.selectNtrCtsCmpExclDownData(ntrCtsCmpRequest); + return excelDownMapper.selectNtrCtsCmpExclDownData(ntrCtsCmpRequest); } } diff --git a/src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpRequest.java b/src/main/java/com/interplug/qcast/biz/excelDown/dto/NtrCtsCmpRequest.java similarity index 91% rename from src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpRequest.java rename to src/main/java/com/interplug/qcast/biz/excelDown/dto/NtrCtsCmpRequest.java index c8e31a51..f8d00dc5 100644 --- a/src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpRequest.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/dto/NtrCtsCmpRequest.java @@ -1,4 +1,4 @@ -package com.interplug.qcast.biz.api.dto; +package com.interplug.qcast.biz.excelDown.dto; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpResponse.java b/src/main/java/com/interplug/qcast/biz/excelDown/dto/NtrCtsCmpResponse.java similarity index 98% rename from src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpResponse.java rename to src/main/java/com/interplug/qcast/biz/excelDown/dto/NtrCtsCmpResponse.java index 7472bbb3..75af5343 100644 --- a/src/main/java/com/interplug/qcast/biz/api/dto/NtrCtsCmpResponse.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/dto/NtrCtsCmpResponse.java @@ -1,4 +1,4 @@ -package com.interplug.qcast.biz.api.dto; +package com.interplug.qcast.biz.excelDown.dto; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/interplug/qcast/biz/api/dto/QuotItemResponse.java b/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotItemResponse.java similarity index 96% rename from src/main/java/com/interplug/qcast/biz/api/dto/QuotItemResponse.java rename to src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotItemResponse.java index ca994d40..7d3b7c10 100644 --- a/src/main/java/com/interplug/qcast/biz/api/dto/QuotItemResponse.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotItemResponse.java @@ -1,4 +1,4 @@ -package com.interplug.qcast.biz.api.dto; +package com.interplug.qcast.biz.excelDown.dto; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/interplug/qcast/biz/api/dto/QuotPlanResponse.java b/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotPlanResponse.java similarity index 99% rename from src/main/java/com/interplug/qcast/biz/api/dto/QuotPlanResponse.java rename to src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotPlanResponse.java index fe9bc325..65b80e00 100644 --- a/src/main/java/com/interplug/qcast/biz/api/dto/QuotPlanResponse.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotPlanResponse.java @@ -1,4 +1,4 @@ -package com.interplug.qcast.biz.api.dto; +package com.interplug.qcast.biz.excelDown.dto; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/interplug/qcast/biz/api/dto/QuotRequest.java b/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotRequest.java similarity index 89% rename from src/main/java/com/interplug/qcast/biz/api/dto/QuotRequest.java rename to src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotRequest.java index 0ee07b29..33d355a7 100644 --- a/src/main/java/com/interplug/qcast/biz/api/dto/QuotRequest.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotRequest.java @@ -1,4 +1,4 @@ -package com.interplug.qcast.biz.api.dto; +package com.interplug.qcast.biz.excelDown.dto; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/interplug/qcast/biz/api/dto/QuotResponse.java b/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotResponse.java similarity index 82% rename from src/main/java/com/interplug/qcast/biz/api/dto/QuotResponse.java rename to src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotResponse.java index 3a409815..ef46b0dd 100644 --- a/src/main/java/com/interplug/qcast/biz/api/dto/QuotResponse.java +++ b/src/main/java/com/interplug/qcast/biz/excelDown/dto/QuotResponse.java @@ -1,4 +1,4 @@ -package com.interplug.qcast.biz.api.dto; +package com.interplug.qcast.biz.excelDown.dto; import lombok.Getter; import lombok.Setter; diff --git a/src/main/resources/mappers/api/apiMapper.xml b/src/main/resources/mappers/excelDown/excelDownMapper.xml similarity index 96% rename from src/main/resources/mappers/api/apiMapper.xml rename to src/main/resources/mappers/excelDown/excelDownMapper.xml index 5c7359e3..fe635050 100644 --- a/src/main/resources/mappers/api/apiMapper.xml +++ b/src/main/resources/mappers/excelDown/excelDownMapper.xml @@ -1,10 +1,11 @@ - - + /* sqlid : com.interplug.qcast.api.excelDown.selectQuotPlanExclDownData (견적엑셀다운로드 플랜정보 데이터 조회) */ SELECT B.OBJECT_NO /* 물건번호 物件番号 */ , A.PLAN_NO /* 플랜 案件番号 */ @@ -190,9 +191,9 @@ - + /* sqlid : com.interplug.qcast.api.excelDown.selectQuotItemExclDownData (견적엑셀다운로드 품목단위 데이터 조회) */ SELECT C.OBJECT_NO /* 물건번호 物件番号 */ , B.PLAN_NO /* 플랜 案件番号 */ @@ -268,9 +269,9 @@ - + /* sqlid : com.interplug.qcast.api.excelDown.selectNtrCtsCmpExclDownData (자연재해보상입력 엑셀 다운로드 데이터 조회)*/ SELECT A.GUARANTEE_RECEIVE_USER /* 구매자 성명購入者 */