package com.eactive.eai.common.logger;

import com.eactive.eai.common.dao.Keys;

/** 
 * 1. 기능 : EAI에서 처리되는 모든 On-Line 거래를 데이터베이스에 로깅하기 위한 운영관리 Logger Query Object
 * 2. 처리 개요 : 
 *     - TSEAILG01(EAI서비스로그), TSEAILG02(로그ALTKEY정보), TSEAILG03(EAI로그업무데이터서브정보), TSEAILG04(EAI서비스오류정보) insert Query
 * 3. 주의사항 
 *
 * @author  : 전영석(amjang@evalleyvs.com)
 * @version : v 1.0.0
 * @see : IMSAdapterListener, IMSRecord
 * @since   :JDK v1.4.2
 */
public interface EAILogQuery 
{ 
     /**
     * 1. 기능 : EAI 서비스 로그 셋팅
     * 2. 처리 개요 : 
     *    - TSEAILG01(EAI서비스로그) 로그값 셋팅
     * 3. 주의사항
     **/
    public static final String ADD_EAI_SVC_LOG 
            = " INSERT INTO " + Keys.TABLE_OWNER + "#{LOG_MASTER_TABLE} ( \n"
            //EAI업무공통부
            + "     EAIBZWKDSTCD, MSGDPSTYMS, EAISVCSERNO, LOGPRCSSSERNO, EAISEVRINSTNCNAME, \n"
            + "     EAISVCNAME, SVCHMSEONOT, SVCMOTIVUSEDSTCD, SVCPRCSSDSTICNAME, FLOWCTRLROUTNAME, \n"
            + "     INTGRADSTICNAME, GSTATSVCDSTICNAME, SVCPRCSSNO, SVCBFCLMNLOGYN, STNDMSGUSEYN, \n"
            + "     GSTATSYSADPTRBZWKGROUPNAME, PRSNTMSGIDNAME, RSPNSERRCDNAME, MSGPRCSSYMS, SEVRLOGLVELNO, \n"
            + "     SVCLOGLVELNO, ERREAISVCNAME, DMNDERRCHNGIDNAME, DMNDERRFLDNAME, RSPNSERRCHNGIDNAME, \n"
            + "     RSPNSERRFLDNAME, PSVINTFACDSTICNAME, PSVBZWKSYSNAME, PSVSYSIDNAME, PSVSYSSVCDSTICNAME, \n"
            + "     PSVSYSADPTRBZWKGROUPNAME, FLOVRYN, CHNGYN, CHNGMSGIDNAME, INPTMSGIDNAME, \n"
            + "     BASCRSPNSMSGCMPRCTNT, BASCRSPNSCHNGYN, BASCRSPNSCHNGMSGIDNAME, ERRRSPNSMSGCMPRCTNT, ERRRSPNSCHNGYN, \n"
            + "     ERRRSPNSCHNGMSGIDNAME, NEXTSVCPRCSSNO, OUTBNDROUTNAME, TOUTVAL, CMPENSVCPRCSSNAME, \n"
            + "     SUPPLBZWKDATAYN, KEYMGTMSGCTNT, TRACKASISKEY1CTNT, TRACKASISKEY2CTNT, TRACKASISKEY3CTNT, \n"
            + "     TRACKASISKEY4CTNT, EAIGROUPCODSTCD, PGUID, TRANTYPE, RSPNSCHNGMSGTYPE, \n"
            + "     EAIERRCD, EAIERRCTNT, SEVRGROUPNAME, COMPANYCODE, SPLIZLENGTH, ADPTRINSTICODE, \n"
            + "     TXID, REFKEY, EXTBIZCD, \n"
            + "     BZWKDATACTNT, STDLAYOUTNAME, CLIENTID \n"
            + " ) VALUES ( \n"
            //EAI업무공통부
            + "     ?, ?, ?, ?, ?, \n"	//index to  5
            + "     ?, ?, ?, ?, ?, \n"	//index to 10
            + "     ?, ?, ?, ?, ?, \n"	//index to 15
            + "     ?, ?, ?, ?, ?, \n"	//index to 20
            + "     ?, ?, ?, ?, ?, \n"	//index to 25
            + "     ?, ?, ?, ?, ?, \n"	//index to 30
            + "     ?, ?, ?, ?, ?, \n"	//index to 35
            + "     ?, ?, ?, ?, ?, \n"	//index to 40
            + "     ?, ?, ?, ?, ?, \n"  //index to 45
            + "     ?, ?, ?, ?, ?, \n"	//index to 50
            + "     ?, ?, ?, ?, ?, \n"  //index to 55
            + "     ?, ?, ?, ?, ?, \n"  //index to 60
            + "     ?, ?, ?, ?,\n"  //index to 61
            + "     ?, ?, ? \n"	// 62~66
            + ") ";
    
