pdf관련 패키지 정리

main
이범준 10 months ago
parent 25b9a208f8
commit 0beaddf614

@ -0,0 +1,23 @@
package cokr.xit.fims.cmmn.dao;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
@Mapper("linkMapper")
public interface LinkMapper extends AbstractMapper {
/** .
* @param params
* @return
*/
int insertElectronicNoticeSndngMaster(DataObject params);
/** .
* @param params
* @return
*/
int insertElectronicNoticeSndngDetail(DataObject params);
}

@ -0,0 +1,5 @@
package cokr.xit.fims.cmmn.pdf;
public abstract class PDFExtractFormat {
}

@ -6,7 +6,7 @@ import java.util.List;
import cokr.xit.fims.sprt.PrintOption; import cokr.xit.fims.sprt.PrintOption;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
public abstract class PDFFormat { public abstract class PDFPrintFormat {
protected List<DefaultOtptArtclStng> prototypeStngs = new ArrayList<DefaultOtptArtclStng>(); protected List<DefaultOtptArtclStng> prototypeStngs = new ArrayList<DefaultOtptArtclStng>();

@ -0,0 +1,10 @@
package cokr.xit.fims.cmmn.pdf.extrationFormat;
import cokr.xit.fims.cmmn.pdf.PDFExtractFormat;
/**
*
*/
public class ElectronicNotice extends PDFExtractFormat {
}

@ -1,11 +1,11 @@
package cokr.xit.fims.cmmn.pdf.format; package cokr.xit.fims.cmmn.pdf.printFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.pdf.PDFFormat; import cokr.xit.fims.cmmn.pdf.PDFPrintFormat;
import cokr.xit.fims.cmmn.pdf.PDFPrintUtil; import cokr.xit.fims.cmmn.pdf.PDFPrintUtil;
import cokr.xit.fims.mngt.FactionUtil; import cokr.xit.fims.mngt.FactionUtil;
import cokr.xit.fims.sprt.PrintOption; import cokr.xit.fims.sprt.PrintOption;
@ -15,7 +15,7 @@ import cokr.xit.foundation.data.DataObject;
/** /**
* *
*/ */
public class Advntce extends PDFFormat { public class Advntce extends PDFPrintFormat {
public Advntce(){ public Advntce(){
addForPost( addForPost(

@ -1,18 +1,18 @@
package cokr.xit.fims.cmmn.pdf.format; package cokr.xit.fims.cmmn.pdf.printFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.pdf.PDFFormat; import cokr.xit.fims.cmmn.pdf.PDFPrintFormat;
import cokr.xit.fims.cmmn.pdf.PDFPrintUtil; import cokr.xit.fims.cmmn.pdf.PDFPrintUtil;
import cokr.xit.fims.mngt.FactionUtil; import cokr.xit.fims.mngt.FactionUtil;
import cokr.xit.fims.sprt.PrintOption; import cokr.xit.fims.sprt.PrintOption;
import cokr.xit.foundation.data.DataFormat; import cokr.xit.foundation.data.DataFormat;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
public class Nht extends PDFFormat { public class Nht extends PDFPrintFormat {
public Nht() { public Nht() {
addForPost( addForPost(

@ -0,0 +1,41 @@
package cokr.xit.fims.cmmn.service.bean;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.fims.cmmn.dao.LinkMapper;
import cokr.xit.foundation.AbstractComponent;
import cokr.xit.foundation.data.DataObject;
@Component("linkBean")
public class LinkBean extends AbstractComponent {
@Resource(name = "linkMapper")
private LinkMapper linkMapper;
public boolean insertElectronicNoticeSndng(DataObject masterInfo, List<DataObject> detailInfos) {
int effected = linkMapper.insertElectronicNoticeSndngMaster(masterInfo);
if(effected != 1) {
throw new RuntimeException("발송 마스터 등록 오류");
}
effected = 0;
for(int i=0; i < detailInfos.size(); i++) {
detailInfos.get(i).set("unitySndngMastrId", masterInfo.string("unitySndngMastrId"));
effected = linkMapper.insertElectronicNoticeSndngDetail(detailInfos.get(i));
if(effected != 1) {
throw new RuntimeException("발송 상세 등록 오류");
}
}
if(effected != 1) {
throw new RuntimeException("발송 상세 등록 오류");
}
return true;
}
}

@ -41,11 +41,11 @@ import cokr.xit.fims.cmmn.hwp.format.RcvmtConfirm;
import cokr.xit.fims.cmmn.hwp.format.ReportOnClaims; import cokr.xit.fims.cmmn.hwp.format.ReportOnClaims;
import cokr.xit.fims.cmmn.hwp.format.RequestForDelivery; import cokr.xit.fims.cmmn.hwp.format.RequestForDelivery;
import cokr.xit.fims.cmmn.pdf.DefaultOtptArtclStng; import cokr.xit.fims.cmmn.pdf.DefaultOtptArtclStng;
import cokr.xit.fims.cmmn.pdf.PDFFormat; import cokr.xit.fims.cmmn.pdf.PDFPrintFormat;
import cokr.xit.fims.cmmn.pdf.PDFPrintUtil; import cokr.xit.fims.cmmn.pdf.PDFPrintUtil;
import cokr.xit.fims.cmmn.pdf.PstnAndSize; import cokr.xit.fims.cmmn.pdf.PstnAndSize;
import cokr.xit.fims.cmmn.pdf.format.Advntce; import cokr.xit.fims.cmmn.pdf.printFormat.Advntce;
import cokr.xit.fims.cmmn.pdf.format.Nht; import cokr.xit.fims.cmmn.pdf.printFormat.Nht;
import cokr.xit.fims.cmmn.service.bean.StngBean; import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
@ -287,7 +287,7 @@ public class IntegrationSearchServiceBean extends AbstractServiceBean implements
public Map<String, String> makePdfFile(String formatType, String formatName, PrintOption printOption, String[] crdnIds) { public Map<String, String> makePdfFile(String formatType, String formatName, PrintOption printOption, String[] crdnIds) {
Map<String, String> result = new HashMap<>(); Map<String, String> result = new HashMap<>();
PDFFormat pdfFormat = null; PDFPrintFormat pdfFormat = null;
if(formatName.equals("advntce")) { if(formatName.equals("advntce")) {
pdfFormat = new Advntce(); pdfFormat = new Advntce();
} else if(formatName.equals("nht")) { } else if(formatName.equals("nht")) {

@ -10,9 +10,9 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import cokr.xit.fims.cmmn.pdf.DefaultOtptArtclStng; import cokr.xit.fims.cmmn.pdf.DefaultOtptArtclStng;
import cokr.xit.fims.cmmn.pdf.PDFFormat; import cokr.xit.fims.cmmn.pdf.PDFPrintFormat;
import cokr.xit.fims.cmmn.pdf.format.Advntce; import cokr.xit.fims.cmmn.pdf.printFormat.Advntce;
import cokr.xit.fims.cmmn.pdf.format.Nht; import cokr.xit.fims.cmmn.pdf.printFormat.Nht;
import cokr.xit.fims.sprt.OtptArtclStng; import cokr.xit.fims.sprt.OtptArtclStng;
import cokr.xit.fims.sprt.OtptForm; import cokr.xit.fims.sprt.OtptForm;
import cokr.xit.fims.sprt.OtptStngQuery; import cokr.xit.fims.sprt.OtptStngQuery;
@ -41,7 +41,7 @@ public class OtptStngBean extends AbstractComponent {
public Map<String, Object> getOtptArtclStngMap(OtptStngQuery query){ public Map<String, Object> getOtptArtclStngMap(OtptStngQuery query){
Map<String,Object> otptStngMap = new HashMap<String,Object>(); Map<String,Object> otptStngMap = new HashMap<String,Object>();
PDFFormat pdfFormat = null; PDFPrintFormat pdfFormat = null;
switch(query.getSndngSeCd()) { switch(query.getSndngSeCd()) {
case "02" : case "02" :
pdfFormat = new Advntce(); pdfFormat = new Advntce();

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.fims.cmmn.dao.LinkMapper">
<insert id="insertElectronicNoticeSndngMaster" parameterType="map">
/* 전자고지 발송 마스터 정보 등록(linkMapper.insertElectronicNoticeSndngMaster) */
<selectKey resultType="string" keyProperty="unitySndngMastrId" keyColumn="NEW_ID" order="BEFORE">
SELECT
CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(UNITY_SNDNG_MASTR_ID,5)) + 1, 1) AS INT), 16, '0'))
AS NEW_ID
FROM TB_CNTC_SNDNG_MASTR
</selectKey>
INSERT
INTO TB_CNTC_SNDNG_MASTR (
UNITY_SNDNG_MASTR_ID
, SIGNGU_CODE
, FFNLG_CODE
, TMPLAT_ID
, SNDNG_TY_CODE
, SNDNG_CO
, SNDNG_PROCESS_STTUS
, SNDNG_DT
, CLOS_DT
, ERROR_CODE
, ERROR_MSSAGE
, REGIST_DT
, REGISTER
, UPDT_DT
, UPDUSR
) VALUES (
#{unitySndngMastrId}
, #{signguCode}
, #{ffnlgCode}
, #{tmplatId}
, 'ENS'
, #{sndngCo}
, 'accept'
, #{sndngDt}
, #{closDt}
, #{errorCode}
, #{errorMssage}
, <include refid="utility.now" />
, #{register}
, <include refid="utility.now" />
, #{updusr}
)
</insert>
<insert id="insertElectronicNoticeSndngDetail" parameterType="map">
/* 전자고지 발송 디테일 정보 등록(linkMapper.insertElectronicNoticeSndngDetail) */
<selectKey resultType="string" keyProperty="unitySndngDetailId" keyColumn="NEW_ID" order="BEFORE">
SELECT
CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(UNITY_SNDNG_DETAIL_ID,5)) + 1, 1) AS INT), 16, '0'))
AS NEW_ID
FROM TB_CNTC_SNDNG_DETAIL
</selectKey>
INSERT
INTO TB_CNTC_SNDNG_DETAIL (
UNITY_SNDNG_DETAIL_ID
, UNITY_SNDNG_MASTR_ID
, SIGNGU_CODE
, FFNLG_CODE
, MAIN_CODE
, VHCLE_NO
, IHIDNUM
, MOBLPHON_NO
, NM
, ADRES
, DETAIL_ADRES
, ZIP
, TMPLT_MSG_DATA
, MOBILE_PAGE_CN
, USE_INSTT_IDNTFC_ID
, EXTERNAL_DOCUMENT_UUID
, REGIST_DT
, REGISTER
, UPDT_DT
, UPDUSR
) VALUES (
#{unitySndngDetailId}
, #{unitySndngMastrId}
, #{signguCode}
, #{ffnlgCode}
, #{mainCode}
, #{vhcleNo}
, #{ihidnum}
, #{moblphonNo}
, #{nm}
, #{adres}
, #{detailAdres}
, #{zip}
, #{tmpltMsgData}
, #{mobilePageCn}
, #{useInsttIdntfcId}
, #{externalDocumentUuid}
, <include refid="utility.now" />
, #{register}
, <include refid="utility.now" />
, #{updusr}
)
</insert>
</mapper>

@ -54,6 +54,9 @@
<button type="button" id="btnOpenTempFileUploadWindow" class="btn btn-outline-dark"> <button type="button" id="btnOpenTempFileUploadWindow" class="btn btn-outline-dark">
외부자료 파일 처리 외부자료 파일 처리
</button> </button>
<button type="button" id="btnOpenStngDialog" class="btn btn-outline-dark">
특화설정
</button>
<button type="button" id="btnGoToCvlcptDscsn" class="btn btn-outline-dark"> <button type="button" id="btnGoToCvlcptDscsn" class="btn btn-outline-dark">
종합민원관리 종합민원관리
</button> </button>
@ -162,6 +165,14 @@
</nav> </nav>
<template id="selectStngButtonsTemplate">
<span class="row g-3" style="display: flex;flex-direction:column">
<button type="button" class="btn btn-xl btn-primary">장비단속파일 서식 설정</button>
<button type="button" class="btn btn-xl btn-primary">출력물 서식 설정</button>
<button type="button" class="btn btn-xl btn-primary">pdf 고지서 정보 추출 설정</button>
</span>
</template>
<c:set var="topScript" scope="request"> <c:set var="topScript" scope="request">
function fnOpenTempFileUploadWindow(){ function fnOpenTempFileUploadWindow(){
window.open( window.open(
@ -171,6 +182,17 @@ function fnOpenTempFileUploadWindow(){
); );
} }
function fnOpenStngDialog(){
dialog.open({
id : "selectStngDialog",
title : "설정 선택",
content : document.getElementById("selectStngButtonsTemplate").innerHTML,
size : "sm",
init : () => {},
onClose : () => {}
});
}
function fnOpenMyInfo(){ function fnOpenMyInfo(){
window.open( window.open(
wctx.url("/user/openMyInfo.do") wctx.url("/user/openMyInfo.do")
@ -390,5 +412,10 @@ $("#photoMask--top").on( "click", function() {
$("#btnOpenTempFileUploadWindow").on( "click", function() { $("#btnOpenTempFileUploadWindow").on( "click", function() {
fnOpenTempFileUploadWindow(); fnOpenTempFileUploadWindow();
}); });
/*--------------------- 특화 설정 ---------------------*/
$("#btnOpenStngDialog").on( "click", function() {
fnOpenStngDialog();
});
</c:set> </c:set>

Loading…
Cancel
Save