Commit 6bb4bdb0 authored by manohar's avatar manohar

bug fixing


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94562 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c1ef5ad5
......@@ -93,7 +93,8 @@ public class LotStatPos extends ValidatorEJB implements LotStatPosLocal, LotStat
HashMap tempMap = null;
//changed by sankara on 16/09/13 for displaying error message.
boolean dataFlag = false;
boolean dataFlag = false, holdFlag = false, relFlag = false;
try
{
dom = genericUtility.parseString(domString);
......@@ -221,6 +222,7 @@ public class LotStatPos extends ValidatorEJB implements LotStatPosLocal, LotStat
//Chnaged by Rohan on 25-07-13 for if lot staus 'R' then aquried new lock configured in disparam.start
if((!"".equalsIgnoreCase(lotStatus) && lotStatus != null) && !lotStatus.equalsIgnoreCase("A") && !isHoldHdr)
{
holdFlag = true;
tranIdHold = generateTranId( "w_inv_hold", siteCode, currDateStr, conn );
System.out.println("tranIdHold"+tranIdHold);
pstmtHdr.setString( 1, tranIdHold );
......@@ -273,6 +275,7 @@ public class LotStatPos extends ValidatorEJB implements LotStatPosLocal, LotStat
{
//changed by sankara on 16/09/13 for displaying error message.
dataFlag = true;
relFlag = true;
lineNoCtr++;
tranIdRel = rs.getString("tran_id");
lineNoRel = rs.getString("line_no");
......@@ -286,6 +289,7 @@ public class LotStatPos extends ValidatorEJB implements LotStatPosLocal, LotStat
//Chnaged by Rohan on 25-07-13 for if lot staus 'R' then aquried new lock configured in disparam.start
if((!"".equalsIgnoreCase(lotStatus) && lotStatus != null) && !lotStatus.equalsIgnoreCase("A"))
{
holdFlag = true;
lineNoHoldCtr++;
locCode = checkNull(rs.getString("loc_code"));
lotSl = checkNull(rs.getString("lot_sl"));
......@@ -345,8 +349,8 @@ public class LotStatPos extends ValidatorEJB implements LotStatPosLocal, LotStat
}
//Changed by Rohan on 26-07-13 for execute batch .end
//if(flag == true)
if(length == ctr)
{
//if(length == ctr)
//{
//Chaged by Rohan on 24-07-13 for releasing stock.start
System.out.println("888888888888 GOing for release old lock 888888888888888888888888");
InvHoldRelConf InvHoldRelConf = new InvHoldRelConf();
......@@ -361,43 +365,46 @@ public class LotStatPos extends ValidatorEJB implements LotStatPosLocal, LotStat
//Changed by Rohan on 24-07-13 for release lot staus 'R' and then put REJECTION_LOCKCODE.start
if((!"".equalsIgnoreCase(lotStatus) && lotStatus != null) && !lotStatus.equalsIgnoreCase("A"))
{
//if((!"".equalsIgnoreCase(lotStatus) && lotStatus != null) && !lotStatus.equalsIgnoreCase("A"))
//{
System.out.println("888888888888 GOing for aqurie new lock 888888888888888888888888");
//update stock hold qty.start
sql = "UPDATE STOCK SET HOLD_QTY = QUANTITY WHERE ITEM_CODE = ? AND SITE_CODE = ? "
+" AND LOC_CODE = ? AND LOT_NO = ? AND LOT_SL = ? ";
pStmt = conn.prepareStatement(sql);
pStmt.setString( 1, itemCodeDet );
pStmt.setString( 2, siteCode );
pStmt.setString( 3, locCode );
pStmt.setString( 4, lotNoDet );
pStmt.setString( 5, lotSl );
int rowcnt = pStmt.executeUpdate();
if(rowcnt == 0)
{
errMsg = itmDBAccessLocal.getErrorString("","VTPRCERR","");
return errMsg;
}
else
{
System.out.println("**************stk hold succefuly ****************");
}
if(pStmt != null)
{
pStmt.close();
pStmt = null;
}
//sql = "UPDATE STOCK SET HOLD_QTY = QUANTITY WHERE ITEM_CODE = ? AND SITE_CODE = ? "
// +" AND LOC_CODE = ? AND LOT_NO = ? AND LOT_SL = ? ";
//pStmt = conn.prepareStatement(sql);
//pStmt.setString( 1, itemCodeDet );
//pStmt.setString( 2, siteCode );
//pStmt.setString( 3, locCode );
//pStmt.setString( 4, lotNoDet );
//pStmt.setString( 5, lotSl );
//int rowcnt = pStmt.executeUpdate();
//if(rowcnt == 0)
//{
// errMsg = itmDBAccessLocal.getErrorString("","VTPRCERR","");
// return errMsg;
//}
//else
//{
// System.out.println("**************stk hold succefuly ****************");
//}
//if(pStmt != null)
//{
// pStmt.close();
// pStmt = null;
//}
//update stock hold qty.end
InvHoldConf invHoldConf = new InvHoldConf();
errMsg = invHoldConf.confirm(tranIdHold,xtraParams, "F" ,conn,false);
if ( errMsg == null && errMsg.trim().length() <= 0 )
if (holdFlag)
{
errMsg = itmDBAccessLocal.getErrorString("","VTPRCERR","");
return errMsg;
InvHoldConf invHoldConf = new InvHoldConf();
errMsg = invHoldConf.confirm(tranIdHold,xtraParams, "F" ,conn,false);
if ( errMsg == null && errMsg.trim().length() <= 0 )
{
errMsg = itmDBAccessLocal.getErrorString("","VTPRCERR","");
return errMsg;
}
}
}
//}
//Changed by Rohan on 24-07-13 for release lot staus not 'R' and then put REJECTION_LOCKCODE.end
//Chaged by Rohan on 24-07-13 for releasing stock.end
sql = "update lot_stat_hdr set confirmed = 'Y', conf_date = ? , EMP_CODE__APRV = ? where tran_id = ?";
......@@ -412,7 +419,7 @@ public class LotStatPos extends ValidatorEJB implements LotStatPosLocal, LotStat
return errMsg;
}
}
//}
}
catch(BatchUpdateException buex)
......
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