Commit 7bd23ac2 authored by msharma's avatar msharma

Active_pick_allow Column added in header (DI3ESUN014)


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93457 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ead35668
......@@ -97,6 +97,7 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
PreparedStatement pstmt = null ;
ResultSet rs = null;
String siteCodeShip=""; // added by cpatil on 27/06/13
String activePickAllow="";
ConnDriver connDriver = new ConnDriver();
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
......@@ -222,6 +223,18 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
pstmt = null;
}
}
else if(childNodeName.equalsIgnoreCase("active_pick_allow"))
{
activePickAllow = genericUtility.getColumnValue("active_pick_allow", dom);
System.out.println("activePickAllow----"+activePickAllow);
if(activePickAllow==null || activePickAllow.length()==0 || ((!"Y".equalsIgnoreCase(activePickAllow)) && (!"N".equalsIgnoreCase(activePickAllow))))
{
errCode = "VTINVPICK";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
......@@ -734,6 +747,7 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
ResultSet rs = null ;
GenericUtility genericUtility = GenericUtility.getInstance();
ConnDriver connDriver = new ConnDriver();
String activePickAllow="";
try
{
System.out.println("@@@@@@@@@@@ itemchange method called for ---->>>>["+currentColumn+"]");
......@@ -813,6 +827,9 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
valueXmlString.append("<add_user protect = \"1\">").append("<![CDATA[" + chgUser + "]]>").append("</add_user>");
valueXmlString.append("<add_term protect = \"1\">").append("<![CDATA[" + chgTerm + "]]>").append("</add_term>");
*/
activePickAllow=genericUtility.getColumnValue("active_pick_allow", dom);
activePickAllow=activePickAllow==null?"Y":activePickAllow;
valueXmlString.append("<active_pick_allow protect = \"1\">").append("<![CDATA[" + activePickAllow + "]]>").append("</active_pick_allow>");
}
else if(currentColumn.trim().equalsIgnoreCase("sale_order"))
{
......@@ -830,6 +847,24 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
valueXmlString.append("<site_code__ship>").append("<![CDATA[" + siteCodeShip + "]]>").append("</site_code__ship>");
valueXmlString.append("<site_ship_descr>").append("<![CDATA[" + siteCodeShipDescr + "]]>").append("</site_ship_descr>");
// added by cpatil on 25/06/13 end
sSQL = " SELECT W.ACTIVE_PICK_ALLOW " +
" FROM SORDER S, CUSTOMER C, WAVE_TYPE W WHERE SALE_ORDER = ? " +
" AND C.CUST_CODE = S.CUST_CODE__DLV " +
" AND C.WAVE_TYPE = W.WAVE_TYPE ";
pstmt=conn.prepareStatement(sSQL);
pstmt.setString(1,saleOrder);
rs=pstmt.executeQuery();
if(rs.next())
{
activePickAllow=rs.getString(1);
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
activePickAllow=activePickAllow==null?"Y":activePickAllow;
valueXmlString.append("<active_pick_allow>").append("<![CDATA[" + activePickAllow + "]]>").append("</active_pick_allow>");
}
// added by cpatil on 25/06/13 start
else if(currentColumn.trim().equalsIgnoreCase("site_code__ship"))
......@@ -914,6 +949,8 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
saleOrder = checkNull(genericUtility.getColumnValue("sale_order", dom));
lineNoSord = checkNull(genericUtility.getColumnValue("line_no__sord", dom));
expLev = checkNull(genericUtility.getColumnValue("exp_lev", dom));
activePickAllow=genericUtility.getColumnValue("active_pick_allow", dom1);
activePickAllow=activePickAllow==null?"Y":activePickAllow;
lineNoSord = " " + lineNoSord.trim();
lineNoSord = lineNoSord.substring( lineNoSord.length()-3 );
......@@ -973,7 +1010,7 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
Map stockDeatil = new HashMap();
//stockDeatil = getStockDetail(siteCode, saleOrder, lineNoSord, conn, itemCode);//COMMENTED BY MANOJ DTD 27/06/2013 to get Stock etail for Site ode Ship
stockDeatil = getStockDetail(siteCodeShip, saleOrder, lineNoSord, conn, itemCode);
stockDeatil = getStockDetail(siteCodeShip, saleOrder, lineNoSord, conn, itemCode,activePickAllow);
/**
* stockDetail.put("qtyAvail", qtyAvail);
* stockDetail.put("lotNo", lotNo);
......@@ -1634,7 +1671,7 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
*/
//Changed by Rohan on 13-06-13 for bug fixing of quantity not greater than pending quantity.end
//Changed by sumit on 07/03/13 getting value after sale order and line_no_sord start
private Map getStockDetail(String siteCode, String saleOrder, String lineNoSord, Connection conn, String itemCode) throws ITMException
private Map getStockDetail(String siteCode, String saleOrder, String lineNoSord, Connection conn, String itemCode,String activePickAllow) throws ITMException
{
String singleLot = "";
String resrvLoc = "";
......@@ -1718,7 +1755,11 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
deepStoreLoc = discommon.getDisparams("999999","DEEP_STORE_INVSTAT",conn);
partialResrvLoc = discommon.getDisparams("999999","PRSRV_INVSTAT",conn);
System.out.println("CASE_PICK_INVSTAT"+casePickLoc+"ACTIVE_PICK_INVSTAT"+activePickLoc+"RESERV_LOCATION"+resrvLoc+"PARTIAL RESERVE LOC["+partialResrvLoc+"]");
if("N".equalsIgnoreCase(activePickAllow))
{
activePickLoc="";
partialResrvLoc="";
}
sSingleLotSql = "SELECT STOCK.LOT_NO,STOCK.LOT_SL,"
+"STOCK.LOC_CODE, "
+"STOCK.UNIT, "
......
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