Commit 5c74ea9b authored by akhokar's avatar akhokar

Final changes in Employee separation confirm and sql

EmployeeSepConfirm.java
A18LSUN003.sql


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@199383 ce508802-f39f-4f6c-b175-0d175dae99d5
parent debd3c8b
......@@ -483,7 +483,7 @@ public class EmployeeSepConfirm extends ActionHandlerEJB implements EmployeeSepC
public String gbfConfSeparation(String asEmpCode, Timestamp adResiDate, Timestamp adReliDate, Connection conn) throws ITMException
{
String lsErrCode = "" , lsStatus = "",todayDate = "",payrollDateStr = "",fullFinalHdrId = "",thiswin = "",keyString = "";
String lsErrCode = "" , lsStatus = "",todayDate = "",tranDate = "",fullFinalHdrId = "",thiswin = "",keyString = "";
String paySite = "",workSite = "",empSite = "",currCode = "", varValue = "";
Timestamp ldResigned = null, ldToday = null;
SimpleDateFormat sdf = null;
......@@ -668,7 +668,7 @@ public class EmployeeSepConfirm extends ActionHandlerEJB implements EmployeeSepC
}
if("Y".equalsIgnoreCase(varValue))
{
payrollDateStr = checkNull(genericUtility.getValidDateTimeString(ldToday, genericUtility.getApplDateFormat()));
tranDate = checkNull(genericUtility.getValidDateTimeString(ldToday, genericUtility.getApplDateFormat()));
String xmlValues = "";
xmlValues = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
xmlValues = xmlValues + "<Header></Header>";
......@@ -677,7 +677,7 @@ public class EmployeeSepConfirm extends ActionHandlerEJB implements EmployeeSepC
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 + "<tran_date>" + tranDate + "</tran_date>";
xmlValues = xmlValues + "</Detail1></Root>";
System.out.println("xmlValues :[" + xmlValues + "]");
TransIDGenerator tg = new TransIDGenerator(xmlValues, "BASE", CommonConstants.DB_NAME);
......@@ -685,8 +685,8 @@ public class EmployeeSepConfirm extends ActionHandlerEJB implements EmployeeSepC
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',?,?,?,?,?,?)";
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,EFF_DATE)"
+ "values (?,?,?,?,?,'N',?,?,?,?,?,?,?)";
pstmtInsertFullFinalHdr = conn.prepareStatement(sql);
}
......@@ -716,12 +716,13 @@ public class EmployeeSepConfirm extends ActionHandlerEJB implements EmployeeSepC
pstmtInsertFullFinalHdr.setString(3, asEmpCode);
pstmtInsertFullFinalHdr.setTimestamp(4, adReliDate);
pstmtInsertFullFinalHdr.setDouble(5, totalAmt);
pstmtInsertFullFinalHdr.setTimestamp(6, ldToday);
pstmtInsertFullFinalHdr.setTimestamp(6, new java.sql.Timestamp(System.currentTimeMillis()));
pstmtInsertFullFinalHdr.setString(7, userId);
pstmtInsertFullFinalHdr.setString(8, chgTerm);
pstmtInsertFullFinalHdr.setDouble(9, itAmt);
pstmtInsertFullFinalHdr.setString(10, currCode);
pstmtInsertFullFinalHdr.setDouble(11, amount);
pstmtInsertFullFinalHdr.setTimestamp(12, adReliDate);
cntInsert = pstmtInsertFullFinalHdr.executeUpdate();
if(pstmtInsertFullFinalHdr != null)
......@@ -753,12 +754,13 @@ public class EmployeeSepConfirm extends ActionHandlerEJB implements EmployeeSepC
pstmtInsertFullFinalHdr.setString(3, asEmpCode);
pstmtInsertFullFinalHdr.setTimestamp(4, adReliDate);
pstmtInsertFullFinalHdr.setDouble(5, totalAmt);
pstmtInsertFullFinalHdr.setTimestamp(6, ldToday);
pstmtInsertFullFinalHdr.setTimestamp(6, new java.sql.Timestamp(System.currentTimeMillis()));
pstmtInsertFullFinalHdr.setString(7, userId);
pstmtInsertFullFinalHdr.setString(8, chgTerm);
pstmtInsertFullFinalHdr.setDouble(9, itAmt);
pstmtInsertFullFinalHdr.setString(10, currCode);
pstmtInsertFullFinalHdr.setDouble(11, amount);
pstmtInsertFullFinalHdr.setTimestamp(12, adReliDate);
cntInsert = pstmtInsertFullFinalHdr.executeUpdate();
if(pstmtInsertFullFinalHdr != null)
......
......@@ -40,6 +40,11 @@ Insert into site_env (SITE_CODE,MODULE_CODE,LEVEL_TYPE,LEVEL_CODE,PAR_NAME,DESCR
values ('99999','ADM ','X','ZZZZZ','GEN_FFSHDR_ONSEPCONF','Check to insert entry in FullFinal_HDR',to_timestamp('01-APR-19','DD-MON-RR HH.MI.SSXFF AM'),to_timestamp('31-DEC-40','DD-MON-RR HH.MI.SSXFF AM'),'Y',to_timestamp('04-APR-19','DD-MON-RR HH.MI.SSXFF AM'),'E07312 ','25SHITPINAKINR ',null);
-------------Added date column(effective date) in fullfinal_hdr table
alter table fullfinal_hdr add eff_date date;
......
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