Commit 07101d27 authored by akhokar's avatar akhokar

created new component for employee separation confirmation as per pb code.

EmployeeSepConfirm.java
EmployeeSepConfirmLocal.java
EmployeeSepConfirmRemote.java
A18LSUN003.sql


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@199167 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7e31228c
package ibase.webitm.ejb.adm.adv;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import javax.ejb.Stateless;
import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ActionHandlerEJB;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.adm.AdmCommon;
import ibase.webitm.ejb.sys.UtilMethods;
import ibase.webitm.utility.ITMException;
import ibase.webitm.utility.TransIDGenerator;
@Stateless
public class EmployeeSepConfirm extends ActionHandlerEJB implements EmployeeSepConfirmLocal, EmployeeSepConfirmRemote
{
E12GenericUtility genericUtility = new E12GenericUtility();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
AdmCommon admCommon = new AdmCommon();
UtilMethods utilMethod = new UtilMethods();
String userId = "",loginEmpCode = "",runMode = "",chgTerm = "";
public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException
{
String retString = null;
Connection conn = null;
try
{
conn = getConnection();
System.out.println("Conn==>[" + conn + "]");
retString = gbfPostLogic(tranId, tranId,xtraParams,forcedFlag,conn);
System.out.println("returning String from EmployeeSepConfirm :confirm():==>[" + retString + "]");
if(retString == null || retString.trim().length() == 0)
{
conn.commit();
}
else
{
conn.rollback();
}
}
catch(Exception e)
{
System.out.println("Exception :EmployeeSepConfirm :confirm() :" + e.getMessage() + ":");
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if(conn != null)
{
conn.close();
conn = null;
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
return retString;
}
public String gbfPostLogic(String asTranidFr,String asTranidTo,String xtraParams,String forcedFlag,Connection conn) throws ITMException
{
String lsEmpCode = "" ,lsErrCode = "",lsKeyVal = "",errString = "", sql = "";
String lsDate = "";
Timestamp ldResiDate = null ,ldReliDate = null;
String lsProcessAttendance = "N" ,lsWorkSite = "" ,lsGradeCode = "",lsCadreCode = "",lsRelievePeriod = "",lsProcWindow = "";
Timestamp ldtRelieveDate = null ,ldCutoffDate = null ,ldtPeriodTodate = null;
int liAddonDays = 0, liCnt = 0;
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
System.out.println("Inside Post Logic Method..!!!!");
userId = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode"));
chgTerm = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId"));
loginEmpCode = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode"));
runMode = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "runMode"));
System.out.println("userId==>" + userId);
System.out.println("loginEmpCode==>" + loginEmpCode + " runMode==>" + runMode);
if(asTranidFr.equalsIgnoreCase(asTranidTo))
{
lsKeyVal = asTranidFr;
System.out.println("Initial lsKeyVal==>::[" + lsKeyVal + "]");
// lsEmpCode = checkNull(admCommon.getToken(lsKeyVal, ":"));
// lsDate = checkNull(admCommon.getToken(lsKeyVal, " "));
// ldResiDate = utilMethod.dateTime(Date.valueOf(lsDate),Time.valueOf(lsKeyVal));
String[] tempArr = lsKeyVal.split(":");
if(tempArr != null && tempArr.length > 0 )
{
lsEmpCode = tempArr[0];
lsDate = tempArr[1];
}
System.out.println("lsKeyVal==>" + lsKeyVal + " lsEmpCode==>" + lsEmpCode + " lsDate==>" + lsDate);
ldResiDate = Timestamp.valueOf(genericUtility.getValidDateString(lsDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("ldResiDate==>" + ldResiDate);
lsErrCode = gbfRetrieveSeparation(lsEmpCode , ldResiDate , conn);
System.out.println("lsErrCode coming from gbfRetrieveSeparation() ::==> [" + lsErrCode + "]");
}
if(lsErrCode != null && lsErrCode.trim().length() > 0)
{
conn.rollback();
errString = itmDBAccessEJB.getErrorString("", lsErrCode, userId, "", conn);
return errString;
}
else
{
sql = "select work_site, grade, cadre from employee where emp_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsEmpCode);
rs = pstmt.executeQuery();
if(rs.next())
{
lsWorkSite = checkNull(rs.getString("work_site"));
lsGradeCode = checkNull(rs.getString("grade"));
lsCadreCode = checkNull(rs.getString("cadre"));
System.out.println("lsWorkSite::: " + lsWorkSite + " lsGradeCode::: " + lsGradeCode + " lsCadreCode::: " + lsCadreCode);
}
else
{
errString = itmDBAccessEJB.getErrorString("", "DS000", userId, "", conn);
return errString;
}
/*else
{*/
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
lsProcessAttendance = checkNull(admCommon.getAdmEnv(lsWorkSite, lsCadreCode, lsGradeCode, "AUTOATTD_ON_SEP_CONF", ldResiDate, conn));
System.out.println("lsProcessAttendance==> " + lsProcessAttendance);
if(utilMethod.pos(lsProcessAttendance, "NULLFOUND") > 0)
{
lsProcessAttendance = checkNull(admCommon.getEnv("999999", "AUTOATTD_ON_SEP_CONF", conn));
if(lsProcessAttendance == null || lsProcessAttendance.trim().length() == 0 || !("Y".equalsIgnoreCase(lsProcessAttendance.trim().toUpperCase())))
{
lsProcessAttendance = "N";
}
System.out.println("lsProcessAttendance==> " + lsProcessAttendance);
}
if(lsProcessAttendance != null && ("Y".equalsIgnoreCase(lsProcessAttendance)))
{
sql = "select relieve_date from separation where emp_code = ? and resi_date = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsEmpCode);
pstmt.setTimestamp(2, ldResiDate);
rs = pstmt.executeQuery();
if(rs.next())
{
ldtRelieveDate = rs.getTimestamp("relieve_date");
System.out.println("ldtRelieveDate::: " + ldtRelieveDate);
}
else
{
errString = itmDBAccessEJB.getErrorString("", "DS000", userId, "", conn);
return errString;
}
/*else
{*/
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
sql = "select code, to_date from period where fr_date <= ? and to_date >= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, ldtRelieveDate);
pstmt.setTimestamp(2, ldtRelieveDate);
rs = pstmt.executeQuery();
if(rs.next())
{
lsRelievePeriod = checkNull(rs.getString("code"));
ldtPeriodTodate = rs.getTimestamp("to_date");
System.out.println("lsRelievePeriod:::" + lsRelievePeriod + " ldtPeriodTodate::: " + ldtPeriodTodate);
}
else
{
errString = itmDBAccessEJB.getErrorString("", "DS000", userId, "", conn);
return errString;
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
sql = "select count(1) as count from payroll where emp_code = ? and prd_code = ? and voucher_no is not null ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsEmpCode);
pstmt.setString(2, lsRelievePeriod);
rs = pstmt.executeQuery();
if(rs.next())
{
liCnt = rs.getInt("count");
System.out.println("liCnt from payroll is::: " + liCnt);
}
else
{
errString = itmDBAccessEJB.getErrorString("", "DS000", userId, "", conn);
return errString;
}
if(liCnt == 0)
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
sql = "select count(1) as count from attendance_mon where emp_code = ? and prd_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsEmpCode);
pstmt.setString(2, lsRelievePeriod);
rs = pstmt.executeQuery();
if(rs.next())
{
liCnt = rs.getInt("count");
System.out.println("liCnt from attendance_mon is::: " + liCnt);
}
else
{
errString = itmDBAccessEJB.getErrorString("", "DS000", userId, "", conn);
return errString;
}
if(liCnt > 0)
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
sql = "select proc_window from attendance_mon where emp_code = ? and prd_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsEmpCode);
pstmt.setString(2, lsRelievePeriod);
rs = pstmt.executeQuery();
if(rs.next())
{
lsProcWindow = checkNull(rs.getString("proc_window"));
System.out.println("lsProcWindow==>" + lsProcWindow);
}
else
{
errString = itmDBAccessEJB.getErrorString("", "DS000", userId, "", conn);
return errString;
}
}
else
{
lsProcWindow = checkNull(admCommon.getAdmEnv(lsWorkSite, lsCadreCode, lsGradeCode, "ATTDPROC_DEFAULT_OPT", ldResiDate, conn));
System.out.println("lsProcWindow==> " + lsProcWindow);
if(utilMethod.pos(lsProcWindow, "NULLFOUND") > 0)
{
lsProcWindow = checkNull(admCommon.getEnv("999999", "ATTDPROC_DEFAULT_OPT", conn));
}
System.out.println("lsProcWindow==> " + lsProcWindow);
}
/*if(errString == null || errString.trim().length() == 0)
{
if(lsProcWindow == null || lsProcWindow.trim().length() == 0)
{
lsProcWindow = "N";
}
else
{
lsProcWindow = lsProcWindow.trim().toUpperCase();
if(!("N".equalsIgnoreCase(lsProcWindow)) && !("L".equalsIgnoreCase(lsProcWindow)))
{
lsProcWindow = "N";
System.out.println("lsProcWindow==> " + lsProcWindow);
}
}
nvo_attd_proc = create nvo_business_object_attdproc
nvo_attd_proc.is_proc_from = "EMPSEP"
ls_errcode = nvo_attd_proc.gbf_attd_proc(ls_relieve_period , ls_empcode , ls_empcode , &
ls_work_site , ls_work_site , "0" , "ZZ" , &
0 , ldt_period_todate , ls_proc_window , 1)
nvo_attd_proc.is_proc_from = "MANUAL"
}*/
}
//}
}
//}
System.out.println("errString:::==> [" + errString + "]");
if(errString != null && errString.trim().length() > 0)
{
conn.rollback();
//return errString;
}
}
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e1)
{
e1.printStackTrace();
}
}
return errString;
}
public String gbfRetrieveSeparation(String asEmpCode, Timestamp adResiDate ,Connection conn) throws ITMException
{
String lsStatus = "", lsEmpCode = "", lsErrCode = "", lsWinName = "",lsDataObj= "";
Timestamp ldReliDate = null, ldResiDate = null;
String ediOption = "";
String sql;
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
System.out.println("Inside gbfRetrieveSeparation Method..!!!!");
sql = "select status ,relieve_date from separation where emp_code = ? and resi_date = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, asEmpCode);
pstmt.setTimestamp(2, adResiDate);
rs = pstmt.executeQuery();
if(rs.next())
{
lsStatus = checkNull(rs.getString("status"));
ldReliDate = rs.getTimestamp("relieve_date");
System.out.println("lsStatus::: " + lsStatus + " ldReliDate:::: " + ldReliDate);
}
else
{
lsErrCode = itmDBAccessEJB.getErrorString("", "VTNOROWS", userId, "", conn);
return lsErrCode;
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if("C".equalsIgnoreCase(lsStatus))
{
lsErrCode = itmDBAccessEJB.getErrorString("", "VTRCONF1", userId, "", conn);
return lsErrCode;
}
else if("X".equalsIgnoreCase(lsStatus))
{
lsErrCode = itmDBAccessEJB.getErrorString("", "VTSEPCAN", userId, "", conn);
return lsErrCode;
}
else
{
lsErrCode = gbfConfSeparation(asEmpCode , adResiDate , ldReliDate , conn);
System.out.println("lsErrCode coming from gbfConfSeparation ::==> [" + lsErrCode + "]");
if(lsErrCode != null && lsErrCode.trim().length() > 0)
{
conn.rollback();
return lsErrCode;
}
}
if(lsErrCode != null && lsErrCode.trim().length() > 0)
{
conn.rollback();
}
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e1)
{
e1.printStackTrace();
}
}
return lsErrCode;
}
public String gbfConfSeparation(String asEmpCode, Timestamp adResiDate, Timestamp adReliDate, Connection conn) throws ITMException
{
String lsErrCode = "" , lsStatus = "",todayDate = "",payrollDateStr = "",fullFinalHdrId = "",thiswin = "",keyString = "";
String paySite = "",workSite = "",empSite = "",currCode = "";
Timestamp ldResigned = null, ldToday = null;
SimpleDateFormat sdf = null;
String sql = "";
PreparedStatement pstmt = null, pstmtTranId = null, pstmtInsertFullFinalHdr = null;
ResultSet rs = null;
int cntRows = 0,cntInsert = 0;
double totalAmt = 0.00,itAmt = 0.00,amount = 0.00;
try
{
System.out.println("gbfConfSeparation Method....!!!!");
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
todayDate = sdf.format(new java.util.Date());
ldToday = Timestamp.valueOf(genericUtility.getValidDateString(todayDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("ldToday==>" + ldToday);
do
{
sql = "select resi_date from employee where emp_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, asEmpCode);
rs = pstmt.executeQuery();
if(rs.next())
{
ldResigned = rs.getTimestamp("resi_date");
System.out.println("ldResigned:::: " + ldResigned);
}
else
{
lsErrCode = itmDBAccessEJB.getErrorString("", "DS000", userId, "", conn);
break;
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(ldResigned == null)
{
sql = "update employee set resi_date = ? ,relieve_date = ? where emp_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, adResiDate);
pstmt.setTimestamp(2, adReliDate);
pstmt.setString(3, asEmpCode);
cntRows = pstmt.executeUpdate();
if(cntRows == 0)
{
lsErrCode = itmDBAccessEJB.getErrorString("", "DS000NR", userId, "", conn);
break;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
else if(ldResigned.equals(adResiDate))
{
sql = "update employee set resi_date = ? , relieve_date = ? where emp_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, adResiDate);
pstmt.setTimestamp(2, adReliDate);
pstmt.setString(3, asEmpCode);
cntRows = pstmt.executeUpdate();
if(cntRows == 0)
{
lsErrCode = itmDBAccessEJB.getErrorString("", "DS000NR", userId, "", conn);
break;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
else
{
lsErrCode = itmDBAccessEJB.getErrorString("", "VTRESIDT", userId, "", conn); // already resigned
break;
}
thiswin = "w_fullfinal";
sql = "SELECT KEY_STRING as key_string FROM TRANSETUP WHERE TRAN_WINDOW = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, thiswin);
rs = pstmt.executeQuery();
if (rs.next())
{
keyString = checkNull(rs.getString("key_string"));
System.out.println("keyString==> " + keyString);
}
else
{
lsErrCode = itmDBAccessEJB.getErrorString("", "VTSEQ", userId, "", conn);
return lsErrCode;
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
sql = "select pay_site, work_site,emp_site from employee where emp_code = ? ";
pstmtTranId = conn.prepareStatement(sql);
pstmtTranId.setString(1, asEmpCode);
rs = pstmtTranId.executeQuery();
if(rs.next())
{
paySite = checkNull(rs.getString("pay_site"));
workSite = checkNull(rs.getString("work_site"));
empSite = checkNull(rs.getString("emp_site"));
}
System.out.println("paySite::: " + paySite + "workSite::: " + workSite + "empSite:::" + empSite);
if(rs != null)
{
rs.close();
rs = null;
}
if (pstmtTranId != null)
{
pstmtTranId.close();
pstmtTranId = null;
}
sql = "select c.curr_code from employee e,site s,currency c,finent f where emp_code = ? and e.emp_site = s.site_code and f.fin_entity = s.fin_entity " +
" and f.curr_code = c.curr_code ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, asEmpCode);
rs = pstmt.executeQuery();
if(rs.next())
{
currCode = checkNull(rs.getString("curr_code"));
System.out.println("currency Code==> " + currCode);
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
payrollDateStr = checkNull(genericUtility.getValidDateTimeString(ldToday, genericUtility.getApplDateFormat()));
String xmlValues = "";
xmlValues = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
xmlValues = xmlValues + "<Header></Header>";
xmlValues = xmlValues + "<Detail1>";
xmlValues = xmlValues + "<tran_id></tran_id>";
xmlValues = xmlValues + "<pay_site>" + paySite + "</pay_site>";
xmlValues = xmlValues + "<emp_site>" + empSite + "</emp_site>";
xmlValues = xmlValues + "<work_site>" + workSite + "</work_site>";
xmlValues = xmlValues + "<tran_date>" + payrollDateStr + "</tran_date>";
xmlValues = xmlValues + "</Detail1></Root>";
System.out.println("xmlValues :[" + xmlValues + "]");
TransIDGenerator tg = new TransIDGenerator(xmlValues, "BASE", CommonConstants.DB_NAME);
fullFinalHdrId = tg.generateTranSeqID("E-FNFS", "tran_id", keyString, conn);
tg = null;
System.out.println("Generated Tran ID for FULLFINAL_HDR ::[" + fullFinalHdrId + "]");
sql = "Insert into fullfinal_hdr (TRAN_ID,TRAN_DATE,EMP_CODE,RELIEVE_DATE,TOTAL_AMT,CONFIRMED,CHG_DATE,CHG_USER,CHG_TERM,IT_AMT,CURR_CODE,AMOUNT)"
+ "values (?,?,?,?,?,'N',?,?,?,?,?,?)";
pstmtInsertFullFinalHdr = conn.prepareStatement(sql);
System.out.println("runMode==> " + runMode);
if("I".equalsIgnoreCase(runMode))
{
sql = "update separation set status = 'C', conf_date = ? , emp_code__conf = ? " +
"where emp_code = ? and resi_date = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, ldToday);
pstmt.setString(2, loginEmpCode);
pstmt.setString(3, asEmpCode);
pstmt.setTimestamp(4, adResiDate);
cntRows = pstmt.executeUpdate();
System.out.println("cntRows===>[" + cntRows + "]");
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
pstmtInsertFullFinalHdr.setString(1, fullFinalHdrId);
pstmtInsertFullFinalHdr.setTimestamp(2, ldToday);
pstmtInsertFullFinalHdr.setString(3, asEmpCode);
pstmtInsertFullFinalHdr.setTimestamp(4, adReliDate);
pstmtInsertFullFinalHdr.setDouble(5, totalAmt);
pstmtInsertFullFinalHdr.setTimestamp(6, ldToday);
pstmtInsertFullFinalHdr.setString(7, userId);
pstmtInsertFullFinalHdr.setString(8, chgTerm);
pstmtInsertFullFinalHdr.setDouble(9, itAmt);
pstmtInsertFullFinalHdr.setString(10, currCode);
pstmtInsertFullFinalHdr.setDouble(11, amount);
cntInsert = pstmtInsertFullFinalHdr.executeUpdate();
System.out.println("cntInsert===>[" + cntInsert + "]");
if(pstmtInsertFullFinalHdr != null)
{
pstmtInsertFullFinalHdr.close();
pstmtInsertFullFinalHdr = null;
}
}
else
{
sql = "update separation set status = 'C' where emp_code = ? and resi_date = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, asEmpCode);
pstmt.setTimestamp(2, adResiDate);
cntRows = pstmt.executeUpdate();
System.out.println("cntRows===>[" + cntRows + "]");
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
pstmtInsertFullFinalHdr.setString(1, fullFinalHdrId);
pstmtInsertFullFinalHdr.setTimestamp(2, ldToday);
pstmtInsertFullFinalHdr.setString(3, asEmpCode);
pstmtInsertFullFinalHdr.setTimestamp(4, adReliDate);
pstmtInsertFullFinalHdr.setDouble(5, totalAmt);
pstmtInsertFullFinalHdr.setTimestamp(6, ldToday);
pstmtInsertFullFinalHdr.setString(7, userId);
pstmtInsertFullFinalHdr.setString(8, chgTerm);
pstmtInsertFullFinalHdr.setDouble(9, itAmt);
pstmtInsertFullFinalHdr.setString(10, currCode);
pstmtInsertFullFinalHdr.setDouble(11, amount);
cntInsert = pstmtInsertFullFinalHdr.executeUpdate();
System.out.println("cntInsert===>[" + cntInsert + "]");
if(pstmtInsertFullFinalHdr != null)
{
pstmtInsertFullFinalHdr.close();
pstmtInsertFullFinalHdr = null;
}
}
if(cntRows == 0)
{
lsErrCode = itmDBAccessEJB.getErrorString("", "DS000NR", userId, "", conn);
break;
}
break;
}
while(true);
if(lsErrCode != null && lsErrCode.trim().length() > 0)
{
conn.rollback();
}
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (pstmtTranId != null)
{
pstmtTranId.close();
pstmtTranId = null;
}
if(pstmtInsertFullFinalHdr != null)
{
pstmtInsertFullFinalHdr.close();
pstmtInsertFullFinalHdr = null;
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
return lsErrCode;
}
private String checkNull(String input)
{
if (input == null)
{
input = "";
}
else
{
input = input.trim();
}
return input;
}
}
\ No newline at end of file
package ibase.webitm.ejb.adm.adv;
import java.rmi.RemoteException;
import java.sql.Connection;
import javax.ejb.Local;
import ibase.webitm.utility.ITMException;
@Local
public interface EmployeeSepConfirmLocal
{
public String confirm(String tranId, String xtraParams, String forcedFlag)throws RemoteException,ITMException;
public String gbfPostLogic(String asTranidFr,String asTranidTo, String xtraParams,String forcedFlag,Connection conn) throws ITMException;
}
package ibase.webitm.ejb.adm.adv;
import java.rmi.RemoteException;
import java.sql.Connection;
import javax.ejb.Remote;
import ibase.webitm.utility.ITMException;
@Remote
public interface EmployeeSepConfirmRemote
{
public String confirm(String tranId, String xtraParams, String forcedFlag)throws RemoteException,ITMException;
public String gbfPostLogic(String asTranidFr,String asTranidTo, String xtraParams,String forcedFlag,Connection conn) throws ITMException;
}
update system_events set service_code='prcm_default_ejb', comp_type='JB', comp_name='ibase.webitm.ejb.adm.adv.EmployeeSepConfirm' where event_code='pre_confirm' and obj_name='emp_separation';
Insert into system_event_services(SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,CHG_DATE,CHG_USER,CHG_TERM,SERVICE_NAMESPACE,RES_ELEM,SOAP_ACTION) values ('prcm_default_ejb','Action To confirm indent requisition','http://localhost:9090/axis/services/ActionHandlerService','Base','confirm','String','S',null,null,to_timestamp('24-JAN-18','DD-MON-RR HH.MI.SSXFF AM'),'base ','base',null,null,null);
Insert into system_service_args (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prcm_default_ejb',1,'COMPONENT_TYPE','I','Component Type','S',null,to_timestamp('01-JUN-12','DD-MON-RR HH.MI.SSXFF AM'),'BASE ','BASE','JB');
Insert into system_service_args (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prcm_default_ejb',2,'COMPONENT_NAME','I','Component Name','S',null,to_timestamp('01-JUN-12','DD-MON-RR HH.MI.SSXFF AM'),'BASE ','BASE',null);
Insert into system_service_args (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prcm_default_ejb',3,'<tran_id>','I','tranid','B.String',null,to_timestamp('01-JUN-12','DD-MON-RR HH.MI.SSXFF AM'),'BASE ','BASE',null);
Insert into system_service_args (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prcm_default_ejb',4,'XTRA_PARAMS','I','Extra Arguments','S',null,to_timestamp('01-JUN-12','DD-MON-RR HH.MI.SSXFF AM'),'BASE ','BASE',null);
Insert into system_service_args (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prcm_default_ejb',5,'FORCED_FLAG','I','Forced Flag','S',null,to_timestamp('01-JUN-12','DD-MON-RR HH.MI.SSXFF AM'),'BASE ','BASE',null);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment