Commit 91c1d60c authored by sshinde's avatar sshinde

Add Drop Down For EOR Location TO See Those Location which hav eStock


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97804 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 64509c22
...@@ -61,12 +61,12 @@ public class EORLocationStockBean implements Serializable ...@@ -61,12 +61,12 @@ public class EORLocationStockBean implements Serializable
return selectedEntity; return selectedEntity;
} }
public String getEORLocDtl(String locPhyArea, String siteCode,String locationRange, String expDate,String reTestDate) throws RemoteException, ITMException public String getEORLocDtl(String locPhyArea, String siteCode,String locationRange, String expDate,String reTestDate ,String occupiedRack) throws RemoteException, ITMException
{ {
String xmlData =""; String xmlData ="";
try try
{ {
xmlData = eORLocationStockRemote.getEORLocDtl(locPhyArea,siteCode,locationRange,expDate,reTestDate); xmlData = eORLocationStockRemote.getEORLocDtl(locPhyArea,siteCode,locationRange,expDate,reTestDate,occupiedRack);
} }
catch(Exception e) catch(Exception e)
{ {
......
...@@ -142,7 +142,7 @@ public class EORLocationStock extends ValidatorEJB implements EORLocationStockRe ...@@ -142,7 +142,7 @@ public class EORLocationStock extends ValidatorEJB implements EORLocationStockRe
return selectedArea; return selectedArea;
} }
public String getEORLocDtl(String locPhyArea, String siteCode, String locationRange, String expDate, String reTestDate) throws RemoteException, ITMException public String getEORLocDtl(String locPhyArea, String siteCode, String locationRange, String expDate, String reTestDate,String occupiedRack) throws RemoteException, ITMException
{ {
String sql = ""; String sql = "";
ResultSet rs = null, rs1 = null; ResultSet rs = null, rs1 = null;
...@@ -163,6 +163,8 @@ public class EORLocationStock extends ValidatorEJB implements EORLocationStockRe ...@@ -163,6 +163,8 @@ public class EORLocationStock extends ValidatorEJB implements EORLocationStockRe
final String noString = "No"; final String noString = "No";
try try
{ {
System.out.println(" occupiedRack ="+occupiedRack);
//sysDate = "sysdate"; //sysDate = "sysdate";
sqlStr = new StringBuffer(); sqlStr = new StringBuffer();
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
...@@ -181,14 +183,24 @@ public class EORLocationStock extends ValidatorEJB implements EORLocationStockRe ...@@ -181,14 +183,24 @@ public class EORLocationStock extends ValidatorEJB implements EORLocationStockRe
sqlStr.append(" and s.exp_date > " + sysDate); sqlStr.append(" and s.exp_date > " + sysDate);
} }
if (reTestDate != null && reTestDate.trim().length() != 0 && reTestDate.equalsIgnoreCase(yseString)) if (occupiedRack != null && occupiedRack.trim().length() != 0 && occupiedRack.equalsIgnoreCase(yseString))
{
//sqlStr.append(" and s.exp_date <= " + sysDate);
}
else if(occupiedRack != null && occupiedRack.trim().length() != 0 && occupiedRack.equalsIgnoreCase(noString))
{
//sqlStr.append(" and s.exp_date > " + sysDate);
}
/* if (reTestDate != null && reTestDate.trim().length() != 0 && reTestDate.equalsIgnoreCase(yseString))
{ {
sqlStr.append(" and s.retest_date < " + sysDate); sqlStr.append(" and s.retest_date < " + sysDate);
} }
else if(reTestDate != null && reTestDate.trim().length() != 0 && reTestDate.equalsIgnoreCase(noString)) else if(reTestDate != null && reTestDate.trim().length() != 0 && reTestDate.equalsIgnoreCase(noString))
{ {
sqlStr.append(" and s.retest_date > " + sysDate); sqlStr.append(" and s.retest_date > " + sysDate);
} }*/
sql = "select loc_code,loc_phy_row,loc_phy_col,loc_phy_stack from location where loc_phy_area = ? and site_code = ? " + locCode + " order by loc_phy_row, loc_phy_stack ,loc_phy_col"; sql = "select loc_code,loc_phy_row,loc_phy_col,loc_phy_stack from location where loc_phy_area = ? and site_code = ? " + locCode + " order by loc_phy_row, loc_phy_stack ,loc_phy_col";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -229,7 +241,11 @@ public class EORLocationStock extends ValidatorEJB implements EORLocationStockRe ...@@ -229,7 +241,11 @@ public class EORLocationStock extends ValidatorEJB implements EORLocationStockRe
} }
xmlData.append("<loc_phy_col col=\"" + checkNull(rs.getString("loc_phy_col")) + "\">"); xmlData.append("<loc_phy_col col=\"" + checkNull(rs.getString("loc_phy_col")) + "\">");
System.out.println(" before generating sql="); System.out.println(" before generating sql=");
sql = "select s.item_code, s.site_code, s.loc_code, s.lot_no, s.lot_sl, s.exp_date, s.quantity, s.alloc_qty, s.hold_qty , s.mfg_date, s.exp_date, s.retest_date , i.descr from stock s ,item i where s.quantity >0 and s.exp_date <= "+ sysDate +" and s.item_code=i.item_code and s.loc_code = ? and s.site_code = ? " + sqlStr.toString();
//sql = "select s.item_code, s.site_code, s.loc_code, s.lot_no, s.lot_sl, s.exp_date, s.quantity, s.alloc_qty, s.hold_qty , s.mfg_date, s.exp_date, s.retest_date , i.descr from stock s ,item i where s.quantity >0 and s.exp_date <= "+ sysDate +" and s.item_code=i.item_code and s.loc_code = ? and s.site_code = ? " + sqlStr.toString();
sql = " select s.item_code, s.site_code, s.loc_code, s.lot_no, s.lot_sl, s.exp_date, s.quantity, s.alloc_qty, s.hold_qty , s.mfg_date, s.exp_date, s.retest_date , i.descr from stock s ,item i where s.quantity >0 and s.item_code=i.item_code and s.loc_code = ? and s.site_code = ? " + sqlStr.toString();
System.out.println(" site code sql is="+sql); System.out.println(" site code sql is="+sql);
pstmt1 = conn.prepareStatement(sql); pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, locationCode); pstmt1.setString(1, locationCode);
......
...@@ -11,6 +11,6 @@ import javax.ejb.Local; ...@@ -11,6 +11,6 @@ import javax.ejb.Local;
public interface EORLocationStockLocal extends ValidatorLocal public interface EORLocationStockLocal extends ValidatorLocal
{ {
public String getEORLocPhyArea() throws RemoteException, ITMException; public String getEORLocPhyArea() throws RemoteException, ITMException;
public String getEORLocDtl(String locPhyArea,String loginCode,String locationRange,String expDate,String retestDate) throws RemoteException, ITMException; public String getEORLocDtl(String locPhyArea,String loginCode,String locationRange,String expDate,String retestDate,String occupiedRack) throws RemoteException, ITMException;
public String getSelectedArea() throws RemoteException, ITMException; public String getSelectedArea() throws RemoteException, ITMException;
} }
...@@ -11,7 +11,7 @@ import javax.ejb.Remote; ...@@ -11,7 +11,7 @@ import javax.ejb.Remote;
public interface EORLocationStockRemote extends ValidatorRemote public interface EORLocationStockRemote extends ValidatorRemote
{ {
public String getEORLocPhyArea() throws RemoteException, ITMException; public String getEORLocPhyArea() throws RemoteException, ITMException;
public String getEORLocDtl(String locPhyArea,String loginCode,String locationRange,String expDate,String retestDate) throws RemoteException, ITMException; public String getEORLocDtl(String locPhyArea,String loginCode,String locationRange,String expDate,String retestDate,String occupiedRack) throws RemoteException, ITMException;
public String getSelectedArea() throws RemoteException, ITMException; public String getSelectedArea() throws RemoteException, 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