From 5721368e5595521a1ca9aff796e5a0d1a1454189 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Tue, 23 Apr 2024 14:59:27 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8C=A8=ED=82=A4=EC=A7=80=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/base/file/pdf/PDFWriter.java | 6 +++--- .../java/cokr/xit/fims/cmmn/PredefinedSet.java | 16 ++++++++++++++++ .../fims/cmmn/pdf/extraction/PredefinedSet.java | 16 ---------------- .../pdf/extraction/format/ElectronicNotice.java | 2 +- .../pdf/extraction/format/PDFExtractFormat.java | 4 ++-- .../cmmn/pdf/print/DefaultOtptArtclStng.java | 11 +++++------ .../cmmn/pdf/print/format/PDFPrintFormat.java | 16 ++++++++-------- .../xit/fims/cmmn/service/bean/ExtrStngBean.java | 2 +- .../cmmn/service/bean/OutsourcingStngBean.java | 6 +++--- .../webapp/WEB-INF/jsp/fims/stng01010-main.jsp | 14 +++++++------- .../webapp/WEB-INF/jsp/fims/stng01020-main.jsp | 6 +++--- .../webapp/WEB-INF/jsp/fims/stng01030-main.jsp | 4 ++-- 12 files changed, 51 insertions(+), 52 deletions(-) create mode 100644 src/main/java/cokr/xit/fims/cmmn/PredefinedSet.java delete mode 100644 src/main/java/cokr/xit/fims/cmmn/pdf/extraction/PredefinedSet.java diff --git a/src/main/java/cokr/xit/base/file/pdf/PDFWriter.java b/src/main/java/cokr/xit/base/file/pdf/PDFWriter.java index 72e8eb5c..39bbd1a3 100644 --- a/src/main/java/cokr/xit/base/file/pdf/PDFWriter.java +++ b/src/main/java/cokr/xit/base/file/pdf/PDFWriter.java @@ -87,7 +87,7 @@ public class PDFWriter { List result = this.getFormat().getPrototypeStngs().stream() .filter((item) -> { - return otptArtclNmList.contains(item.getOtptArtclNm()); + return otptArtclNmList.contains(item.getArtclNm()); }).toList(); return result; @@ -102,7 +102,7 @@ public class PDFWriter { .filter((item) -> { return item.isDownloadData(); }) - .map(DefaultOtptArtclStng::getDscrp).toList(); + .map(DefaultOtptArtclStng::getArtclDscrp).toList(); return result; } @@ -180,7 +180,7 @@ public class PDFWriter { } DefaultOtptArtclStng prototypeStng = prototypeStngList.stream() - .filter(item -> item.getOtptArtclNm().equals(otptArtclNm)).toList().get(0); + .filter(item -> item.getArtclNm().equals(otptArtclNm)).toList().get(0); float[] pstn = this.getPstnStng(prototypeStng, otptArtclStng, this.paper); float[] size = this.getSize(prototypeStng, otptArtclStng); diff --git a/src/main/java/cokr/xit/fims/cmmn/PredefinedSet.java b/src/main/java/cokr/xit/fims/cmmn/PredefinedSet.java new file mode 100644 index 00000000..d77ae73b --- /dev/null +++ b/src/main/java/cokr/xit/fims/cmmn/PredefinedSet.java @@ -0,0 +1,16 @@ +package cokr.xit.fims.cmmn; + + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class PredefinedSet { + public PredefinedSet(String artclNm, String artclDscrp) { + this.artclNm = artclNm; + this.artclDscrp = artclDscrp; + } + private String artclNm; + private String artclDscrp; +} diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/PredefinedSet.java b/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/PredefinedSet.java deleted file mode 100644 index a8d4d9c9..00000000 --- a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/PredefinedSet.java +++ /dev/null @@ -1,16 +0,0 @@ -package cokr.xit.fims.cmmn.pdf.extraction; - - -import lombok.Getter; -import lombok.Setter; - -@Getter -@Setter -public class PredefinedSet { - public PredefinedSet(String extrArtclNm, String extrArtclDscrp) { - this.extrArtclNm = extrArtclNm; - this.extrArtclDscrp = extrArtclDscrp; - } - private String extrArtclNm; - private String extrArtclDscrp; -} diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/ElectronicNotice.java b/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/ElectronicNotice.java index d55dfd94..6d1c82c6 100644 --- a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/ElectronicNotice.java +++ b/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/ElectronicNotice.java @@ -2,7 +2,7 @@ package cokr.xit.fims.cmmn.pdf.extraction.format; import java.util.ArrayList; -import cokr.xit.fims.cmmn.pdf.extraction.PredefinedSet; +import cokr.xit.fims.cmmn.PredefinedSet; /** * 전자고지 diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/PDFExtractFormat.java b/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/PDFExtractFormat.java index 771b35e6..e5da748b 100644 --- a/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/PDFExtractFormat.java +++ b/src/main/java/cokr/xit/fims/cmmn/pdf/extraction/format/PDFExtractFormat.java @@ -3,7 +3,7 @@ package cokr.xit.fims.cmmn.pdf.extraction.format; import java.util.ArrayList; import java.util.List; -import cokr.xit.fims.cmmn.pdf.extraction.PredefinedSet; +import cokr.xit.fims.cmmn.PredefinedSet; import cokr.xit.foundation.data.DataObject; public abstract class PDFExtractFormat { @@ -19,7 +19,7 @@ public abstract class PDFExtractFormat { for(DataObject extrArtclStng : extrArtclStngList) { String extrArtclNm = (String) extrArtclStng.get("EXTR_ARTCL_NM"); - List prototypeStng = prototypeStngs.stream().filter(item -> item.getExtrArtclNm().equals(extrArtclNm)).toList(); + List prototypeStng = prototypeStngs.stream().filter(item -> item.getArtclNm().equals(extrArtclNm)).toList(); if(prototypeStng != null && !prototypeStng.isEmpty()) { extrArtclStng.set("PREDEFINED_YN", "Y"); } else { diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/print/DefaultOtptArtclStng.java b/src/main/java/cokr/xit/fims/cmmn/pdf/print/DefaultOtptArtclStng.java index f854908a..939845f4 100644 --- a/src/main/java/cokr/xit/fims/cmmn/pdf/print/DefaultOtptArtclStng.java +++ b/src/main/java/cokr/xit/fims/cmmn/pdf/print/DefaultOtptArtclStng.java @@ -1,19 +1,20 @@ package cokr.xit.fims.cmmn.pdf.print; +import cokr.xit.fims.cmmn.PredefinedSet; import cokr.xit.fims.cmmn.pdf.Pstn; import lombok.Getter; import lombok.Setter; @Getter @Setter -public class DefaultOtptArtclStng { +public class DefaultOtptArtclStng extends PredefinedSet { /** * 기본 출력 요소 생성 */ - public DefaultOtptArtclStng(String componentType, String otptArtclNm, String dscrp, String otptBscVl){ + public DefaultOtptArtclStng(String componentType, String artclNm, String artclDscrp, String otptBscVl){ + super(artclNm, artclDscrp); + this.componentType = componentType; - this.otptArtclNm=otptArtclNm; - this.dscrp=dscrp; this.otptBscVl=otptBscVl; this.widthSz=0; @@ -129,9 +130,7 @@ public class DefaultOtptArtclStng { private boolean unique; //출력물 내 유일 요소 여부 private boolean forPost; //우편물 관련 요소 여부 private boolean downloadData; //다운로드 이력 기재 항목 여부 - private String dscrp; //출력항목 설명 - private String otptArtclNm; //출력항목명 private Pstn a4; //A4 위치값 private Pstn letter; //레터 위치값 private float widthSz; //영역크기 길이 diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/PDFPrintFormat.java b/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/PDFPrintFormat.java index d22db94e..30a889b0 100644 --- a/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/PDFPrintFormat.java +++ b/src/main/java/cokr/xit/fims/cmmn/pdf/print/format/PDFPrintFormat.java @@ -34,22 +34,22 @@ public abstract class PDFPrintFormat { /** * 텍스트 출력요소를 정의한다. */ - public DefaultOtptArtclStng text(String otptArtclNm, String dscrp, String otptBscVl){ - return new DefaultOtptArtclStng("text", otptArtclNm, dscrp, otptBscVl); + public DefaultOtptArtclStng text(String artclNm, String artclDscrp, String otptBscVl){ + return new DefaultOtptArtclStng("text", artclNm, artclDscrp, otptBscVl); } /** * 이미지 출력요소 정의한다. */ - public DefaultOtptArtclStng image(String otptArtclNm, String dscrp, String otptBscVl){ - return new DefaultOtptArtclStng("image", otptArtclNm, dscrp, otptBscVl); + public DefaultOtptArtclStng image(String artclNm, String artclDscrp, String otptBscVl){ + return new DefaultOtptArtclStng("image", artclNm, artclDscrp, otptBscVl); } /** * 이미지 묶음 출력요소 정의한다. */ - public DefaultOtptArtclStng images(String otptArtclNm, String dscrp, String otptBscVl){ - return new DefaultOtptArtclStng("images", otptArtclNm, dscrp, otptBscVl); + public DefaultOtptArtclStng images(String artclNm, String artclDscrp, String otptBscVl){ + return new DefaultOtptArtclStng("images", artclNm, artclDscrp, otptBscVl); } /** @@ -96,10 +96,10 @@ public abstract class PDFPrintFormat { for(DataObject otptArtclStng : otptArtclStngList) { String otptArtclNm = (String) otptArtclStng.get("OTPT_ARTCL_NM"); DefaultOtptArtclStng prototypeStng = prototypeStngs.stream() - .filter(item -> item.getOtptArtclNm().equals(otptArtclNm)).toList().get(0); + .filter(item -> item.getArtclNm().equals(otptArtclNm)).toList().get(0); otptArtclStng.set("UNIQUE_YN", prototypeStng.isUnique() ? "Y" : "N"); - otptArtclStng.set("DSCRP", prototypeStng.getDscrp()); + otptArtclStng.set("DSCRP", prototypeStng.getArtclDscrp()); otptArtclStng.set("COMPONENT_TYPE", prototypeStng.getComponentType()); otptArtclStng.set("POST_YN", prototypeStng.isForPost() ? "Y" : "N"); } diff --git a/src/main/java/cokr/xit/fims/cmmn/service/bean/ExtrStngBean.java b/src/main/java/cokr/xit/fims/cmmn/service/bean/ExtrStngBean.java index f1c9d73a..4eb41845 100644 --- a/src/main/java/cokr/xit/fims/cmmn/service/bean/ExtrStngBean.java +++ b/src/main/java/cokr/xit/fims/cmmn/service/bean/ExtrStngBean.java @@ -12,8 +12,8 @@ import org.springframework.stereotype.Component; import cokr.xit.fims.cmmn.ExtrArtclStng; import cokr.xit.fims.cmmn.ExtrForm; import cokr.xit.fims.cmmn.ExtrStngQuery; +import cokr.xit.fims.cmmn.PredefinedSet; import cokr.xit.fims.cmmn.dao.ExtrStngMapper; -import cokr.xit.fims.cmmn.pdf.extraction.PredefinedSet; import cokr.xit.fims.cmmn.pdf.extraction.format.ElectronicNotice; import cokr.xit.fims.cmmn.pdf.extraction.format.PDFExtractFormat; import cokr.xit.foundation.AbstractComponent; diff --git a/src/main/java/cokr/xit/fims/cmmn/service/bean/OutsourcingStngBean.java b/src/main/java/cokr/xit/fims/cmmn/service/bean/OutsourcingStngBean.java index d13372d8..135d6cf8 100644 --- a/src/main/java/cokr/xit/fims/cmmn/service/bean/OutsourcingStngBean.java +++ b/src/main/java/cokr/xit/fims/cmmn/service/bean/OutsourcingStngBean.java @@ -13,8 +13,8 @@ import org.springframework.stereotype.Component; import cokr.xit.fims.cmmn.OutsourcingArtclStng; import cokr.xit.fims.cmmn.OutsourcingForm; import cokr.xit.fims.cmmn.OutsourcingStngQuery; +import cokr.xit.fims.cmmn.PredefinedSet; import cokr.xit.fims.cmmn.dao.OutsourcingStngMapper; -import cokr.xit.fims.cmmn.pdf.extraction.PredefinedSet; import cokr.xit.foundation.AbstractComponent; import cokr.xit.foundation.data.DataObject; @@ -74,13 +74,13 @@ public class OutsourcingStngBean extends AbstractComponent { String outsourcingArtclNm = (String) outsourcingArtclStng.get("ARTCL_NM"); Optional optional = predefinedSetList.stream() - .filter(item -> item.getExtrArtclNm().equals(outsourcingArtclNm)).findFirst(); + .filter(item -> item.getArtclNm().equals(outsourcingArtclNm)).findFirst(); if(optional.isEmpty()) { outsourcingArtclStng.set("DSCRP", outsourcingArtclStng.get("ARTCL_NM")); } else { PredefinedSet predefinedSet = optional.get(); - outsourcingArtclStng.set("DSCRP", predefinedSet.getExtrArtclDscrp()); + outsourcingArtclStng.set("DSCRP", predefinedSet.getArtclDscrp()); } } diff --git a/src/main/webapp/WEB-INF/jsp/fims/stng01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/stng01010-main.jsp index b69ce017..1af62a0b 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/stng01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/stng01010-main.jsp @@ -370,7 +370,7 @@ $(document).ready(function(){ for(var i=0; i < prototypeList.length; i++){ var p = prototypeList[i]; - components += ""; + components += ""; } for(var i=0; i < dataList.length; i++){ @@ -452,7 +452,7 @@ $(document).ready(function(){ } else if(paperSeCd == "02"){ paperNm = "letter"; } - var paperObj = prototypeList.find((item) => item.otptArtclNm == otptArtclNm)[paperNm]; + var paperObj = prototypeList.find((item) => item.artclNm == otptArtclNm)[paperNm]; if(paperObj == null){ return 0; } @@ -463,7 +463,7 @@ $(document).ready(function(){ return paperObj["top"]; } } else { - return prototypeList.find((item) => item.otptArtclNm == otptArtclNm)[stngItemAttrNm]; + return prototypeList.find((item) => item.artclNm == otptArtclNm)[stngItemAttrNm]; } } @@ -479,7 +479,7 @@ $(document).ready(function(){ existArr.push($(el).val()); }); - var selectableArr = prototypeList.filter(item => existArr.indexOf(item.otptArtclNm) == -1); + var selectableArr = prototypeList.filter(item => existArr.indexOf(item.artclNm) == -1); var template = document.getElementById("dropdownTemplate--${pageName}"); @@ -491,8 +491,8 @@ $(document).ready(function(){ } else { for(var i=0; i < selectableArr.length; i++){ var li = template.innerHTML; - li = li.replace(/{onclick}/gi, "pageObject['${pageName}'].addRow('" + selectableArr[i].otptArtclNm + "')"); - li = li.replace(/{DSCRP}/gi, selectableArr[i].dscrp); + li = li.replace(/{onclick}/gi, "pageObject['${pageName}'].addRow('" + selectableArr[i].artclNm + "')"); + li = li.replace(/{DSCRP}/gi, selectableArr[i].artclDscrp); $("#dropdownUniqueAdd--${pageName}").append(li); } } @@ -515,7 +515,7 @@ $(document).ready(function(){ var components = ""; for(var i=0; i < prototypeList.length; i++){ var p = prototypeList[i]; - components += ""; + components += ""; } var template = document.getElementById("found--${pageName}").innerHTML; template = template.replace(/{OTPT_FORM_ID}/gi, ""); diff --git a/src/main/webapp/WEB-INF/jsp/fims/stng01020-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/stng01020-main.jsp index 7c4520dc..26e417b0 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/stng01020-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/stng01020-main.jsp @@ -291,7 +291,7 @@ $(document).ready(function(){ existArr.push($(el).val()); }); - var selectableArr = predefinedSetList.filter(item => existArr.indexOf(item.extrArtclNm) == -1); + var selectableArr = predefinedSetList.filter(item => existArr.indexOf(item.artclNm) == -1); var template = document.getElementById("dropdownTemplate--${pageName}"); @@ -303,8 +303,8 @@ $(document).ready(function(){ } else { for(var i=0; i < selectableArr.length; i++){ var li = template.innerHTML; - li = li.replace(/{onclick}/gi, "pageObject['${pageName}'].addRow('" + selectableArr[i].extrArtclNm + "','"+selectableArr[i].extrArtclDscrp+"')"); - li = li.replace(/{DSCRP}/gi, selectableArr[i].extrArtclDscrp); + li = li.replace(/{onclick}/gi, "pageObject['${pageName}'].addRow('" + selectableArr[i].artclNm + "','"+selectableArr[i].artclDscrp+"')"); + li = li.replace(/{DSCRP}/gi, selectableArr[i].artclDscrp); $("#dropdownPredefinedAdd--${pageName}").append(li); } } diff --git a/src/main/webapp/WEB-INF/jsp/fims/stng01030-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/stng01030-main.jsp index dd2eb52c..c03a8ba7 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/stng01030-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/stng01030-main.jsp @@ -214,7 +214,7 @@ $(document).ready(function(){ for(var i=0; i < predefinedSetList.length; i++){ var p = predefinedSetList[i]; - components += ""; + components += ""; } for(var i=0; i < dataList.length; i++){ @@ -264,7 +264,7 @@ $(document).ready(function(){ var components = ""; for(var i=0; i < predefinedSetList.length; i++){ var p = predefinedSetList[i]; - components += ""; + components += ""; } var template = document.getElementById("found--${pageName}").innerHTML; template = template.replace(/{OUTSOURCING_FORM_ID}/gi, "");