From 091b2545aa7391f8067908e240fbf3ae8c78d240 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Mon, 15 Apr 2024 16:04:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=86=8C=EB=82=98=ED=81=90=EB=B8=8C=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pdf/extraction/PDFExtractionUtil.java | 4 +- .../receive/eqpmnt/AttachedTxtParser.java | 1 + .../crdn/receive/eqpmnt/LayoutParser.java | 62 +++++++++---------- .../crdn/receive/eqpmnt/OnlyImageParser.java | 1 + .../crdn/receive/eqpmnt/SingleFileParser.java | 1 + .../fims/nxrp/service/bean/NisIndivBean.java | 5 +- 6 files changed, 40 insertions(+), 34 deletions(-) diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/PDFExtractionUtil.java b/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/PDFExtractionUtil.java index e0b42e7f..652f7ab0 100644 --- a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/PDFExtractionUtil.java +++ b/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/PDFExtractionUtil.java @@ -24,7 +24,7 @@ public class PDFExtractionUtil { try { file = new File(pdfPath); } catch (Exception e2) { - e2.printStackTrace(); + throw new RuntimeException("자료추출 오류."+e2); } PDDocument pdDocument = null; try { @@ -71,7 +71,7 @@ public class PDFExtractionUtil { printer.clearBase64List(); } catch (IOException e1) { - e1.printStackTrace(); + throw new RuntimeException("자료추출 오류."+e1); } extraction.setBase64List(b64imageList); diff --git a/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/AttachedTxtParser.java b/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/AttachedTxtParser.java index 0a4bcd83..a80a5a89 100644 --- a/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/AttachedTxtParser.java +++ b/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/AttachedTxtParser.java @@ -15,6 +15,7 @@ import net.minidev.json.parser.JSONParser; public class AttachedTxtParser extends LayoutParser{ public AttachedTxtParser(){ + super(); this.groupingType = "TXT"; this.need = new Need(true,true,true); } diff --git a/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/LayoutParser.java b/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/LayoutParser.java index 500d19d5..fa0031b0 100644 --- a/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/LayoutParser.java +++ b/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/LayoutParser.java @@ -25,6 +25,36 @@ import net.minidev.json.parser.ParseException; abstract public class LayoutParser { + public LayoutParser() { + allCode = new HashMap>(); + + ArrayList photoType = new ArrayList(); + photoType.add(newCommonCode("1","입차사진")); + photoType.add(newCommonCode("2","주차사진")); + photoType.add(newCommonCode("3","위반사진")); + photoType.add(newCommonCode("4","출차사진")); + allCode.put("PHOTO_TYPE", photoType); + + ArrayList fileStatus = new ArrayList(); + fileStatus.add(newCommonCode("S","정상등록자료")); + fileStatus.add(newCommonCode("E","삭제자료")); + allCode.put("FILE_STATUS", fileStatus); + + ArrayList crdnCn = new ArrayList(); + crdnCn.add(newCommonCode("00","사용안함")); + crdnCn.add(newCommonCode("01","일반차량(전기차)")); + crdnCn.add(newCommonCode("02","장기주차(전기차)")); + allCode.put("CRDN_CN", crdnCn); + + } + + public static CommonCode newCommonCode(String code, String value) { + CommonCode commonCode = new CommonCode(); + commonCode.setCode(code); + commonCode.setValue(value); + return commonCode; + } + protected int tempGroupSeq = 1; public int getTempGroupSeq() { @@ -73,37 +103,7 @@ abstract public class LayoutParser { return dataObject; } - Map> allCode = new HashMap>(){ - - private static final long serialVersionUID = 1L; - - { - put("PHOTO_TYPE",new ArrayList() { - - private static final long serialVersionUID = 1L; - - { - add(new CommonCode() {{ setCode("1"); setValue("입차사진"); }}); - add(new CommonCode() {{ setCode("2"); setValue("주차사진"); }}); - add(new CommonCode() {{ setCode("3"); setValue("위반사진"); }}); - add(new CommonCode() {{ setCode("4"); setValue("출차사진"); }}); - }}); - put("FILE_STATUS",new ArrayList() { - private static final long serialVersionUID = 1L; - - { - add(new CommonCode() {{ setCode("S"); setValue("정상등록자료"); }}); - add(new CommonCode() {{ setCode("E"); setValue("삭제자료"); }}); - }}); - put("CRDN_CN",new ArrayList() { - private static final long serialVersionUID = 1L; - - { - add(new CommonCode() {{ setCode("00"); setValue("사용안함"); }}); - add(new CommonCode() {{ setCode("01"); setValue("일반차량(전기차)"); }}); - add(new CommonCode() {{ setCode("02"); setValue("장기주차(전기차)"); }}); - }}); - }}; + Map> allCode = new HashMap>(); public void addCommonCode(Map> commonCode) { this.allCode.putAll(commonCode); diff --git a/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/OnlyImageParser.java b/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/OnlyImageParser.java index c157d435..0ae9d002 100644 --- a/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/OnlyImageParser.java +++ b/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/OnlyImageParser.java @@ -8,6 +8,7 @@ import cokr.xit.foundation.data.DataObject; public class OnlyImageParser extends LayoutParser { public OnlyImageParser(){ + super(); this.groupingType = "JPG"; this.need = new Need(true,false,true); } diff --git a/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/SingleFileParser.java b/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/SingleFileParser.java index 07a47126..60bd66e2 100644 --- a/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/SingleFileParser.java +++ b/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/SingleFileParser.java @@ -21,6 +21,7 @@ import net.minidev.json.parser.JSONParser; public class SingleFileParser extends LayoutParser { public SingleFileParser(){ + super(); this.groupingType = "BIN"; this.need = new Need(false,true,false); } diff --git a/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivBean.java b/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivBean.java index c4d9d8d5..3a110811 100644 --- a/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivBean.java +++ b/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivBean.java @@ -295,7 +295,10 @@ public class NisIndivBean extends AbstractComponent { nisIndivA01.setModifiedBy(userInfo.string("USER_ID")); // 차세대 세외수입 연계 서비스 호출 - A01 과태료 대장 단속 정보 등록 - String sUrl = "https://211.119.124.117:18080/intf/lntris/a01/create"; + String protocol = "https://"; + String ip = "211.119.124.117"; + String port = ":18080"; + String sUrl = protocol+ip+port+"/intf/lntris/a01/create"; String sMethod = "POST"; String sJsonData = "";