diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/HWPFormatWriter.java b/src/main/java/cokr/xit/fims/cmmn/hwp/HWPFormatWriter.java index e6f49eb1..6debbd5e 100644 --- a/src/main/java/cokr/xit/fims/cmmn/hwp/HWPFormatWriter.java +++ b/src/main/java/cokr/xit/fims/cmmn/hwp/HWPFormatWriter.java @@ -16,6 +16,8 @@ public interface HWPFormatWriter { */ void setting(HWPPrintUtil hwpPrintUtil); + void setting(HWPPrintUtil hwpPrintUtil, int cnt); + /** 한글파일 공통사항 적용 * @param * @return diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnConfirm.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnConfirm.java index e8e73aea..d94c4841 100644 --- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnConfirm.java +++ b/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnConfirm.java @@ -29,6 +29,18 @@ public class CrdnConfirm implements HWPFormatWriter { hwpPrintUtil.setAttachFormatFilePath(""); } + @Override + public void setting(HWPPrintUtil hwpPrintUtil, int recordCnt) { + hwpPrintUtil.setFormatName("crdnConfirm"); + hwpPrintUtil.setFormatKorName("단속확인서"); + + hwpPrintUtil.setFormatType("info"); + hwpPrintUtil.setRecordPerPartFile(recordCnt); + + hwpPrintUtil.setBaseFormatFilePath("template/hwp/crdnConfirm.hwp"); + hwpPrintUtil.setAttachFormatFilePath(""); + } + @Override public void writeGlobalInfo(HWPFile baseFile, List dataObjectList, PrintOption printOption, HWPPrintUtil hwpPrintUtil) { diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnList.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnList.java index b6e4bd80..08112658 100644 --- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnList.java +++ b/src/main/java/cokr/xit/fims/cmmn/hwp/format/CrdnList.java @@ -29,6 +29,18 @@ public class CrdnList implements HWPFormatWriter { hwpPrintUtil.setAttachFormatFilePath("template/hwp/crdnList_inner.hwp"); } + @Override + public void setting(HWPPrintUtil hwpPrintUtil, int recordCnt) { + hwpPrintUtil.setFormatName("crdnList"); + hwpPrintUtil.setFormatKorName("단속내역서"); + + hwpPrintUtil.setFormatType("list"); + hwpPrintUtil.setRecordPerPartFile(recordCnt); + + hwpPrintUtil.setBaseFormatFilePath("template/hwp/crdnList_root.hwp"); + hwpPrintUtil.setAttachFormatFilePath("template/hwp/crdnList_inner.hwp"); + } + @Override public void writeGlobalInfo(HWPFile baseFile, List dataObjectList, PrintOption printOption, HWPPrintUtil hwpPrintUtil diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/DlbrDecsnList.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/DlbrDecsnList.java index 6af17069..327cfc19 100644 --- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/DlbrDecsnList.java +++ b/src/main/java/cokr/xit/fims/cmmn/hwp/format/DlbrDecsnList.java @@ -23,6 +23,18 @@ public class DlbrDecsnList implements HWPFormatWriter { hwpPrintUtil.setAttachFormatFilePath(""); } + @Override + public void setting(HWPPrintUtil hwpPrintUtil, int recordCnt) { + hwpPrintUtil.setFormatName("dlbrDecsn"); + hwpPrintUtil.setFormatKorName("의견제출심의결의서"); + + hwpPrintUtil.setFormatType("info"); + hwpPrintUtil.setRecordPerPartFile(recordCnt); + + hwpPrintUtil.setBaseFormatFilePath("template/hwp/opnnDlbrDecsnForm.hwp"); + hwpPrintUtil.setAttachFormatFilePath(""); + } + @Override public void writeGlobalInfo(HWPFile baseFile, List dataObjectList, PrintOption printOption, HWPPrintUtil hwpPrintUtil) { diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/RcvmtConfirm.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/RcvmtConfirm.java index ee2e23a7..b66cbda0 100644 --- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/RcvmtConfirm.java +++ b/src/main/java/cokr/xit/fims/cmmn/hwp/format/RcvmtConfirm.java @@ -29,6 +29,18 @@ public class RcvmtConfirm implements HWPFormatWriter { hwpPrintUtil.setAttachFormatFilePath(""); } + @Override + public void setting(HWPPrintUtil hwpPrintUtil, int recordCnt) { + hwpPrintUtil.setFormatName("rcvmtConfirm"); + hwpPrintUtil.setFormatKorName("납부확인서"); + + hwpPrintUtil.setFormatType("info"); + hwpPrintUtil.setRecordPerPartFile(recordCnt); + + hwpPrintUtil.setBaseFormatFilePath("template/hwp/rcvmtConfirm.hwp"); + hwpPrintUtil.setAttachFormatFilePath(""); + } + @Override public void writeGlobalInfo(HWPFile baseFile, List dataObjectList, PrintOption printOption, HWPPrintUtil hwpPrintUtil) { diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/ReportOnClaims.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/ReportOnClaims.java index c65b33d8..0fc4e7ee 100644 --- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/ReportOnClaims.java +++ b/src/main/java/cokr/xit/fims/cmmn/hwp/format/ReportOnClaims.java @@ -31,6 +31,18 @@ public class ReportOnClaims implements HWPFormatWriter { hwpPrintUtil.setAttachFormatFilePath("template/hwp/reportOnClaims_inner.hwp"); } + @Override + public void setting(HWPPrintUtil hwpPrintUtil, int recordCnt) { + hwpPrintUtil.setFormatName("채권신고서"); + hwpPrintUtil.setFormatKorName("reportOnClaims"); + + hwpPrintUtil.setFormatType("list"); + hwpPrintUtil.setRecordPerPartFile(recordCnt); + + hwpPrintUtil.setBaseFormatFilePath("template/hwp/reportOnClaims_root.hwp"); + hwpPrintUtil.setAttachFormatFilePath("template/hwp/reportOnClaims_inner.hwp"); + } + @Override public void writeGlobalInfo(HWPFile baseFile, List dataObjectList, PrintOption printOption, HWPPrintUtil hwpPrintUtil) { diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/RequestForDelivery.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/RequestForDelivery.java index ef1180a3..300bb874 100644 --- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/RequestForDelivery.java +++ b/src/main/java/cokr/xit/fims/cmmn/hwp/format/RequestForDelivery.java @@ -31,6 +31,18 @@ public class RequestForDelivery implements HWPFormatWriter { hwpPrintUtil.setAttachFormatFilePath("template/hwp/requestForDelivery_inner.hwp"); } + @Override + public void setting(HWPPrintUtil hwpPrintUtil, int recordCnt) { + hwpPrintUtil.setFormatName("교부청구서"); + hwpPrintUtil.setFormatKorName("requestForDelivery"); + + hwpPrintUtil.setFormatType("list"); + hwpPrintUtil.setRecordPerPartFile(recordCnt); + + hwpPrintUtil.setBaseFormatFilePath("template/hwp/requestForDelivery_root.hwp"); + hwpPrintUtil.setAttachFormatFilePath("template/hwp/requestForDelivery_inner.hwp"); + } + @Override public void writeGlobalInfo(HWPFile baseFile, List dataObjectList, PrintOption printOption, HWPPrintUtil hwpPrintUtil) { diff --git a/src/main/java/cokr/xit/fims/cmmn/hwp/format/SvbtcList.java b/src/main/java/cokr/xit/fims/cmmn/hwp/format/SvbtcList.java index a747d81a..b40378f5 100644 --- a/src/main/java/cokr/xit/fims/cmmn/hwp/format/SvbtcList.java +++ b/src/main/java/cokr/xit/fims/cmmn/hwp/format/SvbtcList.java @@ -5,6 +5,7 @@ import java.util.List; import cokr.xit.fims.cmmn.hwp.ClickHereEditor; import cokr.xit.fims.cmmn.hwp.HWPFormatWriter; import cokr.xit.fims.cmmn.hwp.HWPPrintUtil; +import cokr.xit.fims.cmmn.hwp.InsertingImageCell; import cokr.xit.fims.sprt.PrintOption; import cokr.xit.foundation.data.DataObject; import kr.dogfoot.hwplib.object.HWPFile; @@ -23,13 +24,38 @@ public class SvbtcList implements HWPFormatWriter { hwpPrintUtil.setAttachFormatFilePath("template/hwp/svbtcList_inner.hwp"); } + @Override + public void setting(HWPPrintUtil hwpPrintUtil, int recordCnt) { + hwpPrintUtil.setFormatName("svbtc"); + hwpPrintUtil.setFormatKorName("공시송달"); + + hwpPrintUtil.setFormatType("list"); + hwpPrintUtil.setRecordPerPartFile(recordCnt); + + hwpPrintUtil.setBaseFormatFilePath("template/hwp/svbtcList_root.hwp"); + hwpPrintUtil.setAttachFormatFilePath("template/hwp/svbtcList_inner.hwp"); + } + @Override public void writeGlobalInfo(HWPFile baseFile, List dataObjectList, PrintOption printOption, HWPPrintUtil hwpPrintUtil) { // ClickHereEditor baseFileEditor = new ClickHereEditor(baseFile); - baseFileEditor.set("공시송달일자", dataObjectList.get(0).string("SVBTC_YMD")); - baseFileEditor.set("공시송달종료일자", dataObjectList.get(0).string("SVBTC_END_YMD")); + baseFileEditor.set("문서번호", dataObjectList.get(0).string("INPUT_DOC_NO")); + baseFileEditor.set("제목", dataObjectList.get(0).string("INPUT_TTL_NM")); + baseFileEditor.set("공고기간", dataObjectList.get(0).string("INPUT_SVBTC_DATE")); + baseFileEditor.set("기관장", dataObjectList.get(0).string("INST_LEADER")); + baseFileEditor.set("부서명", dataObjectList.get(0).string("SGG_DEPT_NM")); + baseFileEditor.set("부서전화번호", "☎" + dataObjectList.get(0).string("DEPT_TELNO")); + + try { + if (!dataObjectList.get(0).string("OFFCS_FILE_PATH").equals("")) { + InsertingImageCell.IMPL_InsertPicture(baseFile, "직인", dataObjectList.get(0).string("OFFCS_FILE_PATH")); + } + } catch(Exception e) { + e.printStackTrace(); + throw new RuntimeException("한글 파일 출력 중 오류가 발생하였습니다."); + } } @Override @@ -38,11 +64,11 @@ public class SvbtcList implements HWPFormatWriter { ClickHereEditor attachFileEditor = new ClickHereEditor(attachFile); attachFileEditor.set("성명", dataObject.string("RCPN_NM_MASK")); - attachFileEditor.set("주소", dataObject.string("RCPN_WHOL_ADDR_MASK")); + attachFileEditor.set("주소", dataObject.string("WHOL_ADDR_MASK")); attachFileEditor.set("차량번호", dataObject.string("VHRNO_MASK")); attachFileEditor.set("위반장소", dataObject.string("CRDN_PLC")); attachFileEditor.set("위반일자", dataObject.string("CRDN_DT")); - attachFileEditor.set("반송일자", dataObject.string("DLVR_YMD")); + attachFileEditor.set("반송일자", dataObject.string("DLVR_YMD_MASK")); attachFileEditor.set("반송사유", dataObject.string("UNDLVR_RSN_NM")); } diff --git a/src/main/java/cokr/xit/fims/sndb/SndbQuery.java b/src/main/java/cokr/xit/fims/sndb/SndbQuery.java index a147f0b6..d52ab51f 100644 --- a/src/main/java/cokr/xit/fims/sndb/SndbQuery.java +++ b/src/main/java/cokr/xit/fims/sndb/SndbQuery.java @@ -17,49 +17,52 @@ public class SndbQuery extends CmmnQuery { private static final long serialVersionUID = 1L; // ID - private String[] crdnIDs; // 단속 IDs - private String crdnId; // 단속 ID - private String[] sndngIDs; // 발송 IDs - private String sndngId; // 발송 ID - private String[] sndngDtlIDs; // 발송 상세 IDs - private String sndngDtlId; // 발송 상세 ID - private String[] svbtcIDs; // 공시송달 IDs - private String svbtcId; // 공시송달 ID + private String[] crdnIDs; // 단속 IDs + private String crdnId; // 단속 ID + private String[] sndngIDs; // 발송 IDs + private String sndngId; // 발송 ID + private String[] sndngDtlIDs; // 발송 상세 IDs + private String sndngDtlId; // 발송 상세 ID + private String[] svbtcIDs; // 공시송달 IDs + private String svbtcId; // 공시송달 ID // 검색 조건 - private String schLevyExclYmdFrom; // 부과제외_부과제외 일자 시작 - private String schLevyExclYmdTo; // 부과제외_부과제외 일자 종료 - private String schLevyExclSeCd; // 부과제외_부과제외 구분 코드 - private String schVltnCd; // 위반 코드 - private String schCrdnYmdFrom; // 단속(TB_CRDN)_단속 일자 시작 - private String schCrdnYmdTo; // 단속(TB_CRDN)_단속 일자 종료 - private String schVhrno; // 단속(TB_CRDN)_차량번호 - private String schRtpyrNm; // 납부자(TB_PAYER)_납부자 명 - private String schSndngYmdFrom; // 발송(TB_SNDNG)_발송 일자 시작 - private String schSndngYmdTo; // 발송(TB_SNDNG)_발송 일자 종료 - private String schDlvrYmdFrom; // 발송상세(TB_SNDNG_DTL)_배달 일자 시작 - private String schDlvrYmdTo; // 발송상세(TB_SNDNG_DTL)_배달 일자 종료 - private String schSvbtcYmdFrom; // 공시송달(TB_SVBTC)_공시송달 일자 시작 - private String schSvbtcYmdTo; // 공시송달(TB_SVBTC)_공시송달 일자 종료 - private String schSndngSeCd; // 발송, 발송상세(TB_SNDNG_DTL)_발송 구분 코드 - private String schChcRgIndct; // 선택 등기 표시 + private String schLevyExclYmdFrom; // 부과제외_부과제외 일자 시작 + private String schLevyExclYmdTo; // 부과제외_부과제외 일자 종료 + private String schLevyExclSeCd; // 부과제외_부과제외 구분 코드 + private String schVltnCd; // 위반 코드 + private String schCrdnYmdFrom; // 단속(TB_CRDN)_단속 일자 시작 + private String schCrdnYmdTo; // 단속(TB_CRDN)_단속 일자 종료 + private String schVhrno; // 단속(TB_CRDN)_차량번호 + private String schRtpyrNm; // 납부자(TB_PAYER)_납부자 명 + private String schSndngYmdFrom; // 발송(TB_SNDNG)_발송 일자 시작 + private String schSndngYmdTo; // 발송(TB_SNDNG)_발송 일자 종료 + private String schDlvrYmdFrom; // 발송상세(TB_SNDNG_DTL)_배달 일자 시작 + private String schDlvrYmdTo; // 발송상세(TB_SNDNG_DTL)_배달 일자 종료 + private String schSvbtcYmdFrom; // 공시송달(TB_SVBTC)_공시송달 일자 시작 + private String schSvbtcYmdTo; // 공시송달(TB_SVBTC)_공시송달 일자 종료 + private String schSndngSeCd; // 발송, 발송상세(TB_SNDNG_DTL)_발송 구분 코드 + private String schChcRgIndct; // 선택 등기 표시 // 상세 검색 조건 // 동적 검색 조건 - private String levyExclSeCd; // 부과제외_부과 제외 구분 코드 - private String levyExclSeNm; // 부과제외_부과 제외 구분 명 - private String vltnCd; // 위반 코드 - private String vhrno; // 단속(TB_CRDN)_차량번호 - private String rtpyrNm; // 납부자(TB_PAYER)_납부자 명 - private String crdnSttsCd; // 단속(TB_CRDN)_단속 상태 코드 - private String sndngSeCd; // 발송 구분 코드 - private String sndngSeCdFrom; // 발송 구분 코드 시작 - private String sndngSeCdTo; // 발송 구분 코드 종료 - private String sndngDtlSttsCd; // 발송 상세 상태 코드 + private String levyExclSeCd; // 부과제외_부과 제외 구분 코드 + private String levyExclSeNm; // 부과제외_부과 제외 구분 명 + private String vltnCd; // 위반 코드 + private String vhrno; // 단속(TB_CRDN)_차량번호 + private String rtpyrNm; // 납부자(TB_PAYER)_납부자 명 + private String crdnSttsCd; // 단속(TB_CRDN)_단속 상태 코드 + private String sndngSeCd; // 발송 구분 코드 + private String sndngSeCdFrom; // 발송 구분 코드 시작 + private String sndngSeCdTo; // 발송 구분 코드 종료 + private String sndngDtlSttsCd; // 발송 상세 상태 코드 private String rcpnRelNm1; private String rcpnRelNm2; private String rcpnRelNm3; private String rcpnRelNm4; - private String tnocs; // 총건수 + private String tnocs; // 총건수 + private String printDocNo; // 출력 문서 번호 + private String printTtlNm; // 출력 제목 명 + private String printSvbtcDate; // 출력 공고 기한 // ETC private String callPurpose; // infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정, refresh 재조회). private String delRsn; // 삭제 사유 @@ -424,6 +427,33 @@ public class SndbQuery extends CmmnQuery { this.tnocs = tnocs; return self(); } + + public String getPrintDocNo() { + return ifEmpty(printDocNo, () -> null); + } + + public T setPrintDocNo(String printDocNo) { + this.printDocNo = printDocNo; + return self(); + } + + public String getPrintTtlNm() { + return ifEmpty(printTtlNm, () -> null); + } + + public T setPrintTtlNm(String printTtlNm) { + this.printTtlNm = printTtlNm; + return self(); + } + + public String getPrintSvbtcDate() { + return ifEmpty(printSvbtcDate, () -> null); + } + + public T setPrintSvbtcDate(String printSvbtcDate) { + this.printSvbtcDate = printSvbtcDate; + return self(); + } // 동적 검색 조건 /////////////////////////////////////////////////////////////// // ETC ///////////////////////////////////////////////////////////////////// diff --git a/src/main/java/cokr/xit/fims/sndb/service/SvbtcService.java b/src/main/java/cokr/xit/fims/sndb/service/SvbtcService.java index 0a80335e..1f98e929 100644 --- a/src/main/java/cokr/xit/fims/sndb/service/SvbtcService.java +++ b/src/main/java/cokr/xit/fims/sndb/service/SvbtcService.java @@ -55,7 +55,7 @@ public interface SvbtcService { * @param req 공시송달 IDs * @return */ - Map makeSvbtcFileFromHwpFormat(String formatType, String formatName, PrintOption printOption, String... svbtcIDs); + Map makeSvbtcFileFromHwpFormat(String formatType, String formatName, PrintOption printOption, SndbQuery req); /**공시송달 대장 정보를 등록한다. * @param svbtc 공시송달 대장 diff --git a/src/main/java/cokr/xit/fims/sndb/service/bean/SndngBean.java b/src/main/java/cokr/xit/fims/sndb/service/bean/SndngBean.java index 1b81f9dc..31799e1a 100644 --- a/src/main/java/cokr/xit/fims/sndb/service/bean/SndngBean.java +++ b/src/main/java/cokr/xit/fims/sndb/service/bean/SndngBean.java @@ -1226,7 +1226,7 @@ public class SndngBean extends AbstractComponent { // 발송코드 epostRcptDtl.setRecevCode(sndngDtlInfo.string("SNDNG_DTL_ID")); // 바코드 - epostRcptDtl.setRecevBar1d(deptSggInfo.string("INST_CHIEF_NM")); + epostRcptDtl.setRecevBar1d(deptSggInfo.string("SGG_LEADER")); // 이차원바코드 epostRcptDtl.setRecevBar2d(""); // 고지번호 diff --git a/src/main/java/cokr/xit/fims/sndb/service/bean/SvbtcServiceBean.java b/src/main/java/cokr/xit/fims/sndb/service/bean/SvbtcServiceBean.java index c2001a32..df6e5fb6 100644 --- a/src/main/java/cokr/xit/fims/sndb/service/bean/SvbtcServiceBean.java +++ b/src/main/java/cokr/xit/fims/sndb/service/bean/SvbtcServiceBean.java @@ -74,33 +74,35 @@ public class SvbtcServiceBean extends AbstractServiceBean implements SvbtcServic } @Override - public Map makeSvbtcFileFromHwpFormat(String formatType, String formatName, PrintOption printOption, String... selectIDs) { + public Map makeSvbtcFileFromHwpFormat(String formatType, String formatName, PrintOption printOption, SndbQuery req) { + // return Map result = new HashMap<>(); HWPPrintUtil printUtil = new HWPPrintUtil(); HWPFormatWriter hwpFormatWriter = new SvbtcList(); - hwpFormatWriter.setting(printUtil); + // 사용자 조회 UserInfo userInfo = currentUser(); factionBean.initUserInfo(userInfo); printUtil.setPrintRequestUserInfo(userInfo); // 자료 조회 - SndbQuery req = new SndbQuery(); - - if (formatName.equals("svbtc") ) { - req.setSvbtcId(selectIDs[0]); - req.setDelYN("N"); - } else if (formatName.equals("svbtcDtl") ) { - req.setSndngDtlIDs(selectIDs); - req.setDelYN("N"); - } + req.setSggCd((String)userInfo.getInfo().get("sggCd")); + req.setDeptCd((String)userInfo.getInfo().get("deptCd")); + req.setOrderBy("SV.SVBTC_ID, SD.SNDNG_DTL_ID"); + List dataObjectList = svbtcBean.getSvbtcPrint(req); int totalDataCount = dataObjectList.size(); - List partFileList = new ArrayList<>(); + + // 한글 포맷 setting + hwpFormatWriter.setting(printUtil, totalDataCount); + + // printUtil.calcTotalPartFileCount(totalDataCount); + List partFileList = new ArrayList<>(); + try { int dataIndex = 0; for(int partFileIndex = 0; partFileIndex < printUtil.getTotalPartFileCount(); partFileIndex++) { 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 a738061f..c3970287 100644 --- a/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java +++ b/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java @@ -1370,7 +1370,7 @@ public class Sndb01Controller extends ApplicationController { */ public ModelAndView getServiceByPublicNoticeDetailList(SndbQuery req) { if (!"xls".equals(req.getDownload())) { - List result = svbtcService.getSvbtcDtlList(setFetchSize(req)); + List result = svbtcService.getSvbtcDtls(req); // 공시송달자료는 일괄조회 하자. List result = svbtcService.getSvbtcDtlList(setFetchSize(req)); return setCollectionInfo(new ModelAndView("jsonView"), result, "svbtcDtl"); } else { // 현재 날짜 구하기 @@ -1440,29 +1440,12 @@ public class Sndb01Controller extends ApplicationController { /** 공시송달 한글 파일로 작성한다. * @return 공시송달 hwp파일 */ - public ModelAndView makeSvbtcFileFromHwpFormat(String... svbtcIDs) { + public ModelAndView makeSvbtcFileFromHwpFormat(SndbQuery req) { Map result = null; PrintOption printOption = new PrintOption(); - result = svbtcService.makeSvbtcFileFromHwpFormat("list", "svbtc", printOption, svbtcIDs); - - ModelAndView mav = new ModelAndView("jsonView"); - - mav.addAllObjects(result); - - return mav; - } - - /** 공시송달 한글 파일로 작성한다. - * @return 공시송달 hwp파일 - */ - public ModelAndView makeSvbtcDetailsFileFromHwpFormat(String... sndngDtlIDs) { - Map result = null; - - PrintOption printOption = new PrintOption(); - - result = svbtcService.makeSvbtcFileFromHwpFormat("list", "svbtcDtl", printOption, sndngDtlIDs); + result = svbtcService.makeSvbtcFileFromHwpFormat("list", "svbtc", printOption, req); ModelAndView mav = new ModelAndView("jsonView"); diff --git a/src/main/java/cokr/xit/fims/task/web/DpvController.java b/src/main/java/cokr/xit/fims/task/web/DpvController.java index 86132dc8..cf386a8c 100644 --- a/src/main/java/cokr/xit/fims/task/web/DpvController.java +++ b/src/main/java/cokr/xit/fims/task/web/DpvController.java @@ -675,8 +675,8 @@ public class DpvController { @Override @RequestMapping(name="공시송달 한글 저장", value=METHOD_URL.makeSvbtcFileFromHwpFormat) - public ModelAndView makeSvbtcFileFromHwpFormat(String... svbtcIDs) { - return super.makeSvbtcFileFromHwpFormat(svbtcIDs); + public ModelAndView makeSvbtcFileFromHwpFormat(SndbQuery req) { + return super.makeSvbtcFileFromHwpFormat(req); } @Override @@ -691,12 +691,6 @@ public class DpvController { return super.getServiceByPublicNoticeDetailList(req); } - @Override - @RequestMapping(name="공시송달 상세 한글 저장", value=METHOD_URL.makeSvbtcDetailsFileFromHwpFormat) - public ModelAndView makeSvbtcDetailsFileFromHwpFormat(String... sndngDtlIDs) { - return super.makeSvbtcDetailsFileFromHwpFormat(sndngDtlIDs); - } - @Override @RequestMapping(name="공시송달 정보", value=METHOD_URL.getServiceByPublicNoticeInfo) public ModelAndView getServiceByPublicNoticeInfo(SndbQuery req) { diff --git a/src/main/resources/sql/mapper/fims/epst/epostRcptReg-mapper.xml b/src/main/resources/sql/mapper/fims/epst/epostRcptReg-mapper.xml index f7d94a3d..ba28cc95 100644 --- a/src/main/resources/sql/mapper/fims/epst/epostRcptReg-mapper.xml +++ b/src/main/resources/sql/mapper/fims/epst/epostRcptReg-mapper.xml @@ -63,109 +63,109 @@ - SELECT ERR.CON_KEY /* 외부연계식별키 */ - , ERR.CON_ORG /* 외부기관구분코드 */ - , ERR.SNDNG_ID /* 발송 ID */ - , ERR.RCEPT_ID /* 접수우체국국기호 */ - , ERR.RCEPT_YMD /* 접수 일자 */ - , ERR.DATA_CD /* 접수코드 */ - , ERR.DIV_KB /* 취급구분 */ - , ERR.DFPAYYN /* 결재방법 */ - , ERR.RCPT_KB /* 내용문 유형 */ - , ERR.SEAL_CD /* 내용문 상세 종류 */ - , ERR.WORD_KB /* 내용문 종류 */ - , ERR.MAIL_CNT /* 내용문 매수 */ - , ERR.RECEV_CNT /* 수취인 수 */ - , ERR.ENV_CD /* 봉투 종류 */ - , ERR.COLOR_YN /* 칼라우편물 */ - , ERR.MM_YN /* 메일머지 플래그 */ - , ERR.FLEX_CD /* 이면구분 */ - , ERR.DM_CNT /* 동봉물 개수 */ - , ERR.SB_FG /* 반송불필요 여부 */ - , ERR.APVL_NB /* 승인번호 */ - , ERR.SEND_DATE /* 신청 일자 */ - , ERR.SEND_TIME /* 전송 시간 */ - , ERR.RELORSECT_CD /* 연계기관결제부서코드 */ - , ERR.RECEV_SENDER_ORG_CODE /* 발송기관코드 */ - , ERR.RECEV_SENDER_NM /* 발송인명 */ - , ERR.RECEV_SENDER_ZIPCODE /* 발송인 우편번호 */ - , ERR.RECEV_SENDER_ADDR /* 주소 */ - , ERR.RECEV_SENDER_DETAILADDR /* 상세주소 */ - , ERR.RECEV_SENDER_DEPART_TEL /* 부과부서 전화번호 */ - , ERR.RECEV_SENDER_DEPART_NM /* 부과부서 */ - , ERR.RECEV_DIV_CD /* 등기구분 */ - , ERR.RECEV_PRINT_DT /* 출력일자 */ - , ERR.RECEV_PRINT_YEAR /* 출력연도 */ - , ERR.RECEV_PRINT_MONTH /* 출력월 */ - , ERR.RECEV_PRINT_DAY /* 출력일 */ - , ERR.RECEV_SENDER_FAX /* 부과부서 팩스번호 */ - , ERR.RECEV_SERDER_STAFF /* 부과부서 담당자 */ - , ERR.RECEV_SENDER_EMAIL /* 부과부서 이메일 */ - , ERR.REG_VAR_DATA1 /* 추가 데이터1 */ - , ERR.REG_VAR_DATA2 /* 추가 데이터2 */ - , ERR.REG_VAR_DATA3 /* 추가 데이터3 */ - , ERR.REG_VAR_DATA4 /* 추가 데이터4 */ - , ERR.REG_VAR_DATA5 /* 추가 데이터5 */ - , ERR.JOB_CD /* 작업 코드 */ - , ERR.POST_PRCS_STTS_CD /* 우편 처리 상태 코드 */ - , ERR.DEL_YN /* 삭제 여부 */ - , ERR.REG_DT /* 등록 일시 */ - , ERR.RGTR /* 등록자 */ - , ERR.MDFCN_DT /* 수정 일시 */ - , ERR.MDFR /* 수정자 */ - , ERR.DEL_DT /* 삭제 일시 */ - , ERR.DLTR /* 삭제자 */ - , (SELECT GET_CODE_NM('EGP002', ERR.DIV_KB) FROM DUAL) AS DIV_KB_NM /* 취급 구분 명 */ - , (SELECT GET_CODE_NM('EGP012', ERR.POST_PRCS_STTS_CD) FROM DUAL) AS POST_PRCS_STTS_NM /* 우편 처리 상태 명 */ - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = ERR.RGTR) AS RGTR_NM /* 등록자 명 */ - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = ERR.MDFR) AS MDFR_NM /* 수정자 명 */ - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = ERR.DLTR) AS DLTR_NM /* 삭제자 명 */ + SELECT ERR.CON_KEY + , ERR.CON_ORG + , ERR.SNDNG_ID + , ERR.RCEPT_ID + , ERR.RCEPT_YMD + , ERR.DATA_CD + , ERR.DIV_KB + , ERR.DFPAYYN + , ERR.RCPT_KB + , ERR.SEAL_CD + , ERR.WORD_KB + , ERR.MAIL_CNT + , ERR.RECEV_CNT + , ERR.ENV_CD + , ERR.COLOR_YN + , ERR.MM_YN + , ERR.FLEX_CD + , ERR.DM_CNT + , ERR.SB_FG + , ERR.APVL_NB + , ERR.SEND_DATE + , ERR.SEND_TIME + , ERR.RELORSECT_CD + , ERR.RECEV_SENDER_ORG_CODE + , ERR.RECEV_SENDER_NM + , ERR.RECEV_SENDER_ZIPCODE + , ERR.RECEV_SENDER_ADDR + , ERR.RECEV_SENDER_DETAILADDR + , ERR.RECEV_SENDER_DEPART_TEL + , ERR.RECEV_SENDER_DEPART_NM + , ERR.RECEV_DIV_CD + , ERR.RECEV_PRINT_DT + , ERR.RECEV_PRINT_YEAR + , ERR.RECEV_PRINT_MONTH + , ERR.RECEV_PRINT_DAY + , ERR.RECEV_SENDER_FAX + , ERR.RECEV_SERDER_STAFF + , ERR.RECEV_SENDER_EMAIL + , ERR.REG_VAR_DATA1 + , ERR.REG_VAR_DATA2 + , ERR.REG_VAR_DATA3 + , ERR.REG_VAR_DATA4 + , ERR.REG_VAR_DATA5 + , ERR.JOB_CD + , ERR.POST_PRCS_STTS_CD + , ERR.DEL_YN + , ERR.REG_DT + , ERR.RGTR + , ERR.MDFCN_DT + , ERR.MDFR + , ERR.DEL_DT + , ERR.DLTR + , (SELECT GET_CODE_NM('EGP002', ERR.DIV_KB) FROM DUAL) AS DIV_KB_NM + , (SELECT GET_CODE_NM('EGP012', ERR.POST_PRCS_STTS_CD) FROM DUAL) AS POST_PRCS_STTS_NM + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = ERR.RGTR) AS RGTR_NM + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = ERR.MDFR) AS MDFR_NM + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = ERR.DLTR) AS DLTR_NM FROM TB_EPOST_RCPT_REG ERR /* 공시송달 상세 객체 가져오기(svbtcMapper.selectSvbtcDtls) */ SELECT SV.SVBTC_ID - , SV.SGG_CD - , SV.TASK_SE_CD - , SV.SNDNG_SE_CD , SV.SVBTC_YMD , SV.SVBTC_END_YMD , SV.DOC_NO , SV.TTL_NM , SV.ETC_CN , SV.TNOCS + , (SELECT GET_MASK_DATE(SV.SVBTC_YMD, '-') FROM DUAL) AS SVBTC_YMD + , (SELECT GET_MASK_DATE(SV.SVBTC_END_YMD, '-') FROM DUAL) AS SVBTC_END_YMD , SD.SNDNG_DTL_ID , SD.SNDNG_ID , SD.CRDN_ID @@ -272,27 +271,31 @@ , SD.CRDN_DT , SD.CRDN_STDG_NM , SD.CRDN_PLC - , SD.FFNLG_AMT - , SD.PCPTAX - , SD.ADAMT - , SD.SUM_AMT , SD.RCPN_NM - , SD.RCPN_BRDT , SD.RCPN_ADDR , SD.RCPN_DTL_ADDR , SD.RCPN_ZIP - , SD.CON_KEY , SD.RG_NO , SD.DLVR_YMD , SD.DLVR_TM , SD.UNDLVR_RSN_NM , SD.ACTL_RCPN_NM , SD.RCPN_REL_NM - , SD.RCPN_NM AS RCPN_NM_MASK - , CONCAT(SD.RCPN_ADDR, ' ', SD.RCPN_DTL_ADDR) AS RCPN_WHOL_ADDR_MASK - , SD.VHRNO AS VHRNO_MASK + , (SELECT GET_MASK_NAME(SD.RCPN_NM, 'MIDDLE', 2, '*') FROM DUAL) AS RCPN_NM_MASK + , REGEXP_REPLACE(CONCAT(SD.RCPN_ADDR, ' ', SD.RCPN_DTL_ADDR), '[0-9]', '*') AS WHOL_ADDR_MASK + , CONCAT(SUBSTRING(SD.VHRNO, 1, CHAR_LENGTH(SD.VHRNO) - 2), '**') AS VHRNO_MASK + , (SELECT GET_MASK_DATE(SD.DLVR_YMD, '-') FROM DUAL) AS DLVR_YMD_MASK + , (SELECT GET_INST_LEADER(S.INST_NM, S.INST_SE_CD) FROM DUAL) AS INST_LEADER + , OFFCS_FILE_PATH + , DEPT_TELNO + , CONCAT(SGG_NM, ' ', DEPT_NM) AS SGG_DEPT_NM + , #{printDocNo} AS INPUT_DOC_NO + , #{printTtlNm} AS INPUT_TTL_NM + , #{printSvbtcDate} AS INPUT_SVBTC_DATE FROM TB_SVBTC SV INNER JOIN TB_SNDNG_DTL SD ON (SV.SVBTC_ID = SD.SVBTC_ID) + INNER JOIN TB_SGG S ON (SV.SGG_CD = S.SGG_CD AND S.SGG_CD = #{sggCd}) + INNER JOIN TB_DEPT D ON (S.SGG_CD = D.SGG_CD AND D.DEPT_CD = #{deptCd}) AND SV.SVBTC_ID IN ( @@ -303,7 +306,7 @@ AND SV.SVBTC_ID = #{svbtcId} - AND SV.SNDNG_DTL_ID IN ( + AND SD.SNDNG_DTL_ID IN ( #{sndngDtlId} ) diff --git a/src/main/resources/template/hwp/svbtcList_inner.hwp b/src/main/resources/template/hwp/svbtcList_inner.hwp index 2b7d6124..bb479c4d 100644 Binary files a/src/main/resources/template/hwp/svbtcList_inner.hwp and b/src/main/resources/template/hwp/svbtcList_inner.hwp differ diff --git a/src/main/resources/template/hwp/svbtcList_root.hwp b/src/main/resources/template/hwp/svbtcList_root.hwp index 2207642b..68314f49 100644 Binary files a/src/main/resources/template/hwp/svbtcList_root.hwp and b/src/main/resources/template/hwp/svbtcList_root.hwp differ diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01240-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01240-main.jsp index b87a2151..a355702b 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01240-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01240-main.jsp @@ -298,12 +298,10 @@ ${pageName}Control.getInfo = (svbtcId) => { if (typeof svbtcId == "undefined" || svbtcId == null || svbtcId == "") return; - let params = { - callPurpose : "view" - , sggCd : ${pageName}Control.dataset.getValue("SGG_CD") // 시군구 코드 - , taskSeCd : ${pageName}Control.dataset.getValue("TASK_SE_CD") // 업무 구분 코드 - , svbtcId : svbtcId // 공시송달 ID - }; + let params = ${pageName}Control.query; + params.callPurpose = "view"; // 호출 용도 + params.pageNum = 1; // 페이지 번호 + params.svbtcId = svbtcId; // 공시송달 ID ajax.get({ url : ${pageName}Control.urls.getInfo @@ -438,20 +436,21 @@ } // 한글파일 출력 - makeHwpFileSvbtc${pageName} = (params) => { - let selected = ${pageName}Control.dataset.getKeys("selected"); - - if (selected.length < 1) return; - - if (!params) { - params = {}; - params["svbtcIDs"] = selected.join(","); - } + callbackHwpFileSvbtc${pageName} = (obj) => { + // 서버에 전송할 data(파라미터) 생성 + let params = { + sggCd : ${pageName}Control.dataset.getValue("SGG_CD") // 시군구 코드 + , taskSeCd : ${pageName}Control.dataset.getValue("TASK_SE_CD") // 업무 구분 코드 + , svbtcId : ${pageName}Control.dataset.getValue("SVBTC_ID") // 반송 ID + , sndngSeCd : ${pageName}Control.dataset.getValue("SNDNG_SE_CD") // 발송 구분 코드 + }; - let taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val(); + params.printDocNo = obj.docNo; // 문서 번호 + params.printTtlNm = obj.ttlNm; // 제목 + params.printSvbtcDate = obj.textDate; // 공고 기한 ajax.get({ - url : wctx.url("/" + taskSeCd + "/sndb/sndb01/240/makeSvbtcHwp.do") + url : wctx.url("/" + params.taskSeCd + "/sndb/sndb01/240/makeSvbtcHwp.do") , data : params || {} , success : resp => { if (resp.filePath != null && resp.filePath != "") { @@ -576,7 +575,27 @@ // 한글파일 출력 버튼 이벤트 fnHwpSvbtc${pageName} = () => { - makeHwpFileSvbtc${pageName}(); + // 삭제 사유 입력 + let callbackFuncName = "callbackHwpFileSvbtc${pageName}"; + let docNo = ${pageName}Control.dataset.getValue("DOC_NO"); + let ttlNm = ${pageName}Control.dataset.getValue("TASK_SE_NM") + " 과태료처분에 대한 " + ${pageName}Control.dataset.getValue("TTL_NM"); + let textDate = DateUtil.getDateDay(1).date + " ~ " + DateUtil.getDateDay(15).date + " (15일간)"; + + let popupWidth = 860; + let popupHeight = 240; + let popupX = (window.screen.width / 2) - (popupWidth / 2); + let popupY= (window.screen.height / 2) - (popupHeight / 2); + + window.open( + wctx.url("/resources/html/inputDocNoTtlDialog.html" + + "?callbackFuncName=" + callbackFuncName + + "&docNo=" + docNo + + "&ttlNm=" + ttlNm + + "&textDate=" + textDate + ) + , "inputDocNoTtlDialog" + , 'status=no, height=' + popupHeight + ', width=' + popupWidth + ', left='+ popupX + ', top='+ popupY + ); } // 수정 버튼 이벤트 diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01250-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01250-info.jsp index 72de4a9e..bf399d6c 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01250-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01250-info.jsp @@ -133,6 +133,8 @@ + + @@ -300,18 +302,25 @@ * 사용자 함수(function) **************************************************************************/ // 공시송달 HWP 저장 - makeHwpFileSvbtcDtl${pageName} = (params) => { + callbackHwpFileSvbtcDtl${pageName} = (obj) => { let selected = ${pageName}Control.dataset.getKeys("selected"); if (selected.length < 1) return; - if (!params) { - params = {}; - params["sndngDtlIDs"] = selected.join(","); - } + // 서버에 전송할 data(파라미터) 생성 + let params = { + sggCd : ${pageName}Control.dataset.getValue("SGG_CD") // 시군구 코드 + , taskSeCd : ${pageName}Control.dataset.getValue("TASK_SE_CD") // 업무 구분 코드 + , svbtcId : ${pageName}Control.dataset.getValue("SVBTC_ID") // 반송 ID + }; + + params["sndngDtlIDs"] = selected.join(","); + params.printDocNo = obj.docNo; // 문서 번호 + params.printTtlNm = obj.ttlNm; // 제목 + params.printSvbtcDate = obj.textDate; // 공고 기한 ajax.get({ - url : wctx.url("/" + params.taskSeCd + "/sndb/sndb01/250/makeSvbtcDtlHwp.do") + url : wctx.url("/" + params.taskSeCd + "/sndb/sndb01/240/makeSvbtcHwp.do") , data : params || {} , success : resp => { if (resp.filePath != null && resp.filePath != "") { @@ -386,7 +395,27 @@ // 한글파일 출력 버튼 이벤트 fnHwpSvbtcDtl${pageName} = () => { - makeHwpFileSvbtcDtl${pageName}(); + // 삭제 사유 입력 + let callbackFuncName = "callbackHwpFileSvbtcDtl${pageName}"; + let docNo = ${pageName}Control.dataset.getValue("DOC_NO"); + let ttlNm = ${pageName}Control.dataset.getValue("TASK_SE_NM") + " 과태료처분에 대한 " + ${pageName}Control.dataset.getValue("TTL_NM"); + let textDate = DateUtil.getDateDay(1).date + " ~ " + DateUtil.getDateDay(15).date + " (15일간)"; + + let popupWidth = 860; + let popupHeight = 240; + let popupX = (window.screen.width / 2) - (popupWidth / 2); + let popupY= (window.screen.height / 2) - (popupHeight / 2); + + window.open( + wctx.url("/resources/html/inputDocNoTtlDialog.html" + + "?callbackFuncName=" + callbackFuncName + + "&docNo=" + docNo + + "&ttlNm=" + ttlNm + + "&textDate=" + textDate + ) + , "inputDocNoTtlDialog" + , 'status=no, height=' + popupHeight + ', width=' + popupWidth + ', left='+ popupX + ', top='+ popupY + ); } // 공시송달 삭제 버튼 이벤트 diff --git a/src/main/webapp/resources/html/inputDocNoTtlDialog.html b/src/main/webapp/resources/html/inputDocNoTtlDialog.html new file mode 100644 index 00000000..634deb98 --- /dev/null +++ b/src/main/webapp/resources/html/inputDocNoTtlDialog.html @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 공시송달 출력 입력 + + + +
+
+ +
+ +
+ + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + +