Commit 22ad7610 authored by piyush's avatar piyush

1) New components created to define site,state and Station wise pay table against

[CCF No. COR09/C034 and AD2KSUN005]
1.1) SiteStanPayTbl.java
1.2) SiteStanPayTblLocal.java
1.3) SiteStanPayTblRemote.java
1.4) site_stan_paytbl11.xml
1.5) site_stan_paytbl21.xml
1.6) AD2KSUN005.sql

2) Bug resolution in shift process ejb
2.1) ShiftProcess.java

3) Changes done in emptransfersql21.xml


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93033 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d502fd6f
......@@ -8,7 +8,6 @@ import java.util.*;
import java.sql.*;
import java.text.SimpleDateFormat;
import org.w3c.dom.*;
import javax.ejb.*;
import ibase.webitm.utility.ITMException;
......@@ -192,6 +191,7 @@ public class ShiftProcess extends ProcessEJB implements ShiftProcessLocal,ShiftP
double allocQty = 0;
boolean bappend = false ;
boolean flagException = false;
boolean isTransfrFound = false; //Modified by Prashant on [23/01/2013] [ To make sure that whether Employee transeferred or not]
String holiTblNo =null;
int selectedLineNo = 0;
......@@ -417,6 +417,7 @@ public class ShiftProcess extends ProcessEJB implements ShiftProcessLocal,ShiftP
holiTblNo = null;
counter++;
System.out.println(" In Loop .........");
isTransfrFound = false; //Modified by Prashant on [23/01/2013] [ To make sure that whether Employee transeferred or not]
frSqlDate = new java.sql.Date(frDate.getTime());
System.out.println("java.sql.Date From :["+frSqlDate+"]");
......@@ -599,6 +600,8 @@ public class ShiftProcess extends ProcessEJB implements ShiftProcessLocal,ShiftP
toShiftIndexList.add(lastShiftIndexStr);
effDateList.add(empJoinDt);
//Modified by Prashant on [23/01/2013][To change the conditions for selecting values from database][Start]
/*
sql = "SELECT PATTERN_CODE__FR,PATTERN_CODE__TO,EFF_DATE, " +
" CASE WHEN SHIFT_INDEX__FR IS NULL THEN 0 ELSE SHIFT_INDEX__FR END AS SHIFT_INDEX__FR, "+
" CASE WHEN SHIFT_INDEX__TO IS NULL THEN 0 ELSE SHIFT_INDEX__TO END AS SHIFT_INDEX__TO "+
......@@ -606,7 +609,18 @@ public class ShiftProcess extends ProcessEJB implements ShiftProcessLocal,ShiftP
"AND EFF_DATE = (SELECT MAX(EFF_DATE) FROM "+
"EMP_EMPLOY_EVENTS WHERE EMP_CODE = '"+emp+"' AND EFF_DATE < ? ) "+
"AND CONFIRMED = 'Y' AND (nvl(PATTERN_CODE__FR,' ') <> nvl(PATTERN_CODE__TO, ' ') or nvl(SHIFT_INDEX__FR,'0') <> nvl(SHIFT_INDEX__TO ,'0')) "+
"ORDER BY EFF_DATE DESC,CONF_DATE DESC,CHG_DATE DESC"; //Sql modify by jaimin on 16/06/2008 (AD89SUN014)
"ORDER BY EFF_DATE DESC,CONF_DATE DESC,CHG_DATE DESC";
//Sql modify by jaimin on 16/06/2008 (AD89SUN014)
*/
sql = "SELECT PATTERN_CODE__FR,PATTERN_CODE__TO,EFF_DATE, " +
" CASE WHEN SHIFT_INDEX__FR IS NULL THEN 0 ELSE SHIFT_INDEX__FR END AS SHIFT_INDEX__FR, "+
" CASE WHEN SHIFT_INDEX__TO IS NULL THEN 0 ELSE SHIFT_INDEX__TO END AS SHIFT_INDEX__TO "+
" FROM EMP_EMPLOY_EVENTS WHERE EMP_CODE = '"+emp+"' "+
"AND EFF_DATE = (SELECT MAX(EFF_DATE) FROM "+
"EMP_EMPLOY_EVENTS WHERE EMP_CODE = '"+emp+"' AND EFF_DATE < ? AND CONFIRMED = 'Y' AND (nvl(PATTERN_CODE__FR,' ') <> nvl(PATTERN_CODE__TO, ' ') or nvl(SHIFT_INDEX__FR,'0') <> nvl(SHIFT_INDEX__TO ,'0')))"+
"AND CONFIRMED = 'Y' AND (nvl(PATTERN_CODE__FR,' ') <> nvl(PATTERN_CODE__TO, ' ') or nvl(SHIFT_INDEX__FR,'0') <> nvl(SHIFT_INDEX__TO ,'0')) "+
"ORDER BY EFF_DATE DESC,CONF_DATE DESC,CHG_DATE DESC";
//Modified by Prashant on [23/01/2013][To change the conditions for selecting values from database][End]
//Modified by Rupesh on [26/10/2012][CCF No.:COR10/C252 -AD01SUN037 & COR11/C025-AD1ASUN002][To fetch only confirmed transaction and in proper order][End]
......@@ -636,6 +650,7 @@ public class ShiftProcess extends ProcessEJB implements ShiftProcessLocal,ShiftP
{
lastShiftIndexStr = "1";
}
isTransfrFound = true; // Modified by Prashant on [23/01/2013] [ to check whether employee is transfered or not]
if (frPatternCodeList.size() > 0 )
{
frPatternCodeList.set(0 , lastPatternCodeStr);
......@@ -689,6 +704,7 @@ public class ShiftProcess extends ProcessEJB implements ShiftProcessLocal,ShiftP
{
lastShiftIndexStr = "1";
}
isTransfrFound = true; // Modified by Prashant on [23/01/2013] [ to check whether employee is transfered or not]
if (frPatternCodeList.size() > 0 )
{
frPatternCodeList.set(0 , lastPatternCodeStr);
......@@ -732,8 +748,10 @@ public class ShiftProcess extends ProcessEJB implements ShiftProcessLocal,ShiftP
shiftIndexTo = 0;
lastPatternCodeStr = "";
lastShiftIndexStr = "";
int noOfTrf = 0;
while( patternRs.next() )
{
noOfTrf++;
edShiftDate = null;
shiftIndexTo = 0;
lastPatternCodeStr = "";
......@@ -749,8 +767,17 @@ public class ShiftProcess extends ProcessEJB implements ShiftProcessLocal,ShiftP
//if(shiftStDate2.compareTo(joiningDate)< 0)
if (edShiftDate.compareTo( frSqlDate) == 0)
{
isTransfrFound = true; // Modified by Prashant on [23/01/2013] [ to check whether employee is transfered or not]
if (frPatternCodeList.size() > 0)
{
// Added by Prashant on [30/01/2013] [ to check whether Pattern Code List is containing more than one Pattern or not] [Start]
// Modified by Piyush on 18/03/2013 - It should be 1 and not 0
//if (noOfTrf > 0)
if (noOfTrf > 1)
{
continue;
}
// Added by Prashant on [30/01/2013] [ to check whether Pattern Code List is containing more than one Pattern or not] [End]
frPatternCodeList.set(0 , lastPatternCodeStr);
toPatternCodeList.set(0 , lastPatternCodeStr);
frShiftIndexList.set(0 , lastShiftIndexStr);
......@@ -768,16 +795,55 @@ public class ShiftProcess extends ProcessEJB implements ShiftProcessLocal,ShiftP
}
else if (edShiftDate.compareTo( toSqlDate ) <= 0)
{
// Added by Prashant on [30/01/2013] [ to check whether from End Shift Date is present as Effective Date or not] [Start]
if(effDateList.contains(edShiftDate))
{
continue;
}
// Added by Prashant on [30/01/2013] [ to check whether from End Shift Date is present as Effective Date or not] [End]
isTransfrFound = true; // Modified by Prashant on [23/01/2013] [ to check whether employee is transfered or not]
frPatternCodeList.add(lastPatternCodeStr);
toPatternCodeList.add(lastPatternCodeStr);
frShiftIndexList.add(lastShiftIndexStr);
toShiftIndexList.add(lastShiftIndexStr);
effDateList.add(edShiftDate);
}
// Modified by Prashant on [23/01/2013] [to set/add employee detail if not transfered ] [Start]
/*
else
{
break;
}
*/
else
{
if (isTransfrFound != true )
{
lastPatternCodeStr = checkNull(patternRs.getString( "PATTERN_CODE__FR" )).trim();
shiftIndexFr = patternRs.getInt("SHIFT_INDEX__FR");
lastShiftIndexStr = checkNull(shiftIndexFr+"").trim();
if (frPatternCodeList.size() == 1)
{
frPatternCodeList.set(0 , lastPatternCodeStr);
toPatternCodeList.set(0 , lastPatternCodeStr);
frShiftIndexList.set(0 , lastShiftIndexStr);
toShiftIndexList.set(0 , lastShiftIndexStr);
effDateList.set(0 , frSqlDate);
}
else
{
frPatternCodeList.add(lastPatternCodeStr);
toPatternCodeList.add(lastPatternCodeStr);
frShiftIndexList.add(lastShiftIndexStr);
toShiftIndexList.add(lastShiftIndexStr);
effDateList.add(frSqlDate);
}
}
break;
}
// Modified by Prashant on [23/01/2013] [to set/add employee detail if not transfered ] [End]
}
patternRs.close();
......
This diff is collapsed.
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
@javax.ejb.Local
public interface SiteStanPayTblLocal extends ValidatorLocal
{
public String wfValData() throws RemoteException,ITMException;
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
}
\ No newline at end of file
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
@javax.ejb.Remote
public interface SiteStanPayTblRemote extends ValidatorRemote
{
public String wfValData() throws RemoteException,ITMException;
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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