diff --git a/src/main/java/cokr/xit/base/file/etc/OutsourcingFileWriter.java b/src/main/java/cokr/xit/base/file/etc/OutsourcingFileWriter.java index ac663f56..635228a8 100644 --- a/src/main/java/cokr/xit/base/file/etc/OutsourcingFileWriter.java +++ b/src/main/java/cokr/xit/base/file/etc/OutsourcingFileWriter.java @@ -125,6 +125,7 @@ public class OutsourcingFileWriter { int byteCnt = printStngItem.number("ARTCL_SZ").intValue(); String artclValue = ""; + //조회한 데이터와 관련없는 항목(출력일시 등) if(artclNm.equals("OTPT_YMD") || artclNm.equals("OTPT_YEAR") || artclNm.equals("OTPT_MONTH") || artclNm.equals("OTPT_DAY")) { switch(artclNm) { @@ -146,7 +147,19 @@ public class OutsourcingFileWriter { artclValue = dataObject.string(artclNm); } - line += hangul.rpadByte(artclValue, byteCnt, " "); + + //포매팅 + if(!printStngItem.string("FORMATTING").equals("")) { + //TODO : 등기번호,우편번호,금액,날짜 + } + + //공백 패딩 방향 + if(printStngItem.string("PADDING_DIRECTION").equals("left")) { + line += hangul.lpadByte(artclValue, byteCnt, " "); + } else { + line += hangul.rpadByte(artclValue, byteCnt, " "); + } + } writer.write(line); } diff --git a/src/main/java/cokr/xit/fims/cmmn/Hangul.java b/src/main/java/cokr/xit/fims/cmmn/Hangul.java index acf6feb9..7756bf4b 100644 --- a/src/main/java/cokr/xit/fims/cmmn/Hangul.java +++ b/src/main/java/cokr/xit/fims/cmmn/Hangul.java @@ -37,6 +37,26 @@ public class Hangul { return byteLen; } + /** + * 문자열을 바이트 단위로 패딩 + * + * @param str + * @param byteLen + * @param ch + * @return + */ + public String lpadByte(String str, int byteLen, String ch) { + String result = str; + + int strLen = this.getByteLength(str); + + for(int i=0; i < byteLen - strLen ; i++) { + result = ch + result; + } + + return result; + } + /** * 문자열을 바이트 단위로 패딩 * 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 17e32cb7..7a29d6fd 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 @@ -45,6 +45,7 @@ public class OutsourcingStngBean extends AbstractComponent { predefinedSetList.add(new PredefinedSet("RTPYR_DTL_ADDR", "납부자상세주소")); predefinedSetList.add(new PredefinedSet("RTPYR_ZIP", "납부자우편번호")); predefinedSetList.add(new PredefinedSet("RTPYR_NM", "납부자명")); + predefinedSetList.add(new PredefinedSet("OPNN_RANGE", "의견진술기간")); predefinedSetList.add(new PredefinedSet("CRDN_SE_NM", "단속구분명")); predefinedSetList.add(new PredefinedSet("ATCH_FILE_CNT", "첨부파일갯수")); predefinedSetList.add(new PredefinedSet("FFNLG_CRDN_AMT", "과태료단속금액")); diff --git a/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java b/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java index dc2e575f..c8c6c90b 100644 --- a/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java +++ b/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java @@ -1773,6 +1773,15 @@ public class Sndb01Controller extends ApplicationController { SprtQuery sprtQuery = new SprtQuery(); sprtQuery.setCrdnIds(crdnIds); List dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery); + for(int i=0; i < dataObjectList.size(); i++) { + DataObject sndngDtl = integrationSearchMapper.selectLatestSndngDtlInfo(dataObjectList.get(i).string("CRDN_ID")); + dataObjectList.get(i).set("SNDNG_DTL_ID",sndngDtl.string("SNDNG_DTL_ID")); + dataObjectList.get(i).set("SNDNG_YMD",sndngDtl.string("SNDNG_YMD")); + dataObjectList.get(i).set("OPNN_RANGE", + dataObjectList.get(i).string("SNDNG_YMD")+"~"+dataObjectList.get(i).string("DUDT_YMD")); + dataObjectList.get(i).set("RG_NO",sndngDtl.string("RG_NO")); + } + for(int i=0; i < dataObjectList.size(); i++) { DataObject dataObject = dataObjectList.get(i); diff --git a/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java b/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java index 64612bb3..2a3dee18 100644 --- a/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java +++ b/src/main/java/cokr/xit/fims/sprt/web/Sprt01Controller.java @@ -833,6 +833,10 @@ public class Sprt01Controller extends ApplicationController { String taskSeCd = ""; for(int i=0; i < dataObjectList.size(); i++) { DataObject sndngDtl = integrationSearchMapper.selectLatestSndngDtlInfo(dataObjectList.get(i).string("CRDN_ID")); + dataObjectList.get(i).set("SNDNG_DTL_ID",sndngDtl.string("SNDNG_DTL_ID")); + dataObjectList.get(i).set("SNDNG_YMD",sndngDtl.string("SNDNG_YMD")); + dataObjectList.get(i).set("OPNN_RANGE", + dataObjectList.get(i).string("SNDNG_YMD")+"~"+dataObjectList.get(i).string("DUDT_YMD")); dataObjectList.get(i).set("RG_NO",sndngDtl.string("RG_NO")); } @@ -1064,6 +1068,10 @@ public class Sprt01Controller extends ApplicationController { String taskSeCd = ""; for(int i=0; i < dataObjectList.size(); i++) { DataObject sndngDtl = integrationSearchMapper.selectLatestSndngDtlInfo(dataObjectList.get(i).string("CRDN_ID")); + dataObjectList.get(i).set("SNDNG_DTL_ID",sndngDtl.string("SNDNG_DTL_ID")); + dataObjectList.get(i).set("SNDNG_YMD",sndngDtl.string("SNDNG_YMD")); + dataObjectList.get(i).set("OPNN_RANGE", + dataObjectList.get(i).string("SNDNG_YMD")+"~"+dataObjectList.get(i).string("DUDT_YMD")); dataObjectList.get(i).set("RG_NO",sndngDtl.string("RG_NO")); } diff --git a/src/main/resources/sql/mapper/fims/sprt/integrationSearch-mapper.xml b/src/main/resources/sql/mapper/fims/sprt/integrationSearch-mapper.xml index 32370062..b619af4b 100644 --- a/src/main/resources/sql/mapper/fims/sprt/integrationSearch-mapper.xml +++ b/src/main/resources/sql/mapper/fims/sprt/integrationSearch-mapper.xml @@ -365,6 +365,8 @@ SELECT * FROM ( SELECT ROW_NUMBER() OVER (ORDER BY SD.SNDNG_DTL_ID) AS ROWNUM + , SD.SNDNG_DTL_ID + , SD.SNDNG_YMD , SD.RG_NO , SD.CRDN_ID FROM TB_SNDNG_DTL SD 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 f82a60f6..069acb86 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/stng01030-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/stng01030-main.jsp @@ -82,7 +82,7 @@ 항목명 바이트수 공백문자방향 - 포맷팅 + 포맷팅 @@ -114,7 +114,7 @@ - + @@ -214,14 +214,12 @@ $(document).ready(function(){ var lastTr = $("#tbody--${pageName}").find("tr").last()[0]; $($P.fnGetElement(lastTr,"artclNm")).set(data.ARTCL_NM); - - $($P.fnGetElement(lastTr,"artclSz")) - .set(!isEmpty(data.ARTCL_SZ) ? data.ARTCL_SZ : 0); - + .set(!isEmpty(data.ARTCL_SZ) ? data.ARTCL_SZ : 1); $($P.fnGetElement(lastTr,"paddingDirection")) .set(!isEmpty(data.PADDING_DIRECTION) ? data.PADDING_DIRECTION : "left"); - + $($P.fnGetElement(lastTr,"formatting")) + .set(!isEmpty(data.FORMATTING) ? data.FORMATTING : ""); } $("#tbody--${pageName}").find("tr").each(function(){