123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- /**
- * @(#)file BidPlanSignDriver.java
- * @(#)author Son hyungmin
- * @(#)version 1.0
- * @(#)date 2014-09-29
- * @(#)since JDK 1.4.2
- *
- * Copyright (c) www.dcchem.co.kr, Inc.
- * All rights reserved.
- * This software is the proprietary information of dcchem, Inc.
- */
- package kr.co.udapsoft.common.commonSign.driver;
- import java.sql.Connection;
- import kr.co.hsnc.common.base.WAFLogger;
- import kr.co.hsnc.common.sql.persistent.Persistent;
- import kr.co.hsnc.common.sql.persistent.PersistentImpl;
- import kr.co.hsnc.common.util.ValueObject;
- import kr.co.udapsoft.common.commonSign.CommonSignInterface;
- /**
- *
- * @version 1.0
- * @author Beomgeun Lee
- */
- public class OInsurSignDriver implements CommonSignInterface {
- /**
- * 테슽 파일
- *
- */
- public OInsurSignDriver() {
- super();
- }
- /*
- * (non-Javadoc)
- * @see kr.co.udap.ehr.common.sign.SignInterface#doCallSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
- */
- public void doCallSign(Connection connection, ValueObject signDoc) throws Exception {
- System.out.println("!!doCallSign");
- }
- /*
- * (non-Javadoc)
- * @see kr.co.udap.ehr.common.sign.SignInterface#doStartSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
- */
- public void doStartSign(Connection connection, ValueObject signDoc) throws Exception {
- System.out.println("!!doStartSign");
- }
- /*
- * (non-Javadoc)
- * @see kr.co.udap.ehr.common.sign.SignInterface#doFirstFinishSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
- */
- public void doFirstFinishSign(Connection connection, ValueObject signDoc) throws Exception {
- System.out.println("!!doFirstFinishSign");
- }
-
- /*
- * (non-Javadoc)
- * @see kr.co.udap.ehr.common.sign.SignInterface#doFinishSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
- */
- public void doFinishSign(Connection connection, ValueObject signDoc) throws Exception {
- System.out.println("!!doFinishSign");
- updateMaster(connection, signDoc);
- }
- /*
- * (non-Javadoc)
- * @see kr.co.udap.ehr.common.sign.SignInterface#doRejectSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
- */
- public void doFirstRejectSign(Connection connection, ValueObject signDoc) throws Exception {
- System.out.println("!!doFirstRejectSign");
- updateMaster(connection, signDoc);
- }
- /*
- * (non-Javadoc)
- * @see kr.co.udap.ehr.common.sign.SignInterface#doRejectSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
- */
- public void doRejectSign(Connection connection, ValueObject signDoc) throws Exception {
- System.out.println("!!doRejectSign");
- updateMaster(connection, signDoc);
-
- }
- /*
- * (non-Javadoc)
- * @see kr.co.udap.ehr.common.sign.SignInterface#doCancelSign(java.sql.Connection, com.udapsoft.common.util.ValueObject)
- */
- public void doCancelSign(Connection connection, ValueObject signDoc) throws Exception {
- System.out.println("!!doCancelSign");
- updateMaster(connection, signDoc);
- }
-
-
- /**
- * SAC01001 상태값을 업데이트해준다.
- * @param connection
- * @param valueObject
- * @throws Exception
- */
- public void updateMaster(Connection connection, ValueObject vo) throws Exception {
- Persistent persistent = new PersistentImpl(connection);
- StringBuffer sqlstr = null;
-
- try {
- sqlstr = new StringBuffer();
- String status = "";
- if(vo.get("SIGN_DECI_CLASS").equals("24")){
- status = "10";//결재완료
- }else {
- status = "09";//반려
- }
- //2018.08.16 구매,외주 구분
- if (vo.get("KEY_COL2").equals("P")){
- sqlstr.append(" UPDATE CONT_PUR_INSUR \n");
- sqlstr.append(" SET STATUS_CD = ? \n");
- sqlstr.append(" WHERE PUR_CONT_MOD_ID = ? \n");
- }else {
- sqlstr.append(" UPDATE CONT_OUT_INSUR \n");
- sqlstr.append(" SET STATUS_CD = ? \n");
- sqlstr.append(" WHERE SUB_CONT_MOD_ID = ? \n");
- }
- persistent.setStatement(sqlstr.toString());
- persistent.addParameter(status);
- persistent.addParameter(vo.get("KEY_COL1"));
- persistent.execute();
- }
- catch(Exception e) {
- WAFLogger.error(this.getClass().getName() + " --> updateSac01001() : " + e.getMessage());
- WAFLogger.error("SQL : " + sqlstr);
- WAFLogger.error(e);
- throw e;
- }
- }
- }
|