FileFetchRequestHandler 구현
This commit is contained in:
@@ -170,6 +170,11 @@ public class BatchDirUtil
|
||||
// public static final String RESPONSE_RCV_CHK_DIR = "rcv.chk.directory";
|
||||
public static final String RESPONSE_RCV_ROOT_EXT = "rcv.root.ext";
|
||||
|
||||
public static final String RETENTION_DAY_ROOT = "retension.day.root";
|
||||
public static final String RETENTION_DAY_REAL = "retension.day.real";
|
||||
public static final String RETENTION_DAY_ARCH = "retension.day.arch";
|
||||
public static final String RETENTION_DAY_ERROR = "retension.day.error";
|
||||
|
||||
// 응답송신용 디렉토리 프라퍼티 키 정보 20060425 add by khs
|
||||
// public static final String RESPONSE_SND_DIR_INFO = "ResponseSndDirInfo";
|
||||
// public static final String RESPONSE_SND_REAL_DIR = "snd.real.directory";
|
||||
|
||||
@@ -113,7 +113,7 @@ public class StringUtil
|
||||
|
||||
public static String itos(int i)
|
||||
{
|
||||
return (new Integer(i)).toString();
|
||||
return Integer.toString(i);
|
||||
}
|
||||
|
||||
public static String replaceStr(String s, String s1, String s2) throws NullPointerException
|
||||
|
||||
@@ -63,8 +63,8 @@ public class EncryptManager implements Lifecycle
|
||||
{
|
||||
for(int i=65; i<91; i++)
|
||||
{
|
||||
String key = new Character((char)i).toString();
|
||||
String value = new Integer(100 - i).toString();
|
||||
String key = Character.toString((char) i);
|
||||
String value = Integer.toString(100 - i);
|
||||
|
||||
codeTable.put(key, value);
|
||||
codeTable.put(value, key);
|
||||
@@ -72,8 +72,8 @@ public class EncryptManager implements Lifecycle
|
||||
|
||||
for(int i=0; i<10; i++)
|
||||
{
|
||||
String key = new Integer(i).toString();
|
||||
String value = new Integer(9-i).toString();
|
||||
String key = Integer.toString(i);
|
||||
String value = Integer.toString(9 - i);
|
||||
codeTable.put(key, value);
|
||||
}
|
||||
//logger.debug("** if Hashtable : A = : " + codeTable.get("A"));
|
||||
@@ -169,9 +169,9 @@ public class EncryptManager implements Lifecycle
|
||||
/* 암호화 문장 생성 */
|
||||
for(int i=0; i<16; i++)
|
||||
{
|
||||
int m_Msg = new Integer((String)codeTable.get(transferPwd.substring(i, i+1))).intValue();
|
||||
int m_Key = new Integer((String)codeTable.get(encryptSeed.substring(i, i+1))).intValue();
|
||||
encryptMsg += (String)codeTable.get(new Integer((m_Msg + m_Key) % 36).toString());
|
||||
int m_Msg = Integer.parseInt((String) codeTable.get(transferPwd.substring(i, i + 1)));
|
||||
int m_Key = Integer.parseInt((String) codeTable.get(encryptSeed.substring(i, i + 1)));
|
||||
encryptMsg += (String)codeTable.get(Integer.toString((m_Msg + m_Key) % 36));
|
||||
}
|
||||
|
||||
return encryptMsg;
|
||||
@@ -231,9 +231,9 @@ public class EncryptManager implements Lifecycle
|
||||
/* 암호화 문장 생성 */
|
||||
for(int i=0; i<16; i++)
|
||||
{
|
||||
int m_Msg = new Integer((String)codeTable.get(transferPwd.substring(i, i+1))).intValue();
|
||||
int m_Key = new Integer((String)codeTable.get(encryptSeed.substring(i, i+1))).intValue();
|
||||
encryptMsg += (String)codeTable.get(new Integer((m_Msg + m_Key) % 36).toString());
|
||||
int m_Msg = Integer.parseInt((String) codeTable.get(transferPwd.substring(i, i + 1)));
|
||||
int m_Key = Integer.parseInt((String) codeTable.get(encryptSeed.substring(i, i + 1)));
|
||||
encryptMsg += (String)codeTable.get(Integer.toString((m_Msg + m_Key) % 36));
|
||||
}
|
||||
|
||||
return encryptMsg;
|
||||
@@ -258,9 +258,9 @@ public class EncryptManager implements Lifecycle
|
||||
|
||||
for(int i=0; i<16; i++)
|
||||
{
|
||||
int m_Msg = new Integer((String)codeTable.get(encryptMsg.substring(i, i+1))).intValue() + 36;
|
||||
int m_Key = new Integer((String)codeTable.get(seed.substring(i, i+1))).intValue();
|
||||
normalMsg += (String)codeTable.get(new Integer((m_Msg - m_Key) % 36).toString());
|
||||
int m_Msg = Integer.parseInt((String) codeTable.get(encryptMsg.substring(i, i + 1))) + 36;
|
||||
int m_Key = Integer.parseInt((String) codeTable.get(seed.substring(i, i + 1)));
|
||||
normalMsg += (String)codeTable.get(Integer.toString((m_Msg - m_Key) % 36));
|
||||
}
|
||||
|
||||
return normalMsg;
|
||||
@@ -347,9 +347,9 @@ public class EncryptManager implements Lifecycle
|
||||
/* 암호화 문장 생성 */
|
||||
for(int i=0; i<transferPwd.length(); i++)
|
||||
{
|
||||
int m_Msg = new Integer((String)codeTable.get(transferPwd.substring(i, i+1))).intValue();
|
||||
int m_Key = new Integer((String)codeTable.get(encryptSeed.substring(i, i+1))).intValue();
|
||||
encryptMsg += (String)codeTable.get(new Integer((m_Msg + m_Key) % 36).toString());
|
||||
int m_Msg = Integer.parseInt((String) codeTable.get(transferPwd.substring(i, i + 1)));
|
||||
int m_Key = Integer.parseInt((String) codeTable.get(encryptSeed.substring(i, i + 1)));
|
||||
encryptMsg += (String)codeTable.get(Integer.toString((m_Msg + m_Key) % 36));
|
||||
}
|
||||
|
||||
return encryptMsg;
|
||||
|
||||
@@ -24,6 +24,12 @@ public class FTPFileObject {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FTPFileObject{" +
|
||||
"file=" + file +
|
||||
", name='" + name + '\'' +
|
||||
", size=" + size +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public class BatchJobPriorityManager implements Serializable
|
||||
}
|
||||
|
||||
public synchronized void setDelaySec(String uuid, long sec){
|
||||
hmDelays.put(uuid, new Long(sec));
|
||||
hmDelays.put(uuid, sec);
|
||||
}
|
||||
|
||||
public synchronized boolean hasDelaySec(String uuid){
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.eactive.eai.batch.scheduler;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class JobStatusVO implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String bjobMsgScheID;
|
||||
private String bjobDmndSubMsgID;
|
||||
private String bjobDmndMsgCretnHMS;
|
||||
private String tranStartHMS;
|
||||
private String tranEndHMS;
|
||||
private String tranPrcssDstcd;
|
||||
private String EAIObstclOccurCausCtnt;
|
||||
//private String sndrcvFileName;
|
||||
|
||||
public String toString() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("bjobMsgScheID = [" + bjobMsgScheID + "]\n");
|
||||
sb.append("bjobDmndSubMsgID = [" + bjobDmndSubMsgID + "]\n");
|
||||
sb.append("bjobDmndMsgCretnHMS = [" + bjobDmndMsgCretnHMS + "]\n");
|
||||
sb.append("tranStartHMS = [" + tranStartHMS + "]\n");
|
||||
sb.append("tranEndHMS = [" + tranEndHMS + "]\n");
|
||||
sb.append("tranPrcssDstcd = [" + tranPrcssDstcd + "]\n");
|
||||
sb.append("EAIObstclOccurCausCtnt = [" + EAIObstclOccurCausCtnt + "]\n");
|
||||
// sb.append("sndrcvFileName = [" + sndrcvFileName + "]\n");
|
||||
return new String(sb);
|
||||
}
|
||||
|
||||
public String getBjobMsgScheID() { return bjobMsgScheID; }
|
||||
public String getBjobDmndSubMsgID() { return bjobDmndSubMsgID; }
|
||||
public String getBjobDmndMsgCretnHMS() { return bjobDmndMsgCretnHMS; }
|
||||
public String getTranStartHMS() { return tranStartHMS; }
|
||||
public String getTranEndHMS() { return tranEndHMS; }
|
||||
public String getTranPrcssDstcd() { return tranPrcssDstcd; }
|
||||
public String getEAIObstclOccurCausCtnt() { return EAIObstclOccurCausCtnt; }
|
||||
//public String getSndrcvFileName() { return sndrcvFileName; }
|
||||
|
||||
public void setBjobMsgScheID (String bjobMsgScheID) { this.bjobMsgScheID = bjobMsgScheID; }
|
||||
public void setBjobDmndSubMsgID (String bjobDmndSubMsgID) { this.bjobDmndSubMsgID = bjobDmndSubMsgID; }
|
||||
public void setBjobDmndMsgCretnHMS (String bjobDmndMsgCretnHMS) { this.bjobDmndMsgCretnHMS = bjobDmndMsgCretnHMS; }
|
||||
public void setTranStartHMS (String tranStartHMS) { this.tranStartHMS = tranStartHMS; }
|
||||
public void setTranEndHMS (String tranEndHMS) { this.tranEndHMS = tranEndHMS; }
|
||||
public void setTranPrcssDstcd (String tranPrcssDstcd) { this.tranPrcssDstcd = tranPrcssDstcd; }
|
||||
public void setEAIObstclOccurCausCtnt(String EAIObstclOccurCausCtnt) { this.EAIObstclOccurCausCtnt = EAIObstclOccurCausCtnt; }
|
||||
//public void setSndrcvFileName (String sndrcvFileName) { this.sndrcvFileName = sndrcvFileName; }
|
||||
}
|
||||
|
||||
@@ -224,9 +224,9 @@ public class ScheduleBasisManager {
|
||||
if ( sDate.length() != 8 )
|
||||
return false;
|
||||
try {
|
||||
int year = new Integer(sDate.substring(0, 4)).intValue();
|
||||
int month = new Integer(sDate.substring(4, 6)).intValue();
|
||||
int day = new Integer(sDate.substring(6, 8)).intValue();
|
||||
int year = Integer.parseInt(sDate.substring(0, 4));
|
||||
int month = Integer.parseInt(sDate.substring(4, 6));
|
||||
int day = Integer.parseInt(sDate.substring(6, 8));
|
||||
|
||||
|
||||
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) {
|
||||
|
||||
@@ -106,6 +106,7 @@ public class SchedulerMessageDAO extends BaseDAO implements SchedulerMessageQuer
|
||||
SchedulerMessageVO info = null;
|
||||
if (rs.next()) {
|
||||
info = new SchedulerMessageVO();
|
||||
info.setInstitutionCode(StringUtil.nvlTrim(rs.getString("OsidInstiDstcd" ))); // 대외기관 코드
|
||||
info.setScheduleCode (StringUtil.nvlTrim(rs.getString("BjobMsgScheID" ))); // 스케쥴 아이디
|
||||
info.setJobCode (StringUtil.nvlTrim(rs.getString("BjobMsgDstcd" ))); // Job 구분 코드
|
||||
info.setBizCode (StringUtil.nvlTrim(rs.getString("BjobTranDstcdName"))); // 거래구분코드
|
||||
@@ -113,7 +114,6 @@ public class SchedulerMessageDAO extends BaseDAO implements SchedulerMessageQuer
|
||||
info.setEndTime (StringUtil.nvlTrim(rs.getString("SndrcvEndHMS" ))); // 송수신 종료 시간
|
||||
info.setProcessCode (StringUtil.nvlTrim(rs.getString("BjobBzwkDstcd" ))); // 업무구분 코드
|
||||
info.setProcessType (StringUtil.nvlTrim(rs.getString("BjobPtrnDstcd" ))); // 업무유형 구분
|
||||
info.setInstitutionCode(StringUtil.nvlTrim(rs.getString("OsidInstiDstcd" ))); // 대외기관 코드
|
||||
info.setPriority ( rs.getInt ("MsgPrcssPrity" )); // 메시지 처리 우선 순위
|
||||
info.setHolyProcessGb (StringUtil.nvlTrim(rs.getString("HoldyPrcssDstcd" ))); // 공휴일처리구분
|
||||
info.setStartDelayDays ( rs.getInt ("StartDlayNoday" ));
|
||||
@@ -1276,4 +1276,78 @@ public class SchedulerMessageDAO extends BaseDAO implements SchedulerMessageQuer
|
||||
disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
public SchedulerMessageVO getInfoByteBjobTransDstName(String bjobTranDstcdName) throws DAOException {
|
||||
|
||||
ResultSet rs = null;
|
||||
int index = 0;
|
||||
|
||||
try {
|
||||
this.connect(SELECT_INFO_BY_JOB_TRANS_DST_NAME);
|
||||
//logger.debug("SchedulerMessageDAO.getScheduleInfo() >>> 수행 SQL 문 : \n"+ SELECT_SEND_SCHEDULE_BY_BIZCODE);
|
||||
|
||||
index = 1;
|
||||
this.preparedStatement.setString(index++, bjobTranDstcdName ); logger.debug("SchedulerMessageDAO.getInfoByteBjobTransDstName() >>> 바인드("+(index-1)+") : ["+ bjobTranDstcdName +"]");
|
||||
|
||||
rs = executeQuery();
|
||||
|
||||
SchedulerMessageVO info = null;
|
||||
if (rs.next()) {
|
||||
info = new SchedulerMessageVO();
|
||||
info.setProcessCode (StringUtil.nvlTrim(rs.getString("BjobBzwkDstcd" ))); // 업무구분 코드
|
||||
info.setInstitutionCode(StringUtil.nvlTrim(rs.getString("OsidInstiDstcd" ))); // 대외기관 코드
|
||||
info.setBizCode (StringUtil.nvlTrim(rs.getString("BjobTranDstcdName"))); // 거래구분코드
|
||||
}
|
||||
|
||||
return info;
|
||||
|
||||
} catch (DAOException ex) {
|
||||
throw ex;
|
||||
} catch(Exception e) {
|
||||
String errMsg = ExceptionUtil.getErrorCode(e, "BECEAISSC001", new String[] {"unknown", "unknown", bjobTranDstcdName});
|
||||
throw new DAOException(errMsg); //해당 스케쥴 정보를 찾을 수 없습니다. (업무구분: %1, 대외기관: %2, 거래구분: %3)
|
||||
} finally {
|
||||
disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
public JobStatusVO getOenJobByKey(String bjobDmndMsgID, String bjobDmndSubMsgID) throws DAOException {
|
||||
|
||||
ResultSet rs = null;
|
||||
int index = 0;
|
||||
|
||||
try {
|
||||
this.connect(SELECT_ONE_JOB_BY_KEY);
|
||||
//logger.debug("SchedulerMessageDAO.getScheduleInfo() >>> 수행 SQL 문 : \n"+ SELECT_SEND_SCHEDULE_BY_BIZCODE);
|
||||
|
||||
index = 1;
|
||||
this.preparedStatement.setString(index++, bjobDmndMsgID ); logger.debug("SchedulerMessageDAO.getOenJobByKey() >>> 바인드("+(index-1)+") : ["+ bjobDmndMsgID +"]");
|
||||
this.preparedStatement.setString(index++, bjobDmndMsgID ); logger.debug("SchedulerMessageDAO.getOenJobByKey() >>> 바인드("+(index-1)+") : ["+ bjobDmndSubMsgID+"]");
|
||||
|
||||
rs = executeQuery();
|
||||
|
||||
JobStatusVO jobStatus = null;
|
||||
if (rs.next()) {
|
||||
jobStatus = new JobStatusVO();
|
||||
jobStatus.setBjobMsgScheID (StringUtil.nvlTrim(rs.getString("BjobDmndMsgID" ))); // BATCH작업요청메시지ID
|
||||
jobStatus.setBjobDmndSubMsgID (StringUtil.nvlTrim(rs.getString("BjobDmndSubMsgID" ))); // BATCH작업요청부메시지ID
|
||||
jobStatus.setBjobDmndMsgCretnHMS (StringUtil.nvlTrim(rs.getString("BjobDmndMsgCretnHMS" ))); // BATCH작업요청메시지생성시각
|
||||
jobStatus.setTranStartHMS (StringUtil.nvlTrim(rs.getString("TranStartHMS" ))); // 송수신시작시각
|
||||
jobStatus.setTranEndHMS (StringUtil.nvlTrim(rs.getString("TranEndHMS" ))); // 송수신종료시각
|
||||
jobStatus.setTranPrcssDstcd (StringUtil.nvlTrim(rs.getString("TranPrcssDstcd" ))); // 거래처리구분코드 ('Q', 'S', 'E', 'T')
|
||||
jobStatus.setEAIObstclOccurCausCtnt(StringUtil.nvlTrim(rs.getString("EAIObstclOccurCausCtnt"))); // EAI장애발생원인내용
|
||||
//jobStatus.setSndrcvFileName (StringUtil.nvlTrim(rs.getString("SndrcvFileName" ))); // 송수신파일명(,로 구분)
|
||||
}
|
||||
|
||||
return jobStatus;
|
||||
|
||||
} catch (DAOException ex) {
|
||||
throw ex;
|
||||
} catch(Exception e) {
|
||||
String errMsg = ExceptionUtil.getErrorCode(e, "BECEAISSO001", new String[] {bjobDmndMsgID, bjobDmndSubMsgID});
|
||||
throw new DAOException(errMsg); //해당 스케쥴 정보를 찾을 수 없습니다. (업무구분: %1, 대외기관: %2, 거래구분: %3)
|
||||
} finally {
|
||||
disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -749,5 +749,15 @@ public class SchedulerMessageManager
|
||||
return dao.deleteJobFromProcessing(uuid);
|
||||
}
|
||||
|
||||
|
||||
public SchedulerMessageVO getInfoByteBjobTransDstName(String bjobTranDstcdName) throws Exception
|
||||
{
|
||||
SchedulerMessageDAO dao = (SchedulerMessageDAO)DAOFactory.newInstance().create(SchedulerMessageDAO.class);
|
||||
return dao.getInfoByteBjobTransDstName(bjobTranDstcdName);
|
||||
}
|
||||
|
||||
public JobStatusVO getOenJobByKey(String bjobDmndMsgID, String bjobDmndSubMsgID) throws Exception
|
||||
{
|
||||
SchedulerMessageDAO dao = (SchedulerMessageDAO)DAOFactory.newInstance().create(SchedulerMessageDAO.class);
|
||||
return dao.getOenJobByKey(bjobDmndMsgID, bjobDmndSubMsgID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,4 +625,28 @@ public interface SchedulerMessageQuery
|
||||
+ " MsgPrcssStusCd \n"
|
||||
+ "FROM " + Keys.TABLE_OWNER + "TSEAIBS04";
|
||||
|
||||
public static String SELECT_INFO_BY_JOB_TRANS_DST_NAME =
|
||||
"SELECT A.BjobMsgScheID , \n"
|
||||
+ " A.OsidInstiDstcd, \n"
|
||||
+ " B.BjobBzwkDstcd, \n"
|
||||
+ " B.BjobTranDstcdName \n"
|
||||
+ "FROM " + Keys.TABLE_OWNER + "TSEAIBS01 A,\n"
|
||||
+ " " + Keys.TABLE_OWNER + "TSEAIBJ01 B \n"
|
||||
+ "WHERE A.BjobMsgDstcd = B.BjobMsgDstcd\n"
|
||||
+ "AND A.BjobPtrnDstcd = 'RR' \n"
|
||||
+ "AND LTRIM(RTRIM(B.BjobTranDstcdName)) = ? \n"
|
||||
+ "AND B.ThisMsgUseYn = '1'\n";
|
||||
|
||||
public static final String SELECT_ONE_JOB_BY_KEY =
|
||||
"SELECT AA.BjobDmndMsgID ,\n"
|
||||
+ " AA.BjobDmndSubMsgID ,\n"
|
||||
+ " AA.BjobDmndMsgCretnHMS ,\n"
|
||||
+ " AA.TranStartHMS ,\n"
|
||||
+ " AA.TranEndHMS ,\n"
|
||||
+ " AA.TranPrcssDstcd ,\n"
|
||||
+ " AA.EAIObstclOccurCausCtnt \n"
|
||||
+ "FROM " + Keys.TABLE_OWNER + "TSEAIBJ03 AA \n"
|
||||
+ "WHERE AA.BjobDmndMsgID = ? \n"
|
||||
+ "AND AA.BjobDmndSubMsgID = ? \n";
|
||||
|
||||
}
|
||||
@@ -621,5 +621,4 @@ public interface SchedulerMessageQueryForMariadb
|
||||
+ " MsgQueEtractDmndHMS,\n"
|
||||
+ " MsgPrcssStusCd \n"
|
||||
+ "FROM " + Keys.TABLE_OWNER + "TSEAIBS04";
|
||||
|
||||
}
|
||||
@@ -34,9 +34,9 @@ public interface SchedulerMessageQueryForOracle
|
||||
+ " LTRIM(RTRIM(A.OsidInstiDstcd)) AS OsidInstiDstcd, \n"
|
||||
+ " B.MsgPrcssPrity ,\n"
|
||||
+ " CASE WHEN ( TO_CHAR(SYSDATE,'HH24MI') >= A.SndrcvStartHMS AND \n"
|
||||
+ " TO_CHAR(SYSDATE,'HH24MI') < NVL(RTRIM(A.SndrcvEndHMS), '9999') ) THEN 1 \n" //--스케쥴시작시간 <= 현재시간 < 스케쥴종료시간
|
||||
+ " WHEN ( TO_CHAR(SYSDATE,'HH24MI') < A.SndrcvStartHMS ) THEN 2 \n" //--현재시간 < 스케쥴시작시간 (미래스케쥴)
|
||||
+ " ELSE 3 \n" //--현재시간 > 스케쥴시작시간 (지나간스케쥴)
|
||||
+ " TO_CHAR(SYSDATE,'HH24MI') < NVL(RTRIM(A.SndrcvEndHMS), '9999') ) THEN 1 \n" //--스케쥴시작시간 <= 현재시간 < 스케쥴종료시간
|
||||
+ " WHEN ( TO_CHAR(SYSDATE,'HH24MI') < A.SndrcvStartHMS ) THEN 2 \n" //--현재시간 < 스케쥴시작시간 (미래스케쥴)
|
||||
+ " ELSE 3 \n" //--현재시간 > 스케쥴시작시간 (지나간스케쥴)
|
||||
+ " END FetchPriority ,\n"
|
||||
+ " A.HoldyPrcssDstcd ,\n"
|
||||
+ " A.StartDlayNoday ,\n"
|
||||
@@ -47,7 +47,7 @@ public interface SchedulerMessageQueryForOracle
|
||||
+ "AND B.BjobBzwkDstcd = ? \n"
|
||||
+ "AND LTRIM(RTRIM(A.OsidInstiDstcd)) = ? \n"
|
||||
+ "AND B.BjobTranDstcdName = ? \n"
|
||||
+ "AND A.BjobPtrnDstcd = 'RS'\n"
|
||||
+ "AND A.BjobPtrnDstcd = 'RS'\n"
|
||||
+ "AND A.ThisMsgUseYn = '1' \n"
|
||||
+ "AND B.ThisMsgUseYn = '1' \n"
|
||||
+ "ORDER BY B.MsgPrcssPrity, FetchPriority, A.SndrcvStartHMS, A.SndrcvEndHMS, B.BjobTranDstcdName";
|
||||
@@ -65,9 +65,9 @@ public interface SchedulerMessageQueryForOracle
|
||||
+ " LTRIM(RTRIM(A.OsidInstiDstcd)) AS OsidInstiDstcd, \n"
|
||||
+ " B.MsgPrcssPrity , \n"
|
||||
+ " CASE WHEN ( TO_CHAR(SYSDATE,'HH24MI') >= A.SndrcvStartHMS AND \n"
|
||||
+ " TO_CHAR(SYSDATE,'HH24MI') < NVL(RTRIM(A.SndrcvEndHMS), '9999') ) THEN 1 \n" //--스케쥴시작시간 <= 현재시간 < 스케쥴종료시간
|
||||
+ " WHEN ( TO_CHAR(SYSDATE,'HH24MI') < A.SndrcvStartHMS ) THEN 2 \n" //--현재시간 < 스케쥴시작시간 (미래스케쥴)
|
||||
+ " ELSE 3 \n" //--현재시간 > 스케쥴시작시간 (지나간스케쥴)
|
||||
+ " TO_CHAR(SYSDATE,'HH24MI') < NVL(RTRIM(A.SndrcvEndHMS), '9999') ) THEN 1 \n" //--스케쥴시작시간 <= 현재시간 < 스케쥴종료시간
|
||||
+ " WHEN ( TO_CHAR(SYSDATE,'HH24MI') < A.SndrcvStartHMS ) THEN 2 \n" //--현재시간 < 스케쥴시작시간 (미래스케쥴)
|
||||
+ " ELSE 3 \n" //--현재시간 > 스케쥴시작시간 (지나간스케쥴)
|
||||
+ " END FetchPriority , \n"
|
||||
+ " A.HoldyPrcssDstcd , \n"
|
||||
+ " A.StartDlayNoday , \n"
|
||||
@@ -140,7 +140,7 @@ public interface SchedulerMessageQueryForOracle
|
||||
+ "AND A.BjobBzwkDstcd = E.BjobBzwkDstcd \n"
|
||||
+ "AND A.MsgPrcssPrity > 0 \n" //--suspend 스케쥴 제외
|
||||
+ "AND A.SndrcvStartHMS <= TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH24MISSFF3') \n"
|
||||
+ "AND NVL(RTRIM(A.SndrcvEndHMS), '99991231') > TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH24MISSFF3') \n" //--종료시간이 없으면 종료시간 체크 안함
|
||||
+ "AND NVL(RTRIM(A.SndrcvEndHMS), '99991231') > TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH24MISSFF3') \n" //--종료시간이 없으면 종료시간 체크 안함
|
||||
+ "ORDER BY A.BjobBzwkDstcd, A.MsgPrcssPrity, C.BjobTranDstcdName, A.SndrcvFileName, A.BjobDmndMsgCretnHMS, A.SndrcvStartHMS";
|
||||
|
||||
//3. Timer Event 발생시 작업대기목록 테이블에서 수행할(현재시간에 걸리는) 전체 작업목록을 조회
|
||||
@@ -187,17 +187,17 @@ public interface SchedulerMessageQueryForOracle
|
||||
+ "AND A.BjobBzwkDstcd = E.BjobBzwkDstcd \n"
|
||||
// + "AND A.MsgPrcssPrity > '0' \n" //--suspend 스케쥴 제외
|
||||
+ "AND A.SndrcvStartHMS <= TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH24MISSFF3') \n"
|
||||
+ "AND NVL(RTRIM(A.SndrcvEndHMS), '99991231') > TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH24MISSFF3') \n" //--종료시간이 없으면 종료시간 체크 안함
|
||||
+ "AND NVL(RTRIM(A.SndrcvEndHMS), '99991231') > TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH24MISSFF3') \n" //--종료시간이 없으면 종료시간 체크 안함
|
||||
+ "ORDER BY A.BjobBzwkDstcd, A.MsgPrcssPrity, C.BjobTranDstcdName, A.SndrcvFileName, A.BjobDmndMsgCretnHMS, A.SndrcvStartHMS";
|
||||
|
||||
|
||||
|
||||
//4. 위 3번 쿼리에 의해 조회된 작업목록을 수행하기 전에 해당 작업의 연결정보가 현재 사용중인지
|
||||
//체크하기 위해 작업진행목록 테이블에서 전체 연결정보를 조회
|
||||
public static final String SELECT_EXECUTING_SYSTEMCONNID_FROM_PROCESSING =
|
||||
"SELECT SysLnkgDstcd \n"
|
||||
+ "FROM " + Keys.TABLE_OWNER + "TSEAIBS04 \n"
|
||||
+ "WHERE MsgPrcssStusCd IN ('S','I','C')";
|
||||
|
||||
|
||||
// 4-1. 위 3번 쿼리에 의해 조회된 작업목록을 수행하기 전에 해당 작업의 앞선 우선순위 작업이 수행중인지 확인하기 위한 쿼리
|
||||
//2009.8.14 by kscheon
|
||||
public static final String SELECT_EXECUTING_JOB_FROM_PROCESSING =
|
||||
@@ -297,19 +297,19 @@ public interface SchedulerMessageQueryForOracle
|
||||
+ " A.RqstRecvReTralIntvalTtm, \n"
|
||||
+ " NVL(C.RecvFileEndCnt , 0) RecvFileEndCnt , \n"
|
||||
+ " NVL(C.RecvFileFailCnt, 0) RecvFileFailCnt, \n"
|
||||
+ " NVL(C.RecentExecTime , '') RecentExecTime \n"
|
||||
+ " NVL(C.RecentExecTime , '') RecentExecTime \n"
|
||||
+ "FROM " + Keys.TABLE_OWNER + "TSEAIBJ01 B, \n"
|
||||
+ " " + Keys.TABLE_OWNER + "TSEAIBS01 A \n"
|
||||
+ " " + Keys.TABLE_OWNER + "TSEAIBS01 A \n"
|
||||
+ " LEFT OUTER JOIN ( SELECT BjobMsgScheID, \n"
|
||||
+ " SUM(CASE TranPrcssDstcd WHEN 'T' THEN 1 "
|
||||
+ " ELSE 0 END) AS RecvFileEndCnt ,\n" // --파일전송 완료 건수
|
||||
+ " SUM(CASE TranPrcssDstcd WHEN 'T'THEN 0 "
|
||||
+ " ELSE 1 END) AS RecvFileFailCnt,\n" // --파일전송 미완료 건수
|
||||
+ " MAX(BjobDmndMsgCretnHMS) RecentExecTime \n" // --최근 수행 시간
|
||||
+ " ELSE 1 END) AS RecvFileFailCnt,\n" // --파일전송 미완료 건수
|
||||
+ " MAX(BjobDmndMsgCretnHMS) RecentExecTime \n" // --최근 수행 시간
|
||||
+ " FROM " + Keys.TABLE_OWNER + "TSEAIBJ03 \n"
|
||||
+ " WHERE BjobPtrnDstcd = 'RR' \n" // --요구수신만
|
||||
+ " WHERE BjobPtrnDstcd = 'RR' \n" // --요구수신만
|
||||
+ " AND BjobDmndMsgCretnHMS LIKE TO_CHAR(SYSDATE,'YYYYMMDD')||'%' \n"
|
||||
+ " GROUP BY BjobMsgScheID ) C "
|
||||
+ " GROUP BY BjobMsgScheID ) C "
|
||||
+ "on A.BjobMsgScheID = C.BjobMsgScheID \n"
|
||||
+ "WHERE A.BjobMsgDstcd = B.BjobMsgDstcd \n"
|
||||
+ "AND A.BjobPtrnDstcd = 'RR' --요구수신만 \n"
|
||||
@@ -318,15 +318,15 @@ public interface SchedulerMessageQueryForOracle
|
||||
+ "AND A.SndrcvStartHMS <= TO_CHAR(SYSDATE,'HH24MI') \n"
|
||||
+ "AND NVL(RTRIM(A.SndrcvEndHMS), '9999') > TO_CHAR(SYSDATE,'HH24MI') \n"
|
||||
+ "AND NOT EXISTS ( SELECT X.BjobMsgScheID \n"
|
||||
+ " FROM " + Keys.TABLE_OWNER + "TSEAIBS03 X \n" //--대기목록 테이블에 존재하지 않고
|
||||
+ " FROM " + Keys.TABLE_OWNER + "TSEAIBS03 X \n" //--대기목록 테이블에 존재하지 않고
|
||||
+ " WHERE X.BjobMsgScheID = A.BjobMsgScheID \n"
|
||||
+ " AND X.SndrcvEndHMS >= TO_CHAR(SYSDATE,'YYYYMMDD') ) \n" //--미래의 스케쥴이
|
||||
+ " AND X.SndrcvEndHMS >= TO_CHAR(SYSDATE,'YYYYMMDD') ) \n" //--미래의 스케쥴이
|
||||
+ "AND NOT EXISTS ( SELECT Y.BjobMsgScheID \n"
|
||||
+ " FROM " + Keys.TABLE_OWNER + "TSEAIBS04 Y \n" //--진행목록 테이블에 존재하지 않고
|
||||
+ " WHERE Y.BjobMsgScheID = A.BjobMsgScheID ) \n"
|
||||
+ "ORDER BY A.SndrcvStartHMS, B.BjobTranDstcdName, A.SndrcvEndHMS";
|
||||
|
||||
|
||||
|
||||
//10. 스케줄 아이디에 해당되는 스케줄 정보 조회(요구수신)
|
||||
public static String SELECT_SEND_SCHEDULE_BY_SCHEDULEID =
|
||||
"SELECT A.BjobMsgScheID , \n"
|
||||
@@ -370,10 +370,10 @@ public interface SchedulerMessageQueryForOracle
|
||||
+ " AND B.BjobBzwkDstcd = D.BjobBzwkDstcd \n"
|
||||
+ " AND LTRIM(RTRIM(A.OsidInstiDstcd)) = LTRIM(RTRIM(D.OsidInstiDstcd )) \n"
|
||||
+ " AND LTRIM(RTRIM(A.BjobMsgScheID)) = ? \n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 13. 스케줄 아이디에 해당되는 스케줄 정보 조회(요구송신)
|
||||
public static String SELECT_REQ_SEND_SCHEDULE_BY_SCHEDULEID =
|
||||
"SELECT A.BjobMsgScheID , \n"
|
||||
@@ -393,15 +393,15 @@ public interface SchedulerMessageQueryForOracle
|
||||
+ " " + Keys.TABLE_OWNER + "TSEAIBS01 A \n"
|
||||
+ " LEFT OUTER JOIN ( SELECT BjobMsgScheID, \n"
|
||||
+ " SUM(CASE TranPrcssDstcd WHEN 'T'THEN 0 "
|
||||
+ " ELSE 1 END) AS RecvFileFailCnt\n" //--파일전송 미완료 건수
|
||||
+ " ELSE 1 END) AS RecvFileFailCnt\n" //--파일전송 미완료 건수
|
||||
+ " FROM " + Keys.TABLE_OWNER + "TSEAIBJ03 \n"
|
||||
+ " WHERE BjobPtrnDstcd = 'RS' \n" //--요구송신만
|
||||
+ " AND BjobDmndMsgCretnHMS LIKE TO_CHAR(SYSDATE,'YYYYMMDD')||'%' \n"
|
||||
+ " GROUP BY BjobMsgScheID ) C \n"
|
||||
+ " GROUP BY BjobMsgScheID ) C \n"
|
||||
+ " on A.BjobMsgScheID = C.BjobMsgScheID \n"
|
||||
+ "WHERE A.BjobMsgDstcd = B.BjobMsgDstcd \n"
|
||||
+ "AND RTRIM(A.BjobMsgScheID) = ? \n"
|
||||
+ "AND A.BjobPtrnDstcd = 'RS'\n" //--요구송신만
|
||||
+ "AND A.BjobPtrnDstcd = 'RS'\n" //--요구송신만
|
||||
+ "AND A.ThisMsgUseYn = '1' \n"
|
||||
+ "AND B.ThisMsgUseYn = '1' \n";
|
||||
|
||||
@@ -417,7 +417,7 @@ public interface SchedulerMessageQueryForOracle
|
||||
/**
|
||||
* BATCH작업 메시지일정 ID를 조회하는 쿼리
|
||||
*/
|
||||
public static final String GET_BJOBMSGSCHEID =
|
||||
public static final String GET_BJOBMSGSCHEID =
|
||||
" SELECT BjobBzwkDstcd|| ? ||BjobTranDstcdName|| "
|
||||
+ " ( "
|
||||
+ " SELECT "
|
||||
@@ -438,7 +438,7 @@ public interface SchedulerMessageQueryForOracle
|
||||
/**
|
||||
* BATCH작업 일정 정보를 등록하는 쿼리
|
||||
*/
|
||||
public static final String ADD_JOB_SCH_INFO =
|
||||
public static final String ADD_JOB_SCH_INFO =
|
||||
"INSERT INTO "+Keys.TABLE_OWNER +"TSEAIBS01 ( "
|
||||
+ " BjobMsgScheID "
|
||||
+ " ,BjobMsgDstcd "
|
||||
@@ -490,7 +490,7 @@ public interface SchedulerMessageQueryForOracle
|
||||
/**
|
||||
* BATCH작업 일정 정보를 등록하는 쿼리
|
||||
*/
|
||||
public static final String SELECT_LOG_MASTER_BY_KEYS =
|
||||
public static final String SELECT_LOG_MASTER_BY_KEYS =
|
||||
" SELECT A.BjobDmndMsgID , \n"
|
||||
+ " A.BjobDmndSubMsgID , \n"
|
||||
+ " A.TelgmReTralCnt , \n"
|
||||
@@ -530,7 +530,7 @@ public interface SchedulerMessageQueryForOracle
|
||||
" AND BjobDmndSubMsgID = ? \n" +
|
||||
" AND SndrcvFileName = ? \n";
|
||||
|
||||
// public static final String SELECT_STAGE_LOGS_BY_KEYS =
|
||||
// public static final String SELECT_STAGE_LOGS_BY_KEYS =
|
||||
// "SELECT B.BjobDmndMsgID , \n"
|
||||
// + " B.BjobDmndSubMsgID , \n"
|
||||
// + " B.BjobStgeID , \n"
|
||||
@@ -570,8 +570,8 @@ public interface SchedulerMessageQueryForOracle
|
||||
// + " WHERE B.BjobDmndMsgID LIKE ? ||'%' \n"
|
||||
// + " AND B.BjobDmndSubMsgID LIKE ? ||'%' \n"
|
||||
// + " ORDER BY B.BjobDmndMsgID, B.BjobDmndSubMsgID, B.ThisStgeStartHMS, B.BjobMsgDstcd";
|
||||
|
||||
public static final String SELECT_SCHEDULE_BASIS =
|
||||
|
||||
public static final String SELECT_SCHEDULE_BASIS =
|
||||
"SELECT A.BjobMsgScheID , \n"
|
||||
+ " B.BjobBzwkDstcd , \n"
|
||||
+ " C.BjobBzwkName , \n"
|
||||
@@ -585,10 +585,10 @@ public interface SchedulerMessageQueryForOracle
|
||||
+ " B.ThisMsgChrgIDs , \n"
|
||||
+ " A.SndrcvStartHMS , \n"
|
||||
+ " A.SndrcvEndHMS \n"
|
||||
+ "FROM "+Keys.TABLE_OWNER +"TSEAIBS05 A, \n"
|
||||
+ " "+Keys.TABLE_OWNER +"TSEAIBJ01 B, \n"
|
||||
+ " "+Keys.TABLE_OWNER +"TSEAIBJ02 C, \n"
|
||||
+ " "+Keys.TABLE_OWNER +"TSEAIBJ06 D \n"
|
||||
+ "FROM "+Keys.TABLE_OWNER +"TSEAIBS05 A, \n"
|
||||
+ " "+Keys.TABLE_OWNER +"TSEAIBJ01 B, \n"
|
||||
+ " "+Keys.TABLE_OWNER +"TSEAIBJ02 C, \n"
|
||||
+ " "+Keys.TABLE_OWNER +"TSEAIBJ06 D \n"
|
||||
+ "WHERE A.BjobMsgDstcd = B.BjobMsgDstcd \n"
|
||||
+ "AND B.BjobBzwkDstcd = C.BjobBzwkDstcd \n"
|
||||
+ "AND B.BjobBzwkDstcd = D.BjobBzwkDstcd \n"
|
||||
@@ -621,5 +621,4 @@ public interface SchedulerMessageQueryForOracle
|
||||
+ " MsgQueEtractDmndHMS,\n"
|
||||
+ " MsgPrcssStusCd \n"
|
||||
+ "FROM " + Keys.TABLE_OWNER + "TSEAIBS04";
|
||||
|
||||
}
|
||||
@@ -115,7 +115,7 @@ public class TelegramDAO extends BaseDAO implements TelegramQuery
|
||||
|
||||
rs = this.executeQuery();
|
||||
|
||||
TelegramVO telegramVO = new TelegramVO(keys[i], new Integer(fieldsCount[i]).intValue());
|
||||
TelegramVO telegramVO = new TelegramVO(keys[i], Integer.parseInt(fieldsCount[i]));
|
||||
while(rs.next())
|
||||
{
|
||||
// telegramitem 순서값은 런타임시에는 사용하지 않는다. 대신 TelegramVO에서 item이 추가될때 순서를 부여한다.
|
||||
|
||||
@@ -287,7 +287,7 @@ public class TelegramManager implements Lifecycle
|
||||
}
|
||||
else
|
||||
{
|
||||
int delim = new Integer(length_token).intValue();
|
||||
int delim = Integer.parseInt(length_token);
|
||||
result[i]=telegram.substring(beginIndex, beginIndex+=delim);
|
||||
logger.debug("> 수신 전문필드 파싱... Index: ["+ i +"], Type: ["+ type_token +"], Length: ["+ length_token +"], Name: ["+ telegramVO.getTelegramItem(i+1).getFieldName() +"], Value: ["+ result[i] +"]");
|
||||
}
|
||||
@@ -333,7 +333,7 @@ public class TelegramManager implements Lifecycle
|
||||
}
|
||||
else
|
||||
{
|
||||
int delim = new Integer(length_token).intValue();
|
||||
int delim = Integer.parseInt(length_token);
|
||||
result[i]=telegram.substring(beginIndex, beginIndex+=delim);
|
||||
logger.debug("> 수신 전문필드 파싱... Index: ["+ i +"], Length: ["+ length_token +"], Name: ["+ telegramVO.getTelegramItem(i+1).getFieldName() +"], Value: ["+ result[i] +"]");
|
||||
}
|
||||
@@ -464,7 +464,7 @@ public class TelegramManager implements Lifecycle
|
||||
while(i < lengths.length)
|
||||
{
|
||||
if (!lengths[i].trim().toUpperCase().equals("XX"))
|
||||
totalLength += new Integer(lengths[i]).intValue();
|
||||
totalLength += Integer.parseInt(lengths[i]);
|
||||
i++;
|
||||
}
|
||||
return totalLength;
|
||||
@@ -542,7 +542,7 @@ public class TelegramManager implements Lifecycle
|
||||
else
|
||||
{
|
||||
// 정의된 필드의 길이
|
||||
int fieldLen = new Integer(fieldLength).intValue();
|
||||
int fieldLen = Integer.parseInt(fieldLength);
|
||||
|
||||
// 정의된 필드의 길이보다 큰 경우 예외 처리
|
||||
if (fieldContent.length() > fieldLen)
|
||||
|
||||
@@ -146,7 +146,7 @@ public class TelegramVO implements Serializable
|
||||
String lengthsarray[] = new String[itemVOs.size()];
|
||||
for(int i=0; i<itemVOs.size(); i++)
|
||||
{
|
||||
TelegramItemVO itemVo = itemVOs.get(new Integer(i+1));
|
||||
TelegramItemVO itemVo = itemVOs.get(i + 1);
|
||||
lengthsarray[i] = itemVo.getFieldLength();
|
||||
}
|
||||
return lengthsarray;
|
||||
@@ -164,7 +164,7 @@ public class TelegramVO implements Serializable
|
||||
String typessarray[] = new String[itemVOs.size()];
|
||||
for(int i=0; i<itemVOs.size(); i++)
|
||||
{
|
||||
TelegramItemVO itemVo = (TelegramItemVO)itemVOs.get(new Integer(i+1));
|
||||
TelegramItemVO itemVo = (TelegramItemVO)itemVOs.get(i + 1);
|
||||
typessarray[i] = itemVo.getFieldType();
|
||||
}
|
||||
return typessarray;
|
||||
@@ -175,7 +175,7 @@ public class TelegramVO implements Serializable
|
||||
String idsarray[] = new String[itemVOs.size()];
|
||||
for(int i=0; i<itemVOs.size(); i++)
|
||||
{
|
||||
TelegramItemVO itemVo = (TelegramItemVO)itemVOs.get(new Integer(i+1));
|
||||
TelegramItemVO itemVo = (TelegramItemVO)itemVOs.get(i + 1);
|
||||
idsarray[i] = itemVo.getFieldID();
|
||||
}
|
||||
return idsarray;
|
||||
@@ -186,7 +186,7 @@ public class TelegramVO implements Serializable
|
||||
String namessarray[] = new String[itemVOs.size()];
|
||||
for(int i=0; i<itemVOs.size(); i++)
|
||||
{
|
||||
TelegramItemVO itemVo = (TelegramItemVO)itemVOs.get(new Integer(i+1));
|
||||
TelegramItemVO itemVo = (TelegramItemVO)itemVOs.get(i + 1);
|
||||
namessarray[i] = itemVo.getFieldName();
|
||||
}
|
||||
return namessarray;
|
||||
@@ -201,7 +201,7 @@ public class TelegramVO implements Serializable
|
||||
* @return 필드객체-TelegramItemVO
|
||||
**/
|
||||
public TelegramItemVO getTelegramItem(int index) {
|
||||
TelegramItemVO itemVo = (TelegramItemVO)itemVOs.get(new Integer(index));
|
||||
TelegramItemVO itemVo = (TelegramItemVO)itemVOs.get(index);
|
||||
return itemVo;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ public class TelegramVO implements Serializable
|
||||
this.telegramFieldLengths[seqNo] = telegramItemVO.getFieldLength();
|
||||
|
||||
// 필드를 HashMap에 추가한다.
|
||||
itemVOs.put(new Integer(seqNo+1), telegramItemVO);
|
||||
itemVOs.put(seqNo + 1, telegramItemVO);
|
||||
|
||||
// 디버깅을 위하여 필드를 추가하고 현재 필드의 갯수를 반환한다.
|
||||
return this.getFieldSize();
|
||||
|
||||
Reference in New Issue
Block a user