Commit 7d9e7b31 authored by ssarkar's avatar ssarkar

changed by sumit on 22/03/13 for bug of deallocation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92862 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 61cb12a2
...@@ -612,6 +612,7 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal, ...@@ -612,6 +612,7 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
String lotSl ="", saleOrder =""; String lotSl ="", saleOrder ="";
String lineNoSord = "",cartonPickOrder = ""; String lineNoSord = "",cartonPickOrder = "";
String cartonPickLine = "", confirmed = ""; String cartonPickLine = "", confirmed = "";
String pndInvStat = "";
int tranLineNo = 0; int tranLineNo = 0;
java.sql.Date currDate = new java.sql.Date( System.currentTimeMillis() ); java.sql.Date currDate = new java.sql.Date( System.currentTimeMillis() );
...@@ -849,8 +850,24 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal, ...@@ -849,8 +850,24 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
} }
// CHECKING QUANTITY AGAINST // CHECKING QUANTITY AGAINST
if( !"S".equalsIgnoreCase(pickType))
{
pndInvStat = discommon.getDisparams("999999","PND_INVSTAT",conn);
sql = "SELECT LOC_CODE FROM LOCATION WHERE LOC_CODE = ? AND INV_STAT = ? ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, locCode);
pstmt1.setString(2, pndInvStat);
rs = pstmt1.executeQuery();
if( rs.next())
{
errString="INVDEALLQ5";
errString = itmDBAccessEJB.getErrorString("",errString,"","",conn);
return errString;
}
rs.close(); rs = null;
pstmt1.close(); pstmt1 = null;
}
//sql = " "
String refId = checkForReplOrPick(pickOrder, conn); String refId = checkForReplOrPick(pickOrder, conn);
if("REPL".equalsIgnoreCase(refId)) if("REPL".equalsIgnoreCase(refId))
{ {
...@@ -924,7 +941,10 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal, ...@@ -924,7 +941,10 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
deallocArtConfLocal = (DeallocArtConfLocal)ctx.lookup("ibase/DeallocArtConf/local"); deallocArtConfLocal = (DeallocArtConfLocal)ctx.lookup("ibase/DeallocArtConf/local");
errString = deallocArtConfLocal.confirm(tranId, xtraParams, "", conn, false); errString = deallocArtConfLocal.confirm(tranId, xtraParams, "", conn, false);
System.out.println(" ************ errString ******** ["+errString+"]"); System.out.println(" ************ errString ******** ["+errString+"]");
if (errString.indexOf("VTSUCC1") > -1)
{
errString = "";
}
}//try end }//try end
catch(Exception e) catch(Exception e)
...@@ -932,7 +952,7 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal, ...@@ -932,7 +952,7 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
e.printStackTrace(); e.printStackTrace();
try try
{ {
if ( conn != null && !conn.isClosed() ) if ( conn != null && !conn.isClosed())
{ {
conn.rollback(); conn.rollback();
} }
...@@ -961,8 +981,8 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal, ...@@ -961,8 +981,8 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
else else
{ {
System.out.println("errString.indexOf(<Errors>)---------------"+errString.indexOf("<Errors>")); System.out.println("errString.indexOf(<Errors>)---------------"+errString.indexOf("<Errors>"));
if(errString.indexOf("<Errors>") == -1 ) /*if(errString.indexOf("<Errors>") == -1 )
{ {*/
if( errString.trim().length() > 0) if( errString.trim().length() > 0)
{ {
conn.rollback(); conn.rollback();
...@@ -970,7 +990,7 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal, ...@@ -970,7 +990,7 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
errString="VTPRCERR"; errString="VTPRCERR";
errString = itmDBAccessEJB.getErrorString("",errString,"","",conn); errString = itmDBAccessEJB.getErrorString("",errString,"","",conn);
} }
} //}
} }
if( rs != null ) if( rs != null )
......
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