패키지 정리

main
이범준 7 months ago
parent 11d7034baa
commit 5721368e55

@ -87,7 +87,7 @@ public class PDFWriter {
List<DefaultOtptArtclStng> result = this.getFormat().getPrototypeStngs().stream() List<DefaultOtptArtclStng> result = this.getFormat().getPrototypeStngs().stream()
.filter((item) -> { .filter((item) -> {
return otptArtclNmList.contains(item.getOtptArtclNm()); return otptArtclNmList.contains(item.getArtclNm());
}).toList(); }).toList();
return result; return result;
@ -102,7 +102,7 @@ public class PDFWriter {
.filter((item) -> { .filter((item) -> {
return item.isDownloadData(); return item.isDownloadData();
}) })
.map(DefaultOtptArtclStng::getDscrp).toList(); .map(DefaultOtptArtclStng::getArtclDscrp).toList();
return result; return result;
} }
@ -180,7 +180,7 @@ public class PDFWriter {
} }
DefaultOtptArtclStng prototypeStng = prototypeStngList.stream() 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[] pstn = this.getPstnStng(prototypeStng, otptArtclStng, this.paper);
float[] size = this.getSize(prototypeStng, otptArtclStng); float[] size = this.getSize(prototypeStng, otptArtclStng);

@ -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;
}

@ -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;
}

@ -2,7 +2,7 @@ package cokr.xit.fims.cmmn.pdf.extraction.format;
import java.util.ArrayList; import java.util.ArrayList;
import cokr.xit.fims.cmmn.pdf.extraction.PredefinedSet; import cokr.xit.fims.cmmn.PredefinedSet;
/** /**
* *

@ -3,7 +3,7 @@ package cokr.xit.fims.cmmn.pdf.extraction.format;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import cokr.xit.fims.cmmn.pdf.extraction.PredefinedSet; import cokr.xit.fims.cmmn.PredefinedSet;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
public abstract class PDFExtractFormat { public abstract class PDFExtractFormat {
@ -19,7 +19,7 @@ public abstract class PDFExtractFormat {
for(DataObject extrArtclStng : extrArtclStngList) { for(DataObject extrArtclStng : extrArtclStngList) {
String extrArtclNm = (String) extrArtclStng.get("EXTR_ARTCL_NM"); String extrArtclNm = (String) extrArtclStng.get("EXTR_ARTCL_NM");
List<PredefinedSet> prototypeStng = prototypeStngs.stream().filter(item -> item.getExtrArtclNm().equals(extrArtclNm)).toList(); List<PredefinedSet> prototypeStng = prototypeStngs.stream().filter(item -> item.getArtclNm().equals(extrArtclNm)).toList();
if(prototypeStng != null && !prototypeStng.isEmpty()) { if(prototypeStng != null && !prototypeStng.isEmpty()) {
extrArtclStng.set("PREDEFINED_YN", "Y"); extrArtclStng.set("PREDEFINED_YN", "Y");
} else { } else {

@ -1,19 +1,20 @@
package cokr.xit.fims.cmmn.pdf.print; package cokr.xit.fims.cmmn.pdf.print;
import cokr.xit.fims.cmmn.PredefinedSet;
import cokr.xit.fims.cmmn.pdf.Pstn; import cokr.xit.fims.cmmn.pdf.Pstn;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@Getter @Getter
@Setter @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.componentType = componentType;
this.otptArtclNm=otptArtclNm;
this.dscrp=dscrp;
this.otptBscVl=otptBscVl; this.otptBscVl=otptBscVl;
this.widthSz=0; this.widthSz=0;
@ -129,9 +130,7 @@ public class DefaultOtptArtclStng {
private boolean unique; //출력물 내 유일 요소 여부 private boolean unique; //출력물 내 유일 요소 여부
private boolean forPost; //우편물 관련 요소 여부 private boolean forPost; //우편물 관련 요소 여부
private boolean downloadData; //다운로드 이력 기재 항목 여부 private boolean downloadData; //다운로드 이력 기재 항목 여부
private String dscrp; //출력항목 설명
private String otptArtclNm; //출력항목명
private Pstn a4; //A4 위치값 private Pstn a4; //A4 위치값
private Pstn letter; //레터 위치값 private Pstn letter; //레터 위치값
private float widthSz; //영역크기 길이 private float widthSz; //영역크기 길이

@ -34,22 +34,22 @@ public abstract class PDFPrintFormat {
/** /**
* . * .
*/ */
public DefaultOtptArtclStng text(String otptArtclNm, String dscrp, String otptBscVl){ public DefaultOtptArtclStng text(String artclNm, String artclDscrp, String otptBscVl){
return new DefaultOtptArtclStng("text", otptArtclNm, dscrp, otptBscVl); return new DefaultOtptArtclStng("text", artclNm, artclDscrp, otptBscVl);
} }
/** /**
* . * .
*/ */
public DefaultOtptArtclStng image(String otptArtclNm, String dscrp, String otptBscVl){ public DefaultOtptArtclStng image(String artclNm, String artclDscrp, String otptBscVl){
return new DefaultOtptArtclStng("image", otptArtclNm, dscrp, otptBscVl); return new DefaultOtptArtclStng("image", artclNm, artclDscrp, otptBscVl);
} }
/** /**
* . * .
*/ */
public DefaultOtptArtclStng images(String otptArtclNm, String dscrp, String otptBscVl){ public DefaultOtptArtclStng images(String artclNm, String artclDscrp, String otptBscVl){
return new DefaultOtptArtclStng("images", otptArtclNm, dscrp, otptBscVl); return new DefaultOtptArtclStng("images", artclNm, artclDscrp, otptBscVl);
} }
/** /**
@ -96,10 +96,10 @@ public abstract class PDFPrintFormat {
for(DataObject otptArtclStng : otptArtclStngList) { for(DataObject otptArtclStng : otptArtclStngList) {
String otptArtclNm = (String) otptArtclStng.get("OTPT_ARTCL_NM"); String otptArtclNm = (String) otptArtclStng.get("OTPT_ARTCL_NM");
DefaultOtptArtclStng prototypeStng = prototypeStngs.stream() 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("UNIQUE_YN", prototypeStng.isUnique() ? "Y" : "N");
otptArtclStng.set("DSCRP", prototypeStng.getDscrp()); otptArtclStng.set("DSCRP", prototypeStng.getArtclDscrp());
otptArtclStng.set("COMPONENT_TYPE", prototypeStng.getComponentType()); otptArtclStng.set("COMPONENT_TYPE", prototypeStng.getComponentType());
otptArtclStng.set("POST_YN", prototypeStng.isForPost() ? "Y" : "N"); otptArtclStng.set("POST_YN", prototypeStng.isForPost() ? "Y" : "N");
} }

@ -12,8 +12,8 @@ import org.springframework.stereotype.Component;
import cokr.xit.fims.cmmn.ExtrArtclStng; import cokr.xit.fims.cmmn.ExtrArtclStng;
import cokr.xit.fims.cmmn.ExtrForm; import cokr.xit.fims.cmmn.ExtrForm;
import cokr.xit.fims.cmmn.ExtrStngQuery; import cokr.xit.fims.cmmn.ExtrStngQuery;
import cokr.xit.fims.cmmn.PredefinedSet;
import cokr.xit.fims.cmmn.dao.ExtrStngMapper; 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.ElectronicNotice;
import cokr.xit.fims.cmmn.pdf.extraction.format.PDFExtractFormat; import cokr.xit.fims.cmmn.pdf.extraction.format.PDFExtractFormat;
import cokr.xit.foundation.AbstractComponent; import cokr.xit.foundation.AbstractComponent;

@ -13,8 +13,8 @@ import org.springframework.stereotype.Component;
import cokr.xit.fims.cmmn.OutsourcingArtclStng; import cokr.xit.fims.cmmn.OutsourcingArtclStng;
import cokr.xit.fims.cmmn.OutsourcingForm; import cokr.xit.fims.cmmn.OutsourcingForm;
import cokr.xit.fims.cmmn.OutsourcingStngQuery; import cokr.xit.fims.cmmn.OutsourcingStngQuery;
import cokr.xit.fims.cmmn.PredefinedSet;
import cokr.xit.fims.cmmn.dao.OutsourcingStngMapper; import cokr.xit.fims.cmmn.dao.OutsourcingStngMapper;
import cokr.xit.fims.cmmn.pdf.extraction.PredefinedSet;
import cokr.xit.foundation.AbstractComponent; import cokr.xit.foundation.AbstractComponent;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -74,13 +74,13 @@ public class OutsourcingStngBean extends AbstractComponent {
String outsourcingArtclNm = (String) outsourcingArtclStng.get("ARTCL_NM"); String outsourcingArtclNm = (String) outsourcingArtclStng.get("ARTCL_NM");
Optional<PredefinedSet> optional = predefinedSetList.stream() Optional<PredefinedSet> optional = predefinedSetList.stream()
.filter(item -> item.getExtrArtclNm().equals(outsourcingArtclNm)).findFirst(); .filter(item -> item.getArtclNm().equals(outsourcingArtclNm)).findFirst();
if(optional.isEmpty()) { if(optional.isEmpty()) {
outsourcingArtclStng.set("DSCRP", outsourcingArtclStng.get("ARTCL_NM")); outsourcingArtclStng.set("DSCRP", outsourcingArtclStng.get("ARTCL_NM"));
} else { } else {
PredefinedSet predefinedSet = optional.get(); PredefinedSet predefinedSet = optional.get();
outsourcingArtclStng.set("DSCRP", predefinedSet.getExtrArtclDscrp()); outsourcingArtclStng.set("DSCRP", predefinedSet.getArtclDscrp());
} }
} }

@ -370,7 +370,7 @@ $(document).ready(function(){
for(var i=0; i < prototypeList.length; i++){ for(var i=0; i < prototypeList.length; i++){
var p = prototypeList[i]; var p = prototypeList[i];
components += "<option value='"+p.otptArtclNm+"' >"+p.dscrp+"</option>"; components += "<option value='"+p.artclNm+"' >"+p.artclDscrp+"</option>";
} }
for(var i=0; i < dataList.length; i++){ for(var i=0; i < dataList.length; i++){
@ -452,7 +452,7 @@ $(document).ready(function(){
} else if(paperSeCd == "02"){ } else if(paperSeCd == "02"){
paperNm = "letter"; paperNm = "letter";
} }
var paperObj = prototypeList.find((item) => item.otptArtclNm == otptArtclNm)[paperNm]; var paperObj = prototypeList.find((item) => item.artclNm == otptArtclNm)[paperNm];
if(paperObj == null){ if(paperObj == null){
return 0; return 0;
} }
@ -463,7 +463,7 @@ $(document).ready(function(){
return paperObj["top"]; return paperObj["top"];
} }
} else { } 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()); 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}"); var template = document.getElementById("dropdownTemplate--${pageName}");
@ -491,8 +491,8 @@ $(document).ready(function(){
} else { } else {
for(var i=0; i < selectableArr.length; i++){ for(var i=0; i < selectableArr.length; i++){
var li = template.innerHTML; var li = template.innerHTML;
li = li.replace(/{onclick}/gi, "pageObject['${pageName}'].addRow('" + selectableArr[i].otptArtclNm + "')"); li = li.replace(/{onclick}/gi, "pageObject['${pageName}'].addRow('" + selectableArr[i].artclNm + "')");
li = li.replace(/{DSCRP}/gi, selectableArr[i].dscrp); li = li.replace(/{DSCRP}/gi, selectableArr[i].artclDscrp);
$("#dropdownUniqueAdd--${pageName}").append(li); $("#dropdownUniqueAdd--${pageName}").append(li);
} }
} }
@ -515,7 +515,7 @@ $(document).ready(function(){
var components = "<option value='' data-component-type=''>선택</option>"; var components = "<option value='' data-component-type=''>선택</option>";
for(var i=0; i < prototypeList.length; i++){ for(var i=0; i < prototypeList.length; i++){
var p = prototypeList[i]; var p = prototypeList[i];
components += "<option value='"+p.otptArtclNm+"' data-component-type='"+p.componentType+"'>"+p.dscrp+"</option>"; components += "<option value='"+p.artclNm+"' data-component-type='"+p.componentType+"'>"+p.artclDscrp+"</option>";
} }
var template = document.getElementById("found--${pageName}").innerHTML; var template = document.getElementById("found--${pageName}").innerHTML;
template = template.replace(/{OTPT_FORM_ID}/gi, ""); template = template.replace(/{OTPT_FORM_ID}/gi, "");

@ -291,7 +291,7 @@ $(document).ready(function(){
existArr.push($(el).val()); 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}"); var template = document.getElementById("dropdownTemplate--${pageName}");
@ -303,8 +303,8 @@ $(document).ready(function(){
} else { } else {
for(var i=0; i < selectableArr.length; i++){ for(var i=0; i < selectableArr.length; i++){
var li = template.innerHTML; var li = template.innerHTML;
li = li.replace(/{onclick}/gi, "pageObject['${pageName}'].addRow('" + selectableArr[i].extrArtclNm + "','"+selectableArr[i].extrArtclDscrp+"')"); li = li.replace(/{onclick}/gi, "pageObject['${pageName}'].addRow('" + selectableArr[i].artclNm + "','"+selectableArr[i].artclDscrp+"')");
li = li.replace(/{DSCRP}/gi, selectableArr[i].extrArtclDscrp); li = li.replace(/{DSCRP}/gi, selectableArr[i].artclDscrp);
$("#dropdownPredefinedAdd--${pageName}").append(li); $("#dropdownPredefinedAdd--${pageName}").append(li);
} }
} }

@ -214,7 +214,7 @@ $(document).ready(function(){
for(var i=0; i < predefinedSetList.length; i++){ for(var i=0; i < predefinedSetList.length; i++){
var p = predefinedSetList[i]; var p = predefinedSetList[i];
components += "<option value='"+p.extrArtclNm+"' >"+p.extrArtclDscrp+"</option>"; components += "<option value='"+p.artclNm+"' >"+p.artclDscrp+"</option>";
} }
for(var i=0; i < dataList.length; i++){ for(var i=0; i < dataList.length; i++){
@ -264,7 +264,7 @@ $(document).ready(function(){
var components = "<option value='' data-component-type=''>선택</option>"; var components = "<option value='' data-component-type=''>선택</option>";
for(var i=0; i < predefinedSetList.length; i++){ for(var i=0; i < predefinedSetList.length; i++){
var p = predefinedSetList[i]; var p = predefinedSetList[i];
components += "<option value='"+p.extrArtclNm+"' >"+p.extrArtclDscrp+"</option>"; components += "<option value='"+p.artclNm+"' >"+p.artclDscrp+"</option>";
} }
var template = document.getElementById("found--${pageName}").innerHTML; var template = document.getElementById("found--${pageName}").innerHTML;
template = template.replace(/{OUTSOURCING_FORM_ID}/gi, ""); template = template.replace(/{OUTSOURCING_FORM_ID}/gi, "");

Loading…
Cancel
Save