Commit 45c70653 authored by ysawant's avatar ysawant

* Added new migrated component of Arrears On Encashment menu

empleave_ench_arr11.xml
empleave_ench_arr21.xml
LveEncArrCanc.java
w_empleave_ench_arr.sql
d_empleave_ench_arr_brow.srd
d_empleave_ench_arr_edit.srd
LveEncArrApprove.java
LveEncArrApproveLocal.java
LveEncArrApproveRemote.java
EmpLeaveEnchArrIC.java
EmpLeaveEnchArrICLocal.java
EmpLeaveEnchArrICRemote.java
ArrearsOnEncashment.png
ArrearsOnEncashmentwht.png



git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@208610 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1c31ff13
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import org.w3c.dom.Document;
import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException;
public interface EmpLeaveEnchArrICLocal extends ValidatorLocal
{
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(Document dom, Document dom1,Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(String xmlString, String xmlString1,String xmlString2, String objContext, String editFlag,String xtraParams) throws RemoteException,ITMException ;
public String wfValData(Document dom, Document dom1, Document dom2,String objContext, String editFlag, String xtraParams)throws RemoteException, ITMException;
}
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import org.w3c.dom.Document;
import ibase.webitm.ejb.ValidatorRemote;
import ibase.webitm.utility.ITMException;
public interface EmpLeaveEnchArrICRemote extends ValidatorRemote
{
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(Document dom, Document dom1,Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(String xmlString, String xmlString1,String xmlString2, String objContext, String editFlag,String xtraParams) throws RemoteException,ITMException ;
public String wfValData(Document dom, Document dom1, Document dom2,String objContext, String editFlag, String xtraParams)throws RemoteException, ITMException;
}
This diff is collapsed.
package ibase.webitm.ejb.adm.adv;
import java.rmi.RemoteException;
import java.sql.Connection;
import ibase.webitm.utility.ITMException;
public interface LveEncArrApproveLocal
{
public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
public String gbfPostLogic(String asTranidFr, String asTranidTo, String xtraParams,Connection conn) throws ITMException;
}
package ibase.webitm.ejb.adm.adv;
import java.rmi.RemoteException;
import java.sql.Connection;
import ibase.webitm.utility.ITMException;
public interface LveEncArrApproveRemote
{
public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
public String gbfPostLogic(String asTranidFr, String asTranidTo, String xtraParams,Connection conn) throws ITMException;
}
......@@ -83,6 +83,7 @@ public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLoc
}
catch(Exception e )
{
System.out.println("Exception from actionHandler method --["+ e.getMessage() +"]");
e.printStackTrace();
throw new ITMException(e);
......@@ -93,7 +94,6 @@ public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLoc
}
public String actionHandler(String tranID, String xtraParams, String forcedFlag, Connection conn) throws SQLException, ITMException
{
System.out.println("Inside actionHandler tranID=["+tranID+"]xtraParams=["+xtraParams+"]forcedFlag=["+forcedFlag+"]");
String sql = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
......@@ -123,9 +123,6 @@ public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLoc
int cnt = 0;
int count =0;
double enchAmt = 0.0;
//Modified by Dipesh p. on [12/07/2019][Start]
double enchAmtDiff = 0.0;
//Modified by Dipesh p. on [12/07/2019][End]
int updCount = 0;
String tranIdLve = "";
Timestamp ConfDateCurrent = null;
......@@ -137,10 +134,6 @@ public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLoc
//Modified by Anjali R. on [25/09/2018][Start]
String remArrTanId = "";
//Modified by Anjali R. on [25/09/2018][End]
//Modified by Anjali R. on [25/09/2018][Start]
String chgTerm = "";
//Modified by Anjali R. on [25/09/2018][End]
try
{
E12GenericUtility genericUtility = new E12GenericUtility();
......@@ -150,15 +143,8 @@ public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLoc
simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"chgTerm");
System.out.println("chgUser==["+chgUser+"]chgTerm==["+chgTerm+"]");
//Modified by Dipesh p. on [12/07/2019][Start]
/*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 = ?";*/
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,ench_amt__diff "
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 = ?";
//Modified by Dipesh p. on [12/07/2019][End]
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranID);
rs = pstmt.executeQuery();
......@@ -174,9 +160,6 @@ public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLoc
status = checkNull(rs.getString("STATUS"));
ConfDateCurrent = rs.getTimestamp("aprv_date");
tranIdLve = checkNull(rs.getString("tran_id__lve"));
//Modified by Dipesh p. on [12/07/2019][Start]
enchAmtDiff = rs.getDouble("ench_amt__diff");
//Modified by Dipesh p. on [12/07/2019][End]
}
if(rs != null)
{
......@@ -188,7 +171,7 @@ public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLoc
pstmt.close();
pstmt = null;
}
System.out.println("status ====>"+status);
if("X".equalsIgnoreCase(status))
{
errString = itmDBAccessEJB.getErrorString("", "VTADMLVE05", chgUser,"",conn);
......@@ -239,16 +222,17 @@ public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLoc
//Modified by Anjali R. on [19/09/2018][End]
if(tranDate != null)
{
tranDateStr = genericUtility.getValidDateString(tranDate, genericUtility.getDBDateTimeFormat());
//Modified by Yashwant on [23/09/2019][Start]
//tranDateStr = genericUtility.getValidDateString(tranDate, genericUtility.getDBDateTimeFormat());
tranDateStr = genericUtility.getValidDateString(tranDate, genericUtility.getApplDateFormat());
System.out.println("tranDateStr---["+tranDateStr+"]");
//Modified by Yashwant on [23/09/2019][End]
//Commented by sarita as data is coming in DBDateTimeFormat format so getting error on again formatting 30 JULY 2019 [START]
//ADDED BY AMMIT SHRIVASTAVA ON 1/14/2019[START]
/* lveDateStrTimestamp = Timestamp.valueOf(genericUtility.getValidDateTimeString(tranDateStr, genericUtility.getApplDateFormat()
,genericUtility.getDBDateFormat()));
System.out.println("@Amit @ tranDateTimestamp::::"+lveDateStrTimestamp);*/
//lveDateStrTimestamp = Timestamp.valueOf(genericUtility.getValidDateTimeString(tranDateStr, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()));
lveDateStrTimestamp = Timestamp.valueOf(genericUtility.getValidDateString(tranDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("@Amit @ tranDateTimestamp::::"+lveDateStrTimestamp);
//ADDED BY AMMIT SHRIVASTAVA ON 1/14/2019[END.]
//Commented by sarita as data is coming in DBDateTimeFormat format so getting error on again formatting 30 JULY 2019 [END]
}
//Modified by Anjali R. on [19/09/2018][Start]
/*if(status != null && status.trim().length() > 0 || !status.equalsIgnoreCase("N"))
......@@ -257,7 +241,7 @@ public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLoc
if("Y".equalsIgnoreCase(allowEnvLveCancel ))
{*/
System.out.println("status -------->"+status);
if(status != null && status.trim().length() > 0 && status.equalsIgnoreCase("A"))
{
String siteCode = "" , cadreCode = "" , gradeCode = "";
......@@ -305,17 +289,12 @@ public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLoc
sql = "select FN_CHECK_ACCOUNTING_YEAR(?,?,?,?,?) as err_code from dual";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
// Modified by Piyush on 02/08/2019 [Tran id of Encashment arrears to be passed and not leave tran id]
// pstmt.setString(2, tranIdLve);
pstmt.setString(2, tranID);
pstmt.setString(2, tranIdLve);
pstmt.setString(3, chgUser);
//ADDED BY AMIT SHRIVASTAVA ON 1/14/2019 [START]
//pstmt.setString(4, tranDateStr);
//Modified By sarita on 30 JULY 2019 [START]
//pstmt.setTimestamp(4, lveDateStrTimestamp);
pstmt.setTimestamp(4, tranDate);
pstmt.setTimestamp(4, lveDateStrTimestamp);
//ADDED BY AMIT SHRIVASTAVA ON 1/14/2019 [END.]
//Modified By sarita on 30 JULY 2019 [END]
pstmt.setString(5, "CANC_LVE_ENC_ARR");
rs = pstmt.executeQuery();
if(rs.next())
......@@ -495,18 +474,10 @@ public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLoc
pstmt.setString(3, adCode);
pstmt.setTimestamp(4, frDate);
pstmt.setTimestamp(5, toDate);
//Modified by Dipesh p. [12/07/2019][Start]
//pstmt.setDouble(6, enchAmt * -1);
pstmt.setDouble(6, enchAmtDiff * -1);
//Modified by Dipesh p. [12/07/2019][End]
pstmt.setDouble(6, enchAmt * -1);
pstmt.setTimestamp(7,new java.sql.Timestamp(System.currentTimeMillis()) );
pstmt.setString(8,chgUser);
//Modified by Anjali R. [19/07/2019][Start]
//pstmt.setString(9, chgUser);
pstmt.setString(9, chgTerm);
//Modified by Anjali R. [19/07/2019][End]
pstmt.setString(9, chgUser);
pstmt.setString(10, refNo);
updCount = pstmt.executeUpdate();
if(pstmt != null)
......@@ -528,16 +499,11 @@ public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLoc
//Modified by Anjali R. [31/12/2018][To update chg_date,chg_term and chg_usr][End]
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, refNo);
//Modified by Dipesh p. [12/07/2019][start]
//pstmt.setDouble(2, enchAmt*-1);
pstmt.setDouble(2, enchAmtDiff * -1);
//Modified by Dipesh p. [12/07/2019][End]
pstmt.setDouble(2, enchAmt*-1);
//Modified by Anjali R. [31/12/2018][To update chg_date,chg_term and chg_usr][Start]
pstmt.setTimestamp(3,new java.sql.Timestamp(System.currentTimeMillis()) );
//Modified by Anjali R. [19/07/2019][To update chg_date,chg_term and chg_usr][Start]
//pstmt.setString(4,chgUser);
pstmt.setString(4,chgTerm);
//Modified by Anjali R. [19/07/2019][To update chg_date,chg_term and chg_usr][Start]
pstmt.setString(4,chgUser);
pstmt.setString(5, chgUser);
//Modified by Anjali R. [31/12/2018][To update chg_date,chg_term and chg_usr][End]
......@@ -575,12 +541,10 @@ public class LveEncArrCanc extends ActionHandlerEJB implements LveEncArrCancLoc
System.out.println("count--["+count+"]");
if(count > 0)
{
//Modified by Anjaili R. on [19/07/2019][Start]
//Modified by Anjaili R. on [24/09/2018][Start]
//errString = admCommon.payarrToProcUpdation(prdCodePayroll, prdCodePayroll, empCode, empCode, "PY", "w_empleave_ench_arr", "", adCode,enchAmt*-1 , frDateStr, toDateStr, xtraParams, conn);
//errString = admCommon.payarrToProcUpdation(prdCodePayroll, prdCodePayroll, empCode, empCode, "AR", "w_empleave_ench_arr", "", adCode,enchAmt*-1 , frDateStr, toDateStr, xtraParams, conn);
errString = admCommon.payarrToProcUpdation(prdCodePayroll, prdCodePayroll, empCode, empCode, "AR", "W_ATTD_PROC_NORULE", "", adCode,enchAmt*-1 , frDateStr, toDateStr, xtraParams, conn);
//Modified by Anjaili R. on [19/07/2019][End]
errString = admCommon.payarrToProcUpdation(prdCodePayroll, prdCodePayroll, empCode, empCode, "AR", "w_empleave_ench_arr", "", adCode,enchAmt*-1 , frDateStr, toDateStr, xtraParams, conn);
//Modified by Anjaili R. on [24/09/2018][End]
System.out.println("errString--["+errString+"]");
if(errString != null && errString.trim().length()>0)
......
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