From 4486f6306d297dc4f1cd42a2ea2e4cddd32c0560 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Tue, 28 Nov 2023 17:00:10 +0900 Subject: [PATCH] =?UTF-8?q?pdf=EC=B6=9C=EB=A0=A5=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cokr/xit/fims/cmmn/pdf/PDFPrintUtil.java | 14 +++++++----- .../xit/fims/cmmn/pdf/format/Advntce.java | 22 +++++++++---------- .../fims/sprt/integrationSearch-mapper.xml | 1 - .../sql/mapper/fims/sprt/otptStng-mapper.xml | 1 + 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/PDFPrintUtil.java b/src/main/java/cokr/xit/fims/cmmn/pdf/PDFPrintUtil.java index 3e618fbf..85a72c8e 100644 --- a/src/main/java/cokr/xit/fims/cmmn/pdf/PDFPrintUtil.java +++ b/src/main/java/cokr/xit/fims/cmmn/pdf/PDFPrintUtil.java @@ -87,14 +87,18 @@ public class PDFPrintUtil extends PrintUtil { contentStream.setNonStrokingColor(fontColor); + float resultY = xyAbsolute[1] - fontSize; + float resultX; if(align.equals("right")) { - contentStream.newLineAtOffset(xyAbsolute[0] - textWidth + textAreaWidth_pt, xyAbsolute[1]); + resultX = xyAbsolute[0] - textWidth + textAreaWidth_pt; } else if(align.equals("center")){ - contentStream.newLineAtOffset(xyAbsolute[0] - textHalfWidth + textAreaHalfWidth_pt, xyAbsolute[1]); + resultX = xyAbsolute[0] - textHalfWidth + textAreaHalfWidth_pt; } else { - contentStream.newLineAtOffset(xyAbsolute[0], xyAbsolute[1]); + resultX = xyAbsolute[0]; } + contentStream.newLineAtOffset(resultX, resultY); + contentStream.showText(text); contentStream.endText(); @@ -168,8 +172,8 @@ public class PDFPrintUtil extends PrintUtil { } public int getFontSize(DefaultOtptStng defaultStng, DataObject sggStng) { - if(!sggStng.string("FONT_SIZE").equals("")) { - return sggStng.number("FONT_SIZE").intValue(); + if(!sggStng.string("FONT_SZ").equals("")) { + return sggStng.number("FONT_SZ").intValue(); } else { return defaultStng.getFontSize(); } diff --git a/src/main/java/cokr/xit/fims/cmmn/pdf/format/Advntce.java b/src/main/java/cokr/xit/fims/cmmn/pdf/format/Advntce.java index ae4a1418..39cc6464 100644 --- a/src/main/java/cokr/xit/fims/cmmn/pdf/format/Advntce.java +++ b/src/main/java/cokr/xit/fims/cmmn/pdf/format/Advntce.java @@ -16,18 +16,18 @@ public class Advntce extends PDFFormat { public Advntce(){ addForPost( image("postSenderLogo","").a4(10, 0).letter(0, 0).size(0, 0), - text("postSenderInst","").a4(10, 10).letter(0, 0), - text("postSenderDept","").a4(50, 10).letter(0, 0), - text("postSenderAddr","").a4(10, 20).letter(0, 0), - text("postSenderDtlAddr","").a4(10, 30).letter(0, 0), - text("postSenderZip","").a4(10, 40).letter(0, 0), - text("postSenderTel","").a4(10, 50).letter(0, 0), - text("postSenderFax","").a4(50, 50).letter(0, 0), + text("postSenderInst","").a4(10, 5).letter(0, 0), + text("postSenderDept","").a4(50, 5).letter(0, 0), + text("postSenderAddr","").a4(10, 15).letter(0, 0), + text("postSenderDtlAddr","").a4(10, 25).letter(0, 0), + text("postSenderZip","").a4(10, 35).letter(0, 0), + text("postSenderTel","").a4(10, 45).letter(0, 0), + text("postSenderFax","").a4(50, 45).letter(0, 0), - text("postReceiverAddr","").a4(100, 50).letter(0, 0).size(90, 0).align("right"), - text("postReceiverDtlAddr","").a4(100, 60).letter(0, 0).size(90, 0).align("right"), - text("postReceiver","").a4(100, 70).letter(0, 0).size(90, 0).align("right"), - text("postReceiverZip","").a4(100, 80).letter(0, 0).size(90, 0).align("right") + text("postReceiverAddr","").a4(100, 40).letter(0, 0).size(90, 0).align("right"), + text("postReceiverDtlAddr","").a4(100, 50).letter(0, 0).size(90, 0).align("right"), + text("postReceiver","").a4(100, 60).letter(0, 0).size(90, 0).align("right"), + text("postReceiverZip","").a4(100, 70).letter(0, 0).size(90, 0).align("right") ); add( 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 d4cc672d..966507bf 100644 --- a/src/main/resources/sql/mapper/fims/sprt/integrationSearch-mapper.xml +++ b/src/main/resources/sql/mapper/fims/sprt/integrationSearch-mapper.xml @@ -83,7 +83,6 @@ , L.INSPY_SN /* 분납 순번 */ , (CONCAT(L.FYR, '-', L.LEVY_NO)) AS GOJI_NO /* 고지번호 */ , (SELECT GET_CODE_NM('FIM040', L.LEVY_SE_CD) FROM DUAL) AS LEVY_SE_NM /* 부과 구분 명 */ - , L.RCVMT_SE_NM /* 수납 구분 명 */ , L.LEVY_PCPTAX /* 부과 본세 */ , L.LEVY_ADAMT /* 부과 가산금 */ , L.INSPY_INT /* 분납 이자 */ diff --git a/src/main/resources/sql/mapper/fims/sprt/otptStng-mapper.xml b/src/main/resources/sql/mapper/fims/sprt/otptStng-mapper.xml index 4a1c1fbd..060dbbc3 100644 --- a/src/main/resources/sql/mapper/fims/sprt/otptStng-mapper.xml +++ b/src/main/resources/sql/mapper/fims/sprt/otptStng-mapper.xml @@ -18,6 +18,7 @@ SELECT OTPT_FORM_ID , FONT_SZ , FONT_COLOR , FONT_STYLE + , TEXT_SORT FROM TB_OTPT_FORM WHERE USE_YN = 'Y' AND SGG_CD = #{sggCd}