출력설정 테이블 변경

main
이범준 12 months ago
parent a64a4cea2a
commit b76e1dc44b

@ -150,7 +150,7 @@ public class PDFPrintUtil extends PrintUtil {
} }
} }
public float[] getPstnStng(DefaultOtptStng prototypeStng, DataObject sggStng, String otptPaperSeCd) { public float[] getPstnStng(DefaultOtptStng prototypeStng, DataObject sggStng, String paperSeCd) {
if(!sggStng.string("LEFT_PSTN").equals("") && !sggStng.string("TOP_PSTN").equals("")) { if(!sggStng.string("LEFT_PSTN").equals("") && !sggStng.string("TOP_PSTN").equals("")) {
return new float[] { return new float[] {
sggStng.number("LEFT_PSTN").floatValue(), sggStng.number("LEFT_PSTN").floatValue(),
@ -158,8 +158,8 @@ public class PDFPrintUtil extends PrintUtil {
}; };
} else { } else {
return new float[] { return new float[] {
prototypeStng.getLeftPstn(otptPaperSeCd), prototypeStng.getLeftPstn(paperSeCd),
prototypeStng.getTopPstn(otptPaperSeCd) prototypeStng.getTopPstn(paperSeCd)
}; };
} }
} }

@ -12,7 +12,7 @@ public class OtptForm extends AbstractEntity {
private String sggCd; private String sggCd;
private String taskSeCd; private String taskSeCd;
private String sndngSeCd; private String sndngSeCd;
private String otptPaperSeCd; private String paperSeCd;
private List<OtptStng> otptStngList; private List<OtptStng> otptStngList;
private String[] otptFormIDs; private String[] otptFormIDs;
} }

@ -21,5 +21,5 @@ public class OtptStng extends AbstractEntity {
private String sggCd; private String sggCd;
private String taskSeCd; private String taskSeCd;
private String sndngSeCd; private String sndngSeCd;
private String otptPaperSeCd; private String paperSeCd;
} }

@ -10,7 +10,7 @@ public class OtptStngQuery extends CmmnQuery {
private String sndngSeCd; private String sndngSeCd;
//출력용지구분코드 //출력용지구분코드
private String otptPaperSeCd; private String paperSeCd;
public String getSndngSeCd() { public String getSndngSeCd() {
return ifEmpty(sndngSeCd, () -> null); return ifEmpty(sndngSeCd, () -> null);
@ -21,12 +21,12 @@ public class OtptStngQuery extends CmmnQuery {
return self(); return self();
} }
public String getOtptPaperSeCd() { public String getPaperSeCd() {
return ifEmpty(otptPaperSeCd, () -> null); return ifEmpty(paperSeCd, () -> null);
} }
public <T extends OtptStngQuery> T setOtptPaperSeCd(String otptPaperSeCd) { public <T extends OtptStngQuery> T setPaperSeCd(String paperSeCd) {
this.otptPaperSeCd = otptPaperSeCd; this.paperSeCd = paperSeCd;
return self(); return self();
} }

@ -17,7 +17,7 @@ public class PrintOption {
/** /**
* *
*/ */
private String otptPaperSeCd; private String paperSeCd;
/** /**
* *

@ -304,14 +304,14 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
try { try {
String otptPaperSeCd = printOption.getOtptPaperSeCd(); String paperSeCd = printOption.getPaperSeCd();
PDFPrintUtil pdfPrintUtil = new PDFPrintUtil(); PDFPrintUtil pdfPrintUtil = new PDFPrintUtil();
UserInfo userInfo = currentUser(); UserInfo userInfo = currentUser();
factionBean.initUserInfo(userInfo); factionBean.initUserInfo(userInfo);
pdfPrintUtil.setPrintRequestUserInfo(userInfo); pdfPrintUtil.setPrintRequestUserInfo(userInfo);
// //
pdfPrintUtil.setting(otptPaperSeCd); pdfPrintUtil.setting(paperSeCd);
String resultFilePath = pdfPrintUtil.filePathForNewFile(); String resultFilePath = pdfPrintUtil.filePathForNewFile();
@ -324,7 +324,7 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
//용지 크기 설정 //용지 크기 설정
PDRectangle paper = null; PDRectangle paper = null;
if(otptPaperSeCd.equals("01")) { if(paperSeCd.equals("01")) {
paper = PDRectangle.A4; paper = PDRectangle.A4;
} else { } else {
paper = PDRectangle.LETTER; paper = PDRectangle.LETTER;
@ -345,7 +345,7 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
List<DefaultOtptStng> prototypeStngList = pdfFormat.getPrototypeStngs(); List<DefaultOtptStng> prototypeStngList = pdfFormat.getPrototypeStngs();
otptStngQuery.setSndngSeCd(sndngSeCd); otptStngQuery.setSndngSeCd(sndngSeCd);
otptStngQuery.setOtptPaperSeCd(otptPaperSeCd); otptStngQuery.setPaperSeCd(paperSeCd);
List<DataObject> otptStng = otptStngMapper.selectOtptStngList(otptStngQuery); List<DataObject> otptStng = otptStngMapper.selectOtptStngList(otptStngQuery);
@ -368,7 +368,7 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
DefaultOtptStng prototypeStng = prototypeStngList.stream() DefaultOtptStng prototypeStng = prototypeStngList.stream()
.filter(item -> item.getOtptNm().equals(otptNm)).toList().get(0); .filter(item -> item.getOtptNm().equals(otptNm)).toList().get(0);
float[] pstn = pdfPrintUtil.getPstnStng(prototypeStng, otptItemStng, otptPaperSeCd); float[] pstn = pdfPrintUtil.getPstnStng(prototypeStng, otptItemStng, paperSeCd);
float[] size = pdfPrintUtil.getSize(prototypeStng, otptItemStng); float[] size = pdfPrintUtil.getSize(prototypeStng, otptItemStng);
boolean forPost = prototypeStng.isForPost(); boolean forPost = prototypeStng.isForPost();

@ -469,7 +469,7 @@ public class Sprt01Controller extends ApplicationController {
filter(item -> item.getCode().equals(otptStngQuery.getSndngSeCd())).findFirst().get().getValue(); filter(item -> item.getCode().equals(otptStngQuery.getSndngSeCd())).findFirst().get().getValue();
String otptPaperSeNm = FIM078.stream(). String otptPaperSeNm = FIM078.stream().
filter(item -> item.getCode().equals(otptStngQuery.getOtptPaperSeCd())).findFirst().get().getValue(); filter(item -> item.getCode().equals(otptStngQuery.getPaperSeCd())).findFirst().get().getValue();
String otptStngTitle = "["+sggNm+", "+taskSeNm+"]"+" "+sndngSeNm+" "+"("+otptPaperSeNm+")"; String otptStngTitle = "["+sggNm+", "+taskSeNm+"]"+" "+sndngSeNm+" "+"("+otptPaperSeNm+")";
mav.addObject("otptStngTitle", otptStngTitle); mav.addObject("otptStngTitle", otptStngTitle);

@ -8,7 +8,7 @@ SELECT OTPT_FORM_ID
, SGG_CD , SGG_CD
, TASK_SE_CD , TASK_SE_CD
, SNDNG_SE_CD , SNDNG_SE_CD
, OTPT_PAPER_SE_CD , PAPER_SE_CD
, OTPT_NM , OTPT_NM
, LEFT_PSTN , LEFT_PSTN
, TOP_PSTN , TOP_PSTN
@ -19,29 +19,29 @@ SELECT OTPT_FORM_ID
, FONT_COLOR , FONT_COLOR
, FONT_STYLE , FONT_STYLE
, TEXT_SORT , TEXT_SORT
FROM TB_OTPT_FORM FROM TB_OTPT_FORM_STNG
WHERE USE_YN = 'Y' WHERE USE_YN = 'Y'
AND SGG_CD = #{sggCd} AND SGG_CD = #{sggCd}
AND TASK_SE_CD = #{taskSeCd} AND TASK_SE_CD = #{taskSeCd}
AND SNDNG_SE_CD = #{sndngSeCd} AND SNDNG_SE_CD = #{sndngSeCd}
AND OTPT_PAPER_SE_CD = #{otptPaperSeCd} AND PAPER_SE_CD = #{paperSeCd}
</select> </select>
<insert id="insertStng" parameterType="cokr.xit.fims.sprt.OtptStng"> <insert id="insertStng" parameterType="cokr.xit.fims.sprt.OtptStng">
/* 출력 설정 등록(otptStngMapper.insertStng) */ /* 출력 설정 등록(otptStngMapper.insertStng) */
<selectKey resultType="string" keyProperty="otptFormId" keyColumn="NEW_ID" order="BEFORE"> <selectKey resultType="string" keyProperty="otptFormId" keyColumn="NEW_ID" order="BEFORE">
SELECT SELECT
CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(OTPT_FORM_ID,5)) + 1, 1) AS INT), 16, '0')) LPAD(CAST(IFNULL(MAX(OTPT_FORM_ID) + 1, 1) AS INT), 10, '0')
AS NEW_ID AS NEW_ID
FROM TB_OTPT_FORM FROM TB_OTPT_FORM_STNG
</selectKey> </selectKey>
INSERT INSERT
INTO TB_OTPT_FORM ( INTO TB_OTPT_FORM_STNG (
OTPT_FORM_ID OTPT_FORM_ID
, SGG_CD , SGG_CD
, TASK_SE_CD , TASK_SE_CD
, SNDNG_SE_CD , SNDNG_SE_CD
, OTPT_PAPER_SE_CD , PAPER_SE_CD
, OTPT_NM , OTPT_NM
, LEFT_PSTN , LEFT_PSTN
, TOP_PSTN , TOP_PSTN
@ -60,7 +60,7 @@ INSERT
, #{sggCd} , #{sggCd}
, #{taskSeCd} , #{taskSeCd}
, #{sndngSeCd} , #{sndngSeCd}
, #{otptPaperSeCd} , #{paperSeCd}
, #{otptNm} , #{otptNm}
, #{leftPstn} , #{leftPstn}
, #{topPstn} , #{topPstn}
@ -79,7 +79,7 @@ INSERT
<update id="updateStng" parameterType="cokr.xit.fims.sprt.OtptStng"> <update id="updateStng" parameterType="cokr.xit.fims.sprt.OtptStng">
/* 출력 설정 수정(otptStngMapper.updateStng) */ /* 출력 설정 수정(otptStngMapper.updateStng) */
UPDATE TB_OTPT_FORM UPDATE TB_OTPT_FORM_STNG
SET OTPT_NM = #{otptNm} SET OTPT_NM = #{otptNm}
, LEFT_PSTN = #{leftPstn} , LEFT_PSTN = #{leftPstn}
, TOP_PSTN = #{topPstn} , TOP_PSTN = #{topPstn}
@ -97,14 +97,14 @@ UPDATE TB_OTPT_FORM
<update id="deleteStng" parameterType="cokr.xit.fims.sprt.OtptForm"> <update id="deleteStng" parameterType="cokr.xit.fims.sprt.OtptForm">
/* 출력 설정 삭제(otptStngMapper.deleteStng) */ /* 출력 설정 삭제(otptStngMapper.deleteStng) */
UPDATE TB_OTPT_FORM UPDATE TB_OTPT_FORM_STNG
SET USE_YN = 'N' SET USE_YN = 'N'
, MDFCN_DT = <include refid="utility.now" /> , MDFCN_DT = <include refid="utility.now" />
, MDFR = #{modifiedBy} , MDFR = #{modifiedBy}
WHERE SGG_CD = #{sggCd} WHERE SGG_CD = #{sggCd}
AND TASK_SE_CD = #{taskSeCd} AND TASK_SE_CD = #{taskSeCd}
AND SNDNG_SE_CD = #{sndngSeCd} AND SNDNG_SE_CD = #{sndngSeCd}
AND OTPT_PAPER_SE_CD = #{otptPaperSeCd} AND PAPER_SE_CD = #{paperSeCd}
<if test='otptFormIDs != null'> <if test='otptFormIDs != null'>
AND OTPT_FORM_ID NOT IN (<foreach collection="otptFormIDs" item="OTPT_FORM_ID" separator=",">#{OTPT_FORM_ID}</foreach>) AND OTPT_FORM_ID NOT IN (<foreach collection="otptFormIDs" item="OTPT_FORM_ID" separator=",">#{OTPT_FORM_ID}</foreach>)
</if> </if>

@ -134,7 +134,7 @@ $(document).ready(function(){
taskSeCd : taskSeCd taskSeCd : taskSeCd
}; };
if(fileType == "pdf" || fileType == "preview"){ if(fileType == "pdf" || fileType == "preview"){
submitParam.otptPaperSeCd = "01"; submitParam.paperSeCd = "01";
} }
ajax.post({ ajax.post({

@ -21,7 +21,7 @@
<option value="02">사전통지서</option> <option value="02">사전통지서</option>
</select> </select>
용지 용지
<select class="form-select" name="otptPaperSeCd"> <select class="form-select" name="paperSeCd">
<c:forEach items="${FIM078List}" var="item"> <c:forEach items="${FIM078List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
</c:forEach> </c:forEach>
@ -97,7 +97,7 @@
<input type="hidden" name="sggCd" /> <input type="hidden" name="sggCd" />
<input type="hidden" name="taskSeCd" /> <input type="hidden" name="taskSeCd" />
<input type="hidden" name="sndngSeCd" /> <input type="hidden" name="sndngSeCd" />
<input type="hidden" name="otptPaperSeCd" /> <input type="hidden" name="paperSeCd" />
<input type="text" name="dialogId" hidden /> <input type="text" name="dialogId" hidden />
</form> </form>
@ -246,7 +246,7 @@ $(document).ready(function(){
$("#frmEdit--${pageName}").find("[name='sggCd']").val(query.sggCd); $("#frmEdit--${pageName}").find("[name='sggCd']").val(query.sggCd);
$("#frmEdit--${pageName}").find("[name='taskSeCd']").val(query.taskSeCd); $("#frmEdit--${pageName}").find("[name='taskSeCd']").val(query.taskSeCd);
$("#frmEdit--${pageName}").find("[name='sndngSeCd']").val(query.sndngSeCd); $("#frmEdit--${pageName}").find("[name='sndngSeCd']").val(query.sndngSeCd);
$("#frmEdit--${pageName}").find("[name='otptPaperSeCd']").val(query.otptPaperSeCd); $("#frmEdit--${pageName}").find("[name='paperSeCd']").val(query.paperSeCd);
$("#currentOtpt--${pageName}").text(resp.otptStngTitle); $("#currentOtpt--${pageName}").text(resp.otptStngTitle);
$P.otptStngMap = resp.otptStngMap; $P.otptStngMap = resp.otptStngMap;
@ -330,7 +330,7 @@ $(document).ready(function(){
$P.fnGetProto = (prototypeList, otptNm, stngItemAttrNm) => { $P.fnGetProto = (prototypeList, otptNm, stngItemAttrNm) => {
if(stngItemAttrNm == "leftPstn" || stngItemAttrNm == "topPstn"){ if(stngItemAttrNm == "leftPstn" || stngItemAttrNm == "topPstn"){
var paperSeCd = $("#frmEdit--${pageName}").find("[name='otptPaperSeCd']").val(); var paperSeCd = $("#frmEdit--${pageName}").find("[name='paperSeCd']").val();
var paperNm = ""; var paperNm = "";
if(paperSeCd == "01"){ if(paperSeCd == "01"){
paperNm = "a4"; paperNm = "a4";
@ -384,7 +384,7 @@ $(document).ready(function(){
//행 추가 //행 추가
$P.addRow = (otptNm) => { $P.addRow = (otptNm) => {
var paperSeCd = $("#frmEdit--${pageName}").find("[name='otptPaperSeCd']").val(); var paperSeCd = $("#frmEdit--${pageName}").find("[name='paperSeCd']").val();
var prototypeList; var prototypeList;
var tbodyId; var tbodyId;
@ -545,7 +545,7 @@ $(document).ready(function(){
sggCd : query.sggCd, sggCd : query.sggCd,
taskSeCd : query.taskSeCd, taskSeCd : query.taskSeCd,
sndngSeCd : query.sndngSeCd, sndngSeCd : query.sndngSeCd,
otptPaperSeCd : query.otptPaperSeCd paperSeCd : query.paperSeCd
}; };
rowArr.push(row); rowArr.push(row);
}); });
@ -584,7 +584,7 @@ $(document).ready(function(){
$("#frmSearch--${pageName}").find("[name='sggCd']").val(query.sggCd); $("#frmSearch--${pageName}").find("[name='sggCd']").val(query.sggCd);
$("#frmSearch--${pageName}").find("[name='taskSeCd']").val(query.taskSeCd); $("#frmSearch--${pageName}").find("[name='taskSeCd']").val(query.taskSeCd);
$("#frmSearch--${pageName}").find("[name='sndngSeCd']").val(query.sndngSeCd); $("#frmSearch--${pageName}").find("[name='sndngSeCd']").val(query.sndngSeCd);
$("#frmSearch--${pageName}").find("[name='otptPaperSeCd']").val(query.otptPaperSeCd); $("#frmSearch--${pageName}").find("[name='paperSeCd']").val(query.paperSeCd);
$("#btnLoad--${pageName}").click(); $("#btnLoad--${pageName}").click();

Loading…
Cancel
Save