    /**
     * 1. 기능 : 업무데이터 서브 로그 셋팅
     * 2. 처리 개요 : 
     *    - TSEAILG03(EAI로그업무데이터서브정보) 로그값 셋팅
     * 3. 주의사항
     **/
    public static final String ADD_BWK_DATA_SUB 
    = " INSERT INTO " + Keys.TABLE_OWNER + "#{LOG_SLAVE_TABLE} ( \n"
    + "     EAIBZWKDSTCD, MSGDPSTYMS, EAISVCSERNO, BZWKDATASERNO, LOGPRCSSSERNO \n"
    + "   , BZWKDATACTNT \n"
    + " ) VALUES  ( \n"
    + "     ?, ?, ?, ?, ? \n"
    + "   , ? \n"
    + " ) ";
    
    public static final String ERROR_LOG 
    = " INSERT INTO " + Keys.TABLE_OWNER + "#{LOG_SLAVE_TABLE} ( \n"
    + "     EAIBZWKDSTCD, MSGDPSTYMS, EAISVCSERNO, LOGPRCSSSERNO, EAISVCNAME \n"
    + "   , RSPNSERRCDNAME, GSTATSYSADPTRBZWKGROUPNAME,  PSVSYSADPTRBZWKGROUPNAME, EAIERRCD, EAIERRCTNT \n"
    + "   , EAISEVRINSTNCNAME,  LGINGSYSID,  MSGPRCSSYMS, EAIGROUPCODSTCD \n"
    + " ) VALUES  ( \n"
    + "     ?, ?, ?, ?, ? \n"
    + "   , ?, ?, ?, ?, ? \n"
    + "   , ?, ?, ?, ? \n"
    + " ) ";
    
    
    public static final String STATIC_LOG 
    = " INSERT INTO " + Keys.TABLE_OWNER + "TSEAISR01 ( \n"
    + "     BASEYMD, BASEHH, BASEHHMM, EAIBZWKDSTCD, EAISVCNAME \n"
    + "   , EAISEVRINSTNCNAME, EAIPRCSSTTMVAL, EAIPSVPRCSSTTMVAL, EAITOTALPRCSSTTMVAL, WHOLPRCSSNOITM \n"
    + "   , ERRZNOITM,  TOUTNOITM,  NOMALNOITM \n"
    + " ) VALUES  ( \n"
    + "     ?, ?, ?, ?, ? \n"
    + "   , ?, ?, ?, ?, ? \n"
    + "   , ?, ?, ? \n"
    + " ) ";
    
    
    public static final String STATIC_TRANCD_LOG 
    = " INSERT INTO " + Keys.TABLE_OWNER + "TSEAISR02 ( \n"
    + "     BASEYMD, BASEHH, BASEHHMM, EAIBZWKDSTCD, EAISVCNAME \n"
    + "   , INTFACSENDTRANCD, EAISEVRINSTNCNAME ,EAIPRCSSTTMVAL,  EAIPSVPRCSSTTMVAL, EAITOTALPRCSSTTMVAL \n"
    + "   , WHOLPRCSSNOITM, ERRZNOITM,  TOUTNOITM,  NOMALNOITM \n"
    + " ) VALUES  ( \n"
    + "     ?, ?, ?, ?, ? \n"
    + "   , ?, ?, ?, ?, ? \n"
    + "   , ?, ?, ?, ? \n"
    + " ) ";
    
    public static final String STATIC_SCREEN_LOG 
    = " INSERT INTO " + Keys.TABLE_OWNER + "TSEAISR03 ( \n"
    + "     BASEYMD, BASEHH, BASEHHMM, EAIBZWKDSTCD, EAISVCNAME \n"
    + "   , SCRENNO, EAISEVRINSTNCNAME, EAIPRCSSTTMVAL, EAIPSVPRCSSTTMVAL, EAITOTALPRCSSTTMVAL \n"
    + "   , WHOLPRCSSNOITM, ERRZNOITM,  TOUTNOITM,  NOMALNOITM \n"
    + " ) VALUES  ( \n"
    + "     ?, ?, ?, ?, ? \n"
    + "   , ?, ?, ?, ?, ? \n"
    + "   , ?, ?, ?, ? \n"
    + " ) ";
    
    public static final String STATIC_ADAPTER_LOG 
    = " INSERT INTO " + Keys.TABLE_OWNER + "TSEAISR04 ( \n"
    + "     BASEYMD, BASEHH, BASEHHMM, EAIBZWKDSTCD, EAISVCNAME \n"
    + "   , ADPTRBZWKGROUPNAME, EAISEVRINSTNCNAME, EAIPRCSSTTMVAL, EAIPSVPRCSSTTMVAL, EAITOTALPRCSSTTMVAL \n"
    + "   , WHOLPRCSSNOITM, ERRZNOITM,  TOUTNOITM,  NOMALNOITM \n"
    + " ) VALUES  ( \n"
    + "     ?, ?, ?, ?, ? \n"
    + "   , ?, ?, ?, ?, ? \n"
    + "   , ?, ?, ?, ? \n"
    + " ) ";
    
    public static final String CHECK_DB = "select 1";
} 
