OChgPoSignDriver.java 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  1. /**
  2. * @(#)file BidPlanSignDriver.java
  3. * @(#)author Son hyungmin
  4. * @(#)version 1.0
  5. * @(#)date 2014-09-29
  6. * @(#)since JDK 1.4.2
  7. *
  8. * Copyright (c) www.dcchem.co.kr, Inc.
  9. * All rights reserved.
  10. * This software is the proprietary information of dcchem, Inc.
  11. */
  12. package kr.co.udapsoft.common.commonSign.driver;
  13. import java.sql.Connection;
  14. import com.udapsoft.waf.system.HandlerStorage;
  15. import kr.co.hsnc.common.base.WAFLogger;
  16. import kr.co.hsnc.common.logger.Logger;
  17. import kr.co.hsnc.common.sql.RowSet;
  18. import kr.co.hsnc.common.sql.RowSetImpl;
  19. import kr.co.hsnc.common.sql.WAFSQLException;
  20. import kr.co.hsnc.common.sql.persistent.Persistent;
  21. import kr.co.hsnc.common.sql.persistent.PersistentImpl;
  22. import kr.co.hsnc.common.sql.search.Search;
  23. import kr.co.hsnc.common.sql.search.SearchImpl;
  24. import kr.co.hsnc.common.sql.util.RowSetUtility;
  25. import kr.co.hsnc.common.util.ValueObject;
  26. import kr.co.udapsoft.common.commonSign.CommonSignInterface;
  27. import kr.co.udapsoft.common.sender.MessageSend;
  28. import oracle.toplink.internal.ox.StrBuffer;
  29. /**
  30. *
  31. * @version 1.0
  32. * @author Beomgeun Lee
  33. */
  34. public class OChgPoSignDriver implements CommonSignInterface {
  35. /**
  36. * 테슽 파일
  37. *
  38. */
  39. public OChgPoSignDriver() {
  40. super();
  41. }
  42. /*
  43. * (non-Javadoc)
  44. * @see kr.co.udap.ehr.common.sign.SignInterface#doCallSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
  45. */
  46. public void doCallSign(Connection connection, ValueObject signDoc) throws Exception {
  47. System.out.println("!!doCallSign");
  48. }
  49. /*
  50. * (non-Javadoc)
  51. * @see kr.co.udap.ehr.common.sign.SignInterface#doStartSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
  52. */
  53. public void doStartSign(Connection connection, ValueObject signDoc) throws Exception {
  54. System.out.println("!!doStartSign");
  55. }
  56. /*
  57. * (non-Javadoc)
  58. * @see kr.co.udap.ehr.common.sign.SignInterface#doFirstFinishSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
  59. */
  60. public void doFirstFinishSign(Connection connection, ValueObject signDoc) throws Exception {
  61. System.out.println("!!doFirstFinishSign");
  62. System.out.println("### 결재 Strart");
  63. updateMaster(connection, signDoc);
  64. String maxSubContid = getMaxSubCntId();
  65. addChangeContProc(connection,signDoc, maxSubContid); //변경 계약 축
  66. System.out.println("### 결재 End");
  67. }
  68. /*
  69. * (non-Javadoc)
  70. * @see kr.co.udap.ehr.common.sign.SignInterface#doFinishSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
  71. */
  72. public void doFinishSign(Connection connection, ValueObject signDoc) throws Exception {
  73. System.out.println("!!doFinishSign");
  74. }
  75. /*
  76. * (non-Javadoc)
  77. * @see kr.co.udap.ehr.common.sign.SignInterface#doRejectSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
  78. */
  79. public void doFirstRejectSign(Connection connection, ValueObject signDoc) throws Exception {
  80. System.out.println("!!반려");
  81. updateMaster(connection, signDoc);
  82. }
  83. /*
  84. * (non-Javadoc)
  85. * @see kr.co.udap.ehr.common.sign.SignInterface#doRejectSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
  86. */
  87. public void doRejectSign(Connection connection, ValueObject signDoc) throws Exception {
  88. System.out.println("!!doRejectSign");
  89. }
  90. /*
  91. * (non-Javadoc)
  92. * @see kr.co.udap.ehr.common.sign.SignInterface#doCancelSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
  93. */
  94. public void doCancelSign(Connection connection, ValueObject signDoc) throws Exception {
  95. System.out.println("!!doCancelSign");
  96. }
  97. /**
  98. * SAC01001 상태값을 업데이트해준다.
  99. * @param connection
  100. * @param valueObject
  101. * @throws Exception
  102. */
  103. public void updateMaster(Connection connection, ValueObject vo) throws Exception {
  104. Persistent persistent = new PersistentImpl(connection);
  105. StringBuffer sqlstr = null;
  106. try {
  107. sqlstr = new StringBuffer();
  108. String status = "";
  109. if(vo.get("SIGN_TYPE").equals("1")){
  110. if(vo.get("SIGN_DECI_CLASS").equals("14")){
  111. status = "50";//결재완료
  112. }else {
  113. status = "80";//반려 2018.07.11 90->80으로 변경
  114. }
  115. }
  116. sqlstr.append(" UPDATE SUB3000T \n");
  117. sqlstr.append(" SET STATUS_CD = ? \n");
  118. sqlstr.append(" WHERE SUB_CONT_REQ_ID = ? \n");
  119. persistent.setStatement(sqlstr.toString());
  120. persistent.addParameter(status);
  121. persistent.addParameter(vo.get("KEY_COL2"));
  122. persistent.execute();
  123. }
  124. catch(Exception e) {
  125. WAFLogger.error(this.getClass().getName() + " --> updateSac01001() : " + e.getMessage());
  126. WAFLogger.error("SQL : " + sqlstr);
  127. WAFLogger.error(e);
  128. throw e;
  129. }
  130. }
  131. private String getMaxSubCntId() {
  132. Search search = new SearchImpl();
  133. String sqlstr = "";
  134. try {
  135. sqlstr = "SELECT SUB2000T_S.NEXTVAL AS MAX_SUB_CONT_MOD_ID \n"
  136. + " FROM DUAL\n";
  137. search.setStatement(sqlstr);
  138. return search.execute().getRow(0).get("MAX_SUB_CONT_MOD_ID");
  139. }
  140. catch(Exception e) {
  141. WAFLogger.error(this.getClass().getName() + " --> getNextPgmGrSeq() : " + e.getMessage());
  142. WAFLogger.error("SQL : " + search.getStatement());
  143. WAFLogger.error(e);
  144. return null;
  145. }
  146. }
  147. /**
  148. * 변경 계약 정보 추가
  149. * @param connection
  150. * @param valueObject
  151. * @throws Exception
  152. */
  153. public void addChangeContProc(Connection connection, ValueObject valueObject, String maxSubContid) throws Exception {
  154. //WAFLogger.debug("valueObject : " + valueObject);
  155. try {
  156. addChangeContSub(connection, valueObject, maxSubContid); //변경 계약 축
  157. addChangeContSupport(connection, valueObject, maxSubContid); //변경 계약 축
  158. // orgContChgStatus(super.conn.getConnection(), params); //원계약정보 상태 변경
  159. Send_ToeTEC(valueObject);
  160. //2017.2.7 외주예산관리 추가
  161. addBcsCont(connection, valueObject, maxSubContid);
  162. //2018.10.31 외주내역 추가
  163. addContItem(connection, valueObject, maxSubContid);
  164. }
  165. catch(Exception e) {
  166. WAFLogger.error(this.getClass().getName() + " --> addChangeContProc() : " + e.getMessage());
  167. WAFLogger.error("SQL : " + e.getMessage());
  168. WAFLogger.error(e);
  169. throw e;
  170. }
  171. }
  172. public boolean addChangeContSub(Connection connection, ValueObject valueObject, String maxSubContid) throws Exception {
  173. //WAFLogger.debug("valueObject : " + valueObject);
  174. Persistent persistent = new PersistentImpl(connection);
  175. StrBuffer sqlstr = new StrBuffer();
  176. try {
  177. sqlstr.append("INSERT INTO SUB2000T \n");
  178. sqlstr.append(" ( SUB_CONT_MOD_ID \n");
  179. sqlstr.append(" , CON_DOC_NO \n");
  180. sqlstr.append(" , MOD_NO \n");
  181. sqlstr.append(" , SUB_CONT_ID \n");
  182. sqlstr.append(" , MOD_GB \n");
  183. sqlstr.append(" , MOD_CON_RSN \n");
  184. sqlstr.append(" , MOD_REQ_DATE \n");
  185. sqlstr.append(" , MOD_CORP_RSN \n");
  186. sqlstr.append(" , DEPT_CD \n");
  187. sqlstr.append(" , DEPT_NAME \n");
  188. sqlstr.append(" , CON_GB \n");
  189. sqlstr.append(" , DEALER_NM \n");
  190. sqlstr.append(" , BUILD_NAME \n");
  191. sqlstr.append(" , UND_CON_NAME \n");
  192. sqlstr.append(" , SUB_UND_CON_NAME \n");
  193. sqlstr.append(" , ELEC_CON_YN \n");
  194. sqlstr.append(" , REQ_DEPT_CD \n");
  195. sqlstr.append(" , REQ_DATE \n");
  196. sqlstr.append(" , REQ_USERID \n");
  197. sqlstr.append(" , REQ_USERNM \n");
  198. sqlstr.append(" , REQ_DOC_NO \n");
  199. sqlstr.append(" , CST_DATE \n");
  200. sqlstr.append(" , CON_IN_DATE \n");
  201. sqlstr.append(" , CON_DATE \n");
  202. sqlstr.append(" , PAY_COND_GB \n");
  203. sqlstr.append(" , PAY_CONTENT \n");
  204. sqlstr.append(" , START_WORK_DATE \n");
  205. sqlstr.append(" , END_WORK_DATE \n");
  206. sqlstr.append(" , WORK_PLACE \n");
  207. sqlstr.append(" , PAY_WAY_CASH \n");
  208. sqlstr.append(" , PAY_WAY_BILL \n");
  209. sqlstr.append(" , CON_AMT \n");
  210. sqlstr.append(" , CON_SUPPLY_AMT \n");
  211. sqlstr.append(" , CON_SUPPLY_TAMT \n");
  212. sqlstr.append(" , CON_SUPPLY_NAMT \n");
  213. sqlstr.append(" , CON_SURTAX_AMT \n");
  214. sqlstr.append(" , LABOR_AMT \n");
  215. sqlstr.append(" , PREPAY_RATE \n");
  216. sqlstr.append(" , PREPAY_AMT \n");
  217. sqlstr.append(" , PREPAY_GUAR_AMT_RATE \n");
  218. sqlstr.append(" , PREPAY_GUAR_AMT \n");
  219. sqlstr.append(" , PREPAY_SUPPLY_AMT \n");
  220. sqlstr.append(" , PREPAY_SUPPLY_TAMT \n");
  221. sqlstr.append(" , PREPAY_SUPPLY_NAMT \n");
  222. sqlstr.append(" , PREPAY_SURTAX_AMT \n");
  223. sqlstr.append(" , CON_EST_GUAR_RATE \n");
  224. sqlstr.append(" , CON_EST_GUAR_AMT \n");
  225. sqlstr.append(" , CON_GUAR_TERM \n");
  226. sqlstr.append(" , DEF_EST_GUAR_RATE \n");
  227. sqlstr.append(" , DEF_GUAR_AMT \n");
  228. sqlstr.append(" , DEF_EST_TERM \n");
  229. sqlstr.append(" , DELAY_RATE \n");
  230. sqlstr.append(" , LABOR_GUAR_JOIN_AMT_GB \n");
  231. sqlstr.append(" , CON_SPE_TXT \n");
  232. sqlstr.append(" , ADD_FILE_KIND \n");
  233. sqlstr.append(" , CON_CHARGE_ID \n");
  234. sqlstr.append(" , CON_CHARGE_NAME \n");
  235. sqlstr.append(" , CORP_SIGN_DATE \n");
  236. sqlstr.append(" , COMPANY_SIGN_DATE \n");
  237. sqlstr.append(" , PAY_GROUP \n");
  238. sqlstr.append(" , PAYMENT_TERMS \n");
  239. sqlstr.append(" , ACCT_GB \n");
  240. sqlstr.append(" , PROOF_CD \n");
  241. sqlstr.append(" , CON_CUR_CD \n");
  242. sqlstr.append(" , CON_EXCHANGE_DATE \n");
  243. sqlstr.append(" , CON_WON_RATE \n");
  244. sqlstr.append(" , PAY_ITEM \n");
  245. sqlstr.append(" , COST_CODE \n");
  246. sqlstr.append(" , COST_TYPE \n");
  247. sqlstr.append(" , WORK_KIND_CD \n");
  248. sqlstr.append(" , CONTRACTID \n");
  249. sqlstr.append(" , G_ID \n");
  250. sqlstr.append(" , P_ID \n");
  251. sqlstr.append(" , CON_CLS_YN \n");
  252. sqlstr.append(" , TEMPLATE_CD \n");
  253. sqlstr.append(" , CONT_HASH \n");
  254. sqlstr.append(" , TRUE_RANDOM \n");
  255. sqlstr.append(" , STATUS_CD \n");
  256. sqlstr.append(" , BID_NO \n");
  257. sqlstr.append(" , BID_DEG \n");
  258. sqlstr.append(" , MONTH_ACMP_CNT \n");
  259. sqlstr.append(" , OBJ_RCPT_DAY \n");
  260. sqlstr.append(" , MODI_REQ_REASON \n");
  261. sqlstr.append(" , MODI_REQ_DT \n");
  262. sqlstr.append(" , FRST_CON_AMT \n");
  263. sqlstr.append(" , FRST_EXE_AMT \n");
  264. sqlstr.append(" , CHG_CON_AMT \n");
  265. sqlstr.append(" , CHG_EXE_AMT \n");
  266. sqlstr.append(" , IN_SPE_INFO \n");
  267. sqlstr.append(" , IN_CHG_INFO \n");
  268. sqlstr.append(" , OBC_MID_REQ_MONTH \n");
  269. sqlstr.append(" , OBC_MID_BILL_DATE \n");
  270. sqlstr.append(" , SUPP_DIRECT_YN \n"); //2021.04.01(하도급직불여부 추가)
  271. sqlstr.append(" , LABOR_USE_YN \n"); //2022.03.21(노무비닷컴 사용여부 추가)
  272. sqlstr.append(" , CRE_BY \n");
  273. sqlstr.append(" , CRE_DATE) \n");
  274. sqlstr.append("SELECT ? \n");
  275. sqlstr.append(" , A.CON_DOC_NO \n");
  276. sqlstr.append(" , A.MOD_NO + 1 \n");
  277. sqlstr.append(" , A.SUB_CONT_ID \n");
  278. sqlstr.append(" , B.MOD_GB \n");
  279. sqlstr.append(" , NULL \n");
  280. sqlstr.append(" , NULL \n");
  281. sqlstr.append(" , NULL \n");
  282. sqlstr.append(" , A.DEPT_CD \n");
  283. sqlstr.append(" , A.DEPT_NAME \n");
  284. sqlstr.append(" , A.CON_GB \n");
  285. sqlstr.append(" , A.DEALER_NM \n");
  286. sqlstr.append(" , A.BUILD_NAME \n");
  287. sqlstr.append(" , A.UND_CON_NAME \n");
  288. sqlstr.append(" , A.SUB_UND_CON_NAME \n");
  289. sqlstr.append(" , A.ELEC_CON_YN \n");
  290. sqlstr.append(" , A.REQ_DEPT_CD \n");
  291. sqlstr.append(" , A.REQ_DATE \n");
  292. sqlstr.append(" , A.REQ_USERID \n");
  293. sqlstr.append(" , A.REQ_USERNM \n");
  294. sqlstr.append(" , A.REQ_DOC_NO \n");
  295. sqlstr.append(" , A.CST_DATE \n");
  296. sqlstr.append(" , A.CON_IN_DATE \n");
  297. sqlstr.append(" , A.CON_DATE \n");
  298. sqlstr.append(" , A.PAY_COND_GB \n");
  299. sqlstr.append(" , A.PAY_CONTENT \n");
  300. sqlstr.append(" , A.START_WORK_DATE \n");
  301. sqlstr.append(" , B.AFT_CONT_DATE \n");
  302. sqlstr.append(" , A.WORK_PLACE \n");
  303. sqlstr.append(" , A.PAY_WAY_CASH \n");
  304. sqlstr.append(" , A.PAY_WAY_BILL \n");//2017.07.19
  305. sqlstr.append(" , B.AFT_SUPP_AMT + ROUND(DECODE(NVL(A.CON_SURTAX_AMT,0), 0, 0,ROUND(B.AFT_SUPP_AMT * (A.CON_SUPPLY_TAMT/A.CON_SUPPLY_AMT)*0.1,0)),0) \n");//A.CON_AMT
  306. sqlstr.append(" , B.AFT_SUPP_AMT \n");//A.CON_SUPPLY_AMT
  307. // sqlstr.append(" , ROUND(B.AFT_SUPP_AMT * (A.CON_SUPPLY_TAMT/A.CON_SUPPLY_AMT),0) \n");//A.CON_SUPPLY_TAMT
  308. // sqlstr.append(" , B.AFT_SUPP_AMT - ROUND( B.AFT_SUPP_AMT * (A.CON_SUPPLY_TAMT/A.CON_SUPPLY_AMT),0) \n");//A.CON_SUPPLY_NAMT
  309. sqlstr.append(" , ROUND (DECODE(B.AFT_SUPP_AMT,0,0, B.AFT_SUPP_AMT * (A.CON_SUPPLY_TAMT / A.CON_SUPPLY_AMT)), 0) \n"); //A.CON_SUPPLY_TAMT
  310. sqlstr.append(" , B.AFT_SUPP_AMT - ROUND (DECODE(B.AFT_SUPP_AMT,0,0,B.AFT_SUPP_AMT * (A.CON_SUPPLY_TAMT / A.CON_SUPPLY_AMT)), 0) \n"); //A.CON_SUPPLY_NAMT
  311. sqlstr.append(" , ROUND(DECODE(NVL(A.CON_SURTAX_AMT,0), 0, 0,B.AFT_SUPP_AMT * (A.CON_SUPPLY_TAMT/A.CON_SUPPLY_AMT)*0.1),0) \n");//A.CON_SURTAX_AMT
  312. sqlstr.append(" , A.LABOR_AMT \n");
  313. sqlstr.append(" , A.PREPAY_RATE \n");//2017.07.25
  314. sqlstr.append(" , A.PREPAY_AMT \n");
  315. sqlstr.append(" , A.PREPAY_GUAR_AMT_RATE \n");
  316. sqlstr.append(" , A.PREPAY_GUAR_AMT \n");
  317. sqlstr.append(" , A.PREPAY_SUPPLY_AMT \n");
  318. sqlstr.append(" , A.PREPAY_SUPPLY_TAMT \n");
  319. sqlstr.append(" , A.PREPAY_SUPPLY_NAMT \n");
  320. sqlstr.append(" , A.PREPAY_SURTAX_AMT \n");
  321. sqlstr.append(" , A.CON_EST_GUAR_RATE \n");
  322. sqlstr.append(" , A.CON_EST_GUAR_AMT \n");
  323. sqlstr.append(" , A.CON_GUAR_TERM \n");
  324. sqlstr.append(" , A.DEF_EST_GUAR_RATE \n");
  325. sqlstr.append(" , A.DEF_GUAR_AMT \n");
  326. sqlstr.append(" , A.DEF_EST_TERM \n");
  327. sqlstr.append(" , A.DELAY_RATE \n");
  328. sqlstr.append(" , A.LABOR_GUAR_JOIN_AMT_GB \n");
  329. sqlstr.append(" , A.CON_SPE_TXT \n");
  330. sqlstr.append(" , A.ADD_FILE_KIND \n");
  331. sqlstr.append(" , A.CON_CHARGE_ID \n");
  332. sqlstr.append(" , A.CON_CHARGE_NAME \n");
  333. sqlstr.append(" , A.CORP_SIGN_DATE \n");
  334. sqlstr.append(" , A.COMPANY_SIGN_DATE \n");
  335. sqlstr.append(" , A.PAY_GROUP \n");
  336. sqlstr.append(" , A.PAYMENT_TERMS \n");
  337. sqlstr.append(" , A.ACCT_GB \n");
  338. sqlstr.append(" , A.PROOF_CD \n");
  339. sqlstr.append(" , A.CON_CUR_CD \n");
  340. sqlstr.append(" , A.CON_EXCHANGE_DATE \n");
  341. sqlstr.append(" , A.CON_WON_RATE \n");
  342. sqlstr.append(" , A.PAY_ITEM \n");
  343. sqlstr.append(" , A.COST_CODE \n");
  344. sqlstr.append(" , A.COST_TYPE \n");
  345. sqlstr.append(" , A.WORK_KIND_CD \n");
  346. sqlstr.append(" , A.CONTRACTID \n");
  347. sqlstr.append(" , A.G_ID \n");
  348. sqlstr.append(" , A.P_ID \n");
  349. sqlstr.append(" , 1 \n");
  350. sqlstr.append(" , NULL \n");
  351. sqlstr.append(" , NULL \n");
  352. sqlstr.append(" , NULL \n");
  353. sqlstr.append(" , '00' \n");
  354. sqlstr.append(" , BID_NO \n");
  355. sqlstr.append(" , BID_DEG \n");
  356. sqlstr.append(" , MONTH_ACMP_CNT \n");
  357. sqlstr.append(" , OBJ_RCPT_DAY \n");
  358. sqlstr.append(" , MODI_REQ_REASON \n");
  359. sqlstr.append(" , MODI_REQ_DT \n");
  360. sqlstr.append(" , B.BEF_CONT_AMT \n");
  361. sqlstr.append(" , B.BEF_BUG_AMT \n");
  362. sqlstr.append(" , B.AFT_CONT_AMT \n");
  363. sqlstr.append(" , B.AFT_BUG_AMT \n");
  364. sqlstr.append(" , B.SP_REMARK \n");
  365. sqlstr.append(" , B.REMARK \n");
  366. sqlstr.append(" , A.OBC_MID_REQ_MONTH \n");
  367. sqlstr.append(" , A.OBC_MID_BILL_DATE \n");
  368. sqlstr.append(" , NVL(A.SUPP_DIRECT_YN,'N') AS SUPP_DIRECT_YN \n"); //2021.04.01(하도급직불여부 추가)
  369. sqlstr.append(" , NVL(A.LABOR_USE_YN,'N') AS LABOR_USE_YN \n"); //2022.03.21(노무비닷컴 사용여부 추가)
  370. sqlstr.append(" , ? \n");
  371. sqlstr.append(" , SYSDATE \n");
  372. sqlstr.append(" FROM SUB2000T A \n");
  373. sqlstr.append(" , SUB3000T B \n");
  374. sqlstr.append(" WHERE A.SUB_CONT_MOD_ID = B.SUB_CONT_MOD_ID \n");
  375. sqlstr.append(" AND B.SUB_CONT_REQ_ID = ? \n");
  376. sqlstr.append(" AND A.SUB_CONT_MOD_ID= ? \n");
  377. persistent.setStatement(sqlstr.toString());
  378. persistent.addParameter(maxSubContid);
  379. persistent.addParameter("99990");
  380. persistent.addParameter(valueObject.get("KEY_COL2"));
  381. persistent.addParameter(valueObject.get("KEY_COL1"));
  382. persistent.execute();
  383. return true;
  384. }
  385. catch(Exception e) {
  386. WAFLogger.error(this.getClass().getName() + " --> updUser() : " + e.getMessage());
  387. WAFLogger.error("SQL : " + sqlstr);
  388. WAFLogger.error(e);
  389. //WAFLogger.debug("Exception : " + e.getMessage());
  390. throw e;
  391. }
  392. }
  393. /**
  394. * 변경 계약 업체 정보 추가
  395. * @param connection
  396. * @param valueObject
  397. * @throws Exception
  398. */
  399. public boolean addChangeContSupport(Connection connection, ValueObject valueObject, String maxSubContid) throws Exception {
  400. //WAFLogger.debug("valueObject : " + valueObject);
  401. Persistent persistent = new PersistentImpl(connection);
  402. StrBuffer sqlstr = new StrBuffer();
  403. try {
  404. sqlstr.append("INSERT INTO CONT_OUT_SUPP \n");
  405. sqlstr.append(" ( SUB_CONT_MOD_ID \n");
  406. sqlstr.append(" , CORP_ID \n");
  407. sqlstr.append(" , SIGN_SEQ \n");
  408. sqlstr.append(" , VENDCD \n");
  409. sqlstr.append(" , MEMBER_NAME \n");
  410. sqlstr.append(" , BOSS_NAME \n");
  411. sqlstr.append(" , POST_CODE \n");
  412. sqlstr.append(" , ADDRESS \n");
  413. sqlstr.append(" , TEL_NUM \n");
  414. sqlstr.append(" , MEMBER_SLNO \n");
  415. sqlstr.append(" , USER_NAME \n");
  416. sqlstr.append(" , DIVISION \n");
  417. sqlstr.append(" , POSITION \n");
  418. sqlstr.append(" , HP \n");
  419. sqlstr.append(" , EMAIL \n");
  420. sqlstr.append(" , CRE_BY \n");
  421. sqlstr.append(" , CRE_DATE ) \n");
  422. sqlstr.append("SELECT ? \n");
  423. sqlstr.append(" , DECODE(SIGN_SEQ, 2, NVL(D.AFT_CORP_ID, A.CORP_ID), A.CORP_ID) \n");
  424. sqlstr.append(" , A.SIGN_SEQ \n");
  425. sqlstr.append(" , NVL(E.CORP_REG_NO, A.VENDCD) VENDCD \n");
  426. sqlstr.append(" , DECODE(SIGN_SEQ, 2, NVL(NVL(E.CORP_KOR, B.CORP_KOR), A.MEMBER_NAME), C.CORP_KOR) AS MEMBER_NAME \n");
  427. sqlstr.append(" , DECODE(SIGN_SEQ, 2, NVL(NVL(E.REP_NAME, B.REP_NAME), A.BOSS_NAME), C.REP_NAME) AS BOSS_NAME \n");
  428. sqlstr.append(" , DECODE(SIGN_SEQ, 2, NVL(NVL(E.POST_NO, B.POST_NO), A.POST_CODE), C.POST_NO) AS POST_CODE \n");
  429. sqlstr.append(" , DECODE(SIGN_SEQ, 2, NVL(NVL(E.ADDRESS, B.ADDRESS), A.ADDRESS), C.ADDRESS) AS ADDRESS \n");
  430. sqlstr.append(" , DECODE(SIGN_SEQ, 2, NVL(NVL(E.CORP_TEL, B.CORP_TEL), A.TEL_NUM), A.TEL_NUM) AS TEL_NUM \n");
  431. sqlstr.append(" , DECODE(SIGN_SEQ, 2, NVL(NVL(E.COPR_NO, B.COPR_NO), A.MEMBER_SLNO), C.COPR_NO) AS MEMBER_SLNO \n");
  432. sqlstr.append(" , A.USER_NAME \n");
  433. sqlstr.append(" , A.DIVISION \n");
  434. sqlstr.append(" , A.POSITION \n");
  435. sqlstr.append(" , A.HP \n");
  436. sqlstr.append(" , A.EMAIL \n");
  437. sqlstr.append(" , ? \n");
  438. sqlstr.append(" , SYSDATE \n");
  439. sqlstr.append(" FROM CONT_OUT_SUPP A, SUPP_INFO B ,HEAD_OFFICE_INFO C, SUB3000T D, SUPP_INFO E \n");
  440. sqlstr.append(" WHERE A.CORP_ID = B.CORP_ID(+) \n");
  441. sqlstr.append(" AND A.SUB_CONT_MOD_ID = D.SUB_CONT_MOD_ID \n");
  442. sqlstr.append(" AND D.AFT_CORP_ID = E.CORP_ID(+) \n");
  443. sqlstr.append(" AND D.SUB_CONT_REQ_ID = ? \n");
  444. sqlstr.append(" AND A.SUB_CONT_MOD_ID = ? \n");
  445. persistent.setStatement(sqlstr.toString());
  446. persistent.addParameter(maxSubContid);
  447. persistent.addParameter("99990");
  448. persistent.addParameter(valueObject.get("KEY_COL2"));
  449. persistent.addParameter(valueObject.get("KEY_COL1"));
  450. persistent.execute();
  451. return true;
  452. }
  453. catch(Exception e) {
  454. WAFLogger.error(this.getClass().getName() + " --> updUser() : " + e.getMessage());
  455. WAFLogger.error("SQL : " + sqlstr);
  456. WAFLogger.error(e);
  457. //WAFLogger.debug("Exception : " + e.getMessage());
  458. throw e;
  459. }
  460. }
  461. //2016.6.16 변경시행결의 결재완료알림
  462. public void Send_ToeTEC(ValueObject params) throws Exception {
  463. HandlerStorage Stroage = new HandlerStorage();
  464. MessageSend messageSend = new MessageSend(Stroage);
  465. ValueObject bid_Master = cont_info(params);
  466. StringBuffer mailtitle = new StringBuffer();
  467. StringBuffer mailtitlein = new StringBuffer();
  468. StringBuffer mailContent = new StringBuffer();
  469. mailtitle.append("* [알림]변경시행결의 승인");
  470. mailtitlein.append("* 변경시행결의 승인");
  471. mailContent.append("아래와 같이 변경시행결의가 완료되었음을 알려드립니다.<br>");
  472. mailContent.append("<style type='text/css'>");
  473. mailContent.append("td {font-size:12px;}");
  474. mailContent.append("</style>");
  475. mailContent.append("<font style='width:auto; font-size:12px; line-height:18px; padding:5px; text-align:left;'>");
  476. mailContent.append("<br>");
  477. mailContent.append("1.프로젝트 : " + bid_Master.get("DEPT_NAME") + "<br>");
  478. mailContent.append("2.계약번호 : " + bid_Master.get("CON_DOC_NO") + "<br>");
  479. mailContent.append("3.계약명 : " + bid_Master.get("BUILD_NAME") + "<br>");
  480. mailContent.append("4.외주담당자 : " + bid_Master.get("CON_CHARGE_NAME") + "<br>" );
  481. mailContent.append("5.계약업체 : " + bid_Master.get("MEMBER_NAME") + "<br>" );
  482. mailContent.append("6.변경금액 " );
  483. mailContent.append("<table width='700' cellspacing='0' cellpadding='0' bordercolordark='#FFFFFF' bordercolorlight='#AEAFAF' border='1'>" );
  484. mailContent.append("<tr><td align='Center' bgcolor='rgb(208,216,232)'>&nbsp;</td><td align='Center' bgcolor='rgb(208,216,232)'>원계약</td><td align='Center' bgcolor='rgb(208,216,232)'>변경계약</td><td align='Center' bgcolor='rgb(208,216,232)'>증감(▲▼)</td></tr>" );
  485. mailContent.append("<tr><td align='Center' bgcolor='rgb(208,216,232)'>도급금액</td><td align='Right'>&nbsp;" + bid_Master.get("BEF_CONT_AMT") + "</td><td align='Right'>&nbsp;" + bid_Master.get("AFT_CONT_AMT") + "</td><td align='Right'>&nbsp;" + bid_Master.get("CHG_CONT_AMT") + "</td></tr>" );
  486. mailContent.append("<tr><td align='Center' bgcolor='rgb(208,216,232)'>예산금액</td><td align='Right'>&nbsp;" + bid_Master.get("BEF_BUG_AMT") + "</td><td align='Right'>&nbsp;" + bid_Master.get("AFT_BUG_AMT") + "</td><td align='Right'>&nbsp;" + bid_Master.get("CHG_BUG_AMT") + "</td></tr>" );
  487. mailContent.append("<tr><td align='Center' bgcolor='rgb(208,216,232)'>계약금액</td><td align='Right'>&nbsp;" + bid_Master.get("BEF_SUPP_AMT") + "</td><td align='Right'>&nbsp;" + bid_Master.get("AFT_SUPP_AMT") + "</td><td align='Right'>&nbsp;" + bid_Master.get("CHG_SUPP_AMT") + "</td></tr>" );
  488. mailContent.append("<tr><td align='Center' bgcolor='rgb(208,216,232)'>기타</td><td align='Right'>&nbsp;" + bid_Master.get("BEF_ETC") + "</td><td align='Right'>&nbsp;" + bid_Master.get("AFT_ETC") + "</td><td align='Right'>&nbsp;" + bid_Master.get("CHG_ETC") + "</td></tr></table>" );
  489. mailContent.append("7.계약기간 : " +bid_Master.get("WORK_FROM_DT")+" ~ "+ bid_Master.get("WORK_END_DT")+ "<br>");
  490. mailContent.append("8.변경사유 <br>");
  491. mailContent.append("&nbsp;" + bid_Master.get("REMARK") + "<br>");
  492. mailContent.append("9.특기사항 <br>");
  493. mailContent.append("&nbsp;" + bid_Master.get("SP_REMARK") + "<br>");
  494. mailContent.append("10.비고 <br>");
  495. mailContent.append("&nbsp;1)계약시 추가 반영할 사항은 외주 담당자에게 연락하시기 바랍니다. <br>");
  496. mailContent.append("&nbsp;2)변경계약서는 변경시행결의 승인 후 1~2일 내 업체에 전달됩니다. <br>");
  497. mailContent.append("&nbsp;3)계약 완료 후 계약서 및 관련 서류는 전자조달시스템의 외주-계약결과에서 조회가능합니다. <br>");
  498. mailContent.append("</font><br>");
  499. //test
  500. messageSend.sendEmail(bid_Master.get("O_EMAIL"), "partner@sgc.co.kr", mailtitle.toString(), mailtitlein.toString(), mailContent, "1");
  501. //변경계약요청자
  502. if(!bid_Master.get("E_MAIL").isEmpty()){//
  503. messageSend.sendEmail(bid_Master.get("E_MAIL"), "partner@sgc.co.kr", mailtitle.toString(), mailtitlein.toString(), mailContent, "1");
  504. }
  505. }
  506. //2017.2.7 외주예산관리 추가
  507. public boolean addBcsCont(Connection connection, ValueObject valueObject, String maxSubContid) throws Exception {
  508. //WAFLogger.debug("valueObject : " + valueObject);
  509. Persistent persistent = new PersistentImpl(connection);
  510. StrBuffer sqlstr = new StrBuffer();
  511. try {
  512. sqlstr.append("INSERT INTO BCS_MR \n");
  513. sqlstr.append(" ( DEPT_CD \n");
  514. sqlstr.append(" ,MR_ID \n");
  515. sqlstr.append(" ,KIND_GB \n");
  516. sqlstr.append(" ,MR_NO \n");
  517. sqlstr.append(" ,TITLE \n");
  518. sqlstr.append(" ,CONAMT \n");
  519. sqlstr.append(" ,CONDATE \n");
  520. sqlstr.append(" ,CONT_ID \n");
  521. sqlstr.append(" ,CONT_MOD_ID \n");
  522. sqlstr.append(" ,VENDOR_NM \n");
  523. sqlstr.append(" ,CRE_DATE \n");
  524. sqlstr.append(" ,CRE_BY \n");
  525. sqlstr.append(" ,CURRENCY_GB ) \n");
  526. sqlstr.append(" SELECT A.DEPT_CD \n");//DEPT_CD
  527. sqlstr.append(" , (SELECT DECODE(COUNT(*), 0, 1, MAX(MR_ID)+1) FROM BCS_MR WHERE DEPT_CD = A.DEPT_CD ) \n");//MR_ID
  528. sqlstr.append(" , 'O' \n");//DEMANDED_KIND
  529. sqlstr.append(" , SUBSTR(A.REQ_DOC_NO, 11, LENGTH(A.REQ_DOC_NO)-10) \n");//MR_NO
  530. sqlstr.append(" , A.BUILD_NAME \n");//TITLE
  531. sqlstr.append(" , B.AFT_SUPP_AMT \n");//CONAMT
  532. sqlstr.append(" , SYSDATE \n");//CONDATE
  533. sqlstr.append(" , A.SUB_CONT_ID \n");//CONT_ID
  534. sqlstr.append(" , ? \n");//CONT_MOD_ID
  535. sqlstr.append(" , NVL(D.CORP_KOR, C.MEMBER_NAME) MEMBER_NAME \n");//VENDOR_NM
  536. sqlstr.append(" , SYSDATE \n");//CRE_DATE
  537. sqlstr.append(" , 999 \n");//CRE_BY
  538. sqlstr.append(" , A.CON_CUR_CD \n");//CURRENCY_GB
  539. sqlstr.append(" FROM SUB2000T A \n");
  540. sqlstr.append(" , SUB3000T B \n");
  541. sqlstr.append(" , CONT_OUT_SUPP C \n");
  542. sqlstr.append(" , SUPP_INFO D \n");
  543. sqlstr.append(" WHERE A.SUB_CONT_MOD_ID = B.SUB_CONT_MOD_ID \n");
  544. sqlstr.append(" AND A.SUB_CONT_MOD_ID = C.SUB_CONT_MOD_ID \n");
  545. sqlstr.append(" AND C.SIGN_SEQ = 2 \n");
  546. sqlstr.append(" AND B.AFT_CORP_ID = D.CORP_ID(+) \n");
  547. sqlstr.append(" AND B.SUB_CONT_REQ_ID = ? \n");
  548. sqlstr.append(" AND A.SUB_CONT_MOD_ID= ? \n");
  549. persistent.setStatement(sqlstr.toString());
  550. persistent.addParameter(maxSubContid);
  551. persistent.addParameter(valueObject.get("KEY_COL2"));
  552. persistent.addParameter(valueObject.get("KEY_COL1"));
  553. persistent.execute();
  554. return true;
  555. }
  556. catch(Exception e) {
  557. WAFLogger.error(this.getClass().getName() + " --> updUser() : " + e.getMessage());
  558. WAFLogger.error("SQL : " + sqlstr);
  559. WAFLogger.error(e);
  560. //WAFLogger.debug("Exception : " + e.getMessage());
  561. throw e;
  562. }
  563. }
  564. //2018.10.31 외주내역추가
  565. public boolean addContItem(Connection connection, ValueObject valueObject, String maxSubContid) throws Exception {
  566. //WAFLogger.debug("valueObject : " + valueObject);
  567. Persistent persistent = new PersistentImpl(connection);
  568. StrBuffer sqlstr = new StrBuffer();
  569. try {
  570. sqlstr.append("INSERT INTO CONT_OUT_ITEM ( \n");
  571. sqlstr.append(" SUB_CONT_MOD_ID \n");
  572. sqlstr.append(" ,SQ_CORD \n");
  573. sqlstr.append(" ,NO_CORD \n");
  574. sqlstr.append(" ,SUB_CONT_ID \n");
  575. sqlstr.append(" ,MATERIAL_CD \n");
  576. sqlstr.append(" ,ITEM_NAME \n");
  577. sqlstr.append(" ,SUPPLY_TAMT \n");
  578. sqlstr.append(" ,SUPPLY_NAMT \n");
  579. sqlstr.append(" ,SUPPLY_AMT \n");
  580. sqlstr.append(" ,CD_CORD \n");
  581. sqlstr.append(" ,SEQ_BUDGET \n");
  582. sqlstr.append(" ,SQ_BUDGET \n");
  583. sqlstr.append(" ,CD_CSTR \n");
  584. sqlstr.append(" ,DL_CSTR \n");
  585. sqlstr.append(" ,CD_ACT \n");
  586. sqlstr.append(" ,NM_CSTR \n");
  587. sqlstr.append(" ,CD_SIZE \n");
  588. sqlstr.append(" ,SIZE_CSTR \n");
  589. sqlstr.append(" ,UNIT_CSTR \n");
  590. sqlstr.append(" ,QTY_ORD \n");
  591. sqlstr.append(" ,UNT_ORD \n");
  592. sqlstr.append(" ,AMT_ORD \n");
  593. sqlstr.append(" ,QTY_ACT \n");
  594. sqlstr.append(" ,UNT_ACT \n");
  595. sqlstr.append(" ,AMT_ACT \n");
  596. sqlstr.append(" ,QTY_TRNS_ORD \n");
  597. sqlstr.append(" ,UNT_TRNS_ORD \n");
  598. sqlstr.append(" ,AMT_TRNS_ORD \n");
  599. sqlstr.append(" ,QTY_TRNS_ACT \n");
  600. sqlstr.append(" ,UNT_TRNS_ACT \n");
  601. sqlstr.append(" ,AMT_TRNS_ACT \n");
  602. sqlstr.append(" ,QTY_CORD \n");
  603. sqlstr.append(" ,CRE_BY \n");
  604. sqlstr.append(" ,CRE_DATE \n");
  605. sqlstr.append(") \n");
  606. sqlstr.append("SELECT ? AS SUB_CONT_MOD_ID \n");
  607. sqlstr.append(" ,A.SQ_CORD \n");
  608. sqlstr.append(" ,A.NO_CORD \n");
  609. sqlstr.append(" ,(SELECT SUB_CONT_ID FROM SUB2000T WHERE SUB_CONT_MOD_ID = ?) AS SUB_CONT_ID \n");
  610. sqlstr.append(" ,'0101'||A.CD_CSTR||A.DL_CSTR AS MATERAIL_CD \n");
  611. sqlstr.append(" ,A.NM_CSTR AS ITEM_NAME \n");
  612. sqlstr.append(" ,NVL(B.SUPPLY_TAMT,0) AS SUPPLY_TAMT \n");
  613. sqlstr.append(" ,NVL(B.SUPPLY_NAMT,0) AS SUPPLY_NAMT \n");
  614. sqlstr.append(" ,NVL(B.SUPPLY_AMT,0) AS SUPPLY_AMT \n");
  615. sqlstr.append(" ,A.CD_CORD \n");
  616. sqlstr.append(" ,A.SEQ_BUDGET \n");
  617. sqlstr.append(" ,A.SQ_BUDGET \n");
  618. sqlstr.append(" ,A.CD_CSTR \n");
  619. sqlstr.append(" ,A.DL_CSTR \n");
  620. sqlstr.append(" ,A.CD_ACT \n");
  621. sqlstr.append(" ,A.NM_CSTR \n");
  622. sqlstr.append(" ,A.CD_SIZE \n");
  623. sqlstr.append(" ,A.SIZE_CSTR \n");
  624. sqlstr.append(" ,A.UNIT_CSTR \n");
  625. sqlstr.append(" ,A.QTY_ORD \n");
  626. sqlstr.append(" ,A.UNT_ORD \n");
  627. sqlstr.append(" ,A.AMT_ORD \n");
  628. sqlstr.append(" ,A.QTY_ACT \n");
  629. sqlstr.append(" ,A.UNT_ACT \n");
  630. sqlstr.append(" ,A.AMT_ACT \n");
  631. sqlstr.append(" ,A.QTY_TRNS_ORD \n");
  632. sqlstr.append(" ,A.UNT_TRNS_ORD \n");
  633. sqlstr.append(" ,A.AMT_TRNS_ORD \n");
  634. sqlstr.append(" ,A.QTY_TRNS_ACT \n");
  635. sqlstr.append(" ,A.UNT_TRNS_ACT \n");
  636. sqlstr.append(" ,A.AMT_TRNS_ACT \n");
  637. sqlstr.append(" ,A.QTY_CORD \n");
  638. sqlstr.append(" ,A.CRE_BY \n");
  639. sqlstr.append(" ,SYSDATE \n");
  640. sqlstr.append("FROM SUB3000T_DETAIL A \n");
  641. sqlstr.append(" ,( \n");
  642. sqlstr.append(" SELECT * \n");
  643. sqlstr.append(" FROM CONT_OUT_ITEM \n");
  644. sqlstr.append(" WHERE SUB_CONT_MOD_ID = ? \n");
  645. sqlstr.append(" ) B \n");
  646. sqlstr.append("WHERE A.CD_CSTR = B.CD_CSTR(+) \n");
  647. sqlstr.append("AND A.DL_CSTR = B.DL_CSTR(+) \n");
  648. sqlstr.append("AND A.SUB_CONT_REQ_ID = ? \n");
  649. sqlstr.append("ORDER BY A.SQ_CORD, A.NO_CORD \n");
  650. persistent.setStatement(sqlstr.toString());
  651. persistent.addParameter(maxSubContid);
  652. persistent.addParameter(valueObject.get("KEY_COL1"));
  653. persistent.addParameter(valueObject.get("KEY_COL1"));
  654. persistent.addParameter(valueObject.get("KEY_COL2"));
  655. persistent.execute();
  656. return true;
  657. }
  658. catch(Exception e) {
  659. WAFLogger.error(this.getClass().getName() + " --> addContItem() : " + e.getMessage());
  660. WAFLogger.error("SQL : " + sqlstr);
  661. WAFLogger.error(e);
  662. //WAFLogger.debug("Exception : " + e.getMessage());
  663. throw e;
  664. }
  665. }
  666. public ValueObject cont_info(ValueObject param) {
  667. Search search = new SearchImpl();
  668. ValueObject valueobject = null;
  669. RowSet rowSet = new RowSetImpl();
  670. StrBuffer sqlstr = new StrBuffer();
  671. try{
  672. sqlstr.append(" SELECT A.DEPT_NAME \n");
  673. sqlstr.append(" , A.CON_DOC_NO \n");
  674. sqlstr.append(" , A.BUILD_NAME \n");
  675. sqlstr.append(" , A.CON_CHARGE_NAME \n");
  676. sqlstr.append(" , NVL(F.CORP_KOR, C.MEMBER_NAME) MEMBER_NAME \n");
  677. sqlstr.append(" , F_GET_D_CURRENCY(B.BEF_CONT_AMT, 0) BEF_CONT_AMT \n");
  678. sqlstr.append(" , F_GET_D_CURRENCY(B.AFT_CONT_AMT, 0) AFT_CONT_AMT \n");
  679. sqlstr.append(" , F_GET_D_CURRENCY(B.CHG_CONT_AMT, 0) CHG_CONT_AMT \n");
  680. sqlstr.append(" , F_GET_D_CURRENCY(B.BEF_BUG_AMT, 0) BEF_BUG_AMT \n");
  681. sqlstr.append(" , F_GET_D_CURRENCY(B.AFT_BUG_AMT, 0) AFT_BUG_AMT \n");
  682. sqlstr.append(" , F_GET_D_CURRENCY(B.CHG_BUG_AMT, 0) CHG_BUG_AMT \n");
  683. sqlstr.append(" , F_GET_D_CURRENCY(B.BEF_SUPP_AMT,F_GET_CURRENCY_DIGIT(A.CON_CUR_CD)) BEF_SUPP_AMT \n");
  684. sqlstr.append(" , F_GET_D_CURRENCY(B.AFT_SUPP_AMT,F_GET_CURRENCY_DIGIT(A.CON_CUR_CD)) AFT_SUPP_AMT \n");
  685. sqlstr.append(" , F_GET_D_CURRENCY(B.CHG_SUPP_AMT,F_GET_CURRENCY_DIGIT(A.CON_CUR_CD)) CHG_SUPP_AMT \n");
  686. sqlstr.append(" , A.START_WORK_DATE \n");
  687. sqlstr.append(" , TO_CHAR(A.START_WORK_DATE, 'YYYY-MM-DD') WORK_FROM_DT \n");
  688. sqlstr.append(" , TO_CHAR(TO_DATE(B.AFT_CONT_DATE), 'YYYY-MM-DD') WORK_END_DT \n");
  689. sqlstr.append(" , B.BEF_ETC \n");
  690. sqlstr.append(" , B.AFT_ETC \n");
  691. sqlstr.append(" , B.CHG_ETC \n");
  692. sqlstr.append(" , B.REMARK \n");
  693. sqlstr.append(" , B.SP_REMARK \n");
  694. sqlstr.append(" , D.E_MAIL \n");
  695. sqlstr.append(" , E.EMAIL O_EMAIL \n");
  696. sqlstr.append(" FROM SUB2000T A \n");
  697. sqlstr.append(" ,SUB3000T B \n");
  698. sqlstr.append(" ,CONT_OUT_SUPP C \n");
  699. sqlstr.append(" ,PUB0120T D \n");
  700. sqlstr.append(" ,CONT_OUT_SUPP E \n");
  701. sqlstr.append(" ,SUPP_INFO F \n");
  702. sqlstr.append(" WHERE A.SUB_CONT_MOD_ID = B.SUB_CONT_MOD_ID \n");
  703. sqlstr.append(" AND A.SUB_CONT_MOD_ID = C.SUB_CONT_MOD_ID \n");
  704. sqlstr.append(" AND C.SIGN_SEQ = 2 \n");
  705. sqlstr.append(" AND A.SUB_CONT_MOD_ID = E.SUB_CONT_MOD_ID \n");
  706. sqlstr.append(" AND E.SIGN_SEQ = 1 \n");
  707. sqlstr.append(" AND B.CRE_BY = TO_CHAR(D.ACCT_ID) \n");
  708. sqlstr.append(" AND B.AFT_CORP_ID = F.CORP_ID(+) \n");
  709. sqlstr.append(" AND B.SUB_CONT_MOD_ID = ? \n");
  710. sqlstr.append(" AND B.SUB_CONT_REQ_ID = ? \n");
  711. search.setStatement(sqlstr.toString());
  712. search.addParameter(param.get("KEY_COL1"));
  713. search.addParameter(param.get("KEY_COL2"));
  714. search.setStatement(sqlstr.toString());
  715. rowSet = search.execute();
  716. if( rowSet != null && rowSet.size() > 0 ){
  717. valueobject = RowSetUtility.getValueObject(rowSet.getRow(0));
  718. }
  719. }
  720. catch (WAFSQLException se) {
  721. Logger.err.println("SQL : \n" + se.getStatement());
  722. Logger.err.println("PARAM : \n" + se.getParameter());
  723. }
  724. return valueobject;
  725. }
  726. }