SACDOCreatePDF4.java 162 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400
  1. package kr.co.udapsoft.common.commonSign.util;
  2. import java.awt.Color;
  3. import java.io.IOException;
  4. import java.io.OutputStream;
  5. import java.sql.Connection;
  6. import javax.servlet.http.HttpServletRequest;
  7. import com.lowagie.text.Document;
  8. import com.lowagie.text.DocumentException;
  9. import com.lowagie.text.Element;
  10. import com.lowagie.text.Font;
  11. import com.lowagie.text.Image;
  12. import com.lowagie.text.PageSize;
  13. import com.lowagie.text.Paragraph;
  14. import com.lowagie.text.Rectangle;
  15. import com.lowagie.text.pdf.BaseFont;
  16. import com.lowagie.text.pdf.PdfPCell;
  17. import com.lowagie.text.pdf.PdfPTable;
  18. import com.lowagie.text.pdf.PdfWriter;
  19. /*
  20. * 외주기성고 계산서 : 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
  21. *
  22. */
  23. import com.udapsoft.waf.system.HandlerStorage;
  24. import kr.co.hsnc.common.base.WAFLogger;
  25. import kr.co.hsnc.common.config.WAFConfig;
  26. import kr.co.hsnc.common.sql.RowSet;
  27. import kr.co.hsnc.common.sql.RowSetImpl;
  28. import kr.co.hsnc.common.sql.persistent.Persistent;
  29. import kr.co.hsnc.common.sql.persistent.PersistentImpl;
  30. import kr.co.hsnc.common.sql.search.Search;
  31. import kr.co.hsnc.common.sql.search.SearchImpl;
  32. import kr.co.hsnc.common.sql.util.RowSetUtility;
  33. import kr.co.hsnc.common.util.ValueObject;
  34. import kr.co.udapsoft.common.util.PCMSUtil;
  35. public class SACDOCreatePDF4 {
  36. public static BaseFont bfKorean = null;
  37. /*
  38. * private static Font FontKorean = null;
  39. */
  40. public static Font FontBold = null;
  41. private static String strClassName = (new Throwable()).getStackTrace()[0]
  42. .getClassName();
  43. //private static String strFileName = "d:\\temp\\pdf\\" + strClassName +".pdf";
  44. private static String strFileName = WAFConfig.get("waf.repository.path") + "\\" + strClassName + ".pdf";
  45. private static Color borderColor = Color.BLACK;
  46. private static String strGubun = null;
  47. private static float BorderW = 0.1f;
  48. private static Rectangle border = new Rectangle(0f, 0f);
  49. private static boolean isGray = false;
  50. private static boolean LineisGray = false; //데이터 로
  51. /**
  52. * @param args
  53. */
  54. public void doBiz(OutputStream outputStream, String tmpslipID, HttpServletRequest request) {
  55. WAFLogger.debug("\n\t #################### 구매 대금지급생성 시작");
  56. // step 1
  57. Document document = new Document(PageSize.A4, 25f, 25f, 35f, 10f);
  58. try {
  59. // step 2
  60. PdfWriter writer = PdfWriter.getInstance(document, outputStream);
  61. // step 3
  62. document.open();
  63. BaseFont bfKorean = BaseFont.createFont("HYGoThic-Medium", "UniKS-UCS2-H", BaseFont.NOT_EMBEDDED);
  64. Font FontTitle = new Font(bfKorean, 8, Font.NORMAL);
  65. FontTitle.setColor(borderColor);
  66. Font FontData = new Font(bfKorean, 4.8f, Font.NORMAL);
  67. Font FontTitle2 = new Font(bfKorean, 20, Font.BOLD);
  68. PdfPTable table = null;
  69. PdfPCell cell = null;
  70. /*
  71. * 정보 검색 시작 ---------------------------------------------
  72. */
  73. ValueObject params = new ValueObject();
  74. HandlerStorage storage = new HandlerStorage();
  75. storage.setParams(params);
  76. ValueObject listRowSet = null;
  77. /*
  78. * 정보 검색 시작 ---------------------------------------------
  79. */
  80. listRowSet = getPayReqList(tmpslipID);
  81. // 정보 검색 끝 ---------------------------------------------
  82. /*
  83. * ===========================================================================================
  84. * 제목 생성
  85. * ===========================================================================================
  86. */
  87. if(listRowSet.get("DEPOSIT_CD").equals("1")){
  88. makeTitle_1(document, FontTitle, FontTitle2, request);
  89. }else{
  90. makeTitle(document, FontTitle, FontTitle2, request);
  91. }
  92. //본문생성
  93. setBorder(border, true, true, true, true);
  94. //1행
  95. PdfPTable table11 = new PdfPTable(6);
  96. table11.setWidthPercentage(100);
  97. table11.setSpacingBefore(7f);
  98. table11.setSpacingAfter(7f);
  99. float[] table11Width = {15f,3f,27f,3f,27f,30f};
  100. table11.setWidths(table11Width);
  101. // 1행
  102. PT_addCell(table11, new String [] { "계약번호" }, FontTitle, border,
  103. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  104. PT_addCell(table11, listRowSet.get("ORD_DOC_NO"), FontTitle, border,
  105. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  106. PT_addCell(table11, new String [] { "작성일자" }, FontTitle, border,
  107. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  108. PT_addCell(table11, listRowSet.get("REQ_DATE"), FontTitle, border,
  109. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f,false);
  110. PT_addCell(table11, new String [] { "작성자" }, FontTitle, border,
  111. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  112. PT_addCell(table11, listRowSet.get("REQ_CHARGE_NAME"), FontTitle, border,
  113. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  114. PT_addCell(table11, new String [] { "협조부서" }, FontTitle, border,
  115. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  116. PT_addCell(table11, listRowSet.get("COOP_DEPT_NM"), FontTitle, border,
  117. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f,false);
  118. PT_addCell(table11, new String [] { "현장코드" }, FontTitle, border,
  119. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  120. PT_addCell(table11, listRowSet.get("DEPT_CD"), FontTitle, border,
  121. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f,false);
  122. PT_addCell(table11, new String [] { "통화" }, FontTitle, border,
  123. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  124. PT_addCell(table11, listRowSet.get("CURRENCY_GB"), FontTitle, border,
  125. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  126. PT_addCell(table11, new String [] { "현장명" }, FontTitle, border,
  127. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  128. PT_addCell(table11, listRowSet.get("DEPT_NM"), FontTitle, border,
  129. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 5, 20f ,false);
  130. /*PT_addCell(table11, new String [] { "현장명" }, FontTitle, border,
  131. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  132. PT_addCell(table11, listRowSet.get("DEPT_NM"), FontTitle, border,
  133. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  134. PT_addCell(table11, new String [] { "현장코드" }, FontTitle, border,
  135. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  136. PT_addCell(table11, listRowSet.get("DEPT_CD"), FontTitle, border,
  137. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);*/
  138. PT_addCell(table11, new String [] { "계약명" }, FontTitle, border,
  139. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  140. PT_addCell(table11, listRowSet.get("CST_DOC_NAME"), FontTitle, border,
  141. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 5, 20f ,false);
  142. PT_addCell(table11, new String [] { "계약업체명" }, FontTitle, border,
  143. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  144. PT_addCell(table11, listRowSet.get("CORP_NM"), FontTitle, border,
  145. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  146. PT_addCell(table11, new String [] { "대표이사" }, FontTitle, border,
  147. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  148. PT_addCell(table11, listRowSet.get("REP_NAME"), FontTitle, border,
  149. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  150. PT_addCell(table11, new String [] { "총계약금액" }, FontTitle, border,
  151. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  152. PT_addCell(table11, listRowSet.get("ORD_AMT"), FontTitle, border,
  153. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  154. PT_addCell(table11, new String [] { "선급금액" }, FontTitle, border,
  155. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  156. PT_addCell(table11, listRowSet.get("PREPAY_AMT"), FontTitle, border,
  157. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  158. PT_addCell(table11, new String [] { "지급구분" }, FontTitle, border,
  159. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  160. PT_addCell(table11, listRowSet.get("DEPOSIT_GB"), FontTitle, border,
  161. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  162. PT_addCell(table11, new String [] { "기선급공제액" }, FontTitle, border,
  163. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  164. PT_addCell(table11, listRowSet.get("PREPAY_ACMP_AMT"), FontTitle, border,
  165. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  166. PT_addCell(table11, new String [] { "지급사유" }, FontTitle, border,
  167. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  168. PT_addCell(table11, listRowSet.get("DEPOSIT_RESN"), FontTitle, border,
  169. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  170. PT_addCell(table11, new String [] { "선급잔액" }, FontTitle, border,
  171. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  172. PT_addCell(table11, listRowSet.get("PREPAY_RMDR"), FontTitle, border,
  173. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  174. PT_addCell(table11, new String [] { "기지불액" }, FontTitle, border,
  175. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  176. PT_addCell(table11, listRowSet.get("PAYED_AMT")+" ("+listRowSet.get("PAYED_PERCENT")+")%", FontTitle, border,
  177. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  178. PT_addCell(table11, new String [] { "전기성고" }, FontTitle, border,
  179. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  180. PT_addCell(table11, listRowSet.get("BEF_ACMP_AMT")+" ("+listRowSet.get("BEF_ACMP_PERCENT")+")%", FontTitle, border,
  181. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  182. PT_addCell(table11, new String [] { "금회청구액" }, FontTitle, border,
  183. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  184. PT_addCell(table11, listRowSet.get("CUR_REQ_AMT")+" ("+listRowSet.get("CUR_REQ_PERCENT")+")%", FontTitle, border,
  185. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  186. PT_addCell(table11, new String [] { "금회기성고" }, FontTitle, border,
  187. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  188. PT_addCell(table11, listRowSet.get("CUR_ACMP_AMT")+" ("+listRowSet.get("CUR_ACMP_PERCENT")+")%", FontTitle, border,
  189. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  190. PT_addCell(table11, new String [] { "금회포함지불액" }, FontTitle, border,
  191. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  192. PT_addCell(table11, listRowSet.get("CUR_PAYED_AMT")+" ("+listRowSet.get("CUR_PAYED_PERCENT")+")%", FontTitle, border,
  193. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  194. PT_addCell(table11, new String [] { "금회포함기성고" }, FontTitle, border,
  195. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  196. PT_addCell(table11, listRowSet.get("CUR_BEF_ACMP_AMT")+" ("+listRowSet.get("CUR_BEF_ACMP_PERCENT")+")%", FontTitle, border,
  197. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  198. PT_addCell(table11, new String [] { "잔액" }, FontTitle, border,
  199. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  200. PT_addCell(table11, listRowSet.get("REMAINDER_AMT")+" ("+listRowSet.get("REMAINDER_PERCENT")+")%", FontTitle, border,
  201. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  202. PT_addCell(table11, new String [] { "미기성고" }, FontTitle, border,
  203. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  204. PT_addCell(table11, listRowSet.get("REMAINDER_ACMP_AMT")+" ("+listRowSet.get("REMAINDER_ACMP_PERCENT")+")%", FontTitle, border,
  205. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  206. PT_addCell(table11, new String [] { "특기사항" }, FontTitle, border,
  207. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 200f ,true);
  208. PT_addCell(table11, listRowSet.get("RE_MARKS"), FontTitle, border,
  209. Element.ALIGN_LEFT, Element.ALIGN_TOP, 5, 200f ,false);
  210. PT_addCell(table11, new String [] { "첨부서류" }, FontTitle, border,
  211. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 120f ,true);
  212. PdfPTable table21 = new PdfPTable(4);
  213. float[] table21Width = {3f,27,3,27f};
  214. table21.setWidths(table21Width);
  215. PdfPCell permission = new PdfPCell(table21);
  216. PT_addCell(table21, listRowSet.get("DOC_PAYREQ"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  217. PT_addCell(table21, new String [] { "대금청구서" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  218. PT_addCell(table21, listRowSet.get("DOC_COMPLETE"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  219. PT_addCell(table21, new String [] { "설치완료확인서" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  220. PT_addCell(table21, listRowSet.get("DOC_GUAR_CONST"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  221. PT_addCell(table21, new String [] { "계약이행 보증보험 증권" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  222. PT_addCell(table21, listRowSet.get("DOC_TESTRUN"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  223. PT_addCell(table21, new String [] { "시운전완료확인서" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  224. PT_addCell(table21, listRowSet.get("DOC_MRR"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  225. PT_addCell(table21, new String [] { "지급이행 보증보험 증권" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  226. PT_addCell(table21, listRowSet.get("DOC_INSPECTION_REPORT"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  227. PT_addCell(table21, new String [] { "Inspection Report" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  228. PT_addCell(table21, listRowSet.get("DOC_GUAR_AS"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  229. PT_addCell(table21, new String [] { "하자이행 보증보험 증권" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  230. PT_addCell(table21, listRowSet.get("DOC_SHIP"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  231. PT_addCell(table21, new String [] { "선적서류(B/L, Packing List)" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  232. PT_addCell(table21, listRowSet.get("DOC_ITEMINPUTCONFIRM"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  233. PT_addCell(table21, new String [] { "원자재입고확인서" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  234. PT_addCell(table21, listRowSet.get("DOC_FINAL_DOCUMENTS"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  235. PT_addCell(table21, new String [] { "Final Documents 제출 확인서" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  236. PT_addCell(table21, listRowSet.get("DOC_CONFIRM"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  237. PT_addCell(table21, new String [] { "MRR" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  238. PT_addCell(table21, listRowSet.get("DOC_CONST_COPY"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  239. PT_addCell(table21, new String [] { "계약서 사본" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  240. PT_addCell(table21, listRowSet.get("DOC_WORKQA"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  241. PT_addCell(table21, new String [] { "거래명세서" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  242. PT_addCell(table21, listRowSet.get("DOC_ETC"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  243. PT_addCell(table21, new String [] { "기타" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  244. PT_addCell(table21, listRowSet.get("DOC_MC"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  245. permission.setColspan(4);
  246. table11.addCell(permission);
  247. PT_addCell(table11, "", FontTitle, border,
  248. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 120f,false);
  249. document.add(table11);
  250. } catch (DocumentException de) {
  251. WAFLogger.debug("de.getMessage() = " + de.getMessage());
  252. } catch (IOException ioe) {
  253. WAFLogger.debug("ioe.getMessage() = " + ioe.getMessage());
  254. } catch (Exception e) {
  255. WAFLogger.debug("[Exception] ... " + e);
  256. }
  257. // step 5
  258. document.close();
  259. WAFLogger.debug("\n\t #################### "+ strFileName +" 생성완료");
  260. }
  261. /*
  262. * ===========================================================================================
  263. * A. 타이틀
  264. * ===========================================================================================
  265. */
  266. public void doBiz1(Connection con, OutputStream outputStream, String tmpslipID, HttpServletRequest request) {
  267. WAFLogger.debug("\n\t #################### 구매 대금지급생성 시작");
  268. // step 1
  269. Document document = new Document(PageSize.A4, 25f, 25f, 35f, 10f);
  270. try {
  271. // step 2
  272. PdfWriter writer = PdfWriter.getInstance(document, outputStream);
  273. // step 3
  274. document.open();
  275. BaseFont bfKorean = BaseFont.createFont("HYGoThic-Medium", "UniKS-UCS2-H", BaseFont.NOT_EMBEDDED);
  276. Font FontTitle = new Font(bfKorean, 8, Font.NORMAL);
  277. FontTitle.setColor(borderColor);
  278. Font FontData = new Font(bfKorean, 4.8f, Font.NORMAL);
  279. Font FontTitle2 = new Font(bfKorean, 20, Font.BOLD);
  280. PdfPTable table = null;
  281. PdfPCell cell = null;
  282. /*
  283. * 정보 검색 시작 ---------------------------------------------
  284. */
  285. ValueObject params = new ValueObject();
  286. HandlerStorage storage = new HandlerStorage();
  287. storage.setParams(params);
  288. ValueObject listRowSet = null;
  289. /*
  290. * 정보 검색 시작 ---------------------------------------------
  291. */
  292. listRowSet = getPayReqList1(con, tmpslipID);
  293. // 정보 검색 끝 ---------------------------------------------
  294. /*
  295. * ===========================================================================================
  296. * 제목 생성
  297. * ===========================================================================================
  298. */
  299. makeTitle_2(document, FontTitle, FontTitle2, request);
  300. //본문생성
  301. setBorder(border, true, true, true, true);
  302. //1행
  303. PdfPTable table11 = new PdfPTable(6);
  304. table11.setWidthPercentage(100);
  305. table11.setSpacingBefore(7f);
  306. table11.setSpacingAfter(7f);
  307. float[] table11Width = {15f,3f,27f,3f,27f,30f};
  308. table11.setWidths(table11Width);
  309. // 1행
  310. PT_addCell(table11, new String [] { "계약번호" }, FontTitle, border,
  311. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  312. PT_addCell(table11, listRowSet.get("ORD_DOC_NO"), FontTitle, border,
  313. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  314. PT_addCell(table11, new String [] { "작성일자" }, FontTitle, border,
  315. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  316. PT_addCell(table11, listRowSet.get("REQ_DATE"), FontTitle, border,
  317. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f,false);
  318. //2015.10.22 양식변경
  319. PT_addCell(table11, new String [] { "작성자" }, FontTitle, border,
  320. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  321. PT_addCell(table11, listRowSet.get("REQ_CHARGE_NAME"), FontTitle, border,
  322. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  323. PT_addCell(table11, new String [] { "협조부서" }, FontTitle, border,
  324. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  325. PT_addCell(table11, listRowSet.get("COOP_DEPT_NM"), FontTitle, border,
  326. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f,false);
  327. PT_addCell(table11, new String [] { "현장코드" }, FontTitle, border,
  328. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  329. PT_addCell(table11, listRowSet.get("DEPT_CD"), FontTitle, border,
  330. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f,false);
  331. PT_addCell(table11, new String [] { "통화" }, FontTitle, border,
  332. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  333. PT_addCell(table11, listRowSet.get("CURRENCY_GB"), FontTitle, border,
  334. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  335. PT_addCell(table11, new String [] { "현장명" }, FontTitle, border,
  336. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  337. PT_addCell(table11, listRowSet.get("DEPT_NM"), FontTitle, border,
  338. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 5, 20f ,false);
  339. /*PT_addCell(table11, new String [] { "현장명" }, FontTitle, border,
  340. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  341. PT_addCell(table11, listRowSet.get("DEPT_NM"), FontTitle, border,
  342. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  343. PT_addCell(table11, new String [] { "현장코드" }, FontTitle, border,
  344. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  345. PT_addCell(table11, listRowSet.get("DEPT_CD"), FontTitle, border,
  346. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);*/
  347. PT_addCell(table11, new String [] { "계약명" }, FontTitle, border,
  348. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  349. PT_addCell(table11, listRowSet.get("CST_DOC_NAME"), FontTitle, border,
  350. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 5, 20f ,false);
  351. PT_addCell(table11, new String [] { "계약업체명" }, FontTitle, border,
  352. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  353. PT_addCell(table11, listRowSet.get("CORP_NM"), FontTitle, border,
  354. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  355. PT_addCell(table11, new String [] { "사업자번호" }, FontTitle, border,
  356. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  357. PT_addCell(table11, listRowSet.get("CORP_REG_NO"), FontTitle, border,
  358. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  359. PT_addCell(table11, new String [] { "지급조건" }, FontTitle, border,
  360. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  361. PT_addCell(table11, listRowSet.get("PAYMENT_TERMS"), FontTitle, border,
  362. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  363. PT_addCell(table11, new String [] { "대표이사" }, FontTitle, border,
  364. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  365. PT_addCell(table11, listRowSet.get("REP_NAME"), FontTitle, border,
  366. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  367. PT_addCell(table11, new String [] { "총계약금액" }, FontTitle, border,
  368. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  369. PT_addCell(table11, listRowSet.get("ORD_AMT"), FontTitle, border,
  370. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  371. PT_addCell(table11, new String [] { "선급금액" }, FontTitle, border,
  372. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  373. PT_addCell(table11, listRowSet.get("PREPAY_AMT"), FontTitle, border,
  374. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  375. PT_addCell(table11, new String [] { "지급구분" }, FontTitle, border,
  376. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  377. PT_addCell(table11, listRowSet.get("DEPOSIT_GB"), FontTitle, border,
  378. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  379. PT_addCell(table11, new String [] { "지급사유" }, FontTitle, border,
  380. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  381. PT_addCell(table11, listRowSet.get("DEPOSIT_RESN"), FontTitle, border,
  382. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  383. PT_addCell(table11, new String [] { "기지불액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  384. PT_addCell(table11, listRowSet.get("PAYED_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  385. PT_addCell(table11, new String [] { "기선급공제액" }, FontTitle, border,
  386. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  387. PT_addCell(table11, listRowSet.get("PREPAY_ACMP_AMT"), FontTitle, border,
  388. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  389. PT_addCell(table11, new String [] { "금회청구액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  390. PT_addCell(table11, listRowSet.get("CUR_REQ_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  391. PT_addCell(table11, new String [] { "금회선급공제액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  392. PT_addCell(table11, listRowSet.get("CUR_PREPAY_APPLYAMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  393. PT_addCell(table11, new String [] { "금회포함지불액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  394. PT_addCell(table11, listRowSet.get("CUR_PAYED_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  395. PT_addCell(table11, new String [] { "선급잔액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  396. PT_addCell(table11, listRowSet.get("PREPAY_RMDR"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  397. PT_addCell(table11, new String [] { "잔액" }, FontTitle, border,
  398. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  399. PT_addCell(table11, listRowSet.get("REMAINDER_AMT")+" ("+listRowSet.get("REMAINDER_PERCENT")+")%", FontTitle, border,
  400. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  401. PT_addCell(table11, new String [] { "금회선급공제누계" }, FontTitle, border,
  402. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  403. PT_addCell(table11, listRowSet.get("CUR_PREPAY_APPLYAMT1"), FontTitle, border,
  404. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  405. PT_addCell(table11, new String [] { "전기성고" }, FontTitle, border,
  406. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  407. PT_addCell(table11, listRowSet.get("BEF_ACMP_AMT")+" ("+listRowSet.get("BEF_ACMP_PERCENT")+")%", FontTitle, border,
  408. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f,false);
  409. PT_addCell(table11, new String [] { "" }, FontTitle, border,
  410. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  411. PT_addCell(table11, "", FontTitle, border,
  412. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  413. PT_addCell(table11, new String [] { "금회기성고" }, FontTitle, border,
  414. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  415. PT_addCell(table11, listRowSet.get("CUR_ACMP_AMT")+" ("+listRowSet.get("CUR_ACMP_PERCENT")+")%", FontTitle, border,
  416. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f,false);
  417. PT_addCell(table11, new String [] { "" }, FontTitle, border,
  418. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  419. PT_addCell(table11, "", FontTitle, border,
  420. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  421. /*PT_addCell(table11, new String [] { "금회포함기성고" }, FontTitle, border,
  422. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  423. PT_addCell(table11, listRowSet.get("CUR_BEF_ACMP_AMT")+" ("+listRowSet.get("CUR_BEF_ACMP_PERCENT")+")%", FontTitle, border,
  424. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  425. PT_addCell(table11, new String [] { "미기성고" }, FontTitle, border,
  426. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  427. PT_addCell(table11, listRowSet.get("REMAINDER_ACMP_AMT")+" ("+listRowSet.get("REMAINDER_ACMP_PERCENT")+")%", FontTitle, border,
  428. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);*/
  429. PT_addCell(table11, new String [] { "특기사항" }, FontTitle, border,
  430. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 200f ,true);
  431. PT_addCell(table11, listRowSet.get("RE_MARKS"), FontTitle, border,
  432. Element.ALIGN_LEFT, Element.ALIGN_TOP, 5, 200f ,false);
  433. PT_addCell(table11, new String [] { "첨부서류" }, FontTitle, border,
  434. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 120f ,true);
  435. PdfPTable table21 = new PdfPTable(4);
  436. float[] table21Width = {3f,27,3,27f};
  437. table21.setWidths(table21Width);
  438. PdfPCell permission = new PdfPCell(table21);
  439. PT_addCell(table21, listRowSet.get("DOC_PAYREQ"), FontTitle, border,
  440. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  441. PT_addCell(table21, new String [] { "대금청구서" }, FontTitle, border,
  442. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  443. PT_addCell(table21, listRowSet.get("DOC_COMPLETE"), FontTitle, border,
  444. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  445. PT_addCell(table21, new String [] { "설치완료확인서" }, FontTitle, border,
  446. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  447. PT_addCell(table21, listRowSet.get("DOC_GUAR_CONST"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  448. PT_addCell(table21, new String [] { "계약이행 보증보험 증권" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  449. PT_addCell(table21, listRowSet.get("DOC_TESTRUN"), FontTitle, border,
  450. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  451. PT_addCell(table21, new String [] { "시운전완료확인서" }, FontTitle, border,
  452. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  453. PT_addCell(table21, listRowSet.get("DOC_MRR"), FontTitle, border,
  454. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  455. PT_addCell(table21, new String [] { "지급이행 보증보험 증권" }, FontTitle, border,
  456. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  457. PT_addCell(table21, listRowSet.get("DOC_INSPECTION_REPORT"), FontTitle, border,
  458. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  459. PT_addCell(table21, new String [] { "Inspection Report" }, FontTitle, border,
  460. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  461. PT_addCell(table21, listRowSet.get("DOC_GUAR_AS"), FontTitle, border,
  462. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  463. PT_addCell(table21, new String [] { "하자이행 보증보험 증권" }, FontTitle, border,
  464. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  465. PT_addCell(table21, listRowSet.get("DOC_SHIP"), FontTitle, border,
  466. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  467. PT_addCell(table21, new String [] { "선적서류(B/L, Packing List)" }, FontTitle, border,
  468. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  469. PT_addCell(table21, listRowSet.get("DOC_ITEMINPUTCONFIRM"), FontTitle, border,
  470. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  471. PT_addCell(table21, new String [] { "원자재입고확인서" }, FontTitle, border,
  472. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  473. PT_addCell(table21, listRowSet.get("DOC_FINAL_DOCUMENTS"), FontTitle, border,
  474. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  475. PT_addCell(table21, new String [] { "Final Documents 제출 확인서" }, FontTitle, border,
  476. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  477. PT_addCell(table21, listRowSet.get("DOC_CONFIRM"), FontTitle, border,
  478. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  479. PT_addCell(table21, new String [] { "MRR" }, FontTitle, border,
  480. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  481. PT_addCell(table21, listRowSet.get("DOC_CONST_COPY"), FontTitle, border,
  482. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  483. PT_addCell(table21, new String [] { "계약서 사본" }, FontTitle, border,
  484. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  485. PT_addCell(table21, listRowSet.get("DOC_WORKQA"), FontTitle, border,
  486. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  487. PT_addCell(table21, new String [] { "거래명세서" }, FontTitle, border,
  488. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  489. PT_addCell(table21, listRowSet.get("DOC_ETC"), FontTitle, border,
  490. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  491. PT_addCell(table21, new String [] { "기타" }, FontTitle, border,
  492. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  493. PT_addCell(table21, listRowSet.get("DOC_MC"), FontTitle, border,
  494. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  495. permission.setColspan(4);
  496. table11.addCell(permission);
  497. PT_addCell(table11, "", FontTitle, border,
  498. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 120f,false);
  499. document.add(table11);
  500. } catch (DocumentException de) {
  501. WAFLogger.debug("de.getMessage() = " + de.getMessage());
  502. } catch (IOException ioe) {
  503. WAFLogger.debug("ioe.getMessage() = " + ioe.getMessage());
  504. } catch (Exception e) {
  505. WAFLogger.debug("[Exception] ... " + e);
  506. }
  507. // step 5
  508. document.close();
  509. WAFLogger.debug("\n\t #################### "+ strFileName +" 생성완료");
  510. }
  511. private static void makeTitle1(Document document, Font FontTitle,
  512. Font FontTitle2, HttpServletRequest request) throws Exception {
  513. PdfPTable tbl_Title = new PdfPTable(2);
  514. tbl_Title.setWidthPercentage(40f);
  515. float[] tbl_TitleWidths = {10f,10f};
  516. tbl_Title.setWidths(tbl_TitleWidths);
  517. PdfPCell title= new PdfPCell(new Paragraph("대 금 지 급", FontTitle2));
  518. title.setColspan(2);
  519. title.setHorizontalAlignment(Element.ALIGN_CENTER);
  520. title.setVerticalAlignment(Element.ALIGN_MIDDLE);
  521. title.setFixedHeight(40f);
  522. title.setBorder(0);
  523. title.setBorderWidthBottom(1);
  524. tbl_Title.addCell(title);
  525. PdfPCell titleB = new PdfPCell(new Paragraph("", FontTitle2));
  526. titleB.setColspan(2);
  527. titleB.setFixedHeight(30f);
  528. titleB.setBorder(0);
  529. tbl_Title.addCell(titleB);
  530. //PT_addCell(tbl_Title, "대 금 지 급", FontTitle2, borderTemp,
  531. // Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 28f, false);
  532. document.add(tbl_Title);
  533. Image img = null;
  534. if(request == null)
  535. {
  536. //img = Image.getInstance(new URL("http://edreams21.co.kr/img/invoice/Title_bg1.gif"));
  537. }
  538. else
  539. {
  540. //img = Image.getInstance(new URL(request.getScheme(), request.getServerName(), request.getServerPort(), "/img/invoice/Title_bg1.gif"));
  541. }
  542. // img.scaleToFit(300f, 40f);
  543. // img.setAbsolutePosition(310, 554);
  544. // img.setAbsolutePosition(203, 246);
  545. // img.setAbsolutePosition(180, 310);
  546. // document.add(img);
  547. }
  548. private static void makeTitle_1(Document document, Font FontTitle,
  549. Font FontTitle2, HttpServletRequest request) throws Exception {
  550. PdfPTable tbl_Title = new PdfPTable(2);
  551. tbl_Title.setWidthPercentage(40f);
  552. float[] tbl_TitleWidths = {10f,10f};
  553. tbl_Title.setWidths(tbl_TitleWidths);
  554. PdfPCell title= new PdfPCell(new Paragraph("선 급 금 지 급", FontTitle2));
  555. title.setColspan(2);
  556. title.setHorizontalAlignment(Element.ALIGN_CENTER);
  557. title.setVerticalAlignment(Element.ALIGN_MIDDLE);
  558. title.setFixedHeight(40f);
  559. title.setBorder(0);
  560. title.setBorderWidthBottom(1);
  561. tbl_Title.addCell(title);
  562. PdfPCell titleB = new PdfPCell(new Paragraph("", FontTitle2));
  563. titleB.setColspan(2);
  564. titleB.setFixedHeight(30f);
  565. titleB.setBorder(0);
  566. tbl_Title.addCell(titleB);
  567. document.add(tbl_Title);
  568. Image img = null;
  569. if(request == null)
  570. {
  571. //img = Image.getInstance(new URL("http://edreams21.co.kr/img/invoice/Title_bg1.gif"));
  572. }
  573. else
  574. {
  575. //img = Image.getInstance(new URL(request.getScheme(), request.getServerName(), request.getServerPort(), "/img/invoice/Title_bg1.gif"));
  576. }
  577. // img.scaleToFit(300f, 40f);
  578. // img.setAbsolutePosition(310, 554);
  579. // img.setAbsolutePosition(203, 246);
  580. // img.setAbsolutePosition(180, 310);
  581. // document.add(img);
  582. }
  583. private static void makeTitle_2(Document document, Font FontTitle,
  584. Font FontTitle2, HttpServletRequest request) throws Exception {
  585. PdfPTable tbl_Title = new PdfPTable(2);
  586. tbl_Title.setWidthPercentage(40f);
  587. float[] tbl_TitleWidths = {10f,10f};
  588. tbl_Title.setWidths(tbl_TitleWidths);
  589. PdfPCell title= new PdfPCell(new Paragraph("대 금 지 급", FontTitle2));
  590. title.setColspan(2);
  591. title.setHorizontalAlignment(Element.ALIGN_CENTER);
  592. title.setVerticalAlignment(Element.ALIGN_MIDDLE);
  593. title.setFixedHeight(40f);
  594. title.setBorder(0);
  595. title.setBorderWidthBottom(1);
  596. tbl_Title.addCell(title);
  597. PdfPCell titleB = new PdfPCell(new Paragraph("", FontTitle2));
  598. titleB.setColspan(2);
  599. titleB.setFixedHeight(30f);
  600. titleB.setBorder(0);
  601. tbl_Title.addCell(titleB);
  602. //PT_addCell(tbl_Title, "대 금 지 급", FontTitle2, borderTemp,
  603. // Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 28f, false);
  604. document.add(tbl_Title);
  605. Image img = null;
  606. if(request == null)
  607. {
  608. //img = Image.getInstance(new URL("http://edreams21.co.kr/img/invoice/Title_bg1.gif"));
  609. }
  610. else
  611. {
  612. //img = Image.getInstance(new URL(request.getScheme(), request.getServerName(), request.getServerPort(), "/img/invoice/Title_bg1.gif"));
  613. }
  614. // img.scaleToFit(300f, 40f);
  615. // img.setAbsolutePosition(310, 554);
  616. // img.setAbsolutePosition(203, 246);
  617. // img.setAbsolutePosition(180, 310);
  618. // document.add(img);
  619. }
  620. private static void makeTitle(Document document, Font FontTitle,
  621. Font FontTitle2, HttpServletRequest request) throws Exception {
  622. PdfPTable tbl_Title = new PdfPTable(2);
  623. tbl_Title.setWidthPercentage(40f);
  624. float[] tbl_TitleWidths = {10f,10f};
  625. tbl_Title.setWidths(tbl_TitleWidths);
  626. PdfPCell title= new PdfPCell(new Paragraph("대 금 지 급", FontTitle2));
  627. title.setColspan(2);
  628. title.setHorizontalAlignment(Element.ALIGN_CENTER);
  629. title.setVerticalAlignment(Element.ALIGN_MIDDLE);
  630. title.setFixedHeight(40f);
  631. title.setBorder(0);
  632. title.setBorderWidthBottom(1);
  633. tbl_Title.addCell(title);
  634. PdfPCell titleB = new PdfPCell(new Paragraph("", FontTitle2));
  635. titleB.setColspan(2);
  636. titleB.setFixedHeight(30f);
  637. titleB.setBorder(0);
  638. tbl_Title.addCell(titleB);
  639. //PT_addCell(tbl_Title, "대 금 지 급", FontTitle2, borderTemp,
  640. // Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 28f, false);
  641. document.add(tbl_Title);
  642. Image img = null;
  643. if(request == null)
  644. {
  645. //img = Image.getInstance(new URL("http://edreams21.co.kr/img/invoice/Title_bg1.gif"));
  646. }
  647. else
  648. {
  649. //img = Image.getInstance(new URL(request.getScheme(), request.getServerName(), request.getServerPort(), "/img/invoice/Title_bg1.gif"));
  650. }
  651. // img.scaleToFit(300f, 40f);
  652. // img.setAbsolutePosition(310, 554);
  653. // img.setAbsolutePosition(203, 246);
  654. // img.setAbsolutePosition(180, 310);
  655. // document.add(img);
  656. }
  657. /*
  658. * ===========================================================================================
  659. * B. 데이터 입력
  660. * ===========================================================================================
  661. */
  662. /*
  663. * ===========================================================================================
  664. * 기타
  665. * ===========================================================================================
  666. */
  667. // PdfPCell을 리턴하자
  668. private static PdfPCell PC_addCell(String strText, Font FontTitle,
  669. Rectangle border, int HA, int VA, int CS) {
  670. // 추가할 Cell 생성
  671. PdfPCell cell = new PdfPCell(new Paragraph(strText, FontTitle));
  672. // PdfPCell cell = new PdfPCell(new Paragraph(strText));
  673. // Cell Border 설정
  674. // setBorder(cell, blnLEFT, blnRIGHT, blnTOP, blnBOTTOM);
  675. cell.cloneNonPositionParameters(border);
  676. // 가로/세로 정렬
  677. cell.setHorizontalAlignment(HA);
  678. cell.setVerticalAlignment(VA);
  679. // setColspan
  680. if (CS > 1)
  681. cell.setColspan(CS);
  682. // cell.setPadding(0);
  683. if( isGray )
  684. cell.setGrayFill(0.8f);
  685. //if( LineisGray )
  686. // cell.setGrayFill(0.9f);
  687. //cell.setBackgroundColor(arg0)
  688. return cell;
  689. }
  690. // Cell Border 설정
  691. private static void setBorder(Rectangle border, boolean blnLEFT,
  692. boolean blnRIGHT, boolean blnTOP, boolean blnBOTTOM) {
  693. border.setBorderColor(borderColor);
  694. if (blnLEFT) {
  695. border.setBorderWidthLeft(BorderW);
  696. } else {
  697. border.setBorderWidthLeft(0);
  698. }
  699. if (blnRIGHT) {
  700. border.setBorderWidthRight(BorderW);
  701. } else {
  702. border.setBorderWidthRight(0);
  703. }
  704. if (blnTOP) {
  705. border.setBorderWidthTop(BorderW);
  706. } else {
  707. border.setBorderWidthTop(0);
  708. }
  709. if (blnBOTTOM) {
  710. border.setBorderWidthBottom(BorderW);
  711. } else {
  712. border.setBorderWidthBottom(0);
  713. }
  714. }
  715. // PdfPTable에 Cell 을 추가하자
  716. private static void PT_addCell(PdfPTable table, String[] arrText,
  717. Font FontTitle, Rectangle border, int HA, int VA, int CS) {
  718. for (int i = 0; i < arrText.length; i++) {
  719. PT_addCell(table, arrText[i], FontTitle, border, HA, VA, CS);
  720. }
  721. }
  722. private static void PT_addCell(PdfPTable table, String[] arrText,
  723. Font FontTitle, Rectangle border, int HA, int VA, int CS, float RH, boolean CL) {
  724. for (int i = 0; i < arrText.length; i++) {
  725. PT_addCell(table, arrText[i], FontTitle, border, HA, VA, CS, RH, CL);
  726. }
  727. }
  728. private static void PT_addCell(PdfPTable table, String strText,
  729. Font FontTitle, Rectangle border, int HA, int VA, int CS) {
  730. // 추가할 Cell 생성
  731. PdfPCell cell = PC_addCell(strText, FontTitle, border, HA, VA, CS);
  732. table.addCell(cell);
  733. }
  734. // PdfPTable에 Cell 을 추가하자(행높이 추가)
  735. private static void PT_addCell(PdfPTable table, String strText,
  736. Font FontTitle, Rectangle border, int HA, int VA, int CS, float RH, boolean CL) {
  737. // 추가할 Cell 생성
  738. PdfPCell cell = PC_addCell(strText, FontTitle, border, HA, VA, CS);
  739. // 셀 높이
  740. if (RH > 0)
  741. cell.setFixedHeight(RH);
  742. if (CL) {
  743. cell.setBackgroundColor(Color.lightGray);
  744. } else {
  745. cell.setBackgroundColor(Color.white);
  746. }
  747. table.addCell(cell);
  748. }
  749. public ValueObject getPayReqList(String tmpslipID ){
  750. Search search = new SearchImpl();
  751. ValueObject vo = null;
  752. RowSet rowSet = new RowSetImpl();
  753. StringBuffer sql = new StringBuffer();
  754. try{
  755. sql.append(" SELECT \n");
  756. sql.append(" DECODE(A.DOC_INSPECTION_REPORT , 'Y', 'V', '') DOC_INSPECTION_REPORT -- 첨부_INSPECTION REPORT \n");
  757. sql.append(" ,DECODE(A.DOC_CONFIRM , 'Y', 'V', '') DOC_CONFIRM -- 첨부_납품확인서 \n");
  758. sql.append(" ,DECODE(A.DOC_FINAL_DOCUMENTS , 'Y', 'V', '') DOC_FINAL_DOCUMENTS -- 첨부_FINAL DOCUMENTS 제출확인서 \n");
  759. sql.append(" ,DECODE(A.DOC_GUAR_CONST , 'Y', 'V', '') DOC_GUAR_CONST -- 첨부_계약이행보증보험증권 \n");
  760. sql.append(" ,DECODE(A.DOC_GUAR_AS, 'Y', 'V', '') DOC_GUAR_AS -- 첨부_하자이행보증보험증권 \n");
  761. sql.append(" ,DECODE(A.DOC_WORKQA, 'Y', 'V', '') DOC_WORKQA -- 첨부_기성검사보고서 \n");
  762. sql.append(" ,DECODE(A.DOC_SHIP, 'Y', 'V', '') DOC_SHIP -- 첨부_선적서류(B/L,PACKING LIST) \n");
  763. sql.append(" ,DECODE(A.DOC_COMPLETE, 'Y', 'V', '') DOC_COMPLETE -- 첨부_준공검사보고서 \n");
  764. sql.append(" ,DECODE(A.DOC_CONST_COPY, 'Y', 'V', '') DOC_CONST_COPY -- 첨부_계약서사본 \n");
  765. sql.append(" ,DECODE(A.DOC_ETC, 'Y', 'V', '') DOC_ETC -- 첨부_기타 \n");
  766. sql.append(" ,DECODE(A.DOC_MC, 'Y', 'V', '') DOC_MC -- M/C 완료확인서 \n");
  767. sql.append(" ,DECODE(A.DOC_TESTRUN, 'Y', 'V', '') DOC_TESTRUN -- 첨부_시운행 \n");
  768. sql.append(" ,A.REQ_STATUS -- 대금신청상태 \n");
  769. sql.append(" ,A.TRANS_CD -- 전표집계여부 \n");
  770. sql.append(" ,A.PUR_CONT_ID -- 발주계약ID \n");
  771. sql.append(" ,A.PAYREQ_ID -- 지급신청ID \n");
  772. sql.append(" ,TO_CHAR(A.REQ_DATE, 'YYYY-MM-DD') REQ_DATE -- 신청서작성일자 \n");
  773. sql.append(" ,A.REQ_CHARGE_ID -- 신청서작성자ID \n");
  774. sql.append(" ,A.COOP_DEPT_CD -- 협조부서코드 \n");
  775. sql.append(" ,F_GET_D_CURRENCY( NVL( A.ORD_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) ORD_AMT -- 총계약금액 \n");
  776. sql.append(" ,F_GET_PUR_STATUS(A.DEPOSIT_CD, 'PUR_PAY_ACMP_GB') || '(' || TO_NUMBER(A.DEPOSIT_SEQ) || '차)' DEPOSIT_GB -- 지급구분이름 \n");
  777. sql.append(" ,A.DEPOSIT_CD -- 지급구분 \n");
  778. sql.append(" ,A.DEPOSIT_SEQ -- 지급차수 \n");
  779. sql.append(" ,A.DEPOSIT_RESN -- 지급사유 \n");
  780. sql.append(" ,F_GET_D_CURRENCY( NVL( A.PAYED_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) PAYED_AMT -- 기지불액 \n");
  781. sql.append(" ,F_GET_D_CURRENCY(A.PAYED_PERCENT, 1) PAYED_PERCENT -- 기지불액비율 \n");
  782. sql.append(" ,F_GET_D_CURRENCY( NVL( A.CUR_REQ_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) CUR_REQ_AMT -- 금회청구액 \n");
  783. sql.append(" ,F_GET_D_CURRENCY(A.CUR_REQ_PERCENT, 1) CUR_REQ_PERCENT -- 금회청구액비율 \n");
  784. sql.append(" ,F_GET_D_CURRENCY( NVL( A.CUR_PAYED_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) CUR_PAYED_AMT -- 금회포함지불액 \n");
  785. sql.append(" ,F_GET_D_CURRENCY(A.CUR_PAYED_PERCENT, 1) CUR_PAYED_PERCENT -- 금회포함지불액비율 \n");
  786. sql.append(" ,F_GET_D_CURRENCY( NVL( A.REMAINDER_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) REMAINDER_AMT -- 잔액 \n");
  787. sql.append(" ,F_GET_D_CURRENCY(A.REMAINDER_PERCENT , 1) REMAINDER_PERCENT -- 잔액비율 \n");
  788. sql.append(" ,F_GET_D_CURRENCY( NVL( A.BEF_ACMP_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) BEF_ACMP_AMT -- 전기성고 \n");
  789. sql.append(" ,F_GET_D_CURRENCY(A.BEF_ACMP_PERCENT , 1) BEF_ACMP_PERCENT -- 전기성고비율 \n");
  790. sql.append(" ,F_GET_D_CURRENCY( NVL( A.CUR_ACMP_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) CUR_ACMP_AMT -- 금회기성고 \n");
  791. sql.append(" ,F_GET_D_CURRENCY(A.CUR_ACMP_PERCENT , 1) CUR_ACMP_PERCENT -- 금회기성고비율 \n");
  792. sql.append(" ,F_GET_D_CURRENCY( NVL( A.CUR_BEF_ACMP_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) CUR_BEF_ACMP_AMT -- 금회포함기성고 \n");
  793. sql.append(" ,F_GET_D_CURRENCY(A.CUR_BEF_ACMP_PERCENT ,1) CUR_BEF_ACMP_PERCENT -- 금회포함기성고비율 \n");
  794. sql.append(" ,F_GET_D_CURRENCY( NVL( A.REMAINDER_ACMP_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) REMAINDER_ACMP_AMT -- 미기성고 \n");
  795. sql.append(" ,F_GET_D_CURRENCY(A.REMAINDER_ACMP_PERCENT, 1) REMAINDER_ACMP_PERCENT -- 미기성고비율 \n");
  796. sql.append(" ,F_GET_D_CURRENCY( NVL( A.CUR_PREPAY_DEDUCTAMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) CUR_PREPAY_DEDUCTAMT -- 금회선급금 공제 \n");
  797. sql.append(" ,F_GET_D_CURRENCY(A.ACMP_APPLYRATE ,1) ACMP_APPLYRATE -- 기성고적용 비율 \n");
  798. sql.append(" ,A.RE_MARKS -- 특기사항 \n");
  799. sql.append(" ,DECODE(A.DOC_PAYREQ, 'Y', 'V', '') DOC_PAYREQ -- 첨부_대금청구서 \n");
  800. sql.append(" ,DECODE(A.DOC_MRR, 'Y', 'V', '') DOC_MRR -- 첨부_MRR \n");
  801. sql.append(" ,DECODE(A.DOC_ITEMINPUTCONFIRM, 'Y', 'V', '') DOC_ITEMINPUTCONFIRM -- 첨부_원자재입고확인서 \n");
  802. sql.append(" ,B.ORD_DOC_NO AS ORD_DOC_NO -- 계약번호 \n");
  803. sql.append(" ,F_GET_USER_NM(A.REQ_CHARGE_ID) AS REQ_CHARGE_NAME -- 작성자 \n");
  804. sql.append(" ,GET_ACC_DEPT_NM(A.COOP_DEPT_CD) AS COOP_DEPT_NM -- 협조부서명 \n");
  805. sql.append(" ,B.CST_DOC_NAME AS CST_DOC_NAME -- 계약명 \n");
  806. sql.append(" ,GET_CORP_NM(B.CORP_ID) AS CORP_NM --계약업체명 \n");
  807. sql.append(" ,(SELECT REP_NAME FROM PUR9000T_V D WHERE D.CORP_ID = B.CORP_ID ) REP_NAME -- 업체대표이사 \n");
  808. sql.append(" ,(SELECT CORP_REG_NO FROM PUR9000T_V D WHERE D.CORP_ID = B.CORP_ID ) CORP_REG_NO -- 사업자번호 \n");
  809. sql.append(" ,B.DEPT_NAME AS DEPT_NM -- 현장명 \n");
  810. sql.append(" ,C.DEPT_CD AS DEPT_CD -- 현장코드 \n");//2018.06.25 b
  811. sql.append(" ,B.CURRENCY_GB -- 통화구분 \n");
  812. sql.append(" ,F_GET_D_CURRENCY( F_PUR_AMT_SUM(A.PUR_CONT_ID, '1') \n");
  813. sql.append(" , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) AS PREPAY_ACMP_AMT --기선급공제액 \n");
  814. sql.append(" ,F_GET_D_CURRENCY( NVL(B.PREPAY_AMT , 0) , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) PREPAY_AMT --선급금액 \n");
  815. sql.append(" ,F_GET_D_CURRENCY( PREPAY_AMT - F_PUR_AMT_SUM(A.PUR_CONT_ID, '1') \n");
  816. sql.append(" , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) PREPAY_RMDR --선급잔액 \n");
  817. sql.append(" ,F_GET_D_CURRENCY( NVL( A.CUR_REQ_VATAMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) CUR_REQ_VATAMT \n");
  818. sql.append(" ,F_GET_D_CURRENCY( NVL( A.CUR_PAYING_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( B.CURRENCY_GB, 'KRW' ) ) ) CUR_PAYING_AMT \n");
  819. sql.append(" ,(SELECT CHG_CODE10 FROM COM911T WHERE DETAILCD = B.GUA_GB AND BASECD = 'PROOF_CD') VAT_STATUS \n");
  820. sql.append(" FROM PUR1100T A , PUR1000T B , PUR1040T C \n");
  821. sql.append(" WHERE A.PUR_CONT_ID = B.PUR_CONT_ID \n");
  822. sql.append(" AND C.PAYREQ_ID = A.PAYREQ_ID \n");
  823. sql.append(" AND C.TMPSLIP_ID = "+tmpslipID+" \n");
  824. search.setStatement(sql.toString());
  825. rowSet = search.execute();
  826. if(rowSet.size()>0){
  827. vo = RowSetUtility.getValueObject(rowSet.getRow(0));
  828. }
  829. }catch(Exception e){
  830. WAFLogger.error("SQL : " + search.getStatement());
  831. WAFLogger.error(e);
  832. }finally{
  833. if( vo == null) vo = new ValueObject();
  834. }
  835. return vo;
  836. }
  837. public ValueObject getPayReqList1(Connection con, String tmpslipID ){
  838. Search search = new SearchImpl();
  839. ValueObject vo = null;
  840. RowSet rowSet = new RowSetImpl();
  841. StringBuffer sql = new StringBuffer();
  842. Persistent persistent_c = null;
  843. try{
  844. persistent_c = new PersistentImpl(con);
  845. sql.append(" SELECT \n");
  846. sql.append(" DECODE(B.DOC_INSPECTION_REPORT , 'Y', 'V', '') DOC_INSPECTION_REPORT -- 첨부_INSPECTION REPORT \n");
  847. sql.append(" ,DECODE(B.DOC_PAYREQ , 'Y', 'V', '') DOC_PAYREQ -- 첨부_대금청구서 \n");
  848. sql.append(" ,DECODE(B.DOC_MRR , 'Y', 'V', '') DOC_MRR -- 첨부_MRR \n");
  849. sql.append(" ,DECODE(B.DOC_CONFIRM , 'Y', 'V', '') DOC_CONFIRM -- 첨부_납품확인서 \n");
  850. sql.append(" ,DECODE(B.DOC_FINAL_DOCUMENTS , 'Y', 'V', '') DOC_FINAL_DOCUMENTS -- 첨부_FINAL DOCUMENTS 제출확인서 \n");
  851. sql.append(" ,DECODE(B.DOC_GUAR_CONST , 'Y', 'V', '') DOC_GUAR_CONST -- 첨부_계약이행보증보험증권 \n");
  852. sql.append(" ,DECODE(B.DOC_GUAR_AS, 'Y', 'V', '') DOC_GUAR_AS -- 첨부_하자이행보증보험증권 \n");
  853. sql.append(" ,DECODE(B.DOC_WORKQA, 'Y', 'V', '') DOC_WORKQA -- 첨부_기성검사보고서 \n");
  854. sql.append(" ,DECODE(B.DOC_SHIP, 'Y', 'V', '') DOC_SHIP -- 첨부_선적서류(B/L,PACKING LIST) \n");
  855. sql.append(" ,DECODE(B.DOC_COMPLETE, 'Y', 'V', '') DOC_COMPLETE -- 첨부_준공검사보고서 \n");
  856. sql.append(" ,DECODE(B.DOC_CONST_COPY, 'Y', 'V', '') DOC_CONST_COPY -- 첨부_계약서사본 \n");
  857. sql.append(" ,DECODE(B.DOC_ETC, 'Y', 'V', '') DOC_ETC -- 첨부_기타 \n");
  858. sql.append(" ,DECODE(B.DOC_MC, 'Y', 'V', '') DOC_MC -- M/C 완료확인서 \n");
  859. sql.append(" ,DECODE(B.DOC_TESTRUN, 'Y', 'V', '') DOC_TESTRUN -- 첨부_시운행 \n");
  860. sql.append(" ,B.REQ_STATUS -- 대금신청상태 \n");
  861. sql.append(" ,B.TRANS_CD -- 전표집계여부 \n");
  862. sql.append(" ,B.PUR_CONT_ID -- 발주계약ID \n");
  863. sql.append(" ,B.PAYREQ_ID -- 지급신청ID \n");
  864. sql.append(" ,TO_CHAR(TO_DATE(B.TAX_DY), 'YYYY-MM-DD') REQ_DATE -- 신청서작성일자 \n");
  865. sql.append(" ,B.REQ_CHARGE_ID -- 신청서작성자ID \n");
  866. sql.append(" ,(SELECT USER_NAME FROM PUB0120T WHERE ACCT_ID = B.CRE_BY) AS REQ_CHARGE_NAME -- 작성자 \n");
  867. sql.append(" ,B.COOP_DEPT_CD -- 협조부서코드 \n");
  868. sql.append(" ,F_GET_D_CURRENCY( NVL( B.ORD_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) AS ORD_AMT -- 발주계약금액 \n");
  869. sql.append(" ,F_GET_PUR_STATUS(B.DEPOSIT_CD, 'PUR_PAY_ACMP_GB') || '(' || TO_NUMBER(B.DEPOSIT_SEQ) || '차)' DEPOSIT_GB -- 지급구분이름 \n");
  870. sql.append(" ,B.DEPOSIT_CD -- 지급구분 \n");
  871. sql.append(" ,B.DEPOSIT_SEQ -- 지급차수 \n");
  872. sql.append(" ,B.DEPOSIT_RESN -- 지급사유 \n");
  873. sql.append(" ,F_GET_D_CURRENCY( NVL( B.PAYED_APPLYAMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as PAYED_AMT --기지불액 \n");
  874. sql.append(" ,F_GET_D_CURRENCY(B.PAYED_PERCENT, 1) PAYED_PERCENT -- 기지불액비율 \n");
  875. sql.append(" ,F_GET_D_CURRENCY( NVL( B.CUR_REQ_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as CUR_REQ_AMT --금회청구액 \n");
  876. sql.append(" ,F_GET_D_CURRENCY(B.CUR_REQ_PERCENT, 1) CUR_REQ_PERCENT -- 금회청구액비율 \n");
  877. sql.append(" ,F_GET_D_CURRENCY( NVL( B.CUR_PAYED_SUPPLYAMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as CUR_PAYED_AMT --금회포함지불액 \n");
  878. sql.append(" ,F_GET_D_CURRENCY(B.CUR_PAYED_PERCENT, 1) CUR_PAYED_PERCENT -- 금회포함지불액비율 \n");
  879. sql.append(" ,F_GET_D_CURRENCY( NVL( B.REMAINDER_ACMP_SUPPLYAMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as REMAINDER_AMT -- 잔액 \n");
  880. sql.append(" ,F_GET_D_CURRENCY(B.REMAINDER_ACMP_PERCENT , 1) REMAINDER_PERCENT -- 잔액비율 \n");
  881. sql.append(" ,F_GET_D_CURRENCY( NVL( B.BEF_ACMP_APPLYAMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as BEF_ACMP_AMT --전기성고 \n");
  882. sql.append(" ,F_GET_D_CURRENCY(B.BEF_ACMP_PERCENT , 1) BEF_ACMP_PERCENT -- 전기성고비율 \n");
  883. sql.append(" ,F_GET_D_CURRENCY( NVL( B.CUR_ACMP_APPLYAMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as CUR_ACMP_AMT -- 금회기성고 \n");
  884. sql.append(" ,F_GET_D_CURRENCY(B.CUR_ACMP_PERCENT , 1) CUR_ACMP_PERCENT -- 금회기성고비율 \n");
  885. sql.append(" ,F_GET_D_CURRENCY( NVL( B.CUR_BEF_ACMP_SUPPLYAMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as CUR_BEF_ACMP_AMT -- 금회포함기성고 \n");
  886. sql.append(" ,F_GET_D_CURRENCY(B.CUR_BEF_ACMP_PERCENT ,1) CUR_BEF_ACMP_PERCENT -- 금회포함기성고비율 \n");
  887. sql.append(" ,F_GET_D_CURRENCY( NVL( B.REMAINDER_ACMP_SUPPLYAMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as REMAINDER_ACMP_AMT -- 미기성고 \n");
  888. sql.append(" ,F_GET_D_CURRENCY(B.REMAINDER_ACMP_PERCENT, 1) REMAINDER_ACMP_PERCENT -- 미기성고비율 \n");
  889. sql.append(" ,F_GET_D_CURRENCY( NVL( B.CUR_PREPAY_DEDUCTAMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ) ) ) AS CUR_PREPAY_DEDUCTAMT -- 금회선급금 공제 \n");
  890. sql.append(" ,F_GET_D_CURRENCY(B.ACMP_APPLYRATE ,1) ACMP_APPLYRATE -- 기성고적용 비율 \n");
  891. sql.append(" ,B.RE_MARKS -- 특기사항 \n");
  892. sql.append(" ,A.ORD_DOC_NO AS ORD_DOC_NO -- 계약번호 \n");
  893. sql.append(" ,GET_ACC_DEPT_NM(B.COOP_DEPT_CD) AS COOP_DEPT_NM -- 협조부서명 \n");
  894. sql.append(" ,A.CST_DOC_NAME AS CST_DOC_NAME -- 계약명 \n");
  895. sql.append(" ,GET_CORP_NM(C.DEALR_CD) AS CORP_NM --계약업체명 \n");
  896. sql.append(" ,(SELECT REP_NAME FROM PUR9000T_V D WHERE D.CORP_ID = C.DEALR_CD ) REP_NAME -- 업체대표이사 \n");
  897. sql.append(" ,(SELECT CORP_REG_NO FROM PUR9000T_V D WHERE D.CORP_ID = C.DEALR_CD ) CORP_REG_NO -- 사업자번호 \n");
  898. sql.append(" ,A.DEPT_NAME AS DEPT_NM -- 현장명 \n");
  899. sql.append(" ,A.DEPT_CD AS DEPT_CD -- 현장코드 \n");
  900. sql.append(" ,A.CURRENCY_GB -- 통화구분 \n");
  901. sql.append(" ,F_GET_D_CURRENCY( NVL( B.BEF_PREPAY_APPLYAMT , 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) AS PREPAY_ACMP_AMT --기선급공제액 \n");
  902. sql.append(" ,F_GET_D_CURRENCY( NVL( (SELECT SUM(REQ_PREPAY_SUPPLY_AMT) FROM PUR1030T WHERE PUR_CONT_ID = B.PUR_CONT_ID GROUP BY PUR_CONT_ID), 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) AS PREPAY_AMT --선급금액 \n");
  903. sql.append(" ,F_GET_D_CURRENCY( NVL( B.REMAINDER_PREPAY_SUPPLYAMT , 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) AS PREPAY_RMDR --선급잔액 \n");
  904. sql.append(" ,F_GET_D_CURRENCY( NVL( B.CUR_REQ_VATAMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ) ) ) CUR_REQ_VATAMT \n");
  905. sql.append(" ,F_GET_D_CURRENCY( NVL( B.CUR_PAYING_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ) ) ) CUR_PAYING_AMT \n");
  906. sql.append(" ,(SELECT CHG_CODE10 FROM EBID_COM911T WHERE DETAILCD = A.GUA_GB AND BASECD = 'PROOF_CD') VAT_STATUS \n");
  907. sql.append(" ,F_GET_D_CURRENCY( NVL( B.CUR_PREPAY_APPLYAMT , 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) CUR_PREPAY_APPLYAMT --금회선급공제액 \n");
  908. sql.append(" ,F_GET_D_CURRENCY( NVL( B.BEF_PREPAY_APPLYAMT , 0 ) + NVL(B.CUR_PREPAY_APPLYAMT ,0), F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) CUR_PREPAY_APPLYAMT1 --금회선급공제액 \n");
  909. sql.append(" ,(SELECT DETAILSORTNM FROM EBID_COM911T WHERE BASECD = '004' AND DETAILCD = B.PAYMENT_TERMS) PAYMENT_TERMS --지급조건 \n");
  910. sql.append(" FROM PUR2000T A, \n");
  911. sql.append(" PUR1100T B, \n");
  912. sql.append(" PUR1040T C \n");
  913. sql.append(" WHERE 1=1 \n");
  914. sql.append(" AND A.PUR_CONT_MOD_ID = B.PUR_CONT_MOD_ID \n");
  915. sql.append(" AND C.PAYREQ_ID = B.PAYREQ_ID \n");
  916. sql.append(" AND C.TMPSLIP_ID = "+tmpslipID+" \n");
  917. persistent_c.setStatement(sql.toString());
  918. System.out.println(sql.toString());
  919. rowSet = persistent_c.query();
  920. if(rowSet.size()>0){
  921. vo = RowSetUtility.getValueObject(rowSet.getRow(0));
  922. }
  923. }catch(Exception e){
  924. WAFLogger.error("SQL : " + search.getStatement());
  925. WAFLogger.error(e);
  926. }finally{
  927. if( vo == null) vo = new ValueObject();
  928. }
  929. return vo;
  930. }
  931. /*
  932. * ===========================================================================================
  933. * A. 구매 선급금 증빙 작성
  934. * ===========================================================================================
  935. */
  936. public void doBizBuyPre(Connection con, OutputStream outputStream, String tmpslipID, HttpServletRequest request) {
  937. WAFLogger.debug("\n\t #################### 구매 선급금 시작");
  938. // step 1
  939. Document document = new Document(PageSize.A4, 25f, 25f, 35f, 10f);
  940. try {
  941. // step 2
  942. PdfWriter writer = PdfWriter.getInstance(document, outputStream);
  943. // step 3
  944. document.open();
  945. BaseFont bfKorean = BaseFont.createFont("HYGoThic-Medium", "UniKS-UCS2-H", BaseFont.NOT_EMBEDDED);
  946. Font FontTitle = new Font(bfKorean, 8, Font.NORMAL);
  947. FontTitle.setColor(borderColor);
  948. Font FontData = new Font(bfKorean, 4.8f, Font.NORMAL);
  949. Font FontTitle2 = new Font(bfKorean, 20, Font.BOLD);
  950. PdfPTable table = null;
  951. PdfPCell cell = null;
  952. /*
  953. * 정보 검색 시작 ---------------------------------------------
  954. */
  955. ValueObject params = new ValueObject();
  956. HandlerStorage storage = new HandlerStorage();
  957. storage.setParams(params);
  958. ValueObject listRowSet = null;
  959. /*
  960. * 정보 검색 시작 ---------------------------------------------
  961. */
  962. listRowSet = getBuyPreList(con, tmpslipID);
  963. // 정보 검색 끝 ---------------------------------------------
  964. /*
  965. * ===========================================================================================
  966. * 제목 생성
  967. * ===========================================================================================
  968. */
  969. makeTitle_1(document, FontTitle, FontTitle2, request);
  970. //본문생성
  971. setBorder(border, true, true, true, true);
  972. //1행
  973. PdfPTable table11 = new PdfPTable(6);
  974. table11.setWidthPercentage(100);
  975. table11.setSpacingBefore(7f);
  976. table11.setSpacingAfter(7f);
  977. float[] table11Width = {15f,3f,27f,3f,27f,30f};
  978. table11.setWidths(table11Width);
  979. // 1행
  980. PT_addCell(table11, new String [] { "계약번호" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  981. PT_addCell(table11, listRowSet.get("ORD_DOC_NO"), FontTitle, border,Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  982. PT_addCell(table11, new String [] { "작성일자" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  983. PT_addCell(table11, listRowSet.get("REQ_DATE"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f,false);
  984. PT_addCell(table11, new String [] { "현장코드" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  985. PT_addCell(table11, listRowSet.get("DEPT_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f,false);
  986. PT_addCell(table11, new String [] { "통화" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  987. PT_addCell(table11, listRowSet.get("CURRENCY_GB"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  988. PT_addCell(table11, new String [] { "현장명" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  989. PT_addCell(table11, listRowSet.get("DEPT_NM"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 5, 20f ,false);
  990. PT_addCell(table11, new String [] { "계약명" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  991. PT_addCell(table11, listRowSet.get("CST_DOC_NAME"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 5, 20f ,false);
  992. PT_addCell(table11, new String [] { "계약업체명" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  993. PT_addCell(table11, listRowSet.get("CORP_NM"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  994. PT_addCell(table11, new String [] { "대표이사" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  995. PT_addCell(table11, listRowSet.get("REP_NAME"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  996. PT_addCell(table11, new String [] { "총계약금액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  997. PT_addCell(table11, listRowSet.get("ORD_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  998. PT_addCell(table11, new String [] { "선급금액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  999. PT_addCell(table11, listRowSet.get("PAYED_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1000. PT_addCell(table11, new String [] { "선급공급가" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1001. PT_addCell(table11, listRowSet.get("CUR_REQ_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1002. PT_addCell(table11, new String [] { "선급부가세" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1003. PT_addCell(table11, listRowSet.get("CUR_PAYED_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1004. PT_addCell(table11, new String [] { "지급구분" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1005. PT_addCell(table11, listRowSet.get("DEPOSIT_GB"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1006. PT_addCell(table11, new String [] { "신청선급금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1007. PT_addCell(table11, listRowSet.get("REMAINDER_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1008. PT_addCell(table11, new String [] { "신청선급공급가" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1009. PT_addCell(table11, listRowSet.get("BEF_ACMP_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1010. PT_addCell(table11, new String [] { "신청선급부가세" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1011. PT_addCell(table11, listRowSet.get("CUR_ACMP_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1012. document.add(table11);
  1013. } catch (DocumentException de) {
  1014. WAFLogger.debug("de.getMessage() = " + de.getMessage());
  1015. } catch (IOException ioe) {
  1016. WAFLogger.debug("ioe.getMessage() = " + ioe.getMessage());
  1017. } catch (Exception e) {
  1018. WAFLogger.debug("[Exception] ... " + e);
  1019. }
  1020. // step 5
  1021. document.close();
  1022. WAFLogger.debug("\n\t #################### "+ strFileName +" 생성완료");
  1023. }
  1024. public void doBizBuyPre1(Connection con, OutputStream outputStream, String tmpslipID, HttpServletRequest request) {
  1025. WAFLogger.debug("\n\t #################### 구매 대금지급생성 시작");
  1026. // step 1
  1027. Document document = new Document(PageSize.A4, 25f, 25f, 35f, 10f);
  1028. try {
  1029. // step 2
  1030. PdfWriter writer = PdfWriter.getInstance(document, outputStream);
  1031. // step 3
  1032. document.open();
  1033. BaseFont bfKorean = BaseFont.createFont("HYGoThic-Medium", "UniKS-UCS2-H", BaseFont.NOT_EMBEDDED);
  1034. Font FontTitle = new Font(bfKorean, 8, Font.NORMAL);
  1035. FontTitle.setColor(borderColor);
  1036. Font FontData = new Font(bfKorean, 4.8f, Font.NORMAL);
  1037. Font FontTitle2 = new Font(bfKorean, 20, Font.BOLD);
  1038. PdfPTable table = null;
  1039. PdfPCell cell = null;
  1040. /*
  1041. * 정보 검색 시작 ---------------------------------------------
  1042. */
  1043. ValueObject params = new ValueObject();
  1044. HandlerStorage storage = new HandlerStorage();
  1045. storage.setParams(params);
  1046. ValueObject listRowSet = null;
  1047. /*
  1048. * 정보 검색 시작 ---------------------------------------------
  1049. */
  1050. listRowSet = getPayReqList11(con, tmpslipID);
  1051. // 정보 검색 끝 ---------------------------------------------
  1052. /*
  1053. * ===========================================================================================
  1054. * 제목 생성
  1055. * ===========================================================================================
  1056. */
  1057. makeTitle(document, FontTitle, FontTitle2, request);
  1058. //본문생성
  1059. setBorder(border, true, true, true, true);
  1060. //1행
  1061. PdfPTable table11 = new PdfPTable(4);
  1062. table11.setWidthPercentage(100);
  1063. table11.setSpacingBefore(7f);
  1064. table11.setSpacingAfter(7f);
  1065. float[] table11Width = {15f,40f,15f,15f};
  1066. table11.setWidths(table11Width);
  1067. // 1행
  1068. PT_addCell(table11, new String [] { "현장" }, FontTitle, border,
  1069. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1070. PT_addCell(table11, " " + "(" + listRowSet.get("DEPT_CD") + ")" + listRowSet.get("DEPT_NM") , FontTitle, border,
  1071. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false);
  1072. PT_addCell(table11, new String [] { "발주처" }, FontTitle, border,
  1073. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1074. PT_addCell(table11, " " +listRowSet.get("DEALRER_NM"), FontTitle, border,
  1075. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false);
  1076. PT_addCell(table11, new String [] { "계약번호" }, FontTitle, border,
  1077. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1078. PT_addCell(table11, " " +listRowSet.get("CON_DOC_NO"), FontTitle, border,
  1079. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false);
  1080. PT_addCell(table11, new String [] { "계약일자" }, FontTitle, border,
  1081. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1082. PT_addCell(table11, " " +listRowSet.get("CON_DATE"), FontTitle, border,
  1083. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f,false);
  1084. PT_addCell(table11, new String [] { "계약명" }, FontTitle, border,
  1085. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1086. PT_addCell(table11, " " +listRowSet.get("BUILD_NAME"), FontTitle, border,
  1087. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false);
  1088. PT_addCell(table11, new String [] { "원도급공사명" }, FontTitle, border,
  1089. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1090. PT_addCell(table11, " " +listRowSet.get("UND_CON_NAME"), FontTitle, border,
  1091. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false);
  1092. PT_addCell(table11, new String [] { "하도급공사명" }, FontTitle, border,
  1093. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1094. PT_addCell(table11, " " +listRowSet.get("SUB_UND_CON_NAME"), FontTitle, border,
  1095. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f,false);
  1096. PT_addCell(table11, new String [] { "공사장소" }, FontTitle, border,
  1097. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1098. PT_addCell(table11, " " +listRowSet.get("WORK_PLACE"), FontTitle, border,
  1099. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false);
  1100. PT_addCell(table11, new String [] { "공사기간" }, FontTitle, border,
  1101. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1102. PT_addCell(table11, " " +listRowSet.get("WORK_DATE"), FontTitle, border,
  1103. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false);
  1104. PT_addCell(table11, new String [] { "계약금액" }, FontTitle, border,
  1105. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 90f ,false);
  1106. PdfPTable table21 = new PdfPTable(4);
  1107. float[] table21Width = {13f,25f,5f,25f};
  1108. table21.setWidths(table21Width);
  1109. PdfPCell permission = new PdfPCell(table21);
  1110. setBorder(border, false, false, false, false);
  1111. PT_addCell(table21, new String [] { "합 계 :" }, FontTitle, border,
  1112. Element.ALIGN_MIDDLE, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1113. if(listRowSet.get("con_amt").equals("0")){
  1114. PT_addCell(table21, "일금" + PCMSUtil.toHangule_decimal("0"), FontTitle, border,
  1115. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1116. PT_addCell(table21, new String [] { "원정" }, FontTitle, border,
  1117. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1118. PT_addCell(table21, "(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("con_amt"), 0) + "원정" + ")", FontTitle, border,
  1119. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1120. }else{
  1121. PT_addCell(table21, "일금" + PCMSUtil.toHangule_decimal(PCMSUtil.convertFloor(listRowSet.getDouble("con_amt"), 0).toString()), FontTitle, border,
  1122. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1123. PT_addCell(table21, new String [] { "원정" }, FontTitle, border,
  1124. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1125. PT_addCell(table21,"(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("con_amt"), 0) + "원정" + ")", FontTitle, border,
  1126. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1127. }
  1128. PT_addCell(table21, new String [] { "공급가 :" }, FontTitle, border,
  1129. Element.ALIGN_MIDDLE, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1130. if(listRowSet.get("con_supply_amt").equals("0")){
  1131. PT_addCell(table21, "일금" + PCMSUtil.toHangule_decimal("0"), FontTitle, border,
  1132. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1133. PT_addCell(table21, new String [] { "원정" }, FontTitle, border,
  1134. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1135. PT_addCell(table21, "(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("con_supply_amt"), 0) + "원정" + ")", FontTitle, border,
  1136. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1137. }else{
  1138. PT_addCell(table21, "일금" + PCMSUtil.toHangule_decimal(PCMSUtil.convertFloor(listRowSet.getDouble("con_supply_amt"), 0).toString()), FontTitle, border,
  1139. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1140. PT_addCell(table21, new String [] { "원정" }, FontTitle, border,
  1141. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1142. PT_addCell(table21, "(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("con_supply_amt"), 0) + "원정" + ")", FontTitle, border,
  1143. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1144. }
  1145. PT_addCell(table21, new String [] { "- 과세 :" }, FontTitle, border,
  1146. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1147. if(listRowSet.get("con_supply_tamt").equals("0")){
  1148. PT_addCell(table21, "일금" + PCMSUtil.toHangule_decimal("0"), FontTitle, border,
  1149. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1150. PT_addCell(table21, new String [] { "원정" }, FontTitle, border,
  1151. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1152. PT_addCell(table21, "(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("con_supply_tamt"), 0) + "원정" + ")", FontTitle, border,
  1153. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1154. }else{
  1155. PT_addCell(table21, "일금" + PCMSUtil.toHangule_decimal(PCMSUtil.convertFloor(listRowSet.getDouble("con_supply_tamt"), 0).toString()), FontTitle, border,
  1156. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1157. PT_addCell(table21, new String [] { "원정" }, FontTitle, border,
  1158. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1159. PT_addCell(table21, "(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("con_supply_tamt"), 0) + "원정" + ")", FontTitle, border,
  1160. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1161. }
  1162. PT_addCell(table21, new String [] { "- 면세 :" }, FontTitle, border,
  1163. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1164. if(listRowSet.get("con_supply_namt").equals("0")){
  1165. PT_addCell(table21, "일금" + PCMSUtil.toHangule_decimal("0"), FontTitle, border,
  1166. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1167. PT_addCell(table21, new String [] { "원정" }, FontTitle, border,
  1168. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1169. PT_addCell(table21, "(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("con_supply_namt"), 0) + "원정" + ")", FontTitle, border,
  1170. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1171. }else{
  1172. PT_addCell(table21, "일금" + PCMSUtil.toHangule_decimal(PCMSUtil.convertFloor(listRowSet.getDouble("con_supply_namt"), 0).toString()), FontTitle, border,
  1173. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1174. PT_addCell(table21, new String [] { "원정" }, FontTitle, border,
  1175. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1176. PT_addCell(table21, "(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("con_supply_namt"), 0) + "원정" + ")", FontTitle, border,
  1177. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1178. }
  1179. PT_addCell(table21, new String [] { "부가세 :" }, FontTitle, border,
  1180. Element.ALIGN_MIDDLE, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1181. if(listRowSet.get("con_surtax_amt").equals("0")){
  1182. PT_addCell(table21, "일금" + PCMSUtil.toHangule_decimal("0") + listRowSet.get("con_cur_won"), FontTitle, border,
  1183. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1184. PT_addCell(table21, new String [] { "원정" }, FontTitle, border,
  1185. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1186. PT_addCell(table21, "(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("con_surtax_amt"), 0) + "원정" + ")", FontTitle, border,
  1187. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1188. }else{
  1189. PT_addCell(table21, "일금" + PCMSUtil.toHangule_decimal(PCMSUtil.convertFloor(listRowSet.getDouble("con_surtax_amt"), 0).toString()) , FontTitle, border,
  1190. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1191. PT_addCell(table21, new String [] { "원정" }, FontTitle, border,
  1192. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1193. PT_addCell(table21, "(" + "₩"+ PCMSUtil.convertFloor(listRowSet.getDouble("con_surtax_amt"), 0) + "원정" + ")", FontTitle, border,
  1194. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1195. }
  1196. permission.setColspan(3);
  1197. table11.addCell(permission);
  1198. setBorder(border, true, true, true, true);
  1199. PT_addCell(table11, new String [] { "선급금" }, FontTitle, border,
  1200. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 90f ,false);
  1201. PdfPTable table31 = new PdfPTable(4);
  1202. float[] table31Width = {13f,25f,5f,25f};
  1203. table31.setWidths(table31Width);
  1204. PdfPCell permission2 = new PdfPCell(table31);
  1205. setBorder(border, false, false, false, false);
  1206. PT_addCell(table31, new String [] { "합 계 :" }, FontTitle, border,
  1207. Element.ALIGN_MIDDLE, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1208. if(listRowSet.get("req_amt").equals("0")){
  1209. PT_addCell(table31, "일금" + PCMSUtil.toHangule_decimal("0"), FontTitle, border,
  1210. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1211. PT_addCell(table31, new String [] { "원정" }, FontTitle, border,
  1212. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1213. PT_addCell(table31, "(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("req_amt"), 0) + "원정" + ")", FontTitle, border,
  1214. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1215. }else{
  1216. PT_addCell(table31, "일금" + PCMSUtil.toHangule_decimal(PCMSUtil.convertFloor(listRowSet.getDouble("req_amt"), 0).toString()) , FontTitle, border,
  1217. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1218. PT_addCell(table31, new String [] { "원정" }, FontTitle, border,
  1219. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1220. PT_addCell(table31, "(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("req_amt"), 0) + "원정" + ")", FontTitle, border,
  1221. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1222. }
  1223. PT_addCell(table31, new String [] { "공급가 :" }, FontTitle, border,
  1224. Element.ALIGN_MIDDLE, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1225. if(listRowSet.get("supply_amt").equals("0")){
  1226. PT_addCell(table31, "일금" + PCMSUtil.toHangule_decimal("0"), FontTitle, border,
  1227. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1228. PT_addCell(table31, new String [] { "원정" }, FontTitle, border,
  1229. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1230. PT_addCell(table31, "(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("supply_amt"), 0)+ "원정" + ")", FontTitle, border,
  1231. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1232. }else{
  1233. PT_addCell(table31, "일금" + PCMSUtil.toHangule_decimal(PCMSUtil.convertFloor(listRowSet.getDouble("supply_amt"), 0).toString()) , FontTitle, border,
  1234. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1235. PT_addCell(table31, new String [] { "원정" }, FontTitle, border,
  1236. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1237. PT_addCell(table31, "(" + "₩" +PCMSUtil.convertFloor(listRowSet.getDouble("supply_amt"), 0) + "원정" + ")", FontTitle, border,
  1238. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1239. }
  1240. PT_addCell(table31, new String [] { "부가세 :" }, FontTitle, border,
  1241. Element.ALIGN_MIDDLE, Element.ALIGN_MIDDLE, 1, 30f,false);
  1242. if(listRowSet.get("surtax_amt").equals("0")){
  1243. PT_addCell(table31, "일금" + PCMSUtil.toHangule_decimal("0"), FontTitle, border,
  1244. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1245. PT_addCell(table31, new String [] { "원정" }, FontTitle, border,
  1246. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1247. PT_addCell(table31, "(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("surtax_amt"), 0) + "원정" + ")", FontTitle, border,
  1248. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1249. }else{
  1250. PT_addCell(table31, "일금" + PCMSUtil.toHangule_decimal(PCMSUtil.convertFloor(listRowSet.getDouble("surtax_amt"), 0).toString()), FontTitle, border,
  1251. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1252. PT_addCell(table31, new String [] { "원정" }, FontTitle, border,
  1253. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1254. PT_addCell(table31, "(" + "₩" + PCMSUtil.convertFloor(listRowSet.getDouble("surtax_amt"), 0) + "원정" + ")", FontTitle, border,
  1255. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1256. }
  1257. permission2.setColspan(3);
  1258. table11.addCell(permission2);
  1259. setBorder(border, true, true, true, true);
  1260. PT_addCell(table11, new String [] { "지급조건" }, FontTitle, border,
  1261. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1262. PT_addCell(table11, " " + listRowSet.get("PAY_COND_GB_NM"), FontTitle, border,
  1263. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false);
  1264. PT_addCell(table11, new String [] { "지급조건기술" }, FontTitle, border,
  1265. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1266. PT_addCell(table11, " " + listRowSet.get("PAY_CONTENT"), FontTitle, border,
  1267. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false);
  1268. PT_addCell(table11, new String [] { "지체상금" }, FontTitle, border,
  1269. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1270. PT_addCell(table11, " " + listRowSet.get("DELAY_RATE"), FontTitle, border,
  1271. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false);
  1272. PT_addCell(table11, new String [] { "업체명" }, FontTitle, border,
  1273. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 30f ,false);
  1274. PT_addCell(table11, " " + listRowSet.get("CORP_KOR"), FontTitle, border,
  1275. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 30f ,false);
  1276. PT_addCell(table11, new String [] { "특이사항" }, FontTitle, border,
  1277. Element.ALIGN_CENTER, Element.ALIGN_TOP, 1, 100f ,false);
  1278. PT_addCell(table11, " " + listRowSet.get("CON_SPE_TXT"), FontTitle, border,
  1279. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 3, 100f ,false);
  1280. /*
  1281. */
  1282. document.add(table11);
  1283. } catch (DocumentException de) {
  1284. WAFLogger.debug("de.getMessage() = " + de.getMessage());
  1285. } catch (IOException ioe) {
  1286. WAFLogger.debug("ioe.getMessage() = " + ioe.getMessage());
  1287. } catch (Exception e) {
  1288. WAFLogger.debug("[Exception] ... " + e);
  1289. }
  1290. // step 5
  1291. document.close();
  1292. WAFLogger.debug("\n\t #################### "+ strFileName +" 생성완료");
  1293. }
  1294. /*
  1295. * 구매 선급금 데이터 조회
  1296. */
  1297. public ValueObject getBuyPreList(Connection con, String tmpslipID ){
  1298. Search search = new SearchImpl();
  1299. ValueObject vo = null;
  1300. RowSet rowSet = new RowSetImpl();
  1301. StringBuffer sql = new StringBuffer();
  1302. Persistent persistent_c = null;
  1303. try{
  1304. persistent_c = new PersistentImpl(con);
  1305. sql.append("SELECT B.PREPAY_PROC_GB -- 대금신청상태 \n");
  1306. sql.append(" ,B.PUR_CONT_ID -- 발주계약ID \n");
  1307. sql.append(" ,B.PREPAY_ID as PAYREQ_ID -- 지급신청ID \n");
  1308. sql.append(" ,TO_CHAR(B.PREPAY_DATE, 'YYYY-MM-DD') REQ_DATE -- 신청서작성일자 \n");
  1309. sql.append(" ,F_GET_D_CURRENCY( NVL( A.ORD_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) AS ORD_AMT -- 발주계약금액 \n");
  1310. sql.append(" ,F_GET_PUR_STATUS('1', 'PUR_PAY_ACMP_GB') || '(' || TO_NUMBER(B.PREPAY_NO) || '차)' DEPOSIT_GB -- 지급구분이름 \n");
  1311. sql.append(" ,'1' as DEPOSIT_CD -- 지급구분 \n");
  1312. sql.append(" ,B.PREPAY_NO as DEPOSIT_SEQ -- 지급차수 \n");
  1313. sql.append(" ,F_GET_D_CURRENCY( NVL( B.PREPAY_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as PAYED_AMT --선급금액 \n");
  1314. sql.append(" ,F_GET_D_CURRENCY( NVL( B.PREPAY_SUPPLY_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as CUR_REQ_AMT --선급공급가 \n");
  1315. sql.append(" ,F_GET_D_CURRENCY( NVL( B.PREPAY_SURTAX_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as CUR_PAYED_AMT --선급부가세 \n");
  1316. sql.append(" ,F_GET_D_CURRENCY( NVL( B.REQ_PREPAY_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as REMAINDER_AMT -- 신청선급금합계 \n");
  1317. sql.append(" ,F_GET_D_CURRENCY( NVL( B.REQ_PREPAY_SUPPLY_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as BEF_ACMP_AMT --신청 선급금 공급가액 \n");
  1318. sql.append(" ,F_GET_D_CURRENCY( NVL( B.REQ_PREPAY_SURTAX_AMT, 0 ) , F_GET_CURRENCY_DIGIT( NVL( A.CURRENCY_GB, 'KRW' ))) as CUR_ACMP_AMT -- 신청 선급금 부가세 \n");
  1319. sql.append(" ,A.ORD_DOC_NO AS ORD_DOC_NO -- 발주계약번호 \n");
  1320. sql.append(" ,A.CST_DOC_NAME AS CST_DOC_NAME -- 계약명 \n");
  1321. sql.append(" ,GET_CORP_NM(C.DEALR_CD) AS CORP_NM --계약업체명 \n");
  1322. sql.append(" ,(SELECT REP_NAME FROM PUR9000T_V D WHERE D.CORP_ID = C.DEALR_CD ) REP_NAME -- 업체대표이사 \n");
  1323. sql.append(" ,(SELECT CORP_REG_NO FROM PUR9000T_V D WHERE D.CORP_ID = C.DEALR_CD ) CORP_REG_NO -- 사업자번호 \n");
  1324. sql.append(" ,A.DEPT_NAME AS DEPT_NM -- 현장명 \n");
  1325. sql.append(" ,C.DEPT_CD AS DEPT_CD -- 현장코드 \n");
  1326. sql.append(" ,A.CURRENCY_GB -- 통화구분 \n");
  1327. sql.append(" ,(SELECT CHG_CODE10 FROM EBID_COM911T WHERE DETAILCD = A.GUA_GB AND BASECD = 'PROOF_CD') VAT_STATUS \n");
  1328. sql.append("FROM PUR1000T A \n");
  1329. sql.append(" ,PUR1030T B \n");
  1330. sql.append(" ,PUR1040T C \n");
  1331. sql.append("WHERE 1 = 1 \n");
  1332. sql.append("AND A.PUR_CONT_ID = B.PUR_CONT_ID \n");
  1333. sql.append("AND B.PREPAY_ID = C.PREPAY_ID \n");
  1334. sql.append("AND C.TMPSLIP_ID = "+tmpslipID+" \n");
  1335. persistent_c.setStatement(sql.toString());
  1336. System.out.println(sql.toString());
  1337. rowSet = persistent_c.query();
  1338. if(rowSet.size()>0){
  1339. vo = RowSetUtility.getValueObject(rowSet.getRow(0));
  1340. }
  1341. }catch(Exception e){
  1342. WAFLogger.error("SQL : " + search.getStatement());
  1343. WAFLogger.error(e);
  1344. }finally{
  1345. if( vo == null) vo = new ValueObject();
  1346. }
  1347. return vo;
  1348. }
  1349. public ValueObject getPayReqList11(Connection con, String tmpslipID ){
  1350. ValueObject vo = null;
  1351. RowSet rowSet = new RowSetImpl();
  1352. StringBuffer sql = new StringBuffer();
  1353. Persistent pSelect = null;
  1354. try{
  1355. pSelect = new PersistentImpl(con);
  1356. sql.append(" SELECT MAIN.TMPSLIP_ID \n");
  1357. sql.append(" , TO_CHAR(MAIN.ENTER_DT, 'YYYY-MM-DD') PROOFDATE \n");
  1358. sql.append(" , MAIN.DEPT_CD \n");
  1359. sql.append(" , CONTRACT.DEALER_NM AS DEALRER_NM \n");
  1360. sql.append(" , CONTRACT.DEPT_NAME AS DEPT_NM \n");
  1361. sql.append(" , CONTRACT.ORD_DOC_NO AS CON_DOC_NO \n");
  1362. sql.append(" , TO_CHAR(CONTRACT.CON_IN_DATE,'YYYY-MM-DD') AS CON_DATE \n");
  1363. sql.append(" , CONTRACT.CST_DOC_NAME AS BUILD_NAME \n");
  1364. sql.append(" , CONTRACT.DEALER_NM AS UND_CON_NAME \n");
  1365. sql.append(" , '' AS SUB_UND_CON_NAME \n");
  1366. sql.append(" , CONTRACT.LEAD_PLACE AS WORK_PLACE \n");
  1367. sql.append(" , CONTRACT.ORD_SUPPLY_AMT AS con_supply_amt \n");
  1368. sql.append(" , CONTRACT.ORD_SUPPLY_AMT AS con_supply_tamt \n");
  1369. sql.append(" , 0 AS con_supply_namt \n");
  1370. sql.append(" , CONTRACT.ORD_SURTAX_AMT AS CON_SURTAX_AMT \n");
  1371. sql.append(" , CONTRACT.ORD_AMT AS CON_AMT \n");
  1372. sql.append(" , 0 AS LABOR_AMT \n");
  1373. sql.append(" , PREPAY.REQ_PREPAY_AMT AS PREPAY_SUPPLY_AMT \n");
  1374. sql.append(" , PREPAY.REQ_PREPAY_SUPPLY_AMT AS PREPAY_SUPPLY_TAMT \n");
  1375. sql.append(" , 0 AS PREPAY_SUPPLY_NAMT \n");
  1376. sql.append(" , PREPAY.REQ_PREPAY_SURTAX_AMT AS PREPAY_SURTAX_AMT \n");
  1377. sql.append(" , CONTRACT.PREPAY_AMT AS PREPAY_AMT \n");
  1378. sql.append(" , PAY_TYPE.CHG_CODE01 AS PAY_COND_GB_NM \n");
  1379. sql.append(" , CONTRACT.PAY_CONTENT AS PAY_CONTENT \n");
  1380. sql.append(" , (TO_CHAR(CONTRACT.ORD_START_DATE,'YYYY-MM-DD') || ' ~ ' || TO_CHAR(CONTRACT.ORD_END_DATE,'YYYY-MM-DD') ) WORK_DATE \n");
  1381. sql.append(" , CONTRACT.CON_GUAR_AMT_RATE AS CON_EST_GUAR_RATE \n");
  1382. sql.append(" , CONTRACT.CON_GUAR_AMT AS CON_EST_GUAR_AMT \n");
  1383. sql.append(" , CONTRACT.CON_GUAR_TERM AS CON_GUAR_TERM \n");
  1384. sql.append(" , CONTRACT.DEF_GUAR_AMT_RATE AS DEF_EST_GUAR_RATE \n");
  1385. sql.append(" , CONTRACT.DEF_GUAR_AMT \n");
  1386. sql.append(" , CONTRACT.DEF_GUAR_TERMS AS DEF_EST_TERM \n");
  1387. sql.append(" , '' AS LABOR_GUAR_JOIN_AMT_GB \n");
  1388. sql.append(" , CONTRACT.CON_DISPLAY_TXT AS CON_SPE_TXT \n");
  1389. sql.append(" , CONTRACT.DEL_RATE_GB AS DELAY_RATE \n");
  1390. sql.append(" , CUR_CD.CHG_CODE02 as CON_CUR_NAME \n");
  1391. sql.append(" , CUR_CD.CHG_CODE06 as CON_CUR_WON \n");
  1392. sql.append(" , CUR_CD.CHG_CODE01 as CON_CUR_DIGIT \n");
  1393. sql.append(" , MAIN.DCERTI_NO \n");
  1394. sql.append(" , SUBVENDOR.MEMBER_NAME AS CORP_KOR \n");
  1395. sql.append(" , SUBVENDOR.CORP_ID \n");
  1396. sql.append(" , 'PREPAY' AS PREREQTFLG \n");
  1397. sql.append(" , 0 AS ACMP_NO \n");
  1398. sql.append(" , MAIN.PROOF_CD AS PROOF_CLASS \n");
  1399. sql.append(" , MAIN.ORD_DESC AS ORDACCDESC \n");
  1400. sql.append(" , MAIN.CURRENCY_GB AS CON_CUR_CD \n");
  1401. sql.append(" , MAIN.MAT_SUPPLY_AMT SUPPLY_AMT \n");
  1402. sql.append(" , MAIN.MAT_SURTAX_AMT SURTAX_AMT \n");
  1403. sql.append(" , MAIN.MAT_SUPPLY_AMT + MAIN.MAT_SURTAX_AMT REQ_AMT \n");
  1404. sql.append(" , CONTRACT.CON_CHARGE_ID \n");
  1405. sql.append(" , CONTRACT.CON_CHARGE_NAME \n");
  1406. sql.append(" , MAIN.DEALR_CD \n");
  1407. sql.append(" , MAIN.PAYITEM \n");
  1408. sql.append(" , MAIN.COSTCODE \n");
  1409. sql.append(" , MAIN.COSTTYPE \n");
  1410. sql.append(" , MAIN.TMPNATFLG AS ACC_CLASS \n");
  1411. sql.append(" , MAIN.PAY_GROUP \n");
  1412. sql.append(" , MAIN.PAYMENT_TERMS \n");
  1413. sql.append(" , MAIN.TMPSLIP_DEPT \n");
  1414. sql.append(" , MAIN.TMPSLIP_DT \n");
  1415. sql.append(" , MAIN.TMPSLIP_NO \n");
  1416. sql.append(" , MAIN.TMPSLIP_YN \n");
  1417. sql.append(" , MAIN.SLIP_YN \n");
  1418. sql.append(" , NULL AS ACMP_ID \n");
  1419. sql.append(" , MAIN.PREPAY_ID \n");
  1420. sql.append(" , PREPAY.CORP_ID AS CON_CORP_ID \n");
  1421. sql.append(" , CONTRACT.PUR_CONT_ID AS SUB_CONT_ID \n");
  1422. sql.append(" FROM PUR1040T MAIN \n");
  1423. sql.append(" LEFT OUTER JOIN PUR1030T PREPAY \n");
  1424. sql.append(" ON MAIN.PAYREQ_ID = PREPAY.PREPAY_ID \n");
  1425. sql.append(" LEFT OUTER JOIN CONT_PUR_SUPP SUBVENDOR \n");
  1426. sql.append(" --ON SUBVENDOR.MAIN_CORP = 'Y' \n");
  1427. sql.append(" ON PREPAY.CORP_ID = SUBVENDOR.CORP_ID \n");
  1428. sql.append(" AND PREPAY.PUR_CONT_MOD_ID = SUBVENDOR.PUR_CONT_MOD_ID \n");
  1429. sql.append(" LEFT OUTER JOIN PUR2000T CONTRACT \n");
  1430. sql.append(" ON PREPAY.PUR_CONT_MOD_ID = CONTRACT.PUR_CONT_MOD_ID \n");
  1431. sql.append(" LEFT OUTER JOIN EBID_COM911T CON_KIND \n");
  1432. sql.append(" ON CON_KIND.BASECD = 'SUB_CON_KIND' \n");
  1433. sql.append(" AND CONTRACT.CON_GB = CON_KIND.DETAILCD \n");
  1434. sql.append(" LEFT OUTER JOIN EBID_COM911T PAY_TYPE \n");
  1435. sql.append(" ON PAY_TYPE.BASECD = 'SUB_ACMP_PAY_TYPE' \n");
  1436. sql.append(" AND CONTRACT.PAY_COND_GB = PAY_TYPE.DETAILCD \n");
  1437. sql.append(" LEFT OUTER JOIN EBID_COM911T CUR_CD \n");
  1438. sql.append(" ON CUR_CD.BASECD = '911' \n");
  1439. sql.append(" AND CONTRACT.CURRENCY_GB = CUR_CD.DETAILCD \n");
  1440. sql.append(" WHERE PREPAY_GB = '1' \n");
  1441. sql.append(" AND TMPSLIP_ID = "+tmpslipID+" \n");
  1442. sql.append(" ORDER BY PROOFDATE desc, DEPT_NAME, CON_DOC_NO, CORP_KOR \n");
  1443. System.out.println(sql.toString());
  1444. pSelect.setStatement(sql.toString());
  1445. rowSet = pSelect.query();
  1446. if(rowSet.size()>0){
  1447. vo = RowSetUtility.getValueObject(rowSet.getRow(0));
  1448. }
  1449. }catch(Exception e){
  1450. WAFLogger.error("SQL : " + sql.toString());
  1451. WAFLogger.error(e);
  1452. }finally{
  1453. if( vo == null) vo = new ValueObject();
  1454. }
  1455. return vo;
  1456. }
  1457. //구매 대금 반려처리
  1458. public void doBizPayReqRtn(Connection con, OutputStream outputStream, String tmpslipID, HttpServletRequest request) {
  1459. WAFLogger.debug("\n\t #################### 구매 대금지급 반려 처리 시작");
  1460. // step 1
  1461. Document document = new Document(PageSize.A4, 25f, 25f, 35f, 10f);
  1462. try {
  1463. // step 2
  1464. PdfWriter writer = PdfWriter.getInstance(document, outputStream);
  1465. // step 3
  1466. document.open();
  1467. BaseFont bfKorean = BaseFont.createFont("HYGoThic-Medium", "UniKS-UCS2-H", BaseFont.NOT_EMBEDDED);
  1468. Font FontTitle = new Font(bfKorean, 8, Font.NORMAL);
  1469. FontTitle.setColor(borderColor);
  1470. Font FontData = new Font(bfKorean, 4.8f, Font.NORMAL);
  1471. Font FontTitle2 = new Font(bfKorean, 20, Font.BOLD);
  1472. PdfPTable table = null;
  1473. PdfPCell cell = null;
  1474. /*
  1475. * 정보 검색 시작 ---------------------------------------------
  1476. */
  1477. ValueObject params = new ValueObject();
  1478. HandlerStorage storage = new HandlerStorage();
  1479. storage.setParams(params);
  1480. ValueObject listRowSet = null;
  1481. /*
  1482. * 정보 검색 시작 ---------------------------------------------
  1483. */
  1484. listRowSet = getPayReqList1(con, tmpslipID);
  1485. // 정보 검색 끝 ---------------------------------------------
  1486. /*
  1487. * ===========================================================================================
  1488. * 제목 생성
  1489. * ===========================================================================================
  1490. */
  1491. makeTitle_2(document, FontTitle, FontTitle2, request);
  1492. //본문생성
  1493. setBorder(border, true, true, true, true);
  1494. //1행
  1495. PdfPTable table11 = new PdfPTable(6);
  1496. table11.setWidthPercentage(100);
  1497. table11.setSpacingBefore(7f);
  1498. table11.setSpacingAfter(7f);
  1499. float[] table11Width = {15f,3f,27f,3f,27f,30f};
  1500. table11.setWidths(table11Width);
  1501. // 1행
  1502. PT_addCell(table11, new String [] { "계약번호" }, FontTitle, border,
  1503. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1504. PT_addCell(table11, listRowSet.get("ORD_DOC_NO"), FontTitle, border,
  1505. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1506. PT_addCell(table11, new String [] { "작성일자" }, FontTitle, border,
  1507. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1508. PT_addCell(table11, listRowSet.get("REQ_DATE"), FontTitle, border,
  1509. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1510. /* PT_addCell(table11, new String [] { "작성자" }, FontTitle, border,
  1511. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1512. PT_addCell(table11, listRowSet.get("REQ_CHARGE_NAME"), FontTitle, border,
  1513. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1514. PT_addCell(table11, new String [] { "협조부서" }, FontTitle, border,
  1515. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1516. PT_addCell(table11, listRowSet.get("COOP_DEPT_NM"), FontTitle, border,
  1517. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f,false);*/
  1518. PT_addCell(table11, new String [] { "현장코드" }, FontTitle, border,
  1519. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1520. PT_addCell(table11, listRowSet.get("DEPT_CD"), FontTitle, border,
  1521. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f,false);
  1522. PT_addCell(table11, new String [] { "통화" }, FontTitle, border,
  1523. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1524. PT_addCell(table11, listRowSet.get("CURRENCY_GB"), FontTitle, border,
  1525. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1526. PT_addCell(table11, new String [] { "현장명" }, FontTitle, border,
  1527. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1528. PT_addCell(table11, listRowSet.get("DEPT_NM"), FontTitle, border,
  1529. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 5, 20f ,false);
  1530. /*PT_addCell(table11, new String [] { "현장명" }, FontTitle, border,
  1531. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1532. PT_addCell(table11, listRowSet.get("DEPT_NM"), FontTitle, border,
  1533. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1534. PT_addCell(table11, new String [] { "현장코드" }, FontTitle, border,
  1535. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1536. PT_addCell(table11, listRowSet.get("DEPT_CD"), FontTitle, border,
  1537. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);*/
  1538. PT_addCell(table11, new String [] { "계약명" }, FontTitle, border,
  1539. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1540. PT_addCell(table11, listRowSet.get("CST_DOC_NAME"), FontTitle, border,
  1541. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 5, 20f ,false);
  1542. PT_addCell(table11, new String [] { "계약업체명" }, FontTitle, border,
  1543. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1544. PT_addCell(table11, listRowSet.get("CORP_NM"), FontTitle, border,
  1545. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1546. PT_addCell(table11, new String [] { "대표이사" }, FontTitle, border,
  1547. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1548. PT_addCell(table11, listRowSet.get("REP_NAME"), FontTitle, border,
  1549. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1550. PT_addCell(table11, new String [] { "총계약금액" }, FontTitle, border,
  1551. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1552. PT_addCell(table11, listRowSet.get("ORD_AMT"), FontTitle, border,
  1553. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1554. PT_addCell(table11, new String [] { "선급금액" }, FontTitle, border,
  1555. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1556. PT_addCell(table11, listRowSet.get("PREPAY_AMT"), FontTitle, border,
  1557. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1558. PT_addCell(table11, new String [] { "지급구분" }, FontTitle, border,
  1559. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1560. PT_addCell(table11, listRowSet.get("DEPOSIT_GB"), FontTitle, border,
  1561. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1562. PT_addCell(table11, new String [] { "기선급공제액" }, FontTitle, border,
  1563. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1564. PT_addCell(table11, listRowSet.get("PREPAY_ACMP_AMT"), FontTitle, border,
  1565. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1566. PT_addCell(table11, new String [] { "지급사유" }, FontTitle, border,
  1567. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1568. PT_addCell(table11, listRowSet.get("DEPOSIT_RESN"), FontTitle, border,
  1569. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1570. PT_addCell(table11, new String [] { "선급잔액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1571. PT_addCell(table11, listRowSet.get("PREPAY_RMDR"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1572. PT_addCell(table11, new String [] { "기지불액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1573. //PT_addCell(table11, listRowSet.get("PAYED_AMT")+" ("+listRowSet.get("PAYED_PERCENT")+")%", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1574. PT_addCell(table11, listRowSet.get("PAYED_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1575. PT_addCell(table11, new String [] { "전기성고" }, FontTitle, border,
  1576. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1577. PT_addCell(table11, listRowSet.get("BEF_ACMP_AMT")+" ("+listRowSet.get("BEF_ACMP_PERCENT")+")%", FontTitle, border,
  1578. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1579. PT_addCell(table11, new String [] { "금회청구액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1580. //PT_addCell(table11, listRowSet.get("CUR_REQ_AMT")+" ("+listRowSet.get("CUR_REQ_PERCENT")+")%", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1581. PT_addCell(table11, listRowSet.get("CUR_REQ_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1582. PT_addCell(table11, new String [] { "금회기성고" }, FontTitle, border,
  1583. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1584. PT_addCell(table11, listRowSet.get("CUR_ACMP_AMT")+" ("+listRowSet.get("CUR_ACMP_PERCENT")+")%", FontTitle, border,
  1585. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1586. PT_addCell(table11, new String [] { "금회포함지불액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1587. //PT_addCell(table11, listRowSet.get("CUR_PAYED_AMT")+" ("+listRowSet.get("CUR_PAYED_PERCENT")+")%", FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1588. PT_addCell(table11, listRowSet.get("CUR_PAYED_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1589. PT_addCell(table11, new String [] { "금회포함기성고" }, FontTitle, border,
  1590. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1591. PT_addCell(table11, listRowSet.get("CUR_BEF_ACMP_AMT")+" ("+listRowSet.get("CUR_BEF_ACMP_PERCENT")+")%", FontTitle, border,
  1592. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1593. PT_addCell(table11, new String [] { "잔액" }, FontTitle, border,
  1594. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1595. PT_addCell(table11, listRowSet.get("REMAINDER_AMT")+" ("+listRowSet.get("REMAINDER_PERCENT")+")%", FontTitle, border,
  1596. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1597. PT_addCell(table11, new String [] { "미기성고" }, FontTitle, border,
  1598. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1599. PT_addCell(table11, listRowSet.get("REMAINDER_ACMP_AMT")+" ("+listRowSet.get("REMAINDER_ACMP_PERCENT")+")%", FontTitle, border,
  1600. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1601. PT_addCell(table11, new String [] { "특기사항" }, FontTitle, border,
  1602. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 200f ,true);
  1603. PT_addCell(table11, listRowSet.get("RE_MARKS"), FontTitle, border,
  1604. Element.ALIGN_LEFT, Element.ALIGN_TOP, 5, 200f ,false);
  1605. PT_addCell(table11, new String [] { "첨부서류" }, FontTitle, border,
  1606. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 120f ,true);
  1607. PdfPTable table21 = new PdfPTable(4);
  1608. float[] table21Width = {3f,27,3,27f};
  1609. table21.setWidths(table21Width);
  1610. PdfPCell permission = new PdfPCell(table21);
  1611. PT_addCell(table21, listRowSet.get("DOC_PAYREQ"), FontTitle, border,
  1612. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1613. PT_addCell(table21, new String [] { "대금청구서" }, FontTitle, border,
  1614. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1615. PT_addCell(table21, listRowSet.get("DOC_COMPLETE"), FontTitle, border,
  1616. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1617. PT_addCell(table21, new String [] { "설치완료확인서" }, FontTitle, border,
  1618. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1619. PT_addCell(table21, listRowSet.get("DOC_GUAR_CONST"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1620. PT_addCell(table21, new String [] { "계약이행 보증보험 증권" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1621. PT_addCell(table21, listRowSet.get("DOC_TESTRUN"), FontTitle, border,
  1622. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1623. PT_addCell(table21, new String [] { "시운전완료확인서" }, FontTitle, border,
  1624. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1625. PT_addCell(table21, listRowSet.get("DOC_MRR"), FontTitle, border,
  1626. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1627. PT_addCell(table21, new String [] { "지급이행 보증보험 증권" }, FontTitle, border,
  1628. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1629. PT_addCell(table21, listRowSet.get("DOC_INSPECTION_REPORT"), FontTitle, border,
  1630. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1631. PT_addCell(table21, new String [] { "Inspection Report" }, FontTitle, border,
  1632. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1633. PT_addCell(table21, listRowSet.get("DOC_GUAR_AS"), FontTitle, border,
  1634. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1635. PT_addCell(table21, new String [] { "하자이행 보증보험 증권" }, FontTitle, border,
  1636. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1637. PT_addCell(table21, listRowSet.get("DOC_SHIP"), FontTitle, border,
  1638. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1639. PT_addCell(table21, new String [] { "선적서류(B/L, Packing List)" }, FontTitle, border,
  1640. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1641. PT_addCell(table21, listRowSet.get("DOC_ITEMINPUTCONFIRM"), FontTitle, border,
  1642. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1643. PT_addCell(table21, new String [] { "원자재입고확인서" }, FontTitle, border,
  1644. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1645. PT_addCell(table21, listRowSet.get("DOC_FINAL_DOCUMENTS"), FontTitle, border,
  1646. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1647. PT_addCell(table21, new String [] { "Final Documents 제출 확인서" }, FontTitle, border,
  1648. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1649. PT_addCell(table21, listRowSet.get("DOC_CONFIRM"), FontTitle, border,
  1650. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1651. PT_addCell(table21, new String [] { "MRR" }, FontTitle, border,
  1652. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1653. PT_addCell(table21, listRowSet.get("DOC_CONST_COPY"), FontTitle, border,
  1654. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1655. PT_addCell(table21, new String [] { "계약서 사본" }, FontTitle, border,
  1656. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1657. PT_addCell(table21, listRowSet.get("DOC_WORKQA"), FontTitle, border,
  1658. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1659. PT_addCell(table21, new String [] { "거래명세서" }, FontTitle, border,
  1660. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1661. PT_addCell(table21, listRowSet.get("DOC_ETC"), FontTitle, border,
  1662. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1663. PT_addCell(table21, new String [] { "기타" }, FontTitle, border,
  1664. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1665. PT_addCell(table21, listRowSet.get("DOC_MC"), FontTitle, border,
  1666. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1667. permission.setColspan(4);
  1668. table11.addCell(permission);
  1669. PT_addCell(table11, "", FontTitle, border,
  1670. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 120f,false);
  1671. document.add(table11);
  1672. } catch (DocumentException de) {
  1673. WAFLogger.debug("de.getMessage() = " + de.getMessage());
  1674. } catch (IOException ioe) {
  1675. WAFLogger.debug("ioe.getMessage() = " + ioe.getMessage());
  1676. } catch (Exception e) {
  1677. WAFLogger.debug("[Exception] ... " + e);
  1678. }
  1679. // step 5
  1680. document.close();
  1681. WAFLogger.debug("\n\t #################### "+ strFileName +" 생성완료");
  1682. }
  1683. public void doBizBuyPreRtn(Connection con, OutputStream outputStream, String tmpslipID, HttpServletRequest request) {
  1684. WAFLogger.debug("\n\t #################### 구매 선급금 시작");
  1685. // step 1
  1686. Document document = new Document(PageSize.A4, 25f, 25f, 35f, 10f);
  1687. try {
  1688. // step 2
  1689. PdfWriter writer = PdfWriter.getInstance(document, outputStream);
  1690. // step 3
  1691. document.open();
  1692. BaseFont bfKorean = BaseFont.createFont("HYGoThic-Medium", "UniKS-UCS2-H", BaseFont.NOT_EMBEDDED);
  1693. Font FontTitle = new Font(bfKorean, 8, Font.NORMAL);
  1694. FontTitle.setColor(borderColor);
  1695. Font FontData = new Font(bfKorean, 4.8f, Font.NORMAL);
  1696. Font FontTitle2 = new Font(bfKorean, 20, Font.BOLD);
  1697. PdfPTable table = null;
  1698. PdfPCell cell = null;
  1699. /*
  1700. * 정보 검색 시작 ---------------------------------------------
  1701. */
  1702. ValueObject params = new ValueObject();
  1703. HandlerStorage storage = new HandlerStorage();
  1704. storage.setParams(params);
  1705. ValueObject listRowSet = null;
  1706. /*
  1707. * 정보 검색 시작 ---------------------------------------------
  1708. */
  1709. listRowSet = getBuyPreList(con, tmpslipID);
  1710. // 정보 검색 끝 ---------------------------------------------
  1711. /*
  1712. * ===========================================================================================
  1713. * 제목 생성
  1714. * ===========================================================================================
  1715. */
  1716. makeTitle_1(document, FontTitle, FontTitle2, request);
  1717. //본문생성
  1718. setBorder(border, true, true, true, true);
  1719. //1행
  1720. PdfPTable table11 = new PdfPTable(6);
  1721. table11.setWidthPercentage(100);
  1722. table11.setSpacingBefore(7f);
  1723. table11.setSpacingAfter(7f);
  1724. float[] table11Width = {15f,3f,27f,3f,27f,30f};
  1725. table11.setWidths(table11Width);
  1726. // 1행
  1727. PT_addCell(table11, new String [] { "계약번호" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1728. PT_addCell(table11, listRowSet.get("ORD_DOC_NO"), FontTitle, border,Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1729. PT_addCell(table11, new String [] { "작성일자" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1730. PT_addCell(table11, listRowSet.get("REQ_DATE"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1731. // PT_addCell(table11, new String [] { "작성자" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1732. // PT_addCell(table11, listRowSet.get("REQ_CHARGE_NAME"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1733. // PT_addCell(table11, new String [] { "협조부서" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1734. // PT_addCell(table11, listRowSet.get("COOP_DEPT_NM"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1735. PT_addCell(table11, new String [] { "현장코드" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1736. PT_addCell(table11, listRowSet.get("DEPT_CD"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f,false);
  1737. PT_addCell(table11, new String [] { "통화" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1738. PT_addCell(table11, listRowSet.get("CURRENCY_GB"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1739. PT_addCell(table11, new String [] { "현장명" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1740. PT_addCell(table11, listRowSet.get("DEPT_NM"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 5, 20f ,false);
  1741. /*PT_addCell(table11, new String [] { "현장명" }, FontTitle, border,
  1742. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1743. PT_addCell(table11, listRowSet.get("DEPT_NM"), FontTitle, border,
  1744. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1745. PT_addCell(table11, new String [] { "현장코드" }, FontTitle, border,
  1746. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1747. PT_addCell(table11, listRowSet.get("DEPT_CD"), FontTitle, border,
  1748. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);*/
  1749. PT_addCell(table11, new String [] { "계약명" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1750. PT_addCell(table11, listRowSet.get("CST_DOC_NAME"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 5, 20f ,false);
  1751. PT_addCell(table11, new String [] { "계약업체명" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1752. PT_addCell(table11, listRowSet.get("CORP_NM"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1753. PT_addCell(table11, new String [] { "대표이사" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1754. PT_addCell(table11, listRowSet.get("REP_NAME"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1755. PT_addCell(table11, new String [] { "총계약금액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1756. PT_addCell(table11, listRowSet.get("ORD_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1757. PT_addCell(table11, new String [] { "선급금액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1758. PT_addCell(table11, listRowSet.get("PAYED_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1759. PT_addCell(table11, new String [] { "선급공급가" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1760. PT_addCell(table11, listRowSet.get("CUR_REQ_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1761. PT_addCell(table11, new String [] { "선급부가세" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1762. PT_addCell(table11, listRowSet.get("CUR_PAYED_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1763. PT_addCell(table11, new String [] { "지급구분" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1764. PT_addCell(table11, listRowSet.get("DEPOSIT_GB"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1765. PT_addCell(table11, new String [] { "신청선급금" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1766. PT_addCell(table11, listRowSet.get("REMAINDER_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1767. PT_addCell(table11, new String [] { "신청선급공급가" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1768. PT_addCell(table11, listRowSet.get("BEF_ACMP_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1769. PT_addCell(table11, new String [] { "신청선급부가세" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1770. PT_addCell(table11, listRowSet.get("CUR_ACMP_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1771. // PT_addCell(table11, new String [] { "기선급공제액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1772. // PT_addCell(table11, listRowSet.get("PREPAY_ACMP_AMT"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1773. // PT_addCell(table11, new String [] { "지급사유" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1774. // PT_addCell(table11, listRowSet.get("DEPOSIT_RESN"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1775. // PT_addCell(table11, new String [] { "선급잔액" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1776. // PT_addCell(table11, listRowSet.get("PREPAY_RMDR"), FontTitle, border, Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1777. // PT_addCell(table11, new String [] { "기지불액" }, FontTitle, border,
  1778. // Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1779. // PT_addCell(table11, listRowSet.get("PAYED_AMT")+" ("+listRowSet.get("PAYED_PERCENT")+")%", FontTitle, border,
  1780. // Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1781. // PT_addCell(table11, new String [] { "전기성고" }, FontTitle, border,
  1782. // Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1783. // PT_addCell(table11, listRowSet.get("BEF_ACMP_AMT")+" ("+listRowSet.get("BEF_ACMP_PERCENT")+")%", FontTitle, border,
  1784. // Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1785. /*
  1786. PT_addCell(table11, new String [] { "금회청구액" }, FontTitle, border,
  1787. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1788. PT_addCell(table11, listRowSet.get("CUR_REQ_AMT")+" ("+listRowSet.get("CUR_REQ_PERCENT")+")%", FontTitle, border,
  1789. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1790. PT_addCell(table11, new String [] { "금회기성고" }, FontTitle, border,
  1791. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1792. PT_addCell(table11, listRowSet.get("CUR_ACMP_AMT")+" ("+listRowSet.get("CUR_ACMP_PERCENT")+")%", FontTitle, border,
  1793. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1794. PT_addCell(table11, new String [] { "금회포함지불액" }, FontTitle, border,
  1795. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1796. PT_addCell(table11, listRowSet.get("CUR_PAYED_AMT")+" ("+listRowSet.get("CUR_PAYED_PERCENT")+")%", FontTitle, border,
  1797. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1798. PT_addCell(table11, new String [] { "금회포함기성고" }, FontTitle, border,
  1799. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1800. PT_addCell(table11, listRowSet.get("CUR_BEF_ACMP_AMT")+" ("+listRowSet.get("CUR_BEF_ACMP_PERCENT")+")%", FontTitle, border,
  1801. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1802. PT_addCell(table11, new String [] { "잔액" }, FontTitle, border,
  1803. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,true);
  1804. PT_addCell(table11, listRowSet.get("REMAINDER_AMT")+" ("+listRowSet.get("REMAINDER_PERCENT")+")%", FontTitle, border,
  1805. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 2, 20f ,false);
  1806. PT_addCell(table11, new String [] { "미기성고" }, FontTitle, border,
  1807. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 2, 20f ,true);
  1808. PT_addCell(table11, listRowSet.get("REMAINDER_ACMP_AMT")+" ("+listRowSet.get("REMAINDER_ACMP_PERCENT")+")%", FontTitle, border,
  1809. Element.ALIGN_RIGHT, Element.ALIGN_MIDDLE, 1, 20f,false);
  1810. PT_addCell(table11, new String [] { "특기사항" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 200f ,true);
  1811. PT_addCell(table11, listRowSet.get("RE_MARKS"), FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_TOP, 5, 200f ,false);
  1812. PT_addCell(table11, new String [] { "첨부서류" }, FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 120f ,true);
  1813. PdfPTable table21 = new PdfPTable(4);
  1814. float[] table21Width = {3f,27,3,27f};
  1815. table21.setWidths(table21Width);
  1816. PdfPCell permission = new PdfPCell(table21);
  1817. PT_addCell(table21, listRowSet.get("DOC_PAYREQ"), FontTitle, border,
  1818. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1819. PT_addCell(table21, new String [] { "대금청구서" }, FontTitle, border,
  1820. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1821. PT_addCell(table21, listRowSet.get("DOC_COMPLETE"), FontTitle, border,
  1822. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1823. PT_addCell(table21, new String [] { "설치완료확인서" }, FontTitle, border,
  1824. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1825. PT_addCell(table21, listRowSet.get("DOC_GUAR_CONST"), FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1826. PT_addCell(table21, new String [] { "계약이행 보증보험 증권" }, FontTitle, border, Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1827. PT_addCell(table21, listRowSet.get("DOC_TESTRUN"), FontTitle, border,
  1828. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1829. PT_addCell(table21, new String [] { "시운전완료확인서" }, FontTitle, border,
  1830. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1831. PT_addCell(table21, listRowSet.get("DOC_MRR"), FontTitle, border,
  1832. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1833. PT_addCell(table21, new String [] { "지급이행 보증보험 증권" }, FontTitle, border,
  1834. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1835. PT_addCell(table21, listRowSet.get("DOC_INSPECTION_REPORT"), FontTitle, border,
  1836. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1837. PT_addCell(table21, new String [] { "Inspection Report" }, FontTitle, border,
  1838. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1839. PT_addCell(table21, listRowSet.get("DOC_GUAR_AS"), FontTitle, border,
  1840. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1841. PT_addCell(table21, new String [] { "하자이행 보증보험 증권" }, FontTitle, border,
  1842. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1843. PT_addCell(table21, listRowSet.get("DOC_SHIP"), FontTitle, border,
  1844. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1845. PT_addCell(table21, new String [] { "선적서류(B/L, Packing List)" }, FontTitle, border,
  1846. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1847. PT_addCell(table21, listRowSet.get("DOC_ITEMINPUTCONFIRM"), FontTitle, border,
  1848. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1849. PT_addCell(table21, new String [] { "원자재입고확인서" }, FontTitle, border,
  1850. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1851. PT_addCell(table21, listRowSet.get("DOC_FINAL_DOCUMENTS"), FontTitle, border,
  1852. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1853. PT_addCell(table21, new String [] { "Final Documents 제출 확인서" }, FontTitle, border,
  1854. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1855. PT_addCell(table21, listRowSet.get("DOC_CONFIRM"), FontTitle, border,
  1856. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1857. PT_addCell(table21, new String [] { "MRR" }, FontTitle, border,
  1858. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1859. PT_addCell(table21, listRowSet.get("DOC_CONST_COPY"), FontTitle, border,
  1860. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1861. PT_addCell(table21, new String [] { "계약서 사본" }, FontTitle, border,
  1862. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1863. PT_addCell(table21, listRowSet.get("DOC_WORKQA"), FontTitle, border,
  1864. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f,false);
  1865. PT_addCell(table21, new String [] { "거래명세서" }, FontTitle, border,
  1866. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1867. PT_addCell(table21, listRowSet.get("DOC_ETC"), FontTitle, border,
  1868. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1869. PT_addCell(table21, new String [] { "기타" }, FontTitle, border,
  1870. Element.ALIGN_LEFT, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1871. PT_addCell(table21, listRowSet.get("DOC_MC"), FontTitle, border,
  1872. Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 20f ,false);
  1873. permission.setColspan(4);
  1874. table11.addCell(permission);
  1875. PT_addCell(table11, "", FontTitle, border, Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 1, 120f,false);
  1876. */
  1877. document.add(table11);
  1878. } catch (DocumentException de) {
  1879. WAFLogger.debug("de.getMessage() = " + de.getMessage());
  1880. } catch (IOException ioe) {
  1881. WAFLogger.debug("ioe.getMessage() = " + ioe.getMessage());
  1882. } catch (Exception e) {
  1883. WAFLogger.debug("[Exception] ... " + e);
  1884. }
  1885. // step 5
  1886. document.close();
  1887. WAFLogger.debug("\n\t #################### "+ strFileName +" 생성완료");
  1888. }
  1889. }