diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/format/Advntce.java b/src/main/java/cokr/xit/fims/cmmn/pdf/format/Advntce.java index 3e6b1d82..cc6191ea 100644 --- a/src/main/java/cokr/xit/fims/cmmn/pdf/format/Advntce.java +++ b/src/main/java/cokr/xit/fims/cmmn/pdf/format/Advntce.java @@ -51,6 +51,7 @@ public class Advntce extends PDFFormat { text("vltnArtcl","위반내용",""), text("vltnLawNm","위반법령",""), text("crdnSn","증거번호",""), + text("crdnSn","최초금액","ffnlgCrdnAmt"), text("amt","금액",""), text("untilYmd","납부기한",""), @@ -150,6 +151,9 @@ public class Advntce extends PDFFormat { case "crdnSn" -> { result = dataObject.string("CRDN_SN"); } + case "ffnlgCrdnAmt" -> { + result = dataObject.string("FFNLG_CRDN_AMT"); + } case "amt" -> { result = CmmnUtil.addCommaToNumber(dataObject.string("")); } @@ -280,10 +284,37 @@ public class Advntce extends PDFFormat { @Override public DataObject createSampleData() { DataObject dataObject = new DataObject(); - dataObject.put("rtpyrNm", "홍길동"); - dataObject.put("rtpyrAddr", "무슨도 무슨시 무슨구"); - dataObject.put("rtpyrDtlAddr", "ㅇㅇ아파트 999호"); - dataObject.put("rtpyrZip", "12345"); + dataObject.put("RTPYR_NM", "홍길동"); + dataObject.put("RTPYR_ADDR", "무슨도 무슨시 무슨구"); + dataObject.put("RTPYR_DTL_ADDR", "ㅇㅇ아파트 999호"); + dataObject.put("RTPYR_FULL_ADDR", "무슨도 무슨시 무슨구 ㅇㅇ아파트 999호"); + dataObject.put("RTPYR_ZIP", "12345"); + dataObject.put("VHRNO", "00가0000"); + dataObject.put("CRDN_YMD", "20231204"); + dataObject.put("CRDN_YMD_TM", "20231204080808"); + dataObject.put("CRDN_PLC", "사거리 건너편"); + dataObject.put("FFNLG_CARMDL_NM", "승용"); + dataObject.put("VLTN_ARTCL", "주차위반"); + dataObject.put("VLTN_LAW_NM", "00법 제0조 제0항"); + dataObject.put("CRDN_SN", "1234567890"); + dataObject.put("VR_ACTNO", "000000-00-000000"); + dataObject.put("VR_ACTNO1", "111111-00-000000"); + dataObject.put("VR_ACTNO2", "222222-00-000000"); + dataObject.put("VR_ACTNO3", "333333-00-000000"); + dataObject.put("VR_ACTNO4", "444444-00-000000"); + dataObject.put("VR_ACTNO5", "555555-00-000000"); + dataObject.put("VR_ACTNO6", "666666-00-000000"); + dataObject.put("VR_ACTNO7", "777777-00-000000"); + dataObject.put("VR_ACTNO8", "888888-00-000000"); + dataObject.put("VR_ACTNO9", "999999-00-000000"); + dataObject.put("VR_ACTNO10", "101010-00-000000"); + dataObject.put("EPAY_NO", "00000-0-00-00-000000000"); + dataObject.put("FFNLG_CRDN_AMT", "100000"); + dataObject.put("CRDN_PHOTO1", ""); + dataObject.put("CRDN_PHOTO2", ""); + dataObject.put("CRDN_PHOTO3", ""); + dataObject.put("CRDN_PHOTO4", ""); + return dataObject; } diff --git a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01ServiceBean.java b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01ServiceBean.java index 485531e7..0dca35ed 100644 --- a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01ServiceBean.java +++ b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt01ServiceBean.java @@ -271,9 +271,20 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv public Map makePdfFile(String formatType, String formatName, PrintOption printOption, String[] crdnIds) { Map result = new HashMap<>(); - SprtQuery sprtQuery = new SprtQuery(); - sprtQuery.setCrdnIDs(crdnIds); - List dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery); + PDFFormat pdfFormat = null; + if(formatName.equals("advntce")) { + pdfFormat = new Advntce(); + } + + List dataObjectList = new ArrayList(); + if(crdnIds.length == 1 && crdnIds[0].equals("sample")) { + DataObject sample = pdfFormat.createSampleData(); + dataObjectList.add(sample); + } else { + SprtQuery sprtQuery = new SprtQuery(); + sprtQuery.setCrdnIDs(crdnIds); + dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery); + } DataObject userStngInfo = stngBean.getStng("user"); DataObject sggStngInfo = stngBean.getStng("sgg"); @@ -331,10 +342,6 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv sndngSeCd = "02"; } - PDFFormat pdfFormat = null; - if(formatName.equals("advntce")) { - pdfFormat = new Advntce(); - } List prototypeStngList = pdfFormat.getPrototypeStngs(); otptStngQuery.setSndngSeCd(sndngSeCd); diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01200-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01200-main.jsp index 96164644..43588b7c 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01200-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt01200-main.jsp @@ -30,6 +30,8 @@
+ +
@@ -104,6 +106,8 @@ + +