출력설정 테이블 변경

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("")) {
return new float[] {
sggStng.number("LEFT_PSTN").floatValue(),
@ -158,8 +158,8 @@ public class PDFPrintUtil extends PrintUtil {
};
} else {
return new float[] {
prototypeStng.getLeftPstn(otptPaperSeCd),
prototypeStng.getTopPstn(otptPaperSeCd)
prototypeStng.getLeftPstn(paperSeCd),
prototypeStng.getTopPstn(paperSeCd)
};
}
}

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

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

@ -10,7 +10,7 @@ public class OtptStngQuery extends CmmnQuery {
private String sndngSeCd;
//출력용지구분코드
private String otptPaperSeCd;
private String paperSeCd;
public String getSndngSeCd() {
return ifEmpty(sndngSeCd, () -> null);
@ -21,12 +21,12 @@ public class OtptStngQuery extends CmmnQuery {
return self();
}
public String getOtptPaperSeCd() {
return ifEmpty(otptPaperSeCd, () -> null);
public String getPaperSeCd() {
return ifEmpty(paperSeCd, () -> null);
}
public <T extends OtptStngQuery> T setOtptPaperSeCd(String otptPaperSeCd) {
this.otptPaperSeCd = otptPaperSeCd;
public <T extends OtptStngQuery> T setPaperSeCd(String paperSeCd) {
this.paperSeCd = paperSeCd;
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 {
String otptPaperSeCd = printOption.getOtptPaperSeCd();
String paperSeCd = printOption.getPaperSeCd();
PDFPrintUtil pdfPrintUtil = new PDFPrintUtil();
UserInfo userInfo = currentUser();
factionBean.initUserInfo(userInfo);
pdfPrintUtil.setPrintRequestUserInfo(userInfo);
//
pdfPrintUtil.setting(otptPaperSeCd);
pdfPrintUtil.setting(paperSeCd);
String resultFilePath = pdfPrintUtil.filePathForNewFile();
@ -324,7 +324,7 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
//용지 크기 설정
PDRectangle paper = null;
if(otptPaperSeCd.equals("01")) {
if(paperSeCd.equals("01")) {
paper = PDRectangle.A4;
} else {
paper = PDRectangle.LETTER;
@ -345,7 +345,7 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
List<DefaultOtptStng> prototypeStngList = pdfFormat.getPrototypeStngs();
otptStngQuery.setSndngSeCd(sndngSeCd);
otptStngQuery.setOtptPaperSeCd(otptPaperSeCd);
otptStngQuery.setPaperSeCd(paperSeCd);
List<DataObject> otptStng = otptStngMapper.selectOtptStngList(otptStngQuery);
@ -368,7 +368,7 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
DefaultOtptStng prototypeStng = prototypeStngList.stream()
.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);
boolean forPost = prototypeStng.isForPost();

@ -469,7 +469,7 @@ public class Sprt01Controller extends ApplicationController {
filter(item -> item.getCode().equals(otptStngQuery.getSndngSeCd())).findFirst().get().getValue();
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+")";
mav.addObject("otptStngTitle", otptStngTitle);

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

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

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

Loading…
Cancel
Save