Commit f5fea66c authored by msharma's avatar msharma

Changes done by manoj dtd 13/04/2015 to allocates stock from to location


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97813 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 54afdd8e
...@@ -1141,7 +1141,8 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1141,7 +1141,8 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
boolean campflag1 = false; boolean campflag1 = false;
String invstat1 = ""; String invstat1 = "";
DistStkUpdLocal distStkUpd = null; DistStkUpdLocal distStkUpd = null;
HashMap hashMap = new HashMap(); HashMap hashMap = null;
ArrayList hashMapList=new ArrayList();
double aldAllocQty = 0d; double aldAllocQty = 0d;
String line = " " + lineno; String line = " " + lineno;
...@@ -1369,6 +1370,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1369,6 +1370,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
while(rs.next()) while(rs.next())
{ {
ddlg ++; ddlg ++;
hashMap=new HashMap();
hashMap.put("tran_date", new java.sql.Date(System.currentTimeMillis())); hashMap.put("tran_date", new java.sql.Date(System.currentTimeMillis()));
hashMap.put("ref_ser","XFRX"); hashMap.put("ref_ser","XFRX");
hashMap.put("ref_id", rs.getString("tran_id")); hashMap.put("ref_id", rs.getString("tran_id"));
...@@ -1387,7 +1389,9 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1387,7 +1389,9 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
{ {
System.out.println("distStkUpd.UpdAllocTrace(HashMap, Connection) : Sucessuful!"); System.out.println("distStkUpd.UpdAllocTrace(HashMap, Connection) : Sucessuful!");
} }
// hashMap.clear(); hashMapList.add(hashMap);
System.out.println("1393--Printing hashMap--["+hashMap+"]");
hashMap=null;
} }
if(rs != null) if(rs != null)
rs.close(); rs.close();
...@@ -1398,6 +1402,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1398,6 +1402,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
} }
if(worder != null && worder.trim().length() > 0) if(worder != null && worder.trim().length() > 0)
{ {
hashMap=new HashMap();
hashMap.put("tran_date", new java.sql.Date(System.currentTimeMillis())); hashMap.put("tran_date", new java.sql.Date(System.currentTimeMillis()));
hashMap.put("ref_ser","XFRX"); hashMap.put("ref_ser","XFRX");
hashMap.put("ref_id", tranId); hashMap.put("ref_id", tranId);
...@@ -1418,6 +1423,9 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1418,6 +1423,9 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
{ {
System.out.println("distStkUpd.UpdAllocTrace(HashMap, Connection) : Sucessuful!"); System.out.println("distStkUpd.UpdAllocTrace(HashMap, Connection) : Sucessuful!");
} }
hashMapList.add(hashMap);
System.out.println("1426--Printing hashMap--["+hashMap+"]");
hashMap=null;
} }
System.out.println("...............just before savdata() "); System.out.println("...............just before savdata() ");
siteCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode"); siteCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
...@@ -1438,6 +1446,42 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1438,6 +1446,42 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
retString = stconf.confirm(tranIdForIssue,xtraParams,""); retString = stconf.confirm(tranIdForIssue,xtraParams,"");
System.out.println("retString from StockTransferConf :: @:: "+retString);//CONFSUCC System.out.println("retString from StockTransferConf :: @:: "+retString);//CONFSUCC
if(retString.indexOf("CONFSUCC") > -1) if(retString.indexOf("CONFSUCC") > -1)
{
System.out.println("hashMapList.size()["+hashMapList.size()+"]");
//Changes done by manoj dtd 13/04/2015 to allocates stock from to location
if(hashMapList.size()>0)
{
for(int i=0;i<hashMapList.size();i++)
{
hashMap=(HashMap) hashMapList.get(i);
hashMap.put("alloc_qty", -1*Double.parseDouble( hashMap.get("alloc_qty")+""));
hashMap.put("loc_code", locCodeTo);
System.out.println("1456--Printing hashMap--["+hashMap+"]");
if (distStkUpd.updAllocTrace(hashMap, connOne) > 0)
{
System.out.println("Allocation from loccode to is Sucessuful!");
sql = " update inv_alloc_det set loc_code = ? where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? ";
pstmt = connOne.prepareStatement(sql);
pstmt.setString(1,locCodeTo);
pstmt.setString(2,hashMap.get("ref_id")+"");
pstmt.setString(3,hashMap.get("item_code")+"");
pstmt.setString(4,hashMap.get("lot_no")+"");
pstmt.setString(5,hashMap.get("lot_sl")+"");
pstmt.setString(6,locCodeFr);
pstmt.setString(7,hashMap.get("site_code")+"");
pstmt.executeUpdate();
pstmt.close();
pstmt=null;
}
}
}
}
/*if(retString.indexOf("CONFSUCC") > -1)
{ {
stockMap.put("item_code", itemCode); stockMap.put("item_code", itemCode);
...@@ -1758,7 +1802,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1758,7 +1802,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
} }
} }
} }*/
} }
......
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