Commit 3097efda authored by arawankar's avatar arawankar

-Changes made in below component to cancel approved leave encashment entries

EmpLeaveCancel.java

-Created new componet for cancel arrears cancellation which calculated on leave encashment.

LveEncArrCanc.java
LveEncArrCancLocal.java
LveEncArrCancRemote.java

-Created new component to generate reversal voucher 
HRVoucherReversal.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@189265 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9f1d46b7
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.adm.adv.PayrollVoucherConf;
import ibase.webitm.ejb.fin.FinCommon;
import ibase.webitm.utility.ITMException;
import ibase.webitm.utility.TransIDGenerator;
/**** This component is for generate reversal payroll voucher*****/
public class HRVoucherReversal
{
public String actionHandler() throws RemoteException,ITMException
{
return "";
}
public String actionHandler(String tranID, String xtraParams, String forcedFlag,Connection conn) throws RemoteException,ITMException
{
ITMDBAccessEJB itmDBAccessEjb = null;
AdmCommon admCommon = null;
FinCommon finCommon = null;
String sql = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql1 = "";
PreparedStatement pstmt1 = null;
ResultSet rs1 = null;
String confirm = "";
String errorString = "";
String empCode = "";
String cctrCodeSal = "";
String bankCode = "";
String deptCode = "";
Timestamp relieveDate = null;
String withHeld = "";
String paySite = "";
String siteCodeAcct = "";
String finEntity = "";
String autoPost = "";
String reversalVoucherTranId = "";
Timestamp tranDate = null;
String tranDateStr = "";
String tranType = "";
Timestamp effDate = null;
Timestamp refDate = null;
String refNo = "";
//String bankCode = "";
String autoPay = "";
String siteCode = "";
//String finEntity = "";
String remarks = "";
String analCode = "";
String paid = "";
String acctCodePay = "";
String cctrCodePay = "";
double totAmt = 0.0;
String entryBatchNo = "";
String vouchType = "";
String currCode = "";
double exchRate = 0.0;
double totAmtBC = 0.0;
String hold = "";
String payMode = "";
String chgTerm = "";
String chgUser = "";
Timestamp chgDate = null;
int lineNo = 0;
String acctCode = "";
String cctrCode = "";
double amountDet = 0.0;
String adCode = "";
String retString = "";
try
{
itmDBAccessEjb = new ITMDBAccessEJB();
admCommon = new AdmCommon();
finCommon = new FinCommon();
E12GenericUtility genericUtility = new E12GenericUtility();
PayrollVoucherConf payrollVoucherConf = new PayrollVoucherConf();
Calendar currentDate = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
String sysDateStr = sdf.format(currentDate.getTime());
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId");
chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
System.out.println("CHG_term :- ["+chgTerm+"]");
System.out.println("CHG_user :- ["+chgUser+"]");
sql = "select confirmed,emp_code,tran_date from payr_voucher where tran_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranID);
rs = pstmt.executeQuery();
if(rs.next())
{
confirm = checkNull(rs.getString("confirmed"));
empCode = checkNull(rs.getString("emp_code"));
tranDate = rs.getTimestamp("tran_date");
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
if(tranDate != null)
{
tranDateStr = genericUtility.getValidDateString(tranDate, genericUtility.getDBDateTimeFormat());
System.out.println("tranDateStr---["+tranDateStr+"]");
}
if("X".equalsIgnoreCase(confirm))
{
//errorString = itmDBAccessEjb.getErrorString("confirmed", "VTADMLVE01", "","",conn);
errorString = "VTADMLVE01";
return errorString;
}
else
{
sql = "SELECT CCTR_CODE__SAL, BANK_CODE, DEPT_CODE, RELIEVE_DATE, WITH_HELD, PAY_SITE FROM EMPLOYEE WHERE EMP_CODE = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
rs = pstmt.executeQuery();
if(rs.next())
{
cctrCodeSal = checkNull(rs.getString("CCTR_CODE__SAL"));
bankCode = checkNull(rs.getString("BANK_CODE"));
deptCode = checkNull(rs.getString("DEPT_CODE"));
relieveDate = rs.getTimestamp("RELIEVE_DATE");
withHeld = checkNull(rs.getString("WITH_HELD"));
paySite = checkNull(rs.getString("PAY_SITE"));
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
sql = "SELECT FIN_ENTITY, SITE_CODE__ACCT FROM SITE WHERE SITE_CODE = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, paySite);
rs = pstmt.executeQuery();
if(rs.next())
{
siteCodeAcct = checkNull(rs.getString("SITE_CODE__ACCT"));
finEntity = checkNull(rs.getString("FIN_ENTITY"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
autoPost = getAutoPostValue (empCode, "AUTO_POST", conn);
if("NULLFOUND".equalsIgnoreCase(autoPost))
{
//errorString = itmDBAccessEjb.getErrorString("", "VSENVAR1", "", "", conn);
errorString = "VSENVAR1";
return errorString;
}
System.out.println("autoPost value:::::[" + autoPost + "]");
reversalVoucherTranId = generateTranId("w_payr_voucher", siteCodeAcct, tranDateStr,conn) ;
System.out.println("reversalVoucherTranId--["+reversalVoucherTranId+"]");
sql = "select TRAN_TYPE, EFF_DATE, REF_DATE, " +
"BANK_CODE, AUTO_PAY, PAY_MODE, SITE_CODE, FIN_ENTITY, REMARKS, " +
"ANAL_CODE, CONFIRMED, PAID, ACCT_CODE__PAY, CCTR_CODE__PAY, TOT_AMT, ENTRY_BATCH_NO, VOUCH_TYPE, " +
"CURR_CODE, EXCH_RATE, TOT_AMT__BC, HOLD from PAYR_VOUCHER where TRAN_ID=?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, tranID);
rs=pstmt.executeQuery();
if(rs.next())
{
tranType = checkNull(rs.getString("TRAN_TYPE"));
effDate = rs.getTimestamp("EFF_DATE");
refDate = rs.getTimestamp("REF_DATE");
bankCode = checkNull(rs.getString("BANK_CODE"));
autoPay = checkNull(rs.getString("AUTO_PAY"));
payMode = checkNull(rs.getString("PAY_MODE"));
siteCode = checkNull(rs.getString("SITE_CODE"));
finEntity = checkNull(rs.getString("FIN_ENTITY"));
remarks = checkNull(rs.getString("REMARKS"));
analCode = checkNull(rs.getString("ANAL_CODE"));
paid = checkNull(rs.getString("PAID"));
acctCodePay = rs.getString("ACCT_CODE__PAY");
cctrCodePay = rs.getString("CCTR_CODE__PAY");
totAmt = rs.getDouble("TOT_AMT");
entryBatchNo = checkNull(rs.getString("ENTRY_BATCH_NO"));
vouchType = checkNull(rs.getString("VOUCH_TYPE"));
currCode = checkNull(rs.getString("CURR_CODE"));
exchRate = rs.getDouble("EXCH_RATE");
totAmtBC = rs.getDouble("TOT_AMT__BC");
hold = checkNull(rs.getString("HOLD"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
System.out.println("@V@ Inserting Payer_voucher");
chgDate=Timestamp.valueOf(genericUtility.getValidDateString(sysDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat())
+ " 00:00:00.0");
//Check period is open or not
errorString = finCommon.nfCheckPeriod("ADM", chgDate, siteCode, conn);
System.out.println("errorString for period checking--["+errorString+"]");
if(errorString != null && errorString.trim().length() >0)
{
return errorString;
}
String refId="";
refId="RV-"+reversalVoucherTranId;
sql = " INSERT INTO PAYR_VOUCHER (TRAN_ID, TRAN_DATE, TRAN_TYPE, EFF_DATE, EMP_CODE, REF_NO, REF_DATE, " +
"BANK_CODE, AUTO_PAY, PAY_MODE, CHG_DATE, CHG_USER, CHG_TERM, SITE_CODE, FIN_ENTITY, REMARKS, " +
"ANAL_CODE, CONFIRMED, PAID, ACCT_CODE__PAY, CCTR_CODE__PAY, TOT_AMT, ENTRY_BATCH_NO, VOUCH_TYPE, " +
"CURR_CODE, EXCH_RATE, TOT_AMT__BC, HOLD) "
+" VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, FN_SYSDATE(), ?, ?, ?, ?, ?, " +
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, reversalVoucherTranId);
pstmt.setTimestamp(2, chgDate);
//pstmt.setString(3, tranType);
pstmt.setString(3, "A");
pstmt.setTimestamp(4, effDate);
pstmt.setString(5, empCode);
pstmt.setString(6, refId);
pstmt.setTimestamp(7, chgDate);
pstmt.setString(8, bankCode);
pstmt.setString(9, autoPay);
pstmt.setString(10, payMode);
pstmt.setString(11, chgUser);
pstmt.setString(12, chgTerm);
pstmt.setString(13, siteCode);
pstmt.setString(14, finEntity);
pstmt.setString(15, remarks);
pstmt.setString(16, analCode);
pstmt.setString(17, "N");
pstmt.setString(18, paid);
pstmt.setString(19, acctCodePay);
pstmt.setString(20, cctrCodePay);
pstmt.setDouble(21, (totAmt*-1));
pstmt.setString(22, entryBatchNo);
pstmt.setString(23, vouchType);
pstmt.setString(24, currCode);
pstmt.setDouble(25, exchRate);
pstmt.setDouble(26, totAmtBC);
pstmt.setString(27, hold);
int payrVoucherInsertCount = pstmt.executeUpdate();
System.out.println("@V@ row insert into payr_voucher :: " + payrVoucherInsertCount);
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
sql="select LINE_NO, ACCT_CODE, CCTR_CODE, AMOUNT, AD_CODE from PAYR_VOUCHDET where tran_id=?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, tranID);
rs=pstmt.executeQuery();
while(rs.next())
{
lineNo=rs.getInt("LINE_NO");
acctCode=checkNull(rs.getString("ACCT_CODE"));
cctrCode=checkNull(rs.getString("CCTR_CODE"));
amountDet=rs.getDouble("AMOUNT");
adCode=rs.getString("AD_CODE");
System.out.println("@V@ Inserting Payer_voucher_det");
sql1 = "INSERT INTO PAYR_VOUCHDET (TRAN_ID, LINE_NO, ACCT_CODE, CCTR_CODE, AMOUNT, AD_CODE) "
+" VALUES (?, ?, ?, ?, ?, ?)";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, reversalVoucherTranId);
pstmt1.setInt(2, lineNo);
pstmt1.setString(3, acctCode);
pstmt1.setString(4, cctrCode);
pstmt1.setDouble(5, amountDet*-1);
pstmt1.setString(6, adCode);
int payrVouchDetInsert = pstmt1.executeUpdate();
System.out.println("@V@ row insert into payr_vouchdet " + payrVouchDetInsert);
if(pstmt1 != null)
{
pstmt1.close();
pstmt1 = null;
}
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if("Y".equalsIgnoreCase(autoPost))
{
retString = checkNull(payrollVoucherConf.confirm(reversalVoucherTranId, forcedFlag, xtraParams, conn));
System.out.println("retString---["+retString+"]");
}
if(retString.length() > 0 && retString.indexOf("VTMCONF2") != -1 )
{
errorString = "";
System.out.println("@V@ Payrol voucher confirmed..");
}
else
{
errorString = retString;
}
}
}
catch(Exception e)
{
System.out.println("Exception in actionHandler method--["+ e.getMessage()+"]");
e.printStackTrace();
}
finally
{
try
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e )
{
System.out.println("Exception in finally block --["+ e.getMessage()+"]");
e.printStackTrace();
}
}
return errorString;
}
private String checkNull(String input)
{
if (input == null || ("null").equalsIgnoreCase(input.trim()))
{
input = "";
}
else
{
input = input.trim();
}
return input;
}
private String getAutoPostValue(String empCode, String varName, Connection conn) throws ITMException
{
String autoPost="",sql="";
PreparedStatement pstmt=null;
ResultSet rs=null;
try {
sql="select ddf_hr_site_env_value(?,SYSDATE,?)as var_value from dual";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setString(2, varName);
rs=pstmt.executeQuery();
if(rs.next())
{
autoPost = rs.getString("var_value");
}
System.out.println("autoPost----["+autoPost+"]");
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch (SQLException e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if(pstmt!=null)
{
pstmt.close();
pstmt=null;
}
if(rs!=null)
{
rs.close();
rs=null;
}
}
catch (SQLException e)
{
e.printStackTrace();
throw new ITMException(e);
}
}
return autoPost;
}
private String generateTranId( String windowName, String siteCode, String tranDateStr,Connection conn) throws ITMException
{
PreparedStatement pstmt = null;
ResultSet rs = null;
String selSql = "";
String tranId = "";
String tranSer = "";
String keyString = "";
String keyCol = "";
String xmlValues = "";
try
{
System.out.println("generateTranId() called...");
selSql = "SELECT KEY_STRING, TRAN_ID_COL, REF_SER FROM TRANSETUP WHERE TRAN_WINDOW = ? ";
pstmt = conn.prepareStatement(selSql);
pstmt.setString( 1, windowName );
rs = pstmt.executeQuery();
if (rs.next())
{
keyString = rs.getString("KEY_STRING");
keyCol = rs.getString("TRAN_ID_COL");
tranSer = rs.getString("REF_SER");
}
// close(pstmt, rs);
pstmt.close();
pstmt=null;
rs.close();
rs=null;
System.out.println("keyString :"+keyString);
System.out.println("keyCol :"+keyCol);
System.out.println("tranSer :"+tranSer);
xmlValues ="<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
xmlValues = xmlValues + "<Header></Header>";
xmlValues = xmlValues + "<Detail1>";
xmlValues = xmlValues + "<tran_id></tran_id>";
xmlValues = xmlValues + "<site_code>" + siteCode + "</site_code>";
xmlValues = xmlValues + "<tran_date>" + tranDateStr + "</tran_date>";
xmlValues = xmlValues + "</Detail1></Root>";
System.out.println("xmlValues :["+xmlValues+"]");
TransIDGenerator transIDGenerator = new TransIDGenerator(xmlValues, "BASE", CommonConstants.DB_NAME);
tranId = transIDGenerator.generateTranSeqID(tranSer, keyCol, keyString, conn);
System.out.println("tranId :"+tranId);
}
catch (SQLException ex)
{
System.out.println("Exception :HRVoucherReversal :generateTranId :SQLException ::" +selSql+ ex.getMessage() + ":");
ex.printStackTrace();
throw new ITMException(ex);
}
catch (Exception e)
{
System.out.println("Exception :HRVoucherReversal :generateTranId :Exception ::" + e.getMessage() + ":");
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
}
return tranId;
}
}
......@@ -8,6 +8,8 @@ import ibase.webitm.ejb.ITMDBAccessEJB;
//import ibase.webitm.ejb.ITMDBAccessLocal;
import ibase.webitm.ejb.adm.AdmCommon;
import ibase.webitm.ejb.adm.AttdProcess;
//Added by Anjali R. on[06/08/2018][To create reversal voucher on cancel of leave encashment]
import ibase.webitm.ejb.adm.HRVoucherReversal;
import ibase.webitm.ejb.adm.LeaveEncase;
import ibase.webitm.ejb.sys.UtilMethods;
import ibase.webitm.utility.ITMException;
......@@ -17,6 +19,8 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -40,6 +44,11 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
private String leaveXmlData = "";
private ProteusDataSource proteusDataSource = null;
//Modified by Anjali R. on [07/08/2018][Start]
private String ExtraParams = "";
private String forceFlag = "";
//Modified by Anjali R. on [07/08/2018][End]
public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException
{
genericUtility = new E12GenericUtility();
......@@ -49,6 +58,10 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
try
{
conn = getConnection();
//Modified by Anjali R. on [07/08/2018][Start]
ExtraParams = xtraParams;
forceFlag = forcedFlag;
//Modified by Anjali R. on [07/08/2018][End]
retString = confirm( tranId, xtraParams, forcedFlag, conn);
}
catch(Exception e)
......@@ -115,7 +128,7 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
this.termId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId");
this.loginEmpCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode");
//Added & Commented by sarita to create object instead creating lookup for ITMDBAccessEJB on 20 JULY 18 [START]
//appConnect = new AppConnectParm();
//initialCtx = new InitialContext(appConnect.getProperty());
......@@ -400,7 +413,7 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
{
cfDate = lveDateFr;
}
if(noRows > 0)
{
if(val3.before(cfDate))
......@@ -548,7 +561,7 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
count1 = count1 + 1;
cfDateList[count1] = effDate;
System.out.println("effDate ::::"+effDate);
if(cfDateList.length > 0)
{
// BoLeaveOpenBalance leaveBal = new BoLeaveOpenBalance();
......@@ -649,10 +662,24 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
{
if(status.equals("A"))
{
errCode = "VTEMPLVE21";
//Modified by Anjali R. on [03/08/2018][To cancel approved leave encashment entries][Start]
/*errCode = "VTEMPLVE21";
this.errList.add(errCode);
this.fldList.add("");
break;
break;*/
//cancellation of approved leaves in case of encashment
errCode = cancelEnchLeaves(tranId,connectionObject);
System.out.println("errCode--["+errCode+"]");
if(errCode != null && errCode.trim().length() > 0)
{
errCode = errCode;
System.out.println("errCode---["+errCode+"]");
this.errList.add(errCode);
this.fldList.add("");
break;
}
//Modified by Anjali R. on [03/08/2018][To cancel approved leave encashment entries][End]
}
}
else if(useFlag.equals("L"))
......@@ -694,8 +721,8 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
this.fldList.add("");
break;
}
String empCodeAprv = "",lveType = "",prdCode = "",remarks = "",tranIdPayr="",
authEmp = "",authEmpAlternate = "",chgdate = "",chguser = "",chgterm = "",
leaveStarts = "",leaveEnds = "";
......@@ -736,12 +763,12 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
enchAmt = rs1.getDouble("ENCH_AMT");
noDays = rs1.getDouble("NO_DAYS");
status = checkNull(rs1.getString("STATUS"));
//Modified by Anjali R. on[04/06/2018][To take status date in timestamp data type][Start]
//statusDate1 = checkNull(rs1.getString("STATUS_DATE"));
statusDate1 = rs1.getTimestamp("STATUS_DATE");
//Modified by Anjali R. on[04/06/2018][To take status date in timestamp data type][End]
prdCode = checkNull(rs1.getString("PRD_CODE"));
remarks = checkNull(rs1.getString("REMARKS"));
tranIdPayr = checkNull(rs1.getString("TRAN_ID__PAYR"));
......@@ -754,13 +781,13 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
authEmpAlternate = checkNull(rs1.getString("AUTH_EMP_ALTERNATE"));
leaveStarts = checkNull(rs1.getString("LEAVE_STARTS"));
leaveEnds = checkNull(rs1.getString("LEAVE_ENDS"));
//Modified by Anjali R. on[04/06/2018][To take START_TIME,END_TIME in timestamp data type][Start]
//startTime = checkNull(rs1.getString("START_TIME"));
//endTime = checkNull(rs1.getString("END_TIME"));
startTime = rs1.getTimestamp("START_TIME");
endTime = rs1.getTimestamp("END_TIME");
chgDate = rs1.getTimestamp("current_date");
//Modified by Anjali R. on[04/06/2018][To take START_TIME,END_TIME in timestamp data type][End]
}
......@@ -784,14 +811,14 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
ps2 = connectionObject.prepareStatement(newSql);
ps2.setString(1, tranId);
ps2.setString(2, empCode);
//Modified by Anjali R. on[04/06/2018][To set timestamp values in lve from and to][Start]
//ps2.setString(3, lvefrdate1.length() > 0?genericUtility.getValidDateString(lvefrdate1, genericUtility.getDBDateFormat(),genericUtility.getApplDateFormat()):null);
//ps2.setString(4, lvetodate1.length() > 0?genericUtility.getValidDateString(lvetodate1, genericUtility.getDBDateFormat(),genericUtility.getApplDateFormat()):null);
ps2.setTimestamp(3, lveFromDate);
ps2.setTimestamp(4, lveToDate);
//Modified by Anjali R. on[04/06/2018][To set timestamp values in lve from and to][End]
ps2.setString(5, lveCode);
ps2.setString(6, empCodeAprv);
//Modified by Anjali R. on[06/06/2018][To set aprv date in timestamp data type][Start]
......@@ -803,12 +830,12 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
ps2.setDouble(10, enchAmt);
ps2.setDouble(11, noDays);
ps2.setString(12, status);
//Modified by Anjali R. on[04/06/2018][To set status date in timestamp data type][Start]
//ps2.setString(13, statusDate1.length() > 0?genericUtility.getValidDateString(statusDate1,genericUtility.getDBDateFormat(), genericUtility.getApplDateFormat()):null);
ps2.setTimestamp(13, statusDate1);
//Modified by Anjali R. on[04/06/2018][To set status date in timestamp data type][End]
ps2.setString(14, prdCode);
ps2.setString(15, remarks);
ps2.setString(16, tranIdPayr);
......@@ -1011,4 +1038,345 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
}
return input;
}
//Modified by Anjali R. on[06/08/2018][Added method to cancel leave approved encashment entries.][Start]
private String cancelEnchLeaves(String tranId ,Connection conn) throws ITMException
{
String sql = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
String empCode = "";
String encashMode = "";
String prdCodePayroll = "";
String tranIdPayr = "";
double enchAmt = 0.0;
String adCode = "";
String lveCode = "";
int month = 0;
int cnt = 0;
int updCount = 0;
String refNo = "";
int count = 0;
Timestamp frDate = null;
Timestamp toDate = null;
Timestamp lveDateFr = null;
String retString = "";
String frDateStr = "";
String toDateStr = "";
String lveDateFrStr = "";
String arrearVoucherStatus = "";
String siteCode = "";
String finYearErr = "";
SimpleDateFormat simpleDateFormat = null;
ITMDBAccessEJB itmdbAccessEJB = null;
E12GenericUtility genericUtility = null;
HRVoucherReversal hrVoucherReversal = null;
AdmCommon admCommon = null;
try
{
itmdbAccessEJB = new ITMDBAccessEJB();
genericUtility = new E12GenericUtility();
hrVoucherReversal = new HRVoucherReversal();
admCommon = new AdmCommon();
simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
siteCode = genericUtility.getValueFromXTRA_PARAMS(ExtraParams, "loginSiteCode");
System.out.println("siteCode--["+siteCode+"]");
sql = "select emp_code,ench_amt,encash_mode,prd_code__payroll,tran_id__payr,lve_code,lve_date_fr from empleave where tran_id =?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
if(rs.next())
{
empCode = checkNull(rs.getString("emp_code"));
encashMode = checkNull(rs.getString("encash_mode"));
prdCodePayroll = checkNull(rs.getString("prd_code__payroll"));
tranIdPayr = checkNull(rs.getString("tran_id__payr"));
enchAmt = rs.getDouble("ench_amt");
lveCode = checkNull(rs.getString("lve_code"));
lveDateFr = rs.getTimestamp("lve_date_fr");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(lveDateFr != null)
{
lveDateFrStr = genericUtility.getValidDateString(lveDateFr, genericUtility.getDBDateTimeFormat());
System.out.println("tranDateStr---["+lveDateFrStr+"]");
}
String allowEnvLveCancel = admCommon.getEnv("999999", "ALLOW_CANCEL_LVEENC", conn);
if("Y".equalsIgnoreCase(allowEnvLveCancel ))
{
//If encashment amount paid through voucher then ench mode is "V" ,through payroll then ench mode "P"
if("V".equalsIgnoreCase(encashMode))
{
if(tranIdPayr!=null && tranIdPayr.trim().length()>0)
{
sql = "select FN_CHECK_ACCOUNTING_YEAR(?,?,?,?) as err_code from dual";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setString(2, tranIdPayr);
pstmt.setString(3, userId);
pstmt.setString(4, lveDateFrStr);
rs = pstmt.executeQuery();
if(rs.next())
{
finYearErr = checkNull(rs.getString("err_code"));
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
if(finYearErr != null && finYearErr.trim().length() > 0)
{
retString = itmdbAccessEJB.getErrorString("", finYearErr, userId,"",conn);
retString = finYearErr;
return retString;
}
sql = "select status from empleave_ench_arr where tran_id__lve = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
if(rs.next())
{
arrearVoucherStatus = checkNull(rs.getString("status"));
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
//If arrears voucher is exist as confirm status
if("A".equalsIgnoreCase(arrearVoucherStatus))
{
retString = itmdbAccessEJB.getErrorString("", "VTADMLVE04", "","",conn);
retString = "VTADMLVE04";
return retString;
}
else if("X".equalsIgnoreCase(arrearVoucherStatus) || arrearVoucherStatus == null || arrearVoucherStatus.trim().length() == 0)
{
retString = hrVoucherReversal.actionHandler(tranIdPayr, ExtraParams, forceFlag,conn);
System.out.println("retString---["+retString+"]");
}
}
}
else if("P".equalsIgnoreCase(encashMode))
{
sql = "select fr_date, to_date from period where code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, prdCodePayroll);
rs = pstmt.executeQuery();
if(rs.next())
{
frDate = rs.getTimestamp("fr_date");
toDate = rs.getTimestamp("to_date");
}
else
{
retString = itmdbAccessEJB.getErrorString("prd_code", "VTADMLVE03", "", "",conn);
retString = "VTADMLVE03";
return retString;
}
System.out.println("frDate--["+frDate+"]toDate--["+toDate+"]");
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
month = frDate.getMonth() + 1;
System.out.println("month--["+month+"]");
frDateStr = simpleDateFormat.format(frDate);
System.out.println("frDateStr--["+frDateStr+"]");
toDateStr = simpleDateFormat.format(toDate);
System.out.println("toDateStr--["+toDateStr+"]");
refNo = frDateStr+lveCode;
System.out.println("refNo--["+refNo+"]");
sql = "select ad_code__ench from leaves where lve_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lveCode);
rs = pstmt.executeQuery();
if(rs.next())
{
adCode = checkNull(rs.getString("ad_code__ench"));
}
System.out.println("adCode--["+adCode+"]");
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
sql = " select count(*) as cnt from employee_mthad where emp_code = ? and month_code = ? and ad_code = ? and eff_date = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setInt(2, month);
pstmt.setString(3, adCode);
pstmt.setTimestamp(4, frDate);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt("cnt");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
System.out.println("Count --["+cnt+"]");
if(cnt == 0)
{
sql = "insert into employee_mthad (emp_code,month_code,ad_code,eff_date,exp_date,type,amount,chg_date,chg_user,chg_term,ref_type,ref_no)\n" +
"values(?,?,?,?,?,'F',?,?,?,?,'E',?)";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setInt(2, month);
pstmt.setString(3, adCode);
pstmt.setTimestamp(4, frDate);
pstmt.setTimestamp(5, toDate);
pstmt.setDouble(6, enchAmt * -1);
pstmt.setTimestamp(7,new java.sql.Timestamp(System.currentTimeMillis()) );
pstmt.setString(8,userId);
pstmt.setString(9, termId);
pstmt.setString(10, refNo);
updCount = pstmt.executeUpdate();
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
System.out.println("Updated ["+updCount+"] rows in employee_mthad table");
}
else
{
updCount = 0;
sql = "update employee_mthad set ref_type = 'E' ,ref_no = ?,type = 'F',amount = amount + ? "
+ "where emp_code = ? and month_code = ? and ad_code = ? and eff_date = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, refNo);
pstmt.setDouble(2, enchAmt*-1);
pstmt.setString(3, empCode);
pstmt.setInt(4, month);
pstmt.setString(5, adCode);
pstmt.setTimestamp(6, frDate);
updCount = pstmt.executeUpdate();
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
System.out.println("Updated ["+updCount+"] rows in employee mthad table.");
}
sql = "select count(1) as cnt from payroll where emp_code = ? and prd_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setString(2, prdCodePayroll);
rs = pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt("cnt");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
System.out.println("count--["+count+"]");
if(count > 0)
{
retString = admCommon.payarrToProcUpdation(prdCodePayroll, prdCodePayroll, empCode, empCode, "PY", "w_empleave", "", adCode,enchAmt*-1 , frDateStr, toDateStr, ExtraParams, conn);
System.out.println("retString--["+retString+"]");
}
}
}
}
catch(Exception e)
{
System.out.println("Exception in cancelEnchLeaves--["+e.getMessage()+"]");
e.printStackTrace();
try
{
conn.rollback();
}
catch (SQLException e1)
{
System.out.println("SQLException---["+e1.getMessage()+"]");
e1.printStackTrace();
throw new ITMException(e1);
}
System.out.println("Exception---["+e.getMessage()+"]");
e.printStackTrace();
retString = "DS000";
return retString;
}
finally
{
try
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e)
{
System.out.println("Exception in finally block--["+e.getMessage()+"]");
e.printStackTrace();
}
}
return retString;
}
//Modified by Anjali R. on[06/08/2018][Added method to cancel leave approved encashment entries.][End]
}
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.SQLException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import javax.ejb.Stateless;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ActionHandlerEJB;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.adm.AdmCommon;
import ibase.webitm.ejb.adm.HRVoucherReversal;
import ibase.webitm.utility.ITMException;
@Stateless
public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLocal,LveEncArrCancRemote
{
@Override
public String actionHandler() throws RemoteException,ITMException
{
return "";
}
public String actionHandler(String tranID, String xtraParams, String forcedFlag) throws RemoteException,ITMException
{
System.out.println("LveEncArrCanc---[actionHandler]");
System.out.println("\t tranId : " + tranID + "\n\t xtraParams" + xtraParams + "\n\t forcedFlag" + forcedFlag);
String retString = null;
Connection conn = null;
ITMDBAccessEJB itmdbAccessEJB = null;
try
{
conn = getConnection();
itmdbAccessEJB = new ITMDBAccessEJB();
retString = actionHandler(tranID, xtraParams, forcedFlag, conn);
System.out.println("retString----["+retString+"]");
if(retString != null && retString.trim().length() >0)
{
conn.rollback();
System.out.println("retString---["+retString+"]");
retString = itmdbAccessEJB.getErrorString("", retString, "","",conn);
}
else
{
conn.commit();
retString = itmdbAccessEJB.getErrorString("", "VTADMLVE02", "","",conn);//Voucher cancelled successfully message
}
}
catch (SQLException e)
{
System.out.println("Exception in actionHandler---["+e.getMessage()+"]");
e.printStackTrace();
try
{
conn.rollback();
}
catch (SQLException e1)
{
e1.printStackTrace();
}
}
System.out.println("retString--["+retString+"]");
return retString;
}
public String actionHandler(String tranID, String xtraParams, String forcedFlag, Connection conn) throws SQLException, ITMException
{
String sql = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
String tranIdVoucher = "";
Timestamp tranDate = null;
//Timestamp currentDate = null;
String chgUser = "";
String empCode = "";
String tranDateStr = "";
String accountingYearerror = "";
ITMDBAccessEJB itmDBAccessEJB = null;
String errString = "";
String payMode = "";
String retString = "";
String lveCode = "";
String prdCodePayroll = "";
Timestamp frDate = null;
Timestamp toDate = null;
String frDateStr = "";
String toDateStr = "";
String adCode = "";
String refNo = "";
String status = "";
int month = 0;
int cnt = 0;
int count =0;
double enchAmt = 0.0;
int updCount = 0;
String tranIdLve = "";
Timestamp ConfDateCurrent = null;
Timestamp confDateRem = null;
HRVoucherReversal hrVoucherReversal = null;
SimpleDateFormat simpleDateFormat = null;
AdmCommon admCommon = null;
try
{
E12GenericUtility genericUtility = new E12GenericUtility();
itmDBAccessEJB = new ITMDBAccessEJB();
hrVoucherReversal = new HRVoucherReversal();
admCommon = new AdmCommon();
simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
sql = "select tran_date,tran_id__payr,emp_code,pay_mode,lve_code,PRD_CODE__PAYROLL,ENCH_AMT__NEW,STATUS,aprv_date,tran_id__lve "
+ "from empleave_ench_arr where tran_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranID);
rs = pstmt.executeQuery();
if(rs.next())
{
tranDate = rs.getTimestamp("tran_date");
tranIdVoucher = checkNull(rs.getString("tran_id__payr"));
empCode = checkNull(rs.getString("emp_code"));
payMode = checkNull(rs.getString("pay_mode"));
lveCode = checkNull(rs.getString("lve_code"));
prdCodePayroll = checkNull(rs.getString("PRD_CODE__PAYROLL"));
enchAmt= rs.getDouble("ENCH_AMT__NEW");
status = checkNull(rs.getString("STATUS"));
ConfDateCurrent = rs.getTimestamp("aprv_date");
tranIdLve = checkNull(rs.getString("tran_id__lve"));
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
if("X".equalsIgnoreCase(status))
{
//errString = itmDBAccessEJB.getErrorString("", "VTADMLVE05", chgUser,"",conn);
errString = "VTADMLVE05";
return errString;
}
sql = "select aprv_date from empleave_ench_arr where tran_id__lve = ? AND status = 'A' order by aprv_date desc";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranIdLve);
rs = pstmt.executeQuery();
if(rs.next())
{
confDateRem = rs.getTimestamp("aprv_date");
if(ConfDateCurrent.before(confDateRem))
{
//errString = itmDBAccessEJB.getErrorString("", "VTADMLVE06", chgUser,"",conn);
errString = "VTADMLVE06";
return errString;
}
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
if(tranDate != null)
{
tranDateStr = genericUtility.getValidDateString(tranDate, genericUtility.getDBDateTimeFormat());
System.out.println("tranDateStr---["+tranDateStr+"]");
}
if(status != null && status.trim().length() > 0 || !status.equalsIgnoreCase("N"))
{
String allowEnvLveCancel = admCommon.getEnv("999999", "ALLOW_CANCEL_LVEENC", conn);
if("Y".equalsIgnoreCase(allowEnvLveCancel ))
{
if("V".equalsIgnoreCase(payMode))
{
if(tranIdVoucher!=null && tranIdVoucher.trim().length()>0)
{
sql = "select FN_CHECK_ACCOUNTING_YEAR(?,?,?,?) as err_code from dual";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setString(2, tranIdVoucher);
pstmt.setString(3, chgUser);
pstmt.setString(4, tranDateStr);
rs = pstmt.executeQuery();
if(rs.next())
{
accountingYearerror = checkNull(rs.getString("err_code"));
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
if(accountingYearerror != null && accountingYearerror.trim().length() > 0)
{
//errString = itmDBAccessEJB.getErrorString("", accountingYearerror, chgUser,"",conn);
errString = accountingYearerror;
return errString;
}
//Cal HRVoucherReversal component to generate reversal voucher
retString = hrVoucherReversal.actionHandler(tranIdVoucher, xtraParams, forcedFlag, conn);
System.out.println("retString---["+retString+"]");
/*if(retString == null || retString.trim().length() == 0)
{
sql = "update empleave_ench_arr set status = 'X' where tran_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranID);
updCount = pstmt.executeUpdate();
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}*/
}
}
else if("P".equalsIgnoreCase(payMode))
{
sql = "select fr_date, to_date from period where code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, prdCodePayroll);
rs = pstmt.executeQuery();
if(rs.next())
{
frDate = rs.getTimestamp("fr_date");
toDate = rs.getTimestamp("to_date");
}
else
{
//retString = itmDBAccessEJB.getErrorString("prd_code", "VTADMLVE03", "", "",conn);
retString = "VTADMLVE03";
return retString;
}
System.out.println("frDate--["+frDate+"]toDate--["+toDate+"]");
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
month = frDate.getMonth() + 1;
System.out.println("month--["+month+"]");
frDateStr = simpleDateFormat.format(frDate);
System.out.println("frDateStr--["+frDateStr+"]");
toDateStr = simpleDateFormat.format(toDate);
System.out.println("toDateStr--["+toDateStr+"]");
refNo = frDateStr+lveCode;
System.out.println("refNo--["+refNo+"]");
sql = "select ad_code__ench from leaves where lve_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lveCode);
rs = pstmt.executeQuery();
if(rs.next())
{
adCode = checkNull(rs.getString("ad_code__ench"));
}
System.out.println("adCode--["+adCode+"]");
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
sql = " select count(*) as cnt from employee_mthad where emp_code = ? and month_code = ? and ad_code = ? and eff_date = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setInt(2, month);
pstmt.setString(3, adCode);
pstmt.setTimestamp(4, frDate);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt("cnt");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
System.out.println("Count --["+cnt+"]");
if(cnt == 0)
{
sql = "insert into employee_mthad (emp_code,month_code,ad_code,eff_date,exp_date,type,amount,chg_date,chg_user,chg_term,ref_type,ref_no)\n" +
"values(?,?,?,?,?,'F',?,?,?,?,'E',?)";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setInt(2, month);
pstmt.setString(3, adCode);
pstmt.setTimestamp(4, frDate);
pstmt.setTimestamp(5, toDate);
pstmt.setDouble(6, enchAmt * -1);
pstmt.setTimestamp(7,new java.sql.Timestamp(System.currentTimeMillis()) );
pstmt.setString(8,chgUser);
pstmt.setString(9, chgUser);
pstmt.setString(10, refNo);
updCount = pstmt.executeUpdate();
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
System.out.println("Updated ["+updCount+"] rows in employee_mthad table");
}
else
{
updCount = 0;
sql = "update employee_mthad set ref_type = 'E' ,ref_no = ?,type = 'F',amount = amount + ? "
+ "where emp_code = ? and month_code = ? and ad_code = ? and eff_date = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, refNo);
pstmt.setDouble(2, enchAmt*-1);
pstmt.setString(3, empCode);
pstmt.setInt(4, month);
pstmt.setString(5, adCode);
pstmt.setTimestamp(6, frDate);
updCount = pstmt.executeUpdate();
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
System.out.println("Updated ["+updCount+"] rows in employee mthad table.");
}
sql = "select count(1) as cnt from payroll where emp_code = ? and prd_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setString(2, prdCodePayroll);
rs = pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt("cnt");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
System.out.println("count--["+count+"]");
if(count > 0)
{
retString = admCommon.payarrToProcUpdation(prdCodePayroll, prdCodePayroll, empCode, empCode, "PY", "w_empleave_ench_arr", "", adCode,enchAmt*-1 , frDateStr, toDateStr, xtraParams, conn);
System.out.println("retString--["+retString+"]");
if(retString != null && retString.trim().length()>0)
{
return retString;
}
}
}
}
}
if(retString == null || retString.trim().length() == 0)
{
sql = "update empleave_ench_arr set status = 'X' where tran_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranID);
updCount = pstmt.executeUpdate();
System.out.println("updCount--["+updCount+"]");
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
}
catch(Exception e)
{
System.out.println("Exception in actionHandler [LveEncArrCanc]----["+e.getMessage()+"]");
e.printStackTrace();
conn.rollback();
throw new ITMException(e);
}
finally
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
return retString;
}
private String checkNull(String input)
{
if (input == null || ("null").equalsIgnoreCase(input.trim()))
{
input = "";
}
else
{
input = input.trim();
}
return input;
}
}
package ibase.webitm.ejb.adm.adv;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.SQLException;
import javax.ejb.Local;
import ibase.webitm.ejb.ActionHandlerLocal;
import ibase.webitm.utility.ITMException;
@Local
public interface LveEncArrCancLocal extends ActionHandlerLocal
{
public String actionHandler() throws RemoteException,ITMException;
public String actionHandler(String tranID, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
public String actionHandler(String tranID, String xtraParams, String forcedFlag, Connection conn) throws SQLException, ITMException;
}
package ibase.webitm.ejb.adm.adv;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.SQLException;
import javax.ejb.Local;
import ibase.webitm.ejb.ActionHandlerRemote;
import ibase.webitm.utility.ITMException;
@Local
public interface LveEncArrCancRemote extends ActionHandlerRemote
{
public String actionHandler() throws RemoteException,ITMException;
public String actionHandler(String tranID, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
public String actionHandler(String tranID, String xtraParams, String forcedFlag, Connection conn) throws SQLException, ITMException;
}
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