Commit 8a1f16e1 authored by rtiwari's avatar rtiwari

updated for req: M14FSUN001


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96466 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 88d7a8cd
...@@ -44,7 +44,7 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -44,7 +44,7 @@ QCTransferConfLocal, QCTransferConfRemote
public String confirm(String tranId, String xtraParams, String forcedFlag) public String confirm(String tranId, String xtraParams, String forcedFlag)
throws RemoteException, ITMException throws RemoteException, ITMException
{ {
System.out.println("QCTransferConf confirm called.............."); System.out.println("QCTransferConf confirm called...230914...........");
String confirmed = ""; String confirmed = "";
String sql = ""; String sql = "";
Connection conn = null; Connection conn = null;
...@@ -857,6 +857,70 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -857,6 +857,70 @@ QCTransferConfLocal, QCTransferConfRemote
return itmDBAccessLocal.getErrorString("",errCode,""); return itmDBAccessLocal.getErrorString("",errCode,"");
//return errCode;//Commented by Manoj dtd 03/06/2014 //return errCode;//Commented by Manoj dtd 03/06/2014
}//End if }//End if
// ADDED BY RITESH ON 23/SEP/2014 START
else
{
double holdQty = 0d;
sql = " SELECT HOLD_QTY FROM STOCK "
+ " WHERE ITEM_CODE = ? "
+ " AND SITE_CODE = ? "
+ " AND LOC_CODE = ? "
+ " AND LOT_NO = ? "
+ " AND LOT_SL = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemCode);
pstmt.setString(2,siteCode);
pstmt.setString(3,fromLoc);
pstmt.setString(4,lotNo);
pstmt.setString(5,lotSl);
rs = pstmt.executeQuery();
if(rs.next())
{
holdQty = rs.getDouble("HOLD_QTY");
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
if(holdQty > 0)
{
sql = "UPDATE STOCK SET HOLD_QTY = HOLD_QTY - ?"
+ " WHERE ITEM_CODE = ? "
+ " AND SITE_CODE = ? "
+ " AND LOC_CODE = ? "
+ " AND LOT_NO = ? "
+ " AND LOT_SL = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1, qty );
pstmt.setString(2,itemCode);
pstmt.setString(3,siteCode);
pstmt.setString(4,fromLoc);
pstmt.setString(5,lotNo);
pstmt.setString(6,lotSl);
updCnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("hiold_qty updated in from location "+updCnt);
sql = "UPDATE STOCK SET HOLD_QTY = ?"
+ " WHERE ITEM_CODE = ? "
+ " AND SITE_CODE = ? "
+ " AND LOC_CODE = ? "
+ " AND LOT_NO = ? "
+ " AND LOT_SL = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1, qty );
pstmt.setString(2,itemCode);
pstmt.setString(3,siteCode);
pstmt.setString(4,toLoc);
pstmt.setString(5,lotNo);
pstmt.setString(6,lotSl);
updCnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("hiold_qty updated in to location "+updCnt);
}
}
// ADDED BY RITESH ON 23/SEP/2014 END
} //end if } //end if
......
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