package kr.co.udapsoft.common.commonSign.util; import java.awt.Color; import java.io.IOException; import java.io.OutputStream; import java.sql.Connection; import javax.servlet.http.HttpServletRequest; import com.lowagie.text.Document; import com.lowagie.text.DocumentException; import com.lowagie.text.Element; import com.lowagie.text.Font; import com.lowagie.text.Image; import com.lowagie.text.PageSize; import com.lowagie.text.Paragraph; import com.lowagie.text.Rectangle; import com.lowagie.text.pdf.BaseFont; import com.lowagie.text.pdf.PdfPCell; import com.lowagie.text.pdf.PdfPTable; import com.lowagie.text.pdf.PdfWriter; /* * 외주기성고 계산서 : http://172.17.217.243/lib/dlgReport.screen?&WINDOW_TITLE=%20&REPORT_NAME=%2Fjsp%2Fko_kr%2Fsub%2Freport%2FSUBAcmpBillList.mrd&REPORT_OPTION=%2Frf&HIDE_STATUS_BAR=false&HIDE_TOOL_BAR=false&ZOOM_RATIO=100&HIDE_STATUS_DLG=false&P_0=6250A10401&P_1=200808&P_2='SUBO06110064'%2C'SUBO06110089'%2C'SUBO07010064'%2C'SUBO07030114'%2C'SUBO07030116'%2C'SUBO07050041'%2C'SUBO07070043'%2C'SUBO08040034'%2C'SUBO08040127'%2C'SUBO08050150'%2C'SUBO08070004'%2C'SUBO08070023'%2C'SUBO08070026'%2C'SUBO06110066'%2C'SUBO07010039'%2C'SUBO06110040'%2C'SUBO07020049'%2C'SUBO07090060'%2C'SUBO07110105'%2C'SUBO07110107'%2C'SUBO07120076'%2C'SUBO07120085'%2C'SUBO07120109'%2C'SUBO07120131'%2C'SUBO07120133'%2C'SUBO08010025'%2C'SUBO08010058'%2C'SUBO08020050'%2C'SUBO08030015'%2C'SUBO08040100'%2C'SUBO08040141'%2C'SUBO08060015'%2C'SUBO08060040'%2C'SUBO08060078'%2C'SUBO08070074'%2C'SUBO07010081'%2C'SUBO07030115'%2C'SUBO07060089'%2C'SUBO07070013'%2C'SUBO07070053'%2C'SUBO07070086'%2C'SUBO07070088'%2C'SUBO07070089'%2C'SUBO07100113'%2C'SUBO07100118'%2C'SUBO07100124'%2C'SUBO07110030'%2C'SUBO08030034'%2C'SUBO08030122'%2C'SUBO06120108'%2C'SUBO07020069'%2C'SUBO07020083'%2C'SUBO07030125'%2C'SUBO07050062'%2C'SUBO07060070'%2C'SUBO07070051'%2C'SUBO07070119'%2C'SUBO07070122'%2C'SUBO07100123'%2C'SUBO07120055'%2C'SUBO07120062'%2C'SUBO07120113'%2C'SUBO08030075'%2C'SUBO08060115'%2C'SUBO08060118'%2C'SUBO08070006'%2C'SUBO08070037'%2C'SUBO08070167'%2C'SUBO08070168'%2C'SUBO08080030'%2C'SUBO06120082'%2C'SUBO07030006'%2C'SUBO07030110'%2C'SUBO07040059'%2C'SUBO07040075'%2C'SUBO07090007'%2C'SUBO07110067'%2C'SUBO07120004'%2C'SUBO07120081'%2C'SUBO08010023'%2C'SUBO08010104'%2C'SUBO08010171'%2C'SUBO08030099'%2C'SUBO08040027'%2C'SUBO08040089'%2C'SUBO08060018'%2C'SUBO08090001'&P_SIZE=3 * */ import com.udapsoft.waf.system.HandlerStorage; import kr.co.hsnc.common.base.WAFLogger; import kr.co.hsnc.common.config.WAFConfig; import kr.co.hsnc.common.sql.RowSet; import kr.co.hsnc.common.sql.RowSetImpl; import kr.co.hsnc.common.sql.persistent.Persistent; import kr.co.hsnc.common.sql.persistent.PersistentImpl; import kr.co.hsnc.common.sql.search.Search; import kr.co.hsnc.common.sql.search.SearchImpl; import kr.co.hsnc.common.sql.util.RowSetUtility; import kr.co.hsnc.common.util.ValueObject; public class SACDOCreatePDF7 { public static BaseFont bfKorean = null; /* * private static Font FontKorean = null; */ public static Font FontBold = null; private static String strClassName = (new Throwable()).getStackTrace()[0] .getClassName(); // private static String strFileName = "d:\\temp\\pdf\\" + strClassName + // ".pdf"; private static String strFileName = WAFConfig.get("waf.repository.path") + "\\" + strClassName + ".pdf"; private static Color borderColor = Color.BLACK; private static String strGubun = null; private static float BorderW = 0.1f; private static Rectangle border = new Rectangle(0f, 0f); private static boolean isGray = false; private static boolean LineisGray = false; //데이터 로 /** * @param args */ public void doBiz1(Connection con, OutputStream outputStream, String tmpslipID, HttpServletRequest request) { WAFLogger.debug("\n\t #################### 준공 검사 보고서 시작"); // step 1 Document document = new Document(PageSize.A4, 25f, 25f, 35f, 10f); try { // step 2 PdfWriter writer = PdfWriter.getInstance(document, outputStream); // step 3 document.open(); BaseFont bfKorean = BaseFont.createFont("HYGoThic-Medium", "UniKS-UCS2-H", BaseFont.NOT_EMBEDDED); Font FontTitle = new Font(bfKorean, 9, Font.NORMAL); Font FontTitle1 = new Font(bfKorean, 8, Font.NORMAL); FontTitle.setColor(borderColor); Font FontData = new Font(bfKorean, 4.8f, Font.NORMAL); Font FontTitle2 = new Font(bfKorean, 20, Font.BOLD); PdfPTable table = null; PdfPCell cell = null; /* * 정보 검색 시작 --------------------------------------------- */ ValueObject params = new ValueObject(); HandlerStorage storage = new HandlerStorage(); storage.setParams(params); ValueObject listRowSet = null; RowSet rowSet = null; /* * 정보 검색 시작 --------------------------------------------- */ String subContModId = getSubContModId(con,tmpslipID); //listRowSet = getPayReqList(tmpslipID); listRowSet = getPayReqList1(con, tmpslipID, subContModId); rowSet = getPayReqList2(tmpslipID); // 정보 검색 끝 --------------------------------------------- /* * =========================================================================================== * 제목 생성 * =========================================================================================== */ makeTitle(document, FontTitle, FontTitle2, request); //본문생성 setBorder(border, true, true, true, true); //1행 PdfPTable table11 = new PdfPTable(9); table11.setWidthPercentage(100); table11.setSpacingBefore(7f); table11.setSpacingAfter(7f); float[] table11Width = {12f,12f,3f,15f,3f,15f,3f,12f,6f}; table11.setWidths(table11Width); // 1행 PT_addCell(table11, new String [] { "계 약 번 호" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); PT_addCell(table11, listRowSet.get("CON_DOC_NO"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false); PT_addCell(table11, new String [] { "작 성 일 자" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 30f ,false); PT_addCell(table11, listRowSet.get("ACMP_DATE"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false); //2019.08.29 주석처리 //PT_addCell(table11, new String [] { "주 관 부 서" }, FontTitle, border, // Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); //PT_addCell(table11,listRowSet.get("DEPART_DEPT_NM"), FontTitle, border, // Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false); //PT_addCell(table11, new String [] { "협 조 부 서" }, FontTitle, border, // Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 30f ,false); //PT_addCell(table11,listRowSet.get("ACC_DEPT_NM"), FontTitle, border, // Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false); PT_addCell(table11, new String [] { "PROJECT 명" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); PT_addCell(table11, listRowSet.get("DEPT_NAME"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false); PT_addCell(table11, new String [] { "PROJECT번호" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 30f ,false); PT_addCell(table11, listRowSet.get("CONCD"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false); PT_addCell(table11, new String [] { "계 약 명 " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); PT_addCell(table11, listRowSet.get("BUILD_NAME"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 8, 30f ,false); if(listRowSet.get("CON_CUR_CD").equals("KRW")){ PT_addCell(table11, new String [] { "공사비 내역\n(부가세 별도)" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 360f ,false); }else { PT_addCell(table11, new String [] { "공사비 내역\n(부가세 별도)" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 420f ,false); } PdfPTable table21 = new PdfPTable(9); float[] table21Width = {12f,3f,15f,3f,10f,5f,3f,15f,3f}; table21.setWidths(table21Width); PdfPCell permission = new PdfPCell(table21); PT_addCell(table21, new String [] { "구 분" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); PT_addCell(table21, new String [] { "원 설 계" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 30f ,false); PT_addCell(table21, new String [] { "준 공 액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 3, 30f ,false); PT_addCell(table21, new String [] { "증 ▲ 감 ▽" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 3, 30f ,false); PT_addCell(table21, new String [] { "총 공 사 비" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, listRowSet.get("FIRST_CON_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, true, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, listRowSet.get("LAST_CON_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 30f,false); setBorder(border, true, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("VAR_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, listRowSet.get("VAR_MARK"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "지 급 자 재 비" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 30f,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "도 급 공 사 비" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 30f,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); if(listRowSet.get("CON_CUR_CD").equals("KRW")){ PT_addCell(table21, new String [] { "기 지 불 액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { "금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_PRE_PAYED"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "원정 (" }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("PRE_PAYED_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "금 회 청 구 액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { "금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_REQU_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "원정 (" }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("REQU_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "(과 세)" }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { "금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_REQU_TAMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "원정 (" }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("REQU_TAMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "(면 세)" }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { "금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_REQU_NAMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "원정 (" }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("REQU_NAMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "잔 액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { "금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "없음" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "원정 (" }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "0" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "선 급 금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { "금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_PREPAY_SUPPLY_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "원정 (" }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("PREPAY_SUPPLY_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "선 급 금\n전 회 공 제" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { "금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_PRE_PAY_DEDUCT_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "원정 (" }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("PRE_PAY_DEDUCT_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "선 급 금\n금 회 공 제" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { "금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_PAY_DEDUCT_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "원정 (" }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("PAY_DEDUCT_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); }else{ PT_addCell(table21, new String [] { "기 지 불 액" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_PRE_PAYED"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_NM") + "(", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("PRE_PAYED_AMT"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "금 회 청 구 액" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_REQU_AMT"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_NM") + "(", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("REQU_AMT"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "(과 세)" }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_REQU_TAMT"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_NM") + "(", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("REQU_TAMT"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "(면 세)" }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_REQU_NAMT"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_NM") + "(", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("REQU_NAMT"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "잔 액" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "없음" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_NM") + "(", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "0" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "선 급 금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { "금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_PREPAY_SUPPLY_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_NM") + "(", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("PREPAY_SUPPLY_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "선 급 금\n전 회 공 제" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { "금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_PRE_PAY_DEDUCT_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_NM") + "(", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("PRE_PAY_DEDUCT_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "선 급 금\n금 회 공 제" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { "금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("HAN_PAY_DEDUCT_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_NM") + "(", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("PAY_DEDUCT_AMT"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "전액\n전회공제" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "없음" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_NM") + "(", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "0" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); PT_addCell(table21, new String [] { "전액\n금회공제" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table21, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "없음" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 3, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_NM") + "(", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table21, listRowSet.get("CUR_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, false, true, true); PT_addCell(table21, new String [] { "0" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, false, true, true, true); PT_addCell(table21, new String [] { ")" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f,false); } permission.setColspan(9); table11.addCell(permission); setBorder(border, true, false, true, false); PT_addCell(table11, new String [] { "위와 같이 준공검사 내역을 보고 합니다. " }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 8, 30f,false); setBorder(border, false, true, true, false); PT_addCell(table11, new String [] { " " }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, true, false, false, true); PT_addCell(table11, listRowSet.get("ACMP_DATE").substring(0, 4) + "년 " + listRowSet.get("ACMP_DATE").substring(5, 7) + "월" + listRowSet.get("ACMP_DATE").substring(8, 10) + "일 ", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 8, 30f,false); setBorder(border, false, true, false, true); PT_addCell(table11, new String [] { " " }, FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f,false); setBorder(border, true, true, true, true); PT_addCell(table11, new String [] { "공 사 업 체" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table11, new String [] { "(업체명)" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table11, listRowSet.get("CORP_KOR"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table11, new String [] { "(대표자명)" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table11, listRowSet.get("REP_NAME"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 30f ,false); setBorder(border, false, true, true, true); PT_addCell(table11, new String [] { " " }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, true, true, true); PT_addCell(table11, new String [] { "검 사 인" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table11, new String [] { "(소 속)" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table11, listRowSet.get("CHECK_COMP"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table11, new String [] { "(성 명)" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table11, listRowSet.get("CHECK_MAN"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 30f ,false); setBorder(border, false, true, true, true); PT_addCell(table11, new String [] { "" }, FontTitle1, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, true, true, true); PT_addCell(table11, new String [] { "입 회 인" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, true, true); PT_addCell(table11, new String [] { "(소 속)" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table11, listRowSet.get("ATTEN_COMP"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table11, new String [] { "(성 명)" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, true); PT_addCell(table11, listRowSet.get("ATTEN_MAN"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 30f ,false); setBorder(border, false, true, true, true); PT_addCell(table11, new String [] { "" }, FontTitle1, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, true, true, true); PT_addCell(table11, new String [] { "세금계산서\n발행방법" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 35f ,false); PdfPTable table41 = new PdfPTable(3); float[] table41Width = {35f,35f,35f}; table41.setWidths(table41Width); PdfPCell permission3 = new PdfPCell(table41); String check1 = ""; String check2 = ""; String check3 = ""; check1 = (listRowSet.get("TAX_METHOD_CD").equals("1")?"●":"○")+" 역발행(SGC이앤씨 발행)"; check2 = (listRowSet.get("TAX_METHOD_CD").equals("2")?"●":"○")+" 순발행(업체 직접 발행)"; check3 = (listRowSet.get("TAX_METHOD_CD").equals("3")?"●":"○")+" Invoice"; setBorder(border, true, false, true, false); PT_addCell(table41, check1 , FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 25f ,false); setBorder(border, false, false, true, false); PT_addCell(table41, check2, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 25f ,false); setBorder(border, false, true, true, false); PT_addCell(table41, check3, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 25f ,false); setBorder(border, true, true, true, true); permission3.setColspan(8); table11.addCell(permission3); setBorder(border, true, true, true, true); PT_addCell(table11, new String [] { "특 기 사 항" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 140f ,false); PT_addCell(table11, listRowSet.get("ACMP_REMARK"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_TOP, 8, 140f ,false); PT_addCell(table11, new String [] { "첨 부 서 류" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 90f ,false); PdfPTable table31 = new PdfPTable(3); float[] table31Width = {25f,25f,25f}; table31.setWidths(table31Width); PdfPCell permission2 = new PdfPCell(table31); setBorder(border, true, false, true, false); PT_addCell(table31, rowSet.getRow(0).get("DOC_NM") , FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, true, false); PT_addCell(table31, rowSet.getRow(1).get("DOC_NM"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, true, true, false); PT_addCell(table31, rowSet.getRow(2).get("DOC_NM"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, false, false); PT_addCell(table31, rowSet.getRow(3).get("DOC_NM"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, false, false); PT_addCell(table31, rowSet.getRow(4).get("DOC_NM"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, true, false, false); PT_addCell(table31, rowSet.getRow(5).get("DOC_NM"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, false, false, false); PT_addCell(table31, rowSet.getRow(6).get("DOC_NM"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, false, false, false); PT_addCell(table31, rowSet.getRow(7).get("DOC_NM"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, false, true, false, false); PT_addCell(table31, rowSet.getRow(8).get("DOC_NM"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false); setBorder(border, true, true, true, true); permission2.setColspan(8); table11.addCell(permission2); document.add(table11); } catch (DocumentException de) { WAFLogger.debug("de.getMessage() = " + de.getMessage()); } catch (IOException ioe) { WAFLogger.debug("ioe.getMessage() = " + ioe.getMessage()); } catch (Exception e) { WAFLogger.debug("[Exception] ... " + e); } // step 5 document.close(); WAFLogger.debug("\n\t #################### "+ strFileName +" 생성완료 SACDOCreatePDF7"); } /* * =========================================================================================== * A. 타이틀 * =========================================================================================== */ private static void makeTitle(Document document, Font FontTitle, Font FontTitle2, HttpServletRequest request) throws Exception { PdfPTable tbl_Title = new PdfPTable(2); tbl_Title.setWidthPercentage(40f); float[] tbl_TitleWidths = {10f,10f}; tbl_Title.setWidths(tbl_TitleWidths); PdfPCell title= new PdfPCell(new Paragraph("준공 검사 보고서", FontTitle2)); title.setColspan(2); title.setHorizontalAlignment(Element.ALIGN_CENTER); title.setVerticalAlignment(Element.ALIGN_MIDDLE); title.setFixedHeight(40f); title.setBorder(0); title.setBorderWidthBottom(1); tbl_Title.addCell(title); PdfPCell titleB = new PdfPCell(new Paragraph("", FontTitle2)); titleB.setColspan(2); titleB.setFixedHeight(30f); titleB.setBorder(0); tbl_Title.addCell(titleB); //PT_addCell(tbl_Title, "대 금 지 급", FontTitle2, borderTemp, // Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 28f, false); document.add(tbl_Title); Image img = null; if(request == null) { //img = Image.getInstance(new URL("http://edreams21.co.kr/img/invoice/Title_bg1.gif")); } else { //img = Image.getInstance(new URL(request.getScheme(), request.getServerName(), request.getServerPort(), "/img/invoice/Title_bg1.gif")); } // img.scaleToFit(300f, 40f); // img.setAbsolutePosition(310, 554); // img.setAbsolutePosition(203, 246); // img.setAbsolutePosition(180, 310); // document.add(img); } /* * =========================================================================================== * B. 데이터 입력 * =========================================================================================== */ /* * =========================================================================================== * 기타 * =========================================================================================== */ // PdfPCell을 리턴하자 private static PdfPCell PC_addCell(String strText, Font FontTitle, Rectangle border, int HA, int VA, int CS) { // 추가할 Cell 생성 PdfPCell cell = new PdfPCell(new Paragraph(strText, FontTitle)); // PdfPCell cell = new PdfPCell(new Paragraph(strText)); // Cell Border 설정 // setBorder(cell, blnLEFT, blnRIGHT, blnTOP, blnBOTTOM); cell.cloneNonPositionParameters(border); // 가로/세로 정렬 cell.setHorizontalAlignment(HA); cell.setVerticalAlignment(VA); // setColspan if (CS > 1) cell.setColspan(CS); // cell.setPadding(0); if( isGray ) cell.setGrayFill(0.8f); //if( LineisGray ) // cell.setGrayFill(0.9f); //cell.setBackgroundColor(arg0) return cell; } // Cell Border 설정 private static void setBorder(Rectangle border, boolean blnLEFT, boolean blnRIGHT, boolean blnTOP, boolean blnBOTTOM) { border.setBorderColor(borderColor); if (blnLEFT) { border.setBorderWidthLeft(BorderW); } else { border.setBorderWidthLeft(0); } if (blnRIGHT) { border.setBorderWidthRight(BorderW); } else { border.setBorderWidthRight(0); } if (blnTOP) { border.setBorderWidthTop(BorderW); } else { border.setBorderWidthTop(0); } if (blnBOTTOM) { border.setBorderWidthBottom(BorderW); } else { border.setBorderWidthBottom(0); } } // PdfPTable에 Cell 을 추가하자 private static void PT_addCell(PdfPTable table, String[] arrText, Font FontTitle, Rectangle border, int HA, int VA, int CS) { for (int i = 0; i < arrText.length; i++) { PT_addCell(table, arrText[i], FontTitle, border, HA, VA, CS); } } private static void PT_addCell(PdfPTable table, String[] arrText, Font FontTitle, Rectangle border, int HA, int VA, int CS, float RH, boolean CL) { for (int i = 0; i < arrText.length; i++) { PT_addCell(table, arrText[i], FontTitle, border, HA, VA, CS, RH, CL); } } private static void PT_addCell(PdfPTable table, String strText, Font FontTitle, Rectangle border, int HA, int VA, int CS) { // 추가할 Cell 생성 PdfPCell cell = PC_addCell(strText, FontTitle, border, HA, VA, CS); table.addCell(cell); } // PdfPTable에 Cell 을 추가하자(행높이 추가) private static void PT_addCell(PdfPTable table, String strText, Font FontTitle, Rectangle border, int HA, int VA, int CS, float RH, boolean CL) { // 추가할 Cell 생성 PdfPCell cell = PC_addCell(strText, FontTitle, border, HA, VA, CS); // 셀 높이 if (RH > 0) cell.setFixedHeight(RH); if (CL) { cell.setBackgroundColor(Color.lightGray); } else { cell.setBackgroundColor(Color.white); } table.addCell(cell); } public ValueObject getPayReqList1( Connection con, String tmpslipID, String subContModId ){ Persistent persistent_c = null; Search search = new SearchImpl(); ValueObject vo = null; RowSet rowSet = new RowSetImpl(); StringBuffer sql = new StringBuffer(); try{ persistent_c = new PersistentImpl(con); sql.append(" SELECT FIRST_CON_AMT \n"); sql.append(" , LAST_CON_AMT \n"); sql.append(" , F_GET_D_CURRENCY(VAR_AMT , F_GET_CURRENCY_DIGIT(CON_CUR_CD) ) AS VAR_AMT \n"); sql.append(" , VAR_MARK \n"); sql.append(" , BUILD_NAME \n"); sql.append(" , DIGIT \n"); sql.append(" , PRE_PAYED_AMT \n"); sql.append(" , HAN_PRE_PAYED \n"); sql.append(" , REQU_AMT \n"); sql.append(" , HAN_REQU_AMT \n"); sql.append(" , REQU_TAMT \n"); sql.append(" , HAN_REQU_TAMT \n"); sql.append(" , REQU_NAMT \n"); sql.append(" , HAN_REQU_NAMT \n"); sql.append(" , CHECK_COMP \n"); sql.append(" , CHECK_MAN \n"); sql.append(" , CHECK_TEL \n"); sql.append(" , ATTEN_COMP \n"); sql.append(" , ATTEN_MAN \n"); sql.append(" , ATTEN_TEL \n"); sql.append(" , ACMP_REMARK \n"); sql.append(" , CORP_KOR \n"); sql.append(" , DEPART_DEPT_NM \n"); sql.append(" , ACC_DEPT_NM \n"); sql.append(" , CON_DOC_NO \n"); sql.append(" , ACMP_DATE \n"); sql.append(" , REP_NAME \n"); sql.append(" , DEPT_NAME \n"); sql.append(" , DEPT_CD \n"); sql.append(" , CUR_NM \n"); sql.append(" , CUR_CD \n"); sql.append(" , CON_CUR_CD \n"); sql.append(" , CONCD \n"); sql.append(" , PREPAY_SUPPLY_AMT \n"); sql.append(" , HAN_PREPAY_SUPPLY_AMT \n"); sql.append(" , PRE_PAY_DEDUCT_AMT \n"); sql.append(" , HAN_PRE_PAY_DEDUCT_AMT \n"); sql.append(" , PAY_DEDUCT_AMT \n"); sql.append(" , HAN_PAY_DEDUCT_AMT \n"); sql.append(" , TAX_METHOD_CD \n"); sql.append(" FROM \n"); sql.append(" ( \n"); sql.append(" SELECT F_GET_D_CURRENCY(B.CON_SUPPLY_AMT , F_GET_CURRENCY_DIGIT(A.CON_CUR_CD)) FIRST_CON_AMT \n"); sql.append(" ,F_GET_D_CURRENCY(A.CON_SUPPLY_AMT , F_GET_CURRENCY_DIGIT(A.CON_CUR_CD)) LAST_CON_AMT \n"); sql.append(" ,CASE WHEN A.CON_SUPPLY_AMT > B.CON_SUPPLY_AMT THEN A.CON_SUPPLY_AMT - B.CON_SUPPLY_AMT \n"); sql.append(" WHEN A.CON_SUPPLY_AMT < B.CON_SUPPLY_AMT THEN B.CON_SUPPLY_AMT - A.CON_SUPPLY_AMT \n"); sql.append(" ELSE A.CON_SUPPLY_AMT - B.CON_SUPPLY_AMT \n"); sql.append(" END VAR_AMT \n"); sql.append(" ,CASE WHEN A.CON_SUPPLY_AMT > B.CON_SUPPLY_AMT THEN '▲▽' \n"); sql.append(" WHEN A.CON_SUPPLY_AMT < B.CON_SUPPLY_AMT THEN '△▼' \n"); sql.append(" ELSE '△▽' \n"); sql.append(" END VAR_MARK \n"); sql.append(" ,A.BUILD_NAME \n"); sql.append(" ,F.CHG_CODE01 DIGIT \n"); sql.append(" ,F_GET_D_CURRENCY(C.PRE_REQU_SUPPLY_AMT + NVL( (SELECT SUM(B.REQ_PREPAY_SUPPLY_TAMT) SUPPLY_AMT \n"); sql.append(" FROM SUB1030T B \n"); //, SUB1050T C, SAC01001 D 2016.7.5 중복제거 sql.append(" WHERE DECODE(B.CONVERSION_YN, 'Y', '10', B.STATUS_CD) >= '10' \n"); sql.append(" AND A.SUB_CONT_ID = B.SUB_CONT_ID), 0) , F_GET_CURRENCY_DIGIT(A.CON_CUR_CD)) PRE_PAYED_AMT \n"); sql.append(" ,F_GET_HANGUL(TRUNC(C.PRE_REQU_SUPPLY_AMT + NVL( (SELECT SUM(B.REQ_PREPAY_SUPPLY_TAMT) SUPPLY_AMT \n"); sql.append(" FROM SUB1030T B \n"); sql.append(" WHERE DECODE(B.CONVERSION_YN, 'Y', '10', B.STATUS_CD) >= '10' \n"); sql.append(" AND A.SUB_CONT_ID = B.SUB_CONT_ID), 0))) HAN_PRE_PAYED \n"); sql.append(" ,F_GET_D_CURRENCY(C.REQU_SUPPLY_AMT, F_GET_CURRENCY_DIGIT(A.CON_CUR_CD)) AS REQU_AMT \n"); sql.append(" ,F_GET_HANGUL(TRUNC(C.REQU_SUPPLY_AMT)) HAN_REQU_AMT \n"); sql.append(" ,F_GET_D_CURRENCY(C.REQU_SUPPLY_TAMT, F_GET_CURRENCY_DIGIT(A.CON_CUR_CD)) AS REQU_TAMT \n"); sql.append(" ,F_GET_HANGUL(TRUNC(C.REQU_SUPPLY_TAMT)) HAN_REQU_TAMT \n"); sql.append(" ,F_GET_D_CURRENCY(C.REQU_SUPPLY_NAMT, F_GET_CURRENCY_DIGIT(A.CON_CUR_CD)) AS REQU_NAMT \n"); sql.append(" ,F_GET_HANGUL(TRUNC(C.REQU_SUPPLY_NAMT)) HAN_REQU_NAMT \n"); sql.append(" ,C.CHECK_COMP \n"); sql.append(" ,C.CHECK_MAN \n"); sql.append(" ,C.CHECK_TEL \n"); sql.append(" ,C.ATTEN_COMP \n"); sql.append(" ,C.ATTEN_MAN \n"); sql.append(" ,C.ATTEN_TEL \n"); sql.append(" ,C.ACMP_REMARK \n"); sql.append(" ,SUBSTR(D.CORP_KOR,3) AS CORP_KOR \n"); sql.append(" ,E.DEPART_DEPT_NM \n"); sql.append(" , (SELECT DEPART_DEPT_NM FROM PUB0120T WHERE ACCT_ID = B.CON_CHARGE_ID ) ACC_DEPT_NM \n"); sql.append(" ,A.CON_DOC_NO \n"); sql.append(" ,TO_CHAR(C.ACMP_DATE, 'YYYY.MM.DD') ACMP_DATE \n"); sql.append(" ,G.REP_NAME \n"); sql.append(" ,A.DEPT_NAME \n"); sql.append(" ,C.DEPT_CD \n"); sql.append(" ,F.CHG_CODE06 CUR_NM \n"); sql.append(" ,F.CHG_CODE09 AS CUR_CD \n"); sql.append(" ,A.CON_CUR_CD \n"); sql.append(" ,'' AS CONCD \n"); sql.append(" ,F_GET_D_CURRENCY(H.PREPAY_SUPPLY_AMT, F_GET_CURRENCY_DIGIT(A.CON_CUR_CD)) AS PREPAY_SUPPLY_AMT \n"); sql.append(" ,F_GET_HANGUL(TRUNC(H.PREPAY_SUPPLY_AMT)) HAN_PREPAY_SUPPLY_AMT \n"); sql.append(" ,F_GET_D_CURRENCY(C.PRE_PAY_DEDUCT_AMT, F_GET_CURRENCY_DIGIT(A.CON_CUR_CD)) AS PRE_PAY_DEDUCT_AMT \n"); sql.append(" ,F_GET_HANGUL(TRUNC(C.PRE_PAY_DEDUCT_AMT)) HAN_PRE_PAY_DEDUCT_AMT \n"); sql.append(" ,F_GET_D_CURRENCY(C.PAY_DEDUCT_AMT, F_GET_CURRENCY_DIGIT(A.CON_CUR_CD)) AS PAY_DEDUCT_AMT \n"); sql.append(" ,F_GET_HANGUL(TRUNC(C.PAY_DEDUCT_AMT)) HAN_PAY_DEDUCT_AMT \n"); sql.append(" ,C.TAX_METHOD_CD \n"); sql.append(" FROM SUB2000T A \n"); sql.append(" ,( SELECT * FROM SUB2000T WHERE MOD_NO = 0 ) B \n"); sql.append(" ,SUB1040T C \n"); sql.append(" ,SUB1020T D \n"); sql.append(" ,(SELECT ACCT_ID, DEPART_DEPT_CD, DEPART_DEPT_NM FROM PUB0120T) E \n"); sql.append(" ,(SELECT DETAILCD, CHG_CODE01, CHG_CODE06, CHG_CODE09 FROM EBID_COM911T WHERE BASECD = '911') F \n"); sql.append(" ,(SELECT CORP_ID, REP_NAME FROM SUB9000T_V) G \n"); sql.append(" ,( \n"); sql.append(" SELECT SUB_CONT_ID \n"); sql.append(" ,CON_CORP_ID \n"); sql.append(" ,SUM(REQ_PREPAY_SUPPLY_AMT) AS PREPAY_SUPPLY_AMT \n"); sql.append(" FROM SUB1030T \n"); sql.append(" WHERE STATUS_CD = '10' \n"); sql.append(" AND SUB_CONT_MOD_ID <= "+subContModId+" \n"); sql.append(" GROUP BY SUB_CONT_ID, CON_CORP_ID \n"); sql.append(" ) H \n"); sql.append(" WHERE A.SUB_CONT_ID = B.SUB_CONT_ID \n"); sql.append(" AND A.SUB_CONT_ID = C.SUB_CONT_ID \n"); sql.append(" AND A.MOD_NO = C.MOD_NO \n"); sql.append(" AND C.CON_CORP_ID = D.CON_CORP_ID \n"); sql.append(" AND F.DETAILCD = A.CON_CUR_CD \n"); sql.append(" AND A.REQ_USERID = E.ACCT_ID(+) \n"); sql.append(" AND D.CORP_ID = G.CORP_ID(+) \n"); sql.append(" AND D.MAIN_CORP = 'Y' \n"); sql.append(" AND A.SUB_CONT_ID = H.SUB_CONT_ID(+) \n"); sql.append(" AND C.ACMP_ID = '"+tmpslipID+"' \n"); sql.append(" ) \n"); //search.setStatement(sql.toString()); //rowSet = search.execute(); System.out.println(sql.toString()); persistent_c.setStatement(sql.toString()); rowSet = persistent_c.query(); if(rowSet.size()>0){ vo = RowSetUtility.getValueObject(rowSet.getRow(0)); } }catch(Exception e){ WAFLogger.error("SQL : " + search.getStatement()); WAFLogger.error(e); }finally{ if( vo == null) vo = new ValueObject(); } return vo; } public RowSet getPayReqList2(String tmpslipID ){ Search search = new SearchImpl(); RowSet rowSet = new RowSetImpl(); StringBuffer sql = new StringBuffer(); try{ sql.append(" SELECT DOC_NM \n"); sql.append(" FROM \n"); sql.append(" ( \n"); sql.append(" SELECT DECODE(NVL(B.ID,''),'','□','■') || ' ' || A.DETAILNM AS DOC_NM, ROWNUM AS RO \n"); sql.append(" ,A.DETAILCD \n"); sql.append(" FROM EBID_COM911T A, PUB0510T B \n"); sql.append(" WHERE A.BASECD = 'SUB_ACMP_FILE' \n"); sql.append(" AND A.DETAILCD = B.ID(+) \n"); sql.append(" AND B.FILE_GB(+) = 'RESOLUTION_"+tmpslipID+"' \n"); sql.append(" AND A.CHG_CODE01 = '90' \n"); sql.append(" AND DETAILCD NOT IN ('560', '570') \n"); sql.append(" ) A \n"); sql.append(" , ( SELECT LEVEL AS RO2 \n"); sql.append(" FROM DUAL \n"); sql.append(" CONNECT BY LEVEL <= 9) B \n"); sql.append(" WHERE A.RO(+) =B.RO2 \n"); sql.append(" ORDER BY A.DETAILCD \n"); search.setStatement(sql.toString()); rowSet = search.execute(); }catch(Exception e){ WAFLogger.error("SQL : " + search.getStatement()); WAFLogger.error(e); }finally{ if( rowSet == null) rowSet = new RowSetImpl(); } return rowSet; } public String getSubContModId( Connection con, String acmp_id){ Persistent persistent_c = null; Search search = new SearchImpl(); RowSet rowSet = new RowSetImpl(); StringBuffer sql = new StringBuffer(); String rtnStr = ""; try { persistent_c = new PersistentImpl(con); sql.append(" SELECT A.SUB_CONT_MOD_ID \n"); sql.append(" FROM SUB2000T A \n"); sql.append(" ,SUB1040T C \n"); sql.append(" WHERE A.SUB_CONT_ID = C.SUB_CONT_ID \n"); sql.append(" AND A.MOD_NO = C.MOD_NO \n"); sql.append(" AND C.ACMP_ID = "+acmp_id+" \n"); persistent_c.setStatement(sql.toString()); rowSet = persistent_c.query(); if(rowSet.size()>0){ rtnStr = rowSet.getRow(0).get("SUB_CONT_MOD_ID"); } } catch(Exception e) { WAFLogger.error(this.getClass().getName() + " --> getSubContModId() : \n" + e.getMessage()); WAFLogger.error("SQL : " + search.getStatement()); WAFLogger.error(e); } finally { if( rtnStr == null ) rtnStr = ""; } return rtnStr; } }