Commit 168dd18c authored by caluka's avatar caluka

change hold lock logic for checking quarantineLock


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97633 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 96908abe
......@@ -43,7 +43,7 @@ public class StockUpdate
//
String lotSlOrg="";
int cnt=0;
int cnt1=0;
int cnt1=0,cnt2=0;
int cntHold=0;
double holdQty=0;
String quarLockCode="",genratedTranId="";
......@@ -518,7 +518,7 @@ public class StockUpdate
if(holdLock.equals("N") && cntHold==0)
//if(holdLock.equals("N") && !(this.tranType.equalsIgnoreCase("R")) )
{
sql="select count(1) as count ,a.lock_code as lock_code From inv_hold a, inv_hold_det b Where a.tran_id = b.tran_id And b.item_code = ? " +
/*sql="select count(1) as count ,a.lock_code as lock_code From inv_hold a, inv_hold_det b Where a.tran_id = b.tran_id And b.item_code = ? " +
"And (b.site_code = ? or b.site_code is null ) " +
"And (b.loc_code = ? or b.loc_code is null ) " +
"And (b.lot_no = ? or b.lot_no is null ) " +
......@@ -546,17 +546,50 @@ public class StockUpdate
pstmt = null;
//Start added by chandrashekar on 08-jan-2015
System.out.println("locCodeList:::["+lockCodeList+"]size:"+lockCodeList.size());
*/
quarantineLock = distCommon.getDisparams("999999", "QUARNTINE_LOCKCODE", conn);
System.out.println("quarantineLock:::::" + quarantineLock);
if (quarantineLock == null || "NULLFOUND".equalsIgnoreCase(quarantineLock) || quarantineLock.trim().length() == 0)
/*if (quarantineLock == null || "NULLFOUND".equalsIgnoreCase(quarantineLock) || quarantineLock.trim().length() == 0)
{
errString = "VTQUARLOCK";
errString = itmDBAccessEJB.getErrorString("",errString,"","",conn);
return errString;
}
}*/
//Start Change by chandrashekar on20-MAR-2015
sql="select count(1) as count From inv_hold a, inv_hold_det b Where a.tran_id = b.tran_id And b.item_code = ? " +
"And (b.site_code = ? or b.site_code is null ) " +
"And (b.loc_code = ? or b.loc_code is null ) " +
"And (b.lot_no = ? or b.lot_no is null ) " +
"And (b.lot_sl = ? or b.lot_sl is null )" +
"And (b.line_no_sl = 0 or b.line_no_sl is null)" +
" And a.lock_code != ? "+
" And a.confirmed='Y' And b.hold_status ='H'";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,this.itemCode);
pstmt.setString(2,this.siteCode);
pstmt.setString(3,this.locationCode);
pstmt.setString(4,this.lotNo);
pstmt.setString(5,this.lotSl);
pstmt.setString(6,quarantineLock);
for(int i = 0; i < lockCodeList.size() ; i++)
rs = pstmt.executeQuery();
while(rs.next())
{
cnt2 = rs.getInt("count");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("cnt2>>>>"+cnt2);
if(cnt2>0)
{
errString = "VTSTKHOLD";
errString = itmDBAccessEJB.getErrorString("",errString,"","",conn);
return errString;
}
// End Change by chandrashekar on20-MAR-2015
/*for(int i = 0; i < lockCodeList.size() ; i++)
{
lockCode=lockCodeList.get(i);
if (lockCode.trim().length() > 0 && !("NULLFOUND".equalsIgnoreCase(quarantineLock)) && quarantineLock.trim().length() > 0 )
......@@ -571,7 +604,7 @@ public class StockUpdate
}
}
}
}
}*/
//End added by chandrashekar on 08-jan-2015
/*if(cnt1>0)
......
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