From b73b969b84eeb3c297270bc8a0e01363ad782d77 Mon Sep 17 00:00:00 2001 From: cha Date: Tue, 13 May 2025 15:46:00 +0900 Subject: [PATCH 01/29] =?UTF-8?q?s3=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index 437a8172..1da82b90 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -58,7 +58,7 @@ file: root.path: /home/development/public/files ini.root.path: /home/development/public/files/NewEstimate ini.base.filename: 料金シミュレーション.ini - ini.drawing.img.path: /home/development/public/files/NewEstimate/Drawing + ini.drawing.img.path: https://files.hanasys.jp/Drawing front: url: http://1.248.227.176:3000 \ No newline at end of file From 60e0336cc5cb310a1facc7308b82b4bed75356c2 Mon Sep 17 00:00:00 2001 From: cha Date: Tue, 13 May 2025 16:51:34 +0900 Subject: [PATCH 02/29] =?UTF-8?q?s3=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EB=B3=80=EA=B2=BD=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-local.yml | 2 +- src/main/resources/config/application-prd.yml | 2 +- src/main/resources/config/application.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/config/application-local.yml b/src/main/resources/config/application-local.yml index 9bdfeaf2..b2d1426d 100644 --- a/src/main/resources/config/application-local.yml +++ b/src/main/resources/config/application-local.yml @@ -39,7 +39,7 @@ spring: #QSP qsp: - url: http://localhost:8120 + url: http://1.248.227.176:8120 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index c3c7949a..4e8f6dd0 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -58,7 +58,7 @@ file: root.path: /home/production/public/files ini.root.path: /home/production/public/files/NewEstimate ini.base.filename: 料金シミュレーション.ini - ini.drawing.img.path: /home/production/public/files/NewEstimate/Drawing + ini.drawing.img.path: https://files.hanasys.jp/Drawing front: url: https://hanasys.jp \ No newline at end of file diff --git a/src/main/resources/config/application.yml b/src/main/resources/config/application.yml index 97f5f812..a592c815 100644 --- a/src/main/resources/config/application.yml +++ b/src/main/resources/config/application.yml @@ -65,7 +65,7 @@ file: root.path: /home/development/public/files ini.root.path: /home/development/public/files/NewEstimate ini.base.filename: 料金シミュレーション.ini - ini.drawing.img.path: /home/development/public/files/NewEstimate/Drawing + ini.drawing.img.path: https://files.hanasys.jp/Drawing # log logging: From f521ed9ed221140dae1ea961d646f65a6d273e97 Mon Sep 17 00:00:00 2001 From: cha Date: Tue, 13 May 2025 18:10:05 +0900 Subject: [PATCH 03/29] =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=B6=88?= =?UTF-8?q?=EB=9F=AC=EC=98=A4=EA=B8=B0=20=EB=B0=A9=EB=B2=95=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20(File=20=3D>=20Url)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/biz/estimate/EstimateService.java | 38 +++++++++++++++---- 1 file changed, 30 insertions(+), 8 deletions(-) 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 d90c3684..59bc99d1 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -7,6 +7,9 @@ import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLConnection; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; @@ -1494,21 +1497,40 @@ public class EstimateService { // 도면 이미지 셋팅 String baseDrawingImgName = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo(); - File file = new File(drawingDirPath + File.separator + baseDrawingImgName + "_1.png"); - if (file.exists()) { + + URL url = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png"); + URLConnection con = url.openConnection(); + HttpURLConnection exitCode = (HttpURLConnection)con; + if (exitCode.getResponseCode() == 200) { InputStream imageInputStream = - new FileInputStream(drawingDirPath + File.separator + baseDrawingImgName + "_1.png"); + new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png").openStream(); byte[] drawingImg1 = Util.toByteArray(imageInputStream); estimateResponse.setDrawingImg1(drawingImg1); } - - file = new File(drawingDirPath + File.separator + baseDrawingImgName + "_2.png"); - if (file.exists()) { +// File file = new File(drawingDirPath + File.separator + baseDrawingImgName + "_1.png"); +// if (file.exists()) { +// InputStream imageInputStream = +// new FileInputStream(drawingDirPath + File.separator + baseDrawingImgName + "_1.png"); +// byte[] drawingImg1 = Util.toByteArray(imageInputStream); +// estimateResponse.setDrawingImg1(drawingImg1); +// } + String baseDrawingImgName2 = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo(); + URL url2 = new URL(drawingDirPath + File.separator + baseDrawingImgName2 + "_2.png"); + URLConnection con2 = url2.openConnection(); + HttpURLConnection exitCode2 = (HttpURLConnection)con2; + if (exitCode2.getResponseCode() == 200) { InputStream imageInputStream2 = - new FileInputStream(drawingDirPath + File.separator + baseDrawingImgName + "_2.png"); + new URL(drawingDirPath + File.separator + baseDrawingImgName + "_2.png").openStream(); byte[] drawingImg2 = Util.toByteArray(imageInputStream2); - estimateResponse.setDrawingImg2(drawingImg2); + estimateResponse.setDrawingImg1(drawingImg2); } +// file = new File(drawingDirPath + File.separator + baseDrawingImgName + "_2.png"); +// if (file.exists()) { +// InputStream imageInputStream2 = +// new FileInputStream(drawingDirPath + File.separator + baseDrawingImgName + "_2.png"); +// byte[] drawingImg2 = Util.toByteArray(imageInputStream2); +// estimateResponse.setDrawingImg2(drawingImg2); +// } if ("PDF".equals(estimateRequest.getSchDownload())) { // PDF 다운로드 String[] arrSection = new String[6]; From e9f548a7bf16730aea4526662934fd44e9f70b8f Mon Sep 17 00:00:00 2001 From: yjnoh Date: Wed, 14 May 2025 10:28:50 +0900 Subject: [PATCH 04/29] =?UTF-8?q?interplug-dev=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=ED=95=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/application-dev-interplug.yml | 64 +++++++++++++++++++ .../logback/logback-dev-interplug.xml | 39 +++++++++++ 2 files changed, 103 insertions(+) create mode 100644 src/main/resources/config/application-dev-interplug.yml create mode 100644 src/main/resources/logback/logback-dev-interplug.xml diff --git a/src/main/resources/config/application-dev-interplug.yml b/src/main/resources/config/application-dev-interplug.yml new file mode 100644 index 00000000..bd8461bb --- /dev/null +++ b/src/main/resources/config/application-dev-interplug.yml @@ -0,0 +1,64 @@ +#server +server: + port: 8080 + +#spring +spring: + datasource: + driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy + jdbc-url: jdbc:log4jdbc:sqlserver://1.248.227.176:1433;databaseName=NEWPVCAD;encrypt=true;trustServerCertificate=true + username: pvDBuser + password: ENC(W7owprYnvf7vqwO6Piw4dHfVBCSxE4Ck) + maximum-pool-size: 4 + pool-name: Master-HikariPool + # datasource: + # master: + # driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy + # jdbc-url: jdbc:log4jdbc:sqlserver://1.248.227.176:1433;databaseName=NEWPVCAD;encrypt=true;trustServerCertificate=true + # username: pvDBuser + # password: ENC(W7owprYnvf7vqwO6Piw4dHfVBCSxE4Ck) + # maximum-pool-size: 4 + # pool-name: Master-HikariPool + # read: + # driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy + # jdbc-url: jdbc:log4jdbc:sqlserver://1.248.227.176:1433;databaseName=NEWPVCAD;encrypt=true;trustServerCertificate=true + # username: pvDBuser + # password: ENC(W7owprYnvf7vqwO6Piw4dHfVBCSxE4Ck) + # maximum-pool-size: 4 + # pool-name: Read-HikariPool + jackson: + time-zone: Asia/Seoul + batch: + jdbc: + initialize-schema: never + job: + names: ${job.name:NONE} + enabled: false + profiles: + scheduler: Y + +#QSP +qsp: + url: http://1.248.227.176:8120 + master-store-batch-url: /api/master/storeAdditionalInfo + master-material-batch-url: /api/master/materialList + master-bom-batch-url: /api/master/bomList + master-business-charger-batch-url: /api/user/businessChargerList + master-admin-user-batch-url: /api/admin/userList + master-price-batch-url: /api/master/priceList + simulation-guide-info-url: /api/simulation/guideInfo + aes256.key: jpqcellQ123456!! + auto.login.aes256.key: _autoL!! + system-commonCode-batch-url: /api/system/commonCodeListData + master-special-note-disp-item-batch-url: /api/master/quotationDispItemInfo + estimate-plan-confirm-batch-url: /api/order/planConfirmListData + estimate-sync-batch-url: /api/order/qcastQuotationSave +#File +file: + root.path: /home/development/public/files + ini.root.path: /home/development/public/files/NewEstimate + ini.base.filename: 料金シミュレーション.ini + ini.drawing.img.path: https://files.hanasys.jp/Drawing + +front: + url: http://1.248.227.176:3000 \ No newline at end of file diff --git a/src/main/resources/logback/logback-dev-interplug.xml b/src/main/resources/logback/logback-dev-interplug.xml new file mode 100644 index 00000000..9219eb3d --- /dev/null +++ b/src/main/resources/logback/logback-dev-interplug.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + ${CONSOLE_LOG_CHARSET} + + + + + ${LOG_FILE}${LOG_FILE_EXT} + + ${FILE_LOG_PATTERN} + ${FILE_LOG_CHARSET} + + + ${LOG_FILE}.%d{yyyy-MM-dd}${LOG_FILE_EXT} + + + + + + + + + + + + + + + \ No newline at end of file From 96169fe2a817bf15c9c86bfa4b457ce617b89606 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Wed, 14 May 2025 10:33:02 +0900 Subject: [PATCH 05/29] =?UTF-8?q?s3=20=EA=B2=BD=EB=A1=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-dev-interplug.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/config/application-dev-interplug.yml b/src/main/resources/config/application-dev-interplug.yml index bd8461bb..f56f7c4e 100644 --- a/src/main/resources/config/application-dev-interplug.yml +++ b/src/main/resources/config/application-dev-interplug.yml @@ -55,8 +55,8 @@ qsp: estimate-sync-batch-url: /api/order/qcastQuotationSave #File file: - root.path: /home/development/public/files - ini.root.path: /home/development/public/files/NewEstimate + root.path: C:\\ + ini.root.path: C:\\NewEstimate ini.base.filename: 料金シミュレーション.ini ini.drawing.img.path: https://files.hanasys.jp/Drawing From f90a4a59b7a204be36f208e263e973469fad8a4c Mon Sep 17 00:00:00 2001 From: cha Date: Wed, 14 May 2025 11:06:21 +0900 Subject: [PATCH 06/29] =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=88=9C?= =?UTF-8?q?=EC=84=9C=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/interplug/qcast/biz/estimate/EstimateService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 59bc99d1..655ce36a 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -1520,9 +1520,9 @@ public class EstimateService { HttpURLConnection exitCode2 = (HttpURLConnection)con2; if (exitCode2.getResponseCode() == 200) { InputStream imageInputStream2 = - new URL(drawingDirPath + File.separator + baseDrawingImgName + "_2.png").openStream(); + new URL(drawingDirPath + File.separator + baseDrawingImgName2 + "_2.png").openStream(); byte[] drawingImg2 = Util.toByteArray(imageInputStream2); - estimateResponse.setDrawingImg1(drawingImg2); + estimateResponse.setDrawingImg2(drawingImg2); } // file = new File(drawingDirPath + File.separator + baseDrawingImgName + "_2.png"); // if (file.exists()) { From 92124475ce83ec878229968291534c298d2b7208 Mon Sep 17 00:00:00 2001 From: cha Date: Wed, 14 May 2025 16:17:17 +0900 Subject: [PATCH 07/29] =?UTF-8?q?http=20=ED=86=B5=EC=8B=A0=EC=97=90?= =?UTF-8?q?=EC=84=9C=20ssl=20=EC=9A=B0=ED=9A=8C=ED=95=B4=EC=84=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=A0=80=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/biz/estimate/EstimateService.java | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) 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 655ce36a..7cc3a44f 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -10,6 +10,7 @@ import java.math.BigDecimal; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; +import java.security.cert.X509Certificate; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; @@ -72,6 +73,11 @@ import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; + @Slf4j @Service @RequiredArgsConstructor @@ -1495,12 +1501,25 @@ public class EstimateService { estimateResponse.setPwrGnrSim(pwrGnrSimResponse); + //SSL 무시하기 + TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() { + public X509Certificate[] getAcceptedIssuers() {return null;} + public void checkClientTrusted(X509Certificate[] certs, String authType) {} + public void checkServerTrusted(X509Certificate[] certs, String authType) {} + } }; + + SSLContext sc = SSLContext.getInstance("SSL"); + sc.init(null, trustAllCerts, new java.security.SecureRandom()); + HttpsURLConnection + .setDefaultSSLSocketFactory(sc.getSocketFactory()); + //end + // 도면 이미지 셋팅 String baseDrawingImgName = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo(); URL url = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png"); URLConnection con = url.openConnection(); - HttpURLConnection exitCode = (HttpURLConnection)con; + HttpURLConnection exitCode = (HttpURLConnection) con; if (exitCode.getResponseCode() == 200) { InputStream imageInputStream = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png").openStream(); @@ -1517,7 +1536,7 @@ public class EstimateService { String baseDrawingImgName2 = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo(); URL url2 = new URL(drawingDirPath + File.separator + baseDrawingImgName2 + "_2.png"); URLConnection con2 = url2.openConnection(); - HttpURLConnection exitCode2 = (HttpURLConnection)con2; + HttpURLConnection exitCode2 = (HttpURLConnection) con2; if (exitCode2.getResponseCode() == 200) { InputStream imageInputStream2 = new URL(drawingDirPath + File.separator + baseDrawingImgName2 + "_2.png").openStream(); From 803765de81923083dae5e15cff62d13fafa249b0 Mon Sep 17 00:00:00 2001 From: cha Date: Wed, 14 May 2025 17:53:40 +0900 Subject: [PATCH 08/29] =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=B0=8D=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/biz/estimate/EstimateService.java | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) 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 7cc3a44f..bad195d4 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -73,10 +73,6 @@ import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; @Slf4j @Service @@ -1501,18 +1497,6 @@ public class EstimateService { estimateResponse.setPwrGnrSim(pwrGnrSimResponse); - //SSL 무시하기 - TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() {return null;} - public void checkClientTrusted(X509Certificate[] certs, String authType) {} - public void checkServerTrusted(X509Certificate[] certs, String authType) {} - } }; - - SSLContext sc = SSLContext.getInstance("SSL"); - sc.init(null, trustAllCerts, new java.security.SecureRandom()); - HttpsURLConnection - .setDefaultSSLSocketFactory(sc.getSocketFactory()); - //end // 도면 이미지 셋팅 String baseDrawingImgName = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo(); @@ -1520,6 +1504,11 @@ public class EstimateService { URL url = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png"); URLConnection con = url.openConnection(); HttpURLConnection exitCode = (HttpURLConnection) con; + + System.err.println("exitCode: " + exitCode); + System.err.println("Exit code: " + exitCode.getResponseCode()); + + if (exitCode.getResponseCode() == 200) { InputStream imageInputStream = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png").openStream(); From 858940b8e892d462566cd6f53fe3166b734d33cf Mon Sep 17 00:00:00 2001 From: yjnoh Date: Thu, 15 May 2025 10:20:48 +0900 Subject: [PATCH 09/29] =?UTF-8?q?qsp=20api=20=EA=B0=9C=EB=B0=9C=EA=B3=84?= =?UTF-8?q?=20=EB=8F=84=EB=A9=94=EC=9D=B8=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index 1da82b90..150e936e 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -37,9 +37,9 @@ spring: profiles: scheduler: Y -#QSP +#QSP url #http://jp.qsalesplatform.com qsp: - url: http://1.248.227.176:8120 + url: http://172.16.56.60:8110 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList From 744b7eed77af539f5065e3df300208b7bb9967af Mon Sep 17 00:00:00 2001 From: yjnoh Date: Thu, 15 May 2025 10:43:17 +0900 Subject: [PATCH 10/29] =?UTF-8?q?openfeign=20=EB=A1=9C=EA=B7=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/resources/config/application.yml b/src/main/resources/config/application.yml index a592c815..87107d0f 100644 --- a/src/main/resources/config/application.yml +++ b/src/main/resources/config/application.yml @@ -44,6 +44,13 @@ spring: names: ${job.name:NONE} enabled: false + cloud: + openfeign: + client: + config: + default: + logger-level: FULL + management: endpoints: enabled-by-default: false From 060b3f2ddb328451d65c9ead36ec43514b568395 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Thu, 15 May 2025 10:55:13 +0900 Subject: [PATCH 11/29] =?UTF-8?q?=ED=95=98=EB=82=98=EC=8B=9C=EC=8A=A4=20qs?= =?UTF-8?q?p=20=EC=84=9C=EB=B2=84=20=EC=84=A4=EC=A0=95=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-dev.yml | 3 ++- src/main/resources/config/application-prd.yml | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index 150e936e..7a6fac8b 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -37,7 +37,8 @@ spring: profiles: scheduler: Y -#QSP url #http://jp.qsalesplatform.com +#QSP url 하나시스운영 #http://jp.qsalesplatform.com +#QSP url interplug dev #http://1.248.227.176:8120 qsp: url: http://172.16.56.60:8110 master-store-batch-url: /api/master/storeAdditionalInfo diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index 4e8f6dd0..73535b8f 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -37,9 +37,10 @@ spring: profiles: scheduler: Y -#QSP # http://jp.qsalesplatform.com +#QSP url 하나시스운영 #http://jp.qsalesplatform.com +#QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: http://1.248.227.176:8120 + url: http://172.16.56.60:8110 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList From 47b651af513475f285ba3e2e4e488dcb3a369d46 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Thu, 15 May 2025 11:05:07 +0900 Subject: [PATCH 12/29] =?UTF-8?q?api=20=EC=A3=BC=EC=86=8C=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 --- src/main/resources/config/application-dev.yml | 5 +++-- src/main/resources/config/application-prd.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index 7a6fac8b..d11c3b08 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -37,10 +37,11 @@ spring: profiles: scheduler: Y -#QSP url 하나시스운영 #http://jp.qsalesplatform.com +#QSP url 하나시스운영 #https://jp.qsalesplatform.com +#QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: http://172.16.56.60:8110 + url: https://172.16.56.60:8110 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index 73535b8f..e4c1f641 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -37,10 +37,11 @@ spring: profiles: scheduler: Y -#QSP url 하나시스운영 #http://jp.qsalesplatform.com +#QSP url 하나시스운영 #https://jp.qsalesplatform.com +#QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: http://172.16.56.60:8110 + url: https://jp.qsalesplatform.com master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList From 494f468c555f705f24a6e4f751901c2fc0dec7c6 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Thu, 15 May 2025 12:51:06 +0900 Subject: [PATCH 13/29] =?UTF-8?q?openfeign=20log=20level=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/application.yml b/src/main/resources/config/application.yml index 87107d0f..4b446025 100644 --- a/src/main/resources/config/application.yml +++ b/src/main/resources/config/application.yml @@ -49,7 +49,7 @@ spring: client: config: default: - logger-level: FULL + logger-level: HEADERS management: endpoints: From 9ea7bf1c24db7a04bcb34a0b4a76a0d4aad6ed4c Mon Sep 17 00:00:00 2001 From: yjnoh Date: Thu, 15 May 2025 13:28:39 +0900 Subject: [PATCH 14/29] =?UTF-8?q?api=20=EC=A3=BC=EC=86=8C=20=EC=9B=90?= =?UTF-8?q?=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-dev.yml | 2 +- src/main/resources/config/application-prd.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index d11c3b08..1d65c5cd 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: https://172.16.56.60:8110 + url: http://1.248.227.176:8120 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index e4c1f641..0a264551 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: https://jp.qsalesplatform.com + url: http://1.248.227.176:8120 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList From ea873061482a2d5717d3307f0368fc828903eff9 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Thu, 15 May 2025 13:47:08 +0900 Subject: [PATCH 15/29] =?UTF-8?q?=EA=B0=9C=EB=B0=9C=EA=B3=84=EC=9A=B4?= =?UTF-8?q?=EC=98=81=EB=8F=84=EB=A9=94=EC=9D=B8=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-dev-interplug.yml | 6 ++++-- src/main/resources/config/application-dev.yml | 2 +- src/main/resources/config/application-prd.yml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/resources/config/application-dev-interplug.yml b/src/main/resources/config/application-dev-interplug.yml index f56f7c4e..0f81df56 100644 --- a/src/main/resources/config/application-dev-interplug.yml +++ b/src/main/resources/config/application-dev-interplug.yml @@ -37,9 +37,11 @@ spring: profiles: scheduler: Y -#QSP +#QSP url 하나시스운영 #https://jp.qsalesplatform.com +#QSP url 하나시스개발 #https://172.16.56.60:8110 +#QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: http://1.248.227.176:8120 + url: https://172.16.56.60:8110 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index 1d65c5cd..94f6a316 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: http://1.248.227.176:8120 + url: https://jp.qsalesplatform.com master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index 0a264551..e4c1f641 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: http://1.248.227.176:8120 + url: https://jp.qsalesplatform.com master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList From a9e4baa307e57621aa69451e66213778eb0608ad Mon Sep 17 00:00:00 2001 From: yjnoh Date: Thu, 15 May 2025 14:22:21 +0900 Subject: [PATCH 16/29] =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-dev-interplug.yml | 2 +- src/main/resources/config/application-dev.yml | 2 +- src/main/resources/config/application-prd.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/config/application-dev-interplug.yml b/src/main/resources/config/application-dev-interplug.yml index 0f81df56..6e61a55c 100644 --- a/src/main/resources/config/application-dev-interplug.yml +++ b/src/main/resources/config/application-dev-interplug.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: https://172.16.56.60:8110 + url: http://1.248.227.176:8120 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index 94f6a316..1d65c5cd 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: https://jp.qsalesplatform.com + url: http://1.248.227.176:8120 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index e4c1f641..0a264551 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: https://jp.qsalesplatform.com + url: http://1.248.227.176:8120 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList From c6e2c5b7b0baaec071a7168711b016341945c601 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Tue, 20 May 2025 10:21:48 +0900 Subject: [PATCH 17/29] =?UTF-8?q?api=20=EC=8B=A0=EA=B7=9C=20=EC=9A=B4?= =?UTF-8?q?=EC=98=81=EA=B3=84=20=EC=A0=91=EC=86=8D=20=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-prd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index 0a264551..e4c1f641 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: http://1.248.227.176:8120 + url: https://jp.qsalesplatform.com master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList From 1374c50f1c5de0099d4c9020df60944da9c2b4c5 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Tue, 20 May 2025 10:31:30 +0900 Subject: [PATCH 18/29] =?UTF-8?q?ssl=20=EC=98=A4=EB=A5=98=EB=A1=9C=20?= =?UTF-8?q?=EC=9D=B8=ED=95=9C=20=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-prd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index e4c1f641..0a264551 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: https://jp.qsalesplatform.com + url: http://1.248.227.176:8120 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList From 273a0e4e3e666e9f8d212517f0955f26a6862b53 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Tue, 20 May 2025 11:15:42 +0900 Subject: [PATCH 19/29] =?UTF-8?q?=EC=8B=A0=EA=B7=9C=20=EC=84=9C=EB=B2=84?= =?UTF-8?q?=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-prd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index 0a264551..e4c1f641 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: http://1.248.227.176:8120 + url: https://jp.qsalesplatform.com master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList From 67d2ffed6f38716c9484c5163eb9186de5d4dcfb Mon Sep 17 00:00:00 2001 From: yjnoh Date: Tue, 20 May 2025 11:22:34 +0900 Subject: [PATCH 20/29] =?UTF-8?q?=EA=B0=9C=EB=B0=9C=EA=B3=84=EB=A1=9C=20?= =?UTF-8?q?=EC=86=8C=EC=8A=A4=20=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-prd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index e4c1f641..0a264551 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: https://jp.qsalesplatform.com + url: http://1.248.227.176:8120 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList From 641285d769163765debd6024a68d534c262cdc75 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Tue, 20 May 2025 14:51:34 +0900 Subject: [PATCH 21/29] =?UTF-8?q?qsp=20=EC=8B=A0=EA=B7=9C=EC=84=9C?= =?UTF-8?q?=EB=B2=84=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-prd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index 0a264551..e4c1f641 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: http://1.248.227.176:8120 + url: https://jp.qsalesplatform.com master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList From 57e51f1d58e6571b2594a989b98072016ee555b9 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Tue, 20 May 2025 15:00:36 +0900 Subject: [PATCH 22/29] =?UTF-8?q?=EA=B0=9C=EB=B0=9C=EA=B3=84=20=EC=86=8C?= =?UTF-8?q?=EC=8A=A4=EB=A1=9C=20=EC=9B=90=EC=83=81=EB=B3=B5=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-prd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index e4c1f641..0a264551 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://172.16.56.60:8110 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: https://jp.qsalesplatform.com + url: http://1.248.227.176:8120 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList From e73cf50a9078f78cd83ecc6ca57a0550a96a9972 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Tue, 20 May 2025 16:03:23 +0900 Subject: [PATCH 23/29] =?UTF-8?q?=ED=95=98=EB=82=98=EC=8B=9C=EC=8A=A4=20?= =?UTF-8?q?=EA=B0=9C=EB=B0=9C=EA=B3=84=20=EC=A0=91=EC=86=8D=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-dev-interplug.yml | 2 +- src/main/resources/config/application-dev.yml | 4 ++-- src/main/resources/config/application-prd.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/config/application-dev-interplug.yml b/src/main/resources/config/application-dev-interplug.yml index 6e61a55c..c41ce07e 100644 --- a/src/main/resources/config/application-dev-interplug.yml +++ b/src/main/resources/config/application-dev-interplug.yml @@ -38,7 +38,7 @@ spring: scheduler: Y #QSP url 하나시스운영 #https://jp.qsalesplatform.com -#QSP url 하나시스개발 #https://172.16.56.60:8110 +#QSP url 하나시스개발 #https://121.168.9.37:8080 #QSP url interplug dev #http://1.248.227.176:8120 qsp: url: http://1.248.227.176:8120 diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index 1d65c5cd..10faca29 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -38,10 +38,10 @@ spring: scheduler: Y #QSP url 하나시스운영 #https://jp.qsalesplatform.com -#QSP url 하나시스개발 #https://172.16.56.60:8110 +#QSP url 하나시스개발 #https://121.168.9.37:8080 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: http://1.248.227.176:8120 + url: https://121.168.9.37:8080 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index 0a264551..a1e54f6a 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -38,7 +38,7 @@ spring: scheduler: Y #QSP url 하나시스운영 #https://jp.qsalesplatform.com -#QSP url 하나시스개발 #https://172.16.56.60:8110 +#QSP url 하나시스개발 #https://121.168.9.37:8080 #QSP url interplug dev #http://1.248.227.176:8120 qsp: url: http://1.248.227.176:8120 From 854857d43564505c148bb7e95e32219a64ad3c8f Mon Sep 17 00:00:00 2001 From: yjnoh Date: Tue, 20 May 2025 16:09:40 +0900 Subject: [PATCH 24/29] =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config/application-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index 10faca29..dd94c4fe 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -41,7 +41,7 @@ spring: #QSP url 하나시스개발 #https://121.168.9.37:8080 #QSP url interplug dev #http://1.248.227.176:8120 qsp: - url: https://121.168.9.37:8080 + url: http://121.168.9.37:8080 master-store-batch-url: /api/master/storeAdditionalInfo master-material-batch-url: /api/master/materialList master-bom-batch-url: /api/master/bomList From 230216267d5f536fe66af74e4b614d475a03e52f Mon Sep 17 00:00:00 2001 From: cha Date: Fri, 23 May 2025 13:48:50 +0900 Subject: [PATCH 25/29] =?UTF-8?q?[1004]=201:1=20=EB=AC=B8=EC=9D=98?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/biz/community/BoardController.java | 16 +- .../qcast/biz/community/BoardService.java | 237 ++++++++++++++++-- .../qcast/biz/community/dto/BoardRequest.java | 39 +++ 3 files changed, 266 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/interplug/qcast/biz/community/BoardController.java b/src/main/java/com/interplug/qcast/biz/community/BoardController.java index 4585866c..3e140143 100644 --- a/src/main/java/com/interplug/qcast/biz/community/BoardController.java +++ b/src/main/java/com/interplug/qcast/biz/community/BoardController.java @@ -2,18 +2,15 @@ package com.interplug.qcast.biz.community; import com.interplug.qcast.biz.community.dto.BoardRequest; import com.interplug.qcast.biz.community.dto.BoardResponse; +import com.interplug.qcast.biz.file.dto.FileRequest; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; @Slf4j @RestController @@ -38,6 +35,13 @@ public class BoardController { return boardService.getBoardDetail(boardRequest); } + @Operation(description = "문의를 저장한다.") + @PostMapping("/saveQna") + @ResponseStatus(HttpStatus.OK) + public BoardResponse getBoardQnaSave(BoardRequest boardRequest, HttpServletRequest request) throws Exception { + return boardService.getBoardQnaSave(boardRequest, request); + } + @Operation(description = "커뮤니티(공지사항, FAQ, 자료다운로드) 파일 다운로드를 진행한다.") @GetMapping("/file/download") @ResponseStatus(HttpStatus.OK) diff --git a/src/main/java/com/interplug/qcast/biz/community/BoardService.java b/src/main/java/com/interplug/qcast/biz/community/BoardService.java index 4e4c9767..a1b90796 100644 --- a/src/main/java/com/interplug/qcast/biz/community/BoardService.java +++ b/src/main/java/com/interplug/qcast/biz/community/BoardService.java @@ -4,24 +4,36 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.interplug.qcast.biz.community.dto.BoardRequest; import com.interplug.qcast.biz.community.dto.BoardResponse; +import com.interplug.qcast.biz.estimate.dto.EstimateApiResponse; +import com.interplug.qcast.biz.file.dto.FileRequest; import com.interplug.qcast.config.Exception.ErrorCode; import com.interplug.qcast.config.Exception.QcastException; import com.interplug.qcast.config.message.Messages; import com.interplug.qcast.util.InterfaceQsp; +import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import java.io.ByteArrayInputStream; +import java.io.IOException; import java.io.InputStream; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpMethod; +import org.springframework.core.io.InputStreamResource; +import org.springframework.http.*; +import org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter; import org.springframework.stereotype.Service; +import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.StreamUtils; +import org.springframework.web.client.RestTemplate; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.util.UriComponentsBuilder; @Slf4j @@ -66,18 +78,39 @@ public class BoardService { encodedSchTitle = URLEncoder.encode(boardRequest.getSchTitle(), StandardCharsets.UTF_8); } - String url = QSP_API_URL + "/api/board/list"; - String apiUrl = - UriComponentsBuilder.fromHttpUrl(url) - .queryParam("noticeNo", boardRequest.getNoticeNo()) - .queryParam("schTitle", encodedSchTitle) - .queryParam("schNoticeTpCd", boardRequest.getSchNoticeTpCd()) - .queryParam("schNoticeClsCd", boardRequest.getSchNoticeClsCd()) - .queryParam("startRow", boardRequest.getStartRow()) - .queryParam("endRow", boardRequest.getEndRow()) - .queryParam("schMainYn", boardRequest.getSchMainYn()) - .build() - .toUriString(); + String url = null; + String apiUrl = null; + + if("QNA".equals(boardRequest.getSchNoticeClsCd())) { + url = QSP_API_URL + "/api/qna/list"; + apiUrl = UriComponentsBuilder.fromHttpUrl(url) + .queryParam("compCd", boardRequest.getCompCd()) + .queryParam("storeId", boardRequest.getStoreId()) + .queryParam("siteTpCd", boardRequest.getSiteTpCd()) + .queryParam("schTitle", encodedSchTitle) + .queryParam("schRegId", boardRequest.getSchRegId()) + .queryParam("schFromDt", boardRequest.getSchFromDt()) + .queryParam("schToDt", boardRequest.getSchToDt()) + .queryParam("startRow", boardRequest.getStartRow()) + .queryParam("endRow", boardRequest.getEndRow()) + .queryParam("loginId", boardRequest.getLoginId()) + .queryParam("langCd", boardRequest.getLangCd()) + .build() + .toUriString(); + + } else { + url = QSP_API_URL + "/api/board/list"; + apiUrl = UriComponentsBuilder.fromHttpUrl(url) + .queryParam("noticeNo", boardRequest.getNoticeNo()) + .queryParam("schTitle", encodedSchTitle) + .queryParam("schNoticeTpCd", boardRequest.getSchNoticeTpCd()) + .queryParam("schNoticeClsCd", boardRequest.getSchNoticeClsCd()) + .queryParam("startRow", boardRequest.getStartRow()) + .queryParam("endRow", boardRequest.getEndRow()) + .queryParam("schMainYn", boardRequest.getSchMainYn()) + .build() + .toUriString(); + } /* [2]. QSP API CALL -> Response */ String strResponse = interfaceQsp.callApi(HttpMethod.GET, apiUrl, null); @@ -114,14 +147,26 @@ public class BoardService { message.getMessage("common.message.required.data", "Notice No")); } - /* [1]. QSP API (url + param) Setting */ - String url = QSP_API_URL + "/api/board/detail"; - String apiUrl = - UriComponentsBuilder.fromHttpUrl(url) - .queryParam("noticeNo", boardRequest.getNoticeNo()) - .build() - .toUriString(); + String url = null; + String apiUrl = null; + if("QNA".equals(boardRequest.getSchNoticeClsCd())) { + url = QSP_API_URL + "/api/qna/detail"; + apiUrl = UriComponentsBuilder.fromHttpUrl(url) + .queryParam("qnaNo", boardRequest.getQnaNo()) + .queryParam("compCd", boardRequest.getCompCd()) + .queryParam("loginId", boardRequest.getLoginId()) + .queryParam("langCd", boardRequest.getLangCd()) + .build() + .toUriString(); + } else { + /* [1]. QSP API (url + param) Setting */ + url = QSP_API_URL + "/api/board/detail"; + apiUrl = UriComponentsBuilder.fromHttpUrl(url) + .queryParam("noticeNo", boardRequest.getNoticeNo()) + .build() + .toUriString(); + } /* [2]. QSP API CALL -> Response */ String strResponse = interfaceQsp.callApi(HttpMethod.GET, apiUrl, null); @@ -138,6 +183,138 @@ public class BoardService { return response; } + /** + * ※ 게시판 저장 QSP -> Q.CAST3 + * + * @param boardRequest + * @return + * @throws Exception + */ + public BoardResponse getBoardQnaSave(BoardRequest boardRequest, HttpServletRequest request) throws Exception { + + + + BoardResponse response = null; + + /* [0]. Validation Check */ + if (boardRequest.getCompCd() == null || boardRequest.getCompCd().isEmpty()) { + // [msg] {0} is required input value. + throw new QcastException( + ErrorCode.INVALID_INPUT_VALUE, + message.getMessage("common.message.required.data", "Comp Cd")); + } + if (boardRequest.getSiteTpCd() == null || boardRequest.getSiteTpCd().isEmpty()) { + // [msg] {0} is required input value. + throw new QcastException( + ErrorCode.INVALID_INPUT_VALUE, + message.getMessage("common.message.required.data", "Site Type Cd")); + } + if (boardRequest.getQnaClsLrgCd() == null || boardRequest.getQnaClsLrgCd().isEmpty()) { + // [msg] {0} is required input value. + throw new QcastException( + ErrorCode.INVALID_INPUT_VALUE, + message.getMessage("common.message.required.data", "Qna Cls Large Cd")); + } + if (boardRequest.getQnaClsMidCd() == null || boardRequest.getQnaClsMidCd().isEmpty()) { + // [msg] {0} is required input value. + throw new QcastException( + ErrorCode.INVALID_INPUT_VALUE, + message.getMessage("common.message.required.data", "Qna Cls Mid Cd")); + } + if (boardRequest.getTitle() == null || boardRequest.getTitle().isEmpty()) { + // [msg] {0} is required input value. + throw new QcastException( + ErrorCode.INVALID_INPUT_VALUE, + message.getMessage("common.message.required.data", "title")); + } + + if (boardRequest.getContents() == null || boardRequest.getContents().isEmpty()) { + // [msg] {0} is required input value. + throw new QcastException( + ErrorCode.INVALID_INPUT_VALUE, + message.getMessage("common.message.required.data", "contents")); + } + + if (boardRequest.getRegId() == null || boardRequest.getRegId().isEmpty()) { + // [msg] {0} is required input value. + throw new QcastException( + ErrorCode.INVALID_INPUT_VALUE, + message.getMessage("common.message.required.data", "Reg Id")); + } + + if (boardRequest.getRegUserNm() == null || boardRequest.getRegUserNm().isEmpty()) { + // [msg] {0} is required input value. + throw new QcastException( + ErrorCode.INVALID_INPUT_VALUE, + message.getMessage("common.message.required.data", "Reg User Nm")); + } + + String url = null; + String apiUrl = null; +BoardResponse boardResponse = null; + if("QNA".equals(boardRequest.getSchNoticeClsCd())) { + url = QSP_API_URL + "/api/qna/save"; + apiUrl = UriComponentsBuilder.fromHttpUrl(url) + .queryParam("siteTpCd", boardRequest.getSiteTpCd()) + .queryParam("compCd", boardRequest.getCompCd()) + .queryParam("regId", boardRequest.getRegId()) + .queryParam("title", boardRequest.getTitle()) + .queryParam("qnaClsLrgCd", boardRequest.getQnaClsLrgCd() ) + .queryParam("qnaClsMidCd", boardRequest.getQnaClsMidCd()) + .queryParam("qnaClsSmlCd", boardRequest.getQnaClsSmlCd()) + .queryParam("contents", boardRequest.getContents()) + .queryParam("storeId", boardRequest.getStoreId()) + .queryParam("regUserNm", boardRequest.getRegUserNm()) + .queryParam("regUserTelNo", boardRequest.getRegUserTelNo()) + .queryParam("qstMail", boardRequest.getQstMail()) +// .queryParam("files", multipartFileList) + .build() + .toUriString(); + } + + List multipartFileList = new ArrayList<>(); + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; + Map> mapMultipart = multipartRequest.getMultiFileMap(); + + + String strParamKey; + for (String s : mapMultipart.keySet()) { + strParamKey = s; + multipartFileList.addAll(mapMultipart.get(strParamKey)); + } + + + LinkedMultiValueMap map = new LinkedMultiValueMap<>(); + RestTemplate restTemplate = new RestTemplate(); + String responseStr; + HttpStatus httpStatus = HttpStatus.CREATED; + + for (MultipartFile file : multipartFileList) { + if (!file.isEmpty()) { + map.add("file", new MultipartInputStreamFileResource(file.getInputStream(), file.getOriginalFilename())); + } + } + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.MULTIPART_FORM_DATA); + + HttpEntity> requestEntity = new HttpEntity<>(map, headers); + String strResponse = restTemplate.postForObject(apiUrl, requestEntity, String.class); + + //String strResponse = interfaceQsp.callApi(HttpMethod.POST, apiUrl, multipartFileList); + + if (!"".equals(strResponse)) { + + com.fasterxml.jackson.databind.ObjectMapper om = + new com.fasterxml.jackson.databind.ObjectMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + response = om.readValue(strResponse, BoardResponse.class); + } else { + // [msg] No data + throw new QcastException(ErrorCode.NOT_FOUND, message.getMessage("common.message.no.data")); + } + + return response; + } /** * ※ 게시판 파일 다운로드 QSP -> Q.CAST3 * @@ -202,3 +379,23 @@ public class BoardService { } } } + +class MultipartInputStreamFileResource extends InputStreamResource { + + private final String filename; + + MultipartInputStreamFileResource(InputStream inputStream, String filename) { + super(inputStream); + this.filename = filename; + } + + @Override + public String getFilename() { + return this.filename; + } + + @Override + public long contentLength() throws IOException { + return -1; // we do not want to generally read the whole stream into memory ... + } +} \ No newline at end of file diff --git a/src/main/java/com/interplug/qcast/biz/community/dto/BoardRequest.java b/src/main/java/com/interplug/qcast/biz/community/dto/BoardRequest.java index 0834cafb..96beafc1 100644 --- a/src/main/java/com/interplug/qcast/biz/community/dto/BoardRequest.java +++ b/src/main/java/com/interplug/qcast/biz/community/dto/BoardRequest.java @@ -1,7 +1,13 @@ package com.interplug.qcast.biz.community.dto; +import com.interplug.qcast.biz.file.dto.FileRequest; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.servlet.http.HttpServletRequest; import lombok.Getter; import lombok.Setter; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; @Getter @Setter @@ -28,4 +34,37 @@ public class BoardRequest { /** 메인여부 */ private String schMainYn; + //Company Code + private String compCd; + private String storeId; + //Site Type Code + private String siteTpCd; + private String loginId; + + //등록자 아이디 + private String schRegId; + //검색 시작일시 + private String schFromDt; + //검색 끝일시 + private String schToDt; + + private String qnaNo; + + private String langCd; + + private String qnaClsLrgCd; + private String qnaClsMidCd; + private String qnaClsSmlCd; + private String contents; + private String regId; + private String title; + private String regUserNm; + private String regUserTelNo; + private String qstMail; + + + @Schema(description = "첨부파일 목록") + List fileList; + + } From d4f403b817d2c43b39e3bd5419082d299ac9a52f Mon Sep 17 00:00:00 2001 From: yjnoh Date: Fri, 23 May 2025 14:16:56 +0900 Subject: [PATCH 26/29] =?UTF-8?q?=EA=B0=9C=EB=B0=9C=20db=20=EC=A0=91?= =?UTF-8?q?=EC=86=8D=20=EC=A0=95=EB=B3=B4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- .../qcast/config/swagger/SwaggerConfig.java | 43 ++++++++++++++----- .../config/application-dev-interplug.yml | 4 +- src/main/resources/config/application-dev.yml | 10 +++-- .../resources/config/application-local.yml | 5 ++- src/main/resources/config/application-prd.yml | 4 +- src/main/resources/config/application.yml | 1 + 7 files changed, 52 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 417c2004..20072a6c 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,5 @@ build/ .vscode/ ### logs ### -qcast3/ \ No newline at end of file +qcast3/ +src/test diff --git a/src/main/java/com/interplug/qcast/config/swagger/SwaggerConfig.java b/src/main/java/com/interplug/qcast/config/swagger/SwaggerConfig.java index f83f1d0d..f3577fb6 100644 --- a/src/main/java/com/interplug/qcast/config/swagger/SwaggerConfig.java +++ b/src/main/java/com/interplug/qcast/config/swagger/SwaggerConfig.java @@ -4,11 +4,13 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.oas.models.servers.Server; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springdoc.core.customizers.OpenApiCustomizer; import org.springdoc.core.models.GroupedOpenApi; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; @@ -20,30 +22,51 @@ public class SwaggerConfig { @Autowired Environment env; + @Value("${swagger.url}") + private String swaggerUrl; + @Bean public OpenAPI baseApi() { String activeProfile = env.getProperty("spring.profiles.active"); if (log.isDebugEnabled()) { log.debug("Active profile: {}", activeProfile); } + + Server server = new Server(); + server.setUrl(swaggerUrl); + OpenAPI openAPI = new OpenAPI(); - openAPI.info( - new Info().title("QCast API").version("1.0").description("QCast API Documentation")); + openAPI + .info(new Info().title("QCast API").version("1.0").description("QCast API Documentation")) + .addServersItem(server); return openAPI; } @Bean public GroupedOpenApi allApi() { - return GroupedOpenApi.builder().group("ALL").packagesToScan("com.interplug.qcast.biz").addOpenApiCustomizer(openApiCustomizer()).build(); + return GroupedOpenApi.builder() + .group("ALL") + .packagesToScan("com.interplug.qcast.biz") + .addOpenApiCustomizer(openApiCustomizer()) + .build(); } - + @Bean public OpenApiCustomizer openApiCustomizer() { - Parameter lang = new Parameter().name("lang").description("Language").in("header").schema(new StringSchema()); - return openApi -> openApi.getPaths().values().forEach( - pathItem -> pathItem.readOperations().forEach( - operation -> operation.addParametersItem(lang) - ) - ); + Parameter lang = + new Parameter() + .name("lang") + .description("Language") + .in("header") + .schema(new StringSchema()); + return openApi -> + openApi + .getPaths() + .values() + .forEach( + pathItem -> + pathItem + .readOperations() + .forEach(operation -> operation.addParametersItem(lang))); } } diff --git a/src/main/resources/config/application-dev-interplug.yml b/src/main/resources/config/application-dev-interplug.yml index c41ce07e..e0d8d647 100644 --- a/src/main/resources/config/application-dev-interplug.yml +++ b/src/main/resources/config/application-dev-interplug.yml @@ -63,4 +63,6 @@ file: ini.drawing.img.path: https://files.hanasys.jp/Drawing front: - url: http://1.248.227.176:3000 \ No newline at end of file + url: http://1.248.227.176:3000 + +swagger.url: http://localhost:38080 \ No newline at end of file diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index dd94c4fe..03e5bf37 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -6,9 +6,11 @@ server: spring: datasource: driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - jdbc-url: jdbc:log4jdbc:sqlserver://1.248.227.176:1433;databaseName=NEWPVCAD;encrypt=true;trustServerCertificate=true + #jdbc-url: jdbc:log4jdbc:sqlserver://1.248.227.176:1433;databaseName=NEWPVCAD;encrypt=true;trustServerCertificate=true + jdbc-url: jdbc:log4jdbc:sqlserver://192.168.200.220:1433;databaseName=NEWPVCAD;encrypt=false;trustServerCertificate=false username: pvDBuser - password: ENC(W7owprYnvf7vqwO6Piw4dHfVBCSxE4Ck) + #password: ENC(W7owprYnvf7vqwO6Piw4dHfVBCSxE4Ck) + password: ENC(Zc3J45rtPR/uQDeDOcrnF/iGLlU6U3y6) maximum-pool-size: 4 pool-name: Master-HikariPool # datasource: @@ -63,4 +65,6 @@ file: ini.drawing.img.path: https://files.hanasys.jp/Drawing front: - url: http://1.248.227.176:3000 \ No newline at end of file + url: http://1.248.227.176:3000 + +swagger.url: https://dev-api.hanasys.jp \ No newline at end of file diff --git a/src/main/resources/config/application-local.yml b/src/main/resources/config/application-local.yml index b2d1426d..d02ddfdd 100644 --- a/src/main/resources/config/application-local.yml +++ b/src/main/resources/config/application-local.yml @@ -6,9 +6,10 @@ server: spring: datasource: driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - jdbc-url: jdbc:log4jdbc:sqlserver://1.248.227.176:1433;databaseName=NEWPVCAD;encrypt=true;trustServerCertificate=true + #jdbc-url: jdbc:log4jdbc:sqlserver://1.248.227.176:1433;databaseName=NEWPVCAD;encrypt=true;trustServerCertificate=true + jdbc-url: jdbc:log4jdbc:sqlserver://192.168.200.220:1433;databaseName=NEWPVCAD;encrypt=false;trustServerCertificate=false username: pvDBuser - password: ENC(W7owprYnvf7vqwO6Piw4dHfVBCSxE4Ck) + password: ENC(Zc3J45rtPR/uQDeDOcrnF/iGLlU6U3y6) maximum-pool-size: 4 pool-name: Master-HikariPool # datasource: diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index a1e54f6a..745e0678 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -63,4 +63,6 @@ file: ini.drawing.img.path: https://files.hanasys.jp/Drawing front: - url: https://hanasys.jp \ No newline at end of file + url: https://hanasys.jp + +swagger.url: https://api.hanasys.jp \ No newline at end of file diff --git a/src/main/resources/config/application.yml b/src/main/resources/config/application.yml index 4b446025..aa010a73 100644 --- a/src/main/resources/config/application.yml +++ b/src/main/resources/config/application.yml @@ -82,3 +82,4 @@ springdoc: swagger-ui: operations-sorter: alpha +swagger.url: http://localhost:8080 \ No newline at end of file From 79b884c563075190fa0e912363e3a8e2bca20621 Mon Sep 17 00:00:00 2001 From: cha Date: Fri, 23 May 2025 14:48:30 +0900 Subject: [PATCH 27/29] =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/biz/estimate/EstimateService.java | 380 +++++++++--------- 1 file changed, 186 insertions(+), 194 deletions(-) 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 bad195d4..20d63b8a 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -10,7 +10,6 @@ import java.math.BigDecimal; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; -import java.security.cert.X509Certificate; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; @@ -73,7 +72,6 @@ import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; - @Slf4j @Service @RequiredArgsConstructor @@ -115,32 +113,32 @@ public class EstimateService { // Validation if (StringUtils.isEmpty(priceRequest.getSaleStoreId())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Sale Store ID")); + message.getMessage("common.message.required.data", "Sale Store ID")); } if (StringUtils.isEmpty(priceRequest.getSapSalesStoreCd())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Sap Sale Store Code")); + message.getMessage("common.message.required.data", "Sap Sale Store Code")); } if (StringUtils.isEmpty(priceRequest.getDocTpCd())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Estimate Type")); + message.getMessage("common.message.required.data", "Estimate Type")); } EstimateApiResponse response = null; /* [1]. QSP API (url + param) Setting */ String url = QSP_API_URL + "/api/price/storePriceList"; String apiUrl = UriComponentsBuilder.fromHttpUrl(url) - .queryParam("saleStoreId", priceRequest.getSaleStoreId()) - .queryParam("sapSalesStoreCd", priceRequest.getSapSalesStoreCd()) - .queryParam("docTpCd", priceRequest.getDocTpCd()).build().toUriString(); + .queryParam("saleStoreId", priceRequest.getSaleStoreId()) + .queryParam("sapSalesStoreCd", priceRequest.getSapSalesStoreCd()) + .queryParam("docTpCd", priceRequest.getDocTpCd()).build().toUriString(); /* [2]. QSP API CALL -> Response */ String strResponse = interfaceQsp.callApi(HttpMethod.GET, apiUrl, null); if (!"".equals(strResponse)) { com.fasterxml.jackson.databind.ObjectMapper om = - new com.fasterxml.jackson.databind.ObjectMapper() - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + new com.fasterxml.jackson.databind.ObjectMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); response = om.readValue(strResponse, EstimateApiResponse.class); } else { // [msg] No data @@ -161,26 +159,26 @@ public class EstimateService { // Validation if (StringUtils.isEmpty(priceRequest.getSaleStoreId())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Sale Store ID")); + message.getMessage("common.message.required.data", "Sale Store ID")); } if (StringUtils.isEmpty(priceRequest.getSapSalesStoreCd())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Sap Sale Store Code")); + message.getMessage("common.message.required.data", "Sap Sale Store Code")); } if (StringUtils.isEmpty(priceRequest.getPriceCd())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Price Code")); + message.getMessage("common.message.required.data", "Price Code")); } EstimateApiResponse response = null; /* [1]. QSP API CALL -> Response */ String strResponse = interfaceQsp.callApi(HttpMethod.POST, - QSP_API_URL + "/api//price/storePriceItemList", priceRequest); + QSP_API_URL + "/api//price/storePriceItemList", priceRequest); if (!"".equals(strResponse)) { com.fasterxml.jackson.databind.ObjectMapper om = - new com.fasterxml.jackson.databind.ObjectMapper() - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + new com.fasterxml.jackson.databind.ObjectMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); response = om.readValue(strResponse, EstimateApiResponse.class); } else { // [msg] No data @@ -224,11 +222,11 @@ public class EstimateService { // Validation if (StringUtils.isEmpty(objectNo)) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Object No")); + message.getMessage("common.message.required.data", "Object No")); } if (StringUtils.isEmpty(planNo)) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Plan No")); + message.getMessage("common.message.required.data", "Plan No")); } String splitStr = "、"; @@ -251,26 +249,26 @@ public class EstimateService { String orgConstructSpecificationMultis = response.getConstructSpecificationMulti(); if (!StringUtils.isEmpty(orgRoofMaterialIdMultis) - && !StringUtils.isEmpty(orgConstructSpecificationMultis)) { + && !StringUtils.isEmpty(orgConstructSpecificationMultis)) { String[] arrOrgRoofMaterialIdMultis = orgRoofMaterialIdMultis.split(splitStr); String[] arrOrgConstructSpecificationMultis = - orgConstructSpecificationMultis.split(splitStr); + orgConstructSpecificationMultis.split(splitStr); if (arrOrgRoofMaterialIdMultis.length == arrOrgConstructSpecificationMultis.length) { for (int i = 0; i < arrOrgRoofMaterialIdMultis.length; i++) { if (!roofCheckDatas.contains( - arrOrgRoofMaterialIdMultis[i] + "_" + arrOrgConstructSpecificationMultis[i])) { + arrOrgRoofMaterialIdMultis[i] + "_" + arrOrgConstructSpecificationMultis[i])) { roofMaterialIdMultis += - StringUtils.isEmpty(roofMaterialIdMultis) ? arrOrgRoofMaterialIdMultis[i] - : splitStr + arrOrgRoofMaterialIdMultis[i]; + StringUtils.isEmpty(roofMaterialIdMultis) ? arrOrgRoofMaterialIdMultis[i] + : splitStr + arrOrgRoofMaterialIdMultis[i]; constructSpecificationMultis += StringUtils.isEmpty(constructSpecificationMultis) - ? arrOrgConstructSpecificationMultis[i] - : splitStr + arrOrgConstructSpecificationMultis[i]; + ? arrOrgConstructSpecificationMultis[i] + : splitStr + arrOrgConstructSpecificationMultis[i]; } roofCheckDatas += - arrOrgRoofMaterialIdMultis[i] + "_" + arrOrgConstructSpecificationMultis[i]; + arrOrgRoofMaterialIdMultis[i] + "_" + arrOrgConstructSpecificationMultis[i]; } if (!StringUtils.isEmpty(roofMaterialIdMultis)) { @@ -312,19 +310,19 @@ public class EstimateService { // Validation if (StringUtils.isEmpty(estimateRequest.getObjectNo())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Object No")); + message.getMessage("common.message.required.data", "Object No")); } if (StringUtils.isEmpty(estimateRequest.getPlanNo())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Plan No")); + message.getMessage("common.message.required.data", "Plan No")); } if (StringUtils.isEmpty(estimateRequest.getSaleStoreId())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Sale Store ID")); + message.getMessage("common.message.required.data", "Sale Store ID")); } if (StringUtils.isEmpty(estimateRequest.getUserId())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "User ID")); + message.getMessage("common.message.required.data", "User ID")); } String splitStr = "、"; @@ -347,10 +345,10 @@ public class EstimateService { // 물건정보 조회 후 데이터 축출 ObjectResponse objectResponse = - objectMapper.selectObjectDetail(estimateRequest.getObjectNo()); + objectMapper.selectObjectDetail(estimateRequest.getObjectNo()); if (objectResponse != null) { estimateRequest - .setWeatherPoint(objectResponse.getPrefName() + " - " + objectResponse.getAreaName()); + .setWeatherPoint(objectResponse.getPrefName() + " - " + objectResponse.getAreaName()); estimateRequest.setCharger(objectResponse.getReceiveUser()); } @@ -389,7 +387,7 @@ public class EstimateService { if (!StringUtils.isEmpty(roofRequest.getConstructSpecification())) { constructSpecifications += - !StringUtils.isEmpty(constructSpecifications) ? splitStr : ""; + !StringUtils.isEmpty(constructSpecifications) ? splitStr : ""; constructSpecifications += roofRequest.getConstructSpecification(); } @@ -405,7 +403,7 @@ public class EstimateService { if (!StringUtils.isEmpty(roofRequest.getConstructSpecificationMulti())) { constructSpecificationMultis += - !StringUtils.isEmpty(constructSpecificationMultis) ? splitStr : ""; + !StringUtils.isEmpty(constructSpecificationMultis) ? splitStr : ""; constructSpecificationMultis += roofRequest.getConstructSpecificationMulti(); } @@ -466,7 +464,7 @@ public class EstimateService { // 아이템 BOM Header인 경우 컴포넌트 등록 처리 if ("ERLA".equals(itemRequest.getItemCtgGr())) { List itemBomList = - estimateMapper.selectItemMasterBomList(itemRequest.getItemId()); + estimateMapper.selectItemMasterBomList(itemRequest.getItemId()); int k = 1; for (ItemResponse itemResponse : itemBomList) { @@ -481,7 +479,7 @@ public class EstimateService { bomItem.setPnowW(itemResponse.getPnowW()); bomItem.setSpecification(itemResponse.getPnowW()); bomItem.setAmount(String.valueOf(Integer.parseInt(itemResponse.getBomAmount()) - * Integer.parseInt(itemRequest.getAmount()))); + * Integer.parseInt(itemRequest.getAmount()))); bomItem.setBomAmount(itemResponse.getBomAmount()); bomItem.setUnitPrice(itemResponse.getSalePrice()); bomItem.setSalePrice(itemResponse.getSalePrice()); @@ -524,16 +522,16 @@ public class EstimateService { estimateOptions += !StringUtils.isEmpty(estimateOptions) ? splitStr : ""; estimateOptions += "ATTR003"; // 출력제어시간 기본 체크 } else if ("ATTR004".equals(noteResponse.getCode()) - && "1".equals(estimateRequest.getNorthArrangement())) { + && "1".equals(estimateRequest.getNorthArrangement())) { estimateOptions += !StringUtils.isEmpty(estimateOptions) ? splitStr : ""; estimateOptions += "ATTR004"; // 북면설치 체크 } else if ("ATTR005".equals(noteResponse.getCode()) - && "1".equals(objectResponse != null ? objectResponse.getSaltAreaFlg() : "")) { + && "1".equals(objectResponse != null ? objectResponse.getSaltAreaFlg() : "")) { estimateOptions += !StringUtils.isEmpty(estimateOptions) ? splitStr : ""; estimateOptions += "ATTR005"; // 염해지역 체크 } else if ("ATTR006" - .equals(objectResponse != null ? objectResponse.getColdRegionFlg() : "") - && "1".equals(estimateRequest.getNorthArrangement())) { + .equals(objectResponse != null ? objectResponse.getColdRegionFlg() : "") + && "1".equals(estimateRequest.getNorthArrangement())) { estimateOptions += !StringUtils.isEmpty(estimateOptions) ? splitStr : ""; estimateOptions += "ATTR006"; // 적설지역 체크 } else if ("ATTR007".equals(noteResponse.getCode())) { @@ -583,23 +581,23 @@ public class EstimateService { if (!"1".equals(itemRequest.getDelFlg())) { if (StringUtils.isEmpty(itemRequest.getDispOrder())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Display Order")); + message.getMessage("common.message.required.data", "Display Order")); } if (StringUtils.isEmpty(itemRequest.getItemId())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Item ID")); + message.getMessage("common.message.required.data", "Item ID")); } if (StringUtils.isEmpty(itemRequest.getAmount())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Item Amount")); + message.getMessage("common.message.required.data", "Item Amount")); } // 수량 BigDecimal amount = new BigDecimal( - StringUtils.isEmpty(itemRequest.getAmount()) ? "0" : itemRequest.getAmount()); + StringUtils.isEmpty(itemRequest.getAmount()) ? "0" : itemRequest.getAmount()); // 아이템용량 BigDecimal pnowW = new BigDecimal( - StringUtils.isEmpty(itemRequest.getPnowW()) ? "0" : itemRequest.getPnowW()); + StringUtils.isEmpty(itemRequest.getPnowW()) ? "0" : itemRequest.getPnowW()); // 모듈/PC 체크 if ("MODULE_".equals(itemRequest.getItemGroup())) { @@ -619,20 +617,20 @@ public class EstimateService { // 물건정보 수정 if (!StringUtils.isEmpty(estimateRequest.getObjectName()) - || !StringUtils.isEmpty(estimateRequest.getObjectNameOmit())) { + || !StringUtils.isEmpty(estimateRequest.getObjectNameOmit())) { estimateMapper.updateObject(estimateRequest); } if (!StringUtils.isEmpty(estimateRequest.getSurfaceType()) - || !StringUtils.isEmpty(estimateRequest.getSetupHeight()) - || !StringUtils.isEmpty(estimateRequest.getStandardWindSpeedId()) - || !StringUtils.isEmpty(estimateRequest.getSnowfall())) { + || !StringUtils.isEmpty(estimateRequest.getSetupHeight()) + || !StringUtils.isEmpty(estimateRequest.getStandardWindSpeedId()) + || !StringUtils.isEmpty(estimateRequest.getSnowfall())) { estimateMapper.updateObjectInfo(estimateRequest); } // 견적서 정보 수정 estimateRequest.setPriceCd( - !StringUtils.isEmpty(estimateRequest.getPriceCd()) ? estimateRequest.getPriceCd() - : "UNIT_PRICE"); + !StringUtils.isEmpty(estimateRequest.getPriceCd()) ? estimateRequest.getPriceCd() + : "UNIT_PRICE"); estimateMapper.updateEstimate(estimateRequest); estimateMapper.updateEstimateInfo(estimateRequest); @@ -660,9 +658,9 @@ public class EstimateService { boolean overLap = false; for (ItemRequest data : roofItemList) { if (itemRequest.getItemId().equals(data.getItemId()) - && itemRequest.getPcItemId().equals(data.getPcItemId())) { + && itemRequest.getPcItemId().equals(data.getPcItemId())) { data.setAmount(String.valueOf(Integer.parseInt(data.getAmount()) + 1)); // 데이터 존재하면 - // 카운팅 + 1 + // 카운팅 + 1 overLap = true; break; } @@ -687,7 +685,7 @@ public class EstimateService { // 견적서 PCS 아이템 회로 구성 List circuitPcsItemList = - this.getPcsCircuitList(circuitItemList, allModuleList); + this.getPcsCircuitList(circuitItemList, allModuleList); // 견적서 회로구성 아이템 신규 추가 for (ItemRequest circuitItemRequest : circuitPcsItemList) { @@ -706,7 +704,7 @@ public class EstimateService { itemRequest.setObjectNo(estimateRequest.getObjectNo()); itemRequest.setPlanNo(estimateRequest.getPlanNo()); itemRequest.setAmount( - !StringUtils.isEmpty(itemRequest.getAmount()) ? itemRequest.getAmount() : "0"); + !StringUtils.isEmpty(itemRequest.getAmount()) ? itemRequest.getAmount() : "0"); itemRequest.setUserId(estimateRequest.getUserId()); // BOM 컴포넌트는 제외하고 등록 @@ -727,23 +725,23 @@ public class EstimateService { itemRequest.setObjectNo(estimateRequest.getObjectNo()); itemRequest.setPlanNo(estimateRequest.getPlanNo()); itemRequest.setAmount( - !StringUtils.isEmpty(itemRequest.getAmount()) ? itemRequest.getAmount() : "0"); + !StringUtils.isEmpty(itemRequest.getAmount()) ? itemRequest.getAmount() : "0"); itemRequest.setSalePrice( - !StringUtils.isEmpty(itemRequest.getSalePrice()) ? itemRequest.getSalePrice() : "0"); + !StringUtils.isEmpty(itemRequest.getSalePrice()) ? itemRequest.getSalePrice() : "0"); itemRequest.setBomAmount( - !StringUtils.isEmpty(itemRequest.getBomAmount()) ? itemRequest.getBomAmount() : "0"); + !StringUtils.isEmpty(itemRequest.getBomAmount()) ? itemRequest.getBomAmount() : "0"); itemRequest.setPartAdd( - !StringUtils.isEmpty(itemRequest.getPartAdd()) ? itemRequest.getPartAdd() : "0"); + !StringUtils.isEmpty(itemRequest.getPartAdd()) ? itemRequest.getPartAdd() : "0"); itemRequest.setOpenFlg( - !StringUtils.isEmpty(itemRequest.getOpenFlg()) ? itemRequest.getOpenFlg() : "0"); + !StringUtils.isEmpty(itemRequest.getOpenFlg()) ? itemRequest.getOpenFlg() : "0"); itemRequest.setUnitOpenFlg( !StringUtils.isEmpty(itemRequest.getUnitOpenFlg()) ? itemRequest.getUnitOpenFlg() : "0"); itemRequest.setItemChangeFlg( - !StringUtils.isEmpty(itemRequest.getItemChangeFlg()) ? itemRequest.getItemChangeFlg() - : "0"); + !StringUtils.isEmpty(itemRequest.getItemChangeFlg()) ? itemRequest.getItemChangeFlg() + : "0"); itemRequest.setDispCableFlg( - !StringUtils.isEmpty(itemRequest.getDispCableFlg()) ? itemRequest.getDispCableFlg() - : "0"); + !StringUtils.isEmpty(itemRequest.getDispCableFlg()) ? itemRequest.getDispCableFlg() + : "0"); itemRequest.setUserId(estimateRequest.getUserId()); estimateMapper.insertEstimateItemHis(itemRequest); @@ -800,19 +798,19 @@ public class EstimateService { * @throws Exception */ public EstimateResponse insertEstimateCopy(EstimateCopyRequest estimateCopyRequest) - throws Exception { + throws Exception { // Validation if (StringUtils.isEmpty(estimateCopyRequest.getObjectNo())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Object No")); + message.getMessage("common.message.required.data", "Object No")); } if (StringUtils.isEmpty(estimateCopyRequest.getPlanNo())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Plan No")); + message.getMessage("common.message.required.data", "Plan No")); } if (StringUtils.isEmpty(estimateCopyRequest.getUserId())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "User ID")); + message.getMessage("common.message.required.data", "User ID")); } // 응답 객체 @@ -823,7 +821,7 @@ public class EstimateService { ObjectRequest objectRequest = new ObjectRequest(); objectRequest.setSaleStoreId(estimateCopyRequest.getCopySaleStoreId()); objectRequest - .setReceiveUser(StringUtils.defaultString(estimateCopyRequest.getCopyReceiveUser())); + .setReceiveUser(StringUtils.defaultString(estimateCopyRequest.getCopyReceiveUser())); objectRequest.setDelFlg("1"); objectRequest.setOrgDelFlg("0"); objectRequest.setTempFlg("0"); @@ -909,10 +907,10 @@ public class EstimateService { itemRequest.setObjectNo(estimateCopyRequest.getCopyObjectNo()); itemRequest.setPlanNo(estimateCopyRequest.getCopyPlanNo()); itemRequest.setPartAdd( - !StringUtils.isEmpty(itemRequest.getPartAdd()) ? itemRequest.getPartAdd() : "0"); + !StringUtils.isEmpty(itemRequest.getPartAdd()) ? itemRequest.getPartAdd() : "0"); itemRequest.setItemChangeFlg( - !StringUtils.isEmpty(itemRequest.getItemChangeFlg()) ? itemRequest.getItemChangeFlg() - : "0"); + !StringUtils.isEmpty(itemRequest.getItemChangeFlg()) ? itemRequest.getItemChangeFlg() + : "0"); itemRequest.setUserId(estimateCopyRequest.getUserId()); estimateMapper.insertEstimateItem(itemRequest); @@ -959,22 +957,22 @@ public class EstimateService { // Validation if (StringUtils.isEmpty(estimateRequest.getObjectNo())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Object No")); + message.getMessage("common.message.required.data", "Object No")); } if (StringUtils.isEmpty(estimateRequest.getPlanNo())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Plan No")); + message.getMessage("common.message.required.data", "Plan No")); } if (StringUtils.isEmpty(estimateRequest.getUserId())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "User ID")); + message.getMessage("common.message.required.data", "User ID")); } // 견적서 상세 조회 EstimateResponse estimateResponse = estimateMapper.selectEstimateDetail(estimateRequest); if (estimateResponse == null) { throw new QcastException(ErrorCode.NOT_FOUND, - message.getMessage("common.message.required.data", "Estimate Info")); + message.getMessage("common.message.required.data", "Estimate Info")); } // 응답 객체 @@ -989,16 +987,16 @@ public class EstimateService { // 물건정보 조회 후 데이터 축출 ObjectResponse objectResponse = - objectMapper.selectObjectDetail(estimateRequest.getObjectNo()); + objectMapper.selectObjectDetail(estimateRequest.getObjectNo()); if (objectResponse != null) { estimateRequest - .setWeatherPoint(objectResponse.getPrefName() + " - " + objectResponse.getAreaName()); + .setWeatherPoint(objectResponse.getPrefName() + " - " + objectResponse.getAreaName()); estimateRequest.setCharger(objectResponse.getReceiveUser()); } // [2] 도면에서 저장된 아이템 목록 조회 List estimateItemList = - estimateMapper.selectEstimateDrawingItemList(estimateRequest); + estimateMapper.selectEstimateDrawingItemList(estimateRequest); List itemList = new ArrayList(); for (ItemResponse itemResponse : estimateItemList) { ItemRequest itemRequest = new ItemRequest(); @@ -1052,7 +1050,7 @@ public class EstimateService { // 아이템 BOM Header인 경우 컴포넌트 등록 처리 if ("ERLA".equals(itemRequest.getItemCtgGr())) { List itemBomList = - estimateMapper.selectItemMasterBomList(itemRequest.getItemId()); + estimateMapper.selectItemMasterBomList(itemRequest.getItemId()); int k = 1; for (ItemResponse itemResponse : itemBomList) { @@ -1067,7 +1065,7 @@ public class EstimateService { bomItem.setPnowW(itemResponse.getPnowW()); bomItem.setSpecification(itemResponse.getPnowW()); bomItem.setAmount(String.valueOf(Integer.parseInt(itemResponse.getBomAmount()) - * Integer.parseInt(itemRequest.getAmount()))); + * Integer.parseInt(itemRequest.getAmount()))); bomItem.setBomAmount(itemResponse.getBomAmount()); bomItem.setUnitPrice(itemResponse.getSalePrice()); bomItem.setSalePrice(itemResponse.getSalePrice()); @@ -1110,15 +1108,15 @@ public class EstimateService { estimateOptions += !StringUtils.isEmpty(estimateOptions) ? splitStr : ""; estimateOptions += "ATTR003"; // 출력제어시간 기본 체크 } else if ("ATTR004".equals(noteResponse.getCode()) - && "1".equals(estimateRequest.getNorthArrangement())) { + && "1".equals(estimateRequest.getNorthArrangement())) { estimateOptions += !StringUtils.isEmpty(estimateOptions) ? splitStr : ""; estimateOptions += "ATTR004"; // 북면설치 체크 } else if ("ATTR005".equals(noteResponse.getCode()) - && "1".equals(objectResponse != null ? objectResponse.getSaltAreaFlg() : "")) { + && "1".equals(objectResponse != null ? objectResponse.getSaltAreaFlg() : "")) { estimateOptions += !StringUtils.isEmpty(estimateOptions) ? splitStr : ""; estimateOptions += "ATTR005"; // 염해지역 체크 } else if ("ATTR006".equals(objectResponse != null ? objectResponse.getColdRegionFlg() : "") - && "1".equals(estimateRequest.getNorthArrangement())) { + && "1".equals(estimateRequest.getNorthArrangement())) { estimateOptions += !StringUtils.isEmpty(estimateOptions) ? splitStr : ""; estimateOptions += "ATTR006"; // 적설지역 체크 } else if ("ATTR007".equals(noteResponse.getCode())) { @@ -1166,23 +1164,23 @@ public class EstimateService { for (ItemRequest itemRequest : itemList) { if (StringUtils.isEmpty(itemRequest.getDispOrder())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Display Order")); + message.getMessage("common.message.required.data", "Display Order")); } if (StringUtils.isEmpty(itemRequest.getItemId())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Item ID")); + message.getMessage("common.message.required.data", "Item ID")); } if (StringUtils.isEmpty(itemRequest.getAmount())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Item Amount")); + message.getMessage("common.message.required.data", "Item Amount")); } // 수량 BigDecimal amount = new BigDecimal( - StringUtils.isEmpty(itemRequest.getAmount()) ? "0" : itemRequest.getAmount()); + StringUtils.isEmpty(itemRequest.getAmount()) ? "0" : itemRequest.getAmount()); // 아이템용량 BigDecimal pnowW = new BigDecimal( - StringUtils.isEmpty(itemRequest.getPnowW()) ? "0" : itemRequest.getPnowW()); + StringUtils.isEmpty(itemRequest.getPnowW()) ? "0" : itemRequest.getPnowW()); // 모듈/PC 체크 if ("MODULE_".equals(itemRequest.getItemGroup())) { @@ -1213,20 +1211,20 @@ public class EstimateService { itemRequest.setObjectNo(estimateRequest.getObjectNo()); itemRequest.setPlanNo(estimateRequest.getPlanNo()); itemRequest.setAmount( - !StringUtils.isEmpty(itemRequest.getAmount()) ? itemRequest.getAmount() : "0"); + !StringUtils.isEmpty(itemRequest.getAmount()) ? itemRequest.getAmount() : "0"); itemRequest.setSalePrice( - !StringUtils.isEmpty(itemRequest.getSalePrice()) ? itemRequest.getSalePrice() : "0"); + !StringUtils.isEmpty(itemRequest.getSalePrice()) ? itemRequest.getSalePrice() : "0"); itemRequest.setBomAmount( - !StringUtils.isEmpty(itemRequest.getBomAmount()) ? itemRequest.getBomAmount() : "0"); + !StringUtils.isEmpty(itemRequest.getBomAmount()) ? itemRequest.getBomAmount() : "0"); itemRequest.setPartAdd( - !StringUtils.isEmpty(itemRequest.getPartAdd()) ? itemRequest.getPartAdd() : "0"); + !StringUtils.isEmpty(itemRequest.getPartAdd()) ? itemRequest.getPartAdd() : "0"); itemRequest.setOpenFlg( - !StringUtils.isEmpty(itemRequest.getOpenFlg()) ? itemRequest.getOpenFlg() : "0"); + !StringUtils.isEmpty(itemRequest.getOpenFlg()) ? itemRequest.getOpenFlg() : "0"); itemRequest.setUnitOpenFlg( !StringUtils.isEmpty(itemRequest.getUnitOpenFlg()) ? itemRequest.getUnitOpenFlg() : "0"); itemRequest.setItemChangeFlg( - !StringUtils.isEmpty(itemRequest.getItemChangeFlg()) ? itemRequest.getItemChangeFlg() - : "0"); + !StringUtils.isEmpty(itemRequest.getItemChangeFlg()) ? itemRequest.getItemChangeFlg() + : "0"); itemRequest.setUserId(estimateRequest.getUserId()); estimateMapper.insertEstimateItemHis(itemRequest); @@ -1273,19 +1271,19 @@ public class EstimateService { // Validation if (StringUtils.isEmpty(estimateRequest.getObjectNo())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Object No")); + message.getMessage("common.message.required.data", "Object No")); } if (StringUtils.isEmpty(estimateRequest.getPlanNo())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Plan No")); + message.getMessage("common.message.required.data", "Plan No")); } if (StringUtils.isEmpty(estimateRequest.getLockFlg())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Lock Flag")); + message.getMessage("common.message.required.data", "Lock Flag")); } if (StringUtils.isEmpty(estimateRequest.getUserId())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "User ID")); + message.getMessage("common.message.required.data", "User ID")); } try { @@ -1305,7 +1303,7 @@ public class EstimateService { * @throws Exception */ public void excelDownload(HttpServletRequest request, HttpServletResponse response, - EstimateRequest estimateRequest) throws Exception { + EstimateRequest estimateRequest) throws Exception { EstimateResponse estimateResponse = new EstimateResponse(); String splitStr = "、"; @@ -1313,11 +1311,11 @@ public class EstimateService { // Validation if (StringUtils.isEmpty(estimateRequest.getObjectNo())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Object No")); + message.getMessage("common.message.required.data", "Object No")); } if (StringUtils.isEmpty(estimateRequest.getPlanNo())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Plan No")); + message.getMessage("common.message.required.data", "Plan No")); } try { @@ -1327,7 +1325,7 @@ public class EstimateService { // file Name 명이 없는경우 if (estimateRequest.getFileName() == null || "".equals(estimateRequest.getFileName())) { estimateRequest.setFileName(estimateResponse.getObjectNo() + "_" - + new SimpleDateFormat("yyyyMMdd").format(new Date())); + + new SimpleDateFormat("yyyyMMdd").format(new Date())); } if ("1".equals(estimateRequest.getSchDisplayFlg())) { @@ -1346,7 +1344,7 @@ public class EstimateService { List noteList = new ArrayList(); if (!StringUtils.isEmpty(estimateResponse.getEstimateOption())) { String[] arrSpnAttrCd = - new String[estimateResponse.getEstimateOption().split(splitStr).length]; + new String[estimateResponse.getEstimateOption().split(splitStr).length]; int i = 0; for (String str : estimateResponse.getEstimateOption().split(splitStr)) { arrSpnAttrCd[i++] = str; @@ -1363,7 +1361,7 @@ public class EstimateService { RoofInfoResponse roofInfoResponse = new RoofInfoResponse(); List roofList = estimateMapper.selectEstimateRoofList(estimateRequest); List circuitItemList = - estimateMapper.selectEstimateCircuitItemList(estimateRequest); + estimateMapper.selectEstimateCircuitItemList(estimateRequest); estimateRequest.setSchItemGroup("MODULE_"); List roofVolList = estimateMapper.selectEstimateRoofVolList(estimateRequest); @@ -1371,9 +1369,9 @@ public class EstimateService { BigDecimal moduleTotVolKw = BigDecimal.ZERO; for (RoofResponse roofVol : roofVolList) { BigDecimal amount = - new BigDecimal(StringUtils.isEmpty(roofVol.getAmount()) ? "0" : roofVol.getAmount()); + new BigDecimal(StringUtils.isEmpty(roofVol.getAmount()) ? "0" : roofVol.getAmount()); BigDecimal vol = - new BigDecimal(StringUtils.isEmpty(roofVol.getVolKw()) ? "0" : roofVol.getVolKw()); + new BigDecimal(StringUtils.isEmpty(roofVol.getVolKw()) ? "0" : roofVol.getVolKw()); String classTypeName = ""; if ("0".equals(roofVol.getClassType())) { @@ -1403,7 +1401,7 @@ public class EstimateService { // 총 합산금액 계산 this.selectTotalPriceInfo(estimateResponse, estimateItemList, - estimateRequest.getSchUnitPriceFlg()); + estimateRequest.getSchUnitPriceFlg()); int j = 1; for (ItemResponse itemResponse : estimateItemList) { @@ -1411,14 +1409,14 @@ public class EstimateService { // 문자열 통화로 변환 처리 itemResponse.setSalePrice( - String.format("%1$,.0f", Double.parseDouble(itemResponse.getSalePrice()))); + String.format("%1$,.0f", Double.parseDouble(itemResponse.getSalePrice()))); itemResponse - .setAmount(String.format("%1$,.0f", Double.parseDouble(itemResponse.getAmount()))); + .setAmount(String.format("%1$,.0f", Double.parseDouble(itemResponse.getAmount()))); itemResponse.setSaleTotPrice( - String.format("%1$,.0f", Double.parseDouble(itemResponse.getSaleTotPrice()))); + String.format("%1$,.0f", Double.parseDouble(itemResponse.getSaleTotPrice()))); if ("YJSS".equals(estimateResponse.getEstimateType()) - && (!StringUtils.isEmpty(itemResponse.getPaDispOrder()) + && (!StringUtils.isEmpty(itemResponse.getPaDispOrder()) || !"1".equals(itemResponse.getPkgMaterialFlg()))) { itemResponse.setSalePrice(""); itemResponse.setSaleTotPrice(""); @@ -1442,21 +1440,21 @@ public class EstimateService { // 합산 문자열 통화로 변환 처리 estimateResponse.setPkgYn("YJSS".equals(estimateResponse.getEstimateType()) ? "Y" : "N"); estimateResponse - .setPkgNo("YJSS".equals(estimateResponse.getEstimateType()) ? String.valueOf(j++) : ""); + .setPkgNo("YJSS".equals(estimateResponse.getEstimateType()) ? String.valueOf(j++) : ""); if ("YJSS".equals(estimateResponse.getEstimateType())) { estimateResponse - .setPkgAsp(String.format("%1$,.0f", Double.parseDouble(estimateResponse.getPkgAsp()))); + .setPkgAsp(String.format("%1$,.0f", Double.parseDouble(estimateResponse.getPkgAsp()))); } estimateResponse - .setTotVol(String.format("%1$,.0f", Double.parseDouble(estimateResponse.getTotVol()))); + .setTotVol(String.format("%1$,.0f", Double.parseDouble(estimateResponse.getTotVol()))); estimateResponse.setPkgTotPrice( - String.format("%1$,.0f", Double.parseDouble(estimateResponse.getPkgTotPrice()))); + String.format("%1$,.0f", Double.parseDouble(estimateResponse.getPkgTotPrice()))); estimateResponse.setSupplyPrice( - String.format("%1$,.0f", Double.parseDouble(estimateResponse.getSupplyPrice()))); + String.format("%1$,.0f", Double.parseDouble(estimateResponse.getSupplyPrice()))); estimateResponse.setVatPrice( - String.format("%1$,.0f", Double.parseDouble(estimateResponse.getVatPrice()))); + String.format("%1$,.0f", Double.parseDouble(estimateResponse.getVatPrice()))); estimateResponse.setTotPrice( - String.format("%1$,.0f", Double.parseDouble(estimateResponse.getTotPrice()))); + String.format("%1$,.0f", Double.parseDouble(estimateResponse.getTotPrice()))); // 발전시뮬레이션 계산 PwrGnrSimRequest pwrGnrSimRequest = new PwrGnrSimRequest(); @@ -1464,7 +1462,7 @@ public class EstimateService { pwrGnrSimRequest.setPlanNo(estimateResponse.getPlanNo()); PwrGnrSimResponse pwrGnrSimResponse = - pwrGnrSimService.selectPwrGnrSimulation(pwrGnrSimRequest); + pwrGnrSimService.selectPwrGnrSimulation(pwrGnrSimRequest); pwrGnrSimResponse.setPwrGnrSimType(estimateRequest.getPwrGnrSimType()); // 발전시뮬레이션 타입에 따른 list 셋팅 @@ -1479,15 +1477,15 @@ public class EstimateService { } pwrGnrSimResponse.setIntFrcPwrGnrList( - Arrays.stream(pwrGnrSimResponse.getFrcPwrGnrList()).map(s -> s.replace(",", "")) // , 제거 - .mapToInt(Integer::parseInt) // 문자열을 int로 변환 - .toArray()); + Arrays.stream(pwrGnrSimResponse.getFrcPwrGnrList()).map(s -> s.replace(",", "")) // , 제거 + .mapToInt(Integer::parseInt) // 문자열을 int로 변환 + .toArray()); if (pwrGnrSimResponse != null) { try { // 발전시뮬레이션 안내사항 조회 PwrGnrSimGuideResponse pwrGnrSimGuideInfo = - pwrGnrSimService.selectPwrGnrSimulationGuideInfo(); + pwrGnrSimService.selectPwrGnrSimulationGuideInfo(); if (pwrGnrSimGuideInfo != null) { pwrGnrSimResponse.setGuideInfo(pwrGnrSimGuideInfo.getData()); } @@ -1497,18 +1495,12 @@ public class EstimateService { estimateResponse.setPwrGnrSim(pwrGnrSimResponse); - // 도면 이미지 셋팅 String baseDrawingImgName = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo(); URL url = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png"); URLConnection con = url.openConnection(); - HttpURLConnection exitCode = (HttpURLConnection) con; - - System.err.println("exitCode: " + exitCode); - System.err.println("Exit code: " + exitCode.getResponseCode()); - - + HttpURLConnection exitCode = (HttpURLConnection)con; if (exitCode.getResponseCode() == 200) { InputStream imageInputStream = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png").openStream(); @@ -1525,7 +1517,7 @@ public class EstimateService { String baseDrawingImgName2 = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo(); URL url2 = new URL(drawingDirPath + File.separator + baseDrawingImgName2 + "_2.png"); URLConnection con2 = url2.openConnection(); - HttpURLConnection exitCode2 = (HttpURLConnection) con2; + HttpURLConnection exitCode2 = (HttpURLConnection)con2; if (exitCode2.getResponseCode() == 200) { InputStream imageInputStream2 = new URL(drawingDirPath + File.separator + baseDrawingImgName2 + "_2.png").openStream(); @@ -1594,8 +1586,8 @@ public class EstimateService { ExcelUtil excelUtil = new ExcelUtil(); byte[] excelBytes = - excelUtil.download(request, response, excelUtil.convertVoToMap(estimateResponse), - excelUtil.convertListToMap(estimateItemList), excelTemplateNam); + excelUtil.download(request, response, excelUtil.convertVoToMap(estimateResponse), + excelUtil.convertListToMap(estimateItemList), excelTemplateNam); InputStream in = new ByteArrayInputStream(excelBytes); workbook = WorkbookFactory.create(in); // JXLS POI 엑셀로 재변환 @@ -1627,7 +1619,7 @@ public class EstimateService { excelBytes = byteArrayOutputStream.toByteArray(); response.setHeader("Content-Disposition", - "attachment; filename=\"" + estimateRequest.getFileName() + ".xlsx\""); + "attachment; filename=\"" + estimateRequest.getFileName() + ".xlsx\""); response.addHeader("Access-Control-Expose-Headers", "Content-Disposition"); response.getOutputStream().write(excelBytes); } @@ -1647,7 +1639,7 @@ public class EstimateService { * @throws Exception */ public void selectTotalPriceInfo(EstimateResponse estimateResponse, List itemList, - String unitPriceFlg) throws Exception { + String unitPriceFlg) throws Exception { BigDecimal totAmount = BigDecimal.ZERO; BigDecimal totVol = BigDecimal.ZERO; BigDecimal pkgTotPrice = BigDecimal.ZERO; @@ -1659,26 +1651,26 @@ public class EstimateService { // 주택패키지 단가 BigDecimal pkgAsp = new BigDecimal( - StringUtils.isEmpty(estimateResponse.getPkgAsp()) ? "0" : estimateResponse.getPkgAsp()); + StringUtils.isEmpty(estimateResponse.getPkgAsp()) ? "0" : estimateResponse.getPkgAsp()); for (ItemResponse itemResponse : itemList) { // 수량 BigDecimal amount = new BigDecimal( - StringUtils.isEmpty(itemResponse.getAmount()) ? "0" : itemResponse.getAmount()); + StringUtils.isEmpty(itemResponse.getAmount()) ? "0" : itemResponse.getAmount()); // 판매가 BigDecimal salePrice = BigDecimal.ZERO; if ("1".equals(unitPriceFlg)) { salePrice = new BigDecimal( - StringUtils.isEmpty(itemResponse.getUnitPrice()) ? "0" : itemResponse.getUnitPrice()); + StringUtils.isEmpty(itemResponse.getUnitPrice()) ? "0" : itemResponse.getUnitPrice()); itemResponse.setSalePrice(String.valueOf(salePrice)); } else { salePrice = new BigDecimal( - StringUtils.isEmpty(itemResponse.getSalePrice()) ? "0" : itemResponse.getSalePrice()); + StringUtils.isEmpty(itemResponse.getSalePrice()) ? "0" : itemResponse.getSalePrice()); } // 아이템용량 BigDecimal pnowW = new BigDecimal( - StringUtils.isEmpty(itemResponse.getPnowW()) ? "0" : itemResponse.getPnowW()); + StringUtils.isEmpty(itemResponse.getPnowW()) ? "0" : itemResponse.getPnowW()); // 아이템 단가 합산 itemResponse.setSaleTotPrice(String.valueOf(salePrice.multiply(amount))); @@ -1723,9 +1715,9 @@ public class EstimateService { estimateResponse.setTotAmount(String.valueOf(totAmount.setScale(0, BigDecimal.ROUND_HALF_UP))); estimateResponse.setTotVol(String.valueOf(totVol)); estimateResponse.setTotVolKw(String - .valueOf(totVol.multiply(new BigDecimal("0.001")).setScale(3, BigDecimal.ROUND_FLOOR))); + .valueOf(totVol.multiply(new BigDecimal("0.001")).setScale(3, BigDecimal.ROUND_FLOOR))); estimateResponse - .setSupplyPrice(String.valueOf(supplyPrice.setScale(0, BigDecimal.ROUND_HALF_UP))); + .setSupplyPrice(String.valueOf(supplyPrice.setScale(0, BigDecimal.ROUND_HALF_UP))); estimateResponse.setVatPrice(String.valueOf(vatPrice.setScale(0, BigDecimal.ROUND_HALF_UP))); estimateResponse.setTotPrice(String.valueOf(totPrice.setScale(0, BigDecimal.ROUND_HALF_UP))); } @@ -1738,7 +1730,7 @@ public class EstimateService { * @throws Exception */ public List sendEstimateApi(EstimateRequest estimateRequest) - throws Exception { + throws Exception { EstimateSendRequest estimateSendRequest = new EstimateSendRequest(); List quoteList = new ArrayList(); String docNo = ""; @@ -1746,24 +1738,24 @@ public class EstimateService { try { // 견적서 상세 조회 EstimateSendResponse estimateSendResponse = - estimateMapper.selectEstimateApiDetail(estimateRequest); + estimateMapper.selectEstimateApiDetail(estimateRequest); if (estimateSendResponse == null) { throw new QcastException(ErrorCode.NOT_FOUND, message.getMessage("common.message.no.data")); } else { String constructSpecification = - estimateMapper.selectEstimateConstructSpecification(estimateRequest); + estimateMapper.selectEstimateConstructSpecification(estimateRequest); estimateSendResponse.setSaveType("3"); estimateSendResponse.setSyncFlg("0"); estimateSendResponse.setConstructSpecification( - !StringUtils.isEmpty(constructSpecification) ? constructSpecification : ""); + !StringUtils.isEmpty(constructSpecification) ? constructSpecification : ""); estimateSendResponse.setDelFlg("1".equals(estimateSendResponse.getDelFlg()) ? "Y" : "N"); // 아이템 목록 조회 estimateRequest.setSchBomNotExist("1"); List estimateItemList = - estimateMapper.selectEstimateItemList(estimateRequest); + estimateMapper.selectEstimateItemList(estimateRequest); estimateSendResponse.setItemList(estimateItemList); // 첨부파일 목록 조회 @@ -1784,24 +1776,24 @@ public class EstimateService { EstimateApiResponse response = null; /* [1]. QSP API CALL -> Response */ String strResponse = interfaceQsp.callApi(HttpMethod.POST, - QSP_API_URL + "/api/order/qcastQuotationSave", estimateSendRequest); + QSP_API_URL + "/api/order/qcastQuotationSave", estimateSendRequest); if (!"".equals(strResponse)) { com.fasterxml.jackson.databind.ObjectMapper om = - new com.fasterxml.jackson.databind.ObjectMapper() - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + new com.fasterxml.jackson.databind.ObjectMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); response = om.readValue(strResponse, EstimateApiResponse.class); Map result = (Map) response.getData(); if (result != null) { List> succList = - (List>) result.get("successList"); + (List>) result.get("successList"); for (Map succ : succList) { if (succ != null) { for (EstimateSendResponse data : quoteList) { if (data.getObjectNo().equals(succ.get("objectNo")) - && data.getPlanNo().equals(succ.get("planNo"))) { + && data.getPlanNo().equals(succ.get("planNo"))) { data.setSyncFlg(String.valueOf(succ.get("syncFlg"))); data.setDocNo(String.valueOf(succ.get("docNo"))); } @@ -1830,7 +1822,7 @@ public class EstimateService { * @throws QcastException */ public Document estimatePdfHtml(Document doc, EstimateResponse data, List list) - throws IOException, QcastException { + throws IOException, QcastException { Element elm; @@ -1852,7 +1844,7 @@ public class EstimateService { elm = doc.getElementById("objectNo1"); elm.text(StringUtils.defaultString(data.getObjectNo()) + " / " - + StringUtils.defaultString(data.getPlanNo())); + + StringUtils.defaultString(data.getPlanNo())); /* * elm = doc.getElementById("planNo"); elm.text(StringUtils.defaultString(data.getPlanNo())); @@ -1889,19 +1881,19 @@ public class EstimateService { for (ItemResponse itemResponse : list) { sb.append(""); sb.append( - "" + StringUtils.defaultString(itemResponse.getNo()) + ""); + "" + StringUtils.defaultString(itemResponse.getNo()) + ""); sb.append("" - + StringUtils.defaultString(itemResponse.getItemName()) + ""); + + StringUtils.defaultString(itemResponse.getItemName()) + ""); sb.append("" + StringUtils.defaultString(itemResponse.getItemNo()) - + ""); + + ""); sb.append("" - + StringUtils.defaultString(itemResponse.getSalePrice()) + ""); + + StringUtils.defaultString(itemResponse.getSalePrice()) + ""); sb.append("" - + StringUtils.defaultString(itemResponse.getAmount()) + ""); + + StringUtils.defaultString(itemResponse.getAmount()) + ""); sb.append( - "" + StringUtils.defaultString(itemResponse.getUnit()) + ""); + "" + StringUtils.defaultString(itemResponse.getUnit()) + ""); sb.append("" - + StringUtils.defaultString(itemResponse.getSaleTotPrice()) + ""); + + StringUtils.defaultString(itemResponse.getSaleTotPrice()) + ""); sb.append(""); } if ("Y".equals(data.getPkgYn())) { @@ -1910,12 +1902,12 @@ public class EstimateService { sb.append("住宅 PKG"); sb.append("-"); sb.append("" - + StringUtils.defaultString(data.getPkgAsp()) + ""); + + StringUtils.defaultString(data.getPkgAsp()) + ""); sb.append("" - + StringUtils.defaultString(data.getTotVol()) + ""); + + StringUtils.defaultString(data.getTotVol()) + ""); sb.append("W"); sb.append("" - + StringUtils.defaultString(data.getPkgTotPrice()) + ""); + + StringUtils.defaultString(data.getPkgTotPrice()) + ""); sb.append(""); } elm = doc.getElementById("itemList_detail"); @@ -1944,9 +1936,9 @@ public class EstimateService { for (NoteResponse noteResponse : data.getNoteList()) { sb.append(""); sb.append("" - + StringUtils.defaultString(noteResponse.getCodeNm()) + ""); + + StringUtils.defaultString(noteResponse.getCodeNm()) + ""); sb.append("" + StringUtils - .defaultString(noteResponse.getRemarks()).replaceAll("\r\n|\r|\n", "
") + ""); + .defaultString(noteResponse.getRemarks()).replaceAll("\r\n|\r|\n", "
") + ""); sb.append(""); } elm = doc.getElementById("noteList_detail"); @@ -1956,7 +1948,7 @@ public class EstimateService { // 도면 설정 elm = doc.getElementById("objectNo4"); elm.text(StringUtils.defaultString(data.getObjectNo()) + " (Plan No : " - + StringUtils.defaultString(data.getPlanNo()) + ")"); + + StringUtils.defaultString(data.getPlanNo()) + ")"); elm = doc.getElementById("objectName"); elm.text(StringUtils.defaultString(data.getObjectName())); @@ -1996,9 +1988,9 @@ public class EstimateService { sb.append(""); sb.append("" + (no++) + ""); sb.append("" - + StringUtils.defaultString(itemResponse.getItemNo()) + ""); + + StringUtils.defaultString(itemResponse.getItemNo()) + ""); sb.append("" - + StringUtils.defaultString(itemResponse.getAmount()) + ""); + + StringUtils.defaultString(itemResponse.getAmount()) + ""); sb.append(""); } } @@ -2012,8 +2004,8 @@ public class EstimateService { sb.append(""); sb.append("" + (no++) + ""); sb.append( - "" + StringUtils.defaultString(itemResponse.getItemNo()) - + " [" + itemResponse.getCircuitCfg() + "]" + ""); + "" + StringUtils.defaultString(itemResponse.getItemNo()) + + " [" + itemResponse.getCircuitCfg() + "]" + ""); sb.append(""); } elm = doc.getElementById("pcsItemList_detail"); @@ -2028,7 +2020,7 @@ public class EstimateService { sb.append("" + StringUtils.defaultString(roofResponse.getClassTypeName()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getAmount()) + ""); sb.append("" - + StringUtils.defaultString(roofResponse.getVolKw()) + ""); + + StringUtils.defaultString(roofResponse.getVolKw()) + ""); sb.append(""); } elm = doc.getElementById("surFaceList_detail"); @@ -2047,12 +2039,12 @@ public class EstimateService { sb.append(""); sb.append("" + StringUtils.defaultString(roofResponse.getRoofSurface()) + ""); sb.append("" - + StringUtils.defaultString(roofResponse.getRoofMaterialName()) + ""); + + StringUtils.defaultString(roofResponse.getRoofMaterialName()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getSlope()) + "寸"); sb.append("" + StringUtils.defaultString(roofResponse.getConstructSpecificationName()) - + ""); + + ""); sb.append("" - + StringUtils.defaultString(roofResponse.getSupportMethodName()) + ""); + + StringUtils.defaultString(roofResponse.getSupportMethodName()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getSurfaceType()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getSetupHeight()) + ""); sb.append(""); @@ -2063,7 +2055,7 @@ public class EstimateService { elm = doc.getElementById("objectNo5"); elm.text(StringUtils.defaultString(data.getObjectNo()) + " (Plan No : " - + StringUtils.defaultString(data.getPlanNo()) + ")"); + + StringUtils.defaultString(data.getPlanNo()) + ")"); elm = doc.getElementById("objectName5"); elm.text(StringUtils.defaultString(data.getObjectName())); @@ -2103,9 +2095,9 @@ public class EstimateService { sb.append(""); sb.append("" + (no++) + ""); sb.append("" - + StringUtils.defaultString(itemResponse.getItemNo()) + ""); + + StringUtils.defaultString(itemResponse.getItemNo()) + ""); sb.append("" - + StringUtils.defaultString(itemResponse.getAmount()) + ""); + + StringUtils.defaultString(itemResponse.getAmount()) + ""); sb.append(""); } } @@ -2118,12 +2110,12 @@ public class EstimateService { sb.append(""); sb.append("" + StringUtils.defaultString(roofResponse.getRoofSurface()) + ""); sb.append("" - + StringUtils.defaultString(roofResponse.getRoofMaterialName()) + ""); + + StringUtils.defaultString(roofResponse.getRoofMaterialName()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getSlope()) + "寸"); sb.append("" + StringUtils.defaultString(roofResponse.getConstructSpecificationName()) - + ""); + + ""); sb.append("" - + StringUtils.defaultString(roofResponse.getSupportMethodName()) + ""); + + StringUtils.defaultString(roofResponse.getSupportMethodName()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getSurfaceType()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getSetupHeight()) + ""); sb.append(""); @@ -2164,7 +2156,7 @@ public class EstimateService { // 견적서 동기화 실패 목록 조회 List estimateSendListResponse = - estimateMapper.selectEstimateApiFailList(); + estimateMapper.selectEstimateApiFailList(); for (EstimateSendResponse estimateSendResponse : estimateSendListResponse) { EstimateRequest estimateRequest = new EstimateRequest(); @@ -2172,12 +2164,12 @@ public class EstimateService { estimateRequest.setPlanNo(estimateSendResponse.getPlanNo()); String constructSpecification = - estimateMapper.selectEstimateConstructSpecification(estimateRequest); + estimateMapper.selectEstimateConstructSpecification(estimateRequest); estimateSendResponse.setSaveType("3"); estimateSendResponse.setSyncFlg("0"); estimateSendResponse.setConstructSpecification( - !StringUtils.isEmpty(constructSpecification) ? constructSpecification : ""); + !StringUtils.isEmpty(constructSpecification) ? constructSpecification : ""); estimateSendResponse.setDelFlg("1".equals(estimateSendResponse.getDelFlg()) ? "Y" : "N"); // 아이템 목록 조회 @@ -2232,13 +2224,13 @@ public class EstimateService { * @return */ private List getPcsCircuitList(List pcsItemList, - List moduleList) { + List moduleList) { if (pcsItemList != null && pcsItemList.size() > 0) { for (ItemRequest itemRequest : moduleList) { itemRequest - .setCircuit(itemRequest.getCircuit().replaceAll("\\(", "").replaceAll("\\)", "")); + .setCircuit(itemRequest.getCircuit().replaceAll("\\(", "").replaceAll("\\)", "")); } if (pcsItemList.size() == 1) { @@ -2250,8 +2242,8 @@ public class EstimateService { String val = String.valueOf(j); List resultList = moduleList.stream() - .filter(t -> StringUtils.equals(val, t.getCircuit().split("-")[0])) - .collect(Collectors.toList()); + .filter(t -> StringUtils.equals(val, t.getCircuit().split("-")[0])) + .collect(Collectors.toList()); data.setCircuitCfg(this.getPcsCircuitCtg(resultList)); j++; } @@ -2307,7 +2299,7 @@ public class EstimateService { if (StringUtils.isEmpty(priceRequest.getSapSalesStoreCd())) { throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, - message.getMessage("common.message.required.data", "Sap Sale Store Code")); + message.getMessage("common.message.required.data", "Sap Sale Store Code")); } @@ -2315,15 +2307,15 @@ public class EstimateService { /* [1]. QSP API (url + param) Setting */ String url = QSP_API_URL + "/api/master/agencyCustList"; String apiUrl = UriComponentsBuilder.fromHttpUrl(url) - .queryParam("sapSalesStoreCd", priceRequest.getSapSalesStoreCd()).build().toUriString(); + .queryParam("sapSalesStoreCd", priceRequest.getSapSalesStoreCd()).build().toUriString(); /* [2]. QSP API CALL -> Response */ String strResponse = interfaceQsp.callApi(HttpMethod.GET, apiUrl, null); if (!"".equals(strResponse)) { com.fasterxml.jackson.databind.ObjectMapper om = - new com.fasterxml.jackson.databind.ObjectMapper() - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + new com.fasterxml.jackson.databind.ObjectMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); response = om.readValue(strResponse, EstimateApiResponse.class); } else { // [msg] No data From 703256cbf8bbe97bf55825fb33ace0847ea3fe47 Mon Sep 17 00:00:00 2001 From: cha Date: Mon, 26 May 2025 15:37:33 +0900 Subject: [PATCH 28/29] mssql formate => cast --- src/main/resources/mappers/estimate/estimateMapper.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/resources/mappers/estimate/estimateMapper.xml b/src/main/resources/mappers/estimate/estimateMapper.xml index 915915c3..1ac641cb 100644 --- a/src/main/resources/mappers/estimate/estimateMapper.xml +++ b/src/main/resources/mappers/estimate/estimateMapper.xml @@ -362,7 +362,12 @@