Commit 587be534 authored by rtiwari's avatar rtiwari

CANGE FOR UPDATE LOC CODE


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93857 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9dc4dd25
...@@ -173,7 +173,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -173,7 +173,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
{ {
errString = allocStockToWo(worder,locCodeTo,xtraParams,connOne); errString = allocStockToWo(worder,locCodeTo,xtraParams,connOne);
System.out.println("err String from STOCKTRANS ="+errString); System.out.println("err String from STOCKTRANS ="+errString);
if((errString != null ) && errString.indexOf("Success") > -1 || errString.indexOf("CONFSUCC") >-1)//Added by manoj dtd 23/08/2013 to check whether generated transaction is confirmed successfully if((errString != null ) && errString.indexOf("Success") > -1 || errString.indexOf("CONFSUCC") >-1)
{ {
connOne.commit(); connOne.commit();
System.out.println("--process completed--"); System.out.println("--process completed--");
...@@ -504,6 +504,12 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -504,6 +504,12 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
} }
if(rs != null)
rs.close();
rs = null;
if(pstmt != null)
pstmt.close();
pstmt = null;
System.out.println("Total transaction : "+notrans+" total list size"+list.size()); System.out.println("Total transaction : "+notrans+" total list size"+list.size());
StockTransferConf stconf = new StockTransferConf(); StockTransferConf stconf = new StockTransferConf();
for(int i=0;i<= list.size()-1;i++) for(int i=0;i<= list.size()-1;i++)
...@@ -511,6 +517,19 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -511,6 +517,19 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
retString = stconf.confirm((String)list.get(i),xtraParams,""); retString = stconf.confirm((String)list.get(i),xtraParams,"");
System.out.println("retString from confirmStocktrans :: @"+i+":: "+retString);//CONFSUCC System.out.println("retString from confirmStocktrans :: @"+i+":: "+retString);//CONFSUCC
} }
if((retString != null ) && retString.indexOf("Success") > -1 || retString.indexOf("CONFSUCC") >-1)
{
sql = " update inv_alloc_det set loc_Code = ? where tran_id = ? ";
pstmt = connOne.prepareStatement(sql);
pstmt.setString(1,locCodeTo);
pstmt.setString(2,tranIdInvAlloc);
int rows = pstmt.executeUpdate();
System.out.println("--update rows in process --"+ rows);
if(pstmt != null)
pstmt.close();
pstmt = null;
}
} }
catch(Exception e) catch(Exception e)
......
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