Commit ac8de50d authored by rbhogale's avatar rbhogale

Changed by Rohan on 29-03-13 for setting actual quantity zero


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92893 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fd3fc72a
......@@ -96,6 +96,15 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
String lotSlNew = "", orderType = "";
//Changed By Sumit To check whether all replenishment close
String replStatus = "";
//Changed by Rohan on 12-03-13 for define variables.start
String invState = "";
String invPndReserve = "";
String replOrder1 = "";
int lineNo1 = 0;
String dsoInvstat = "";
//Changed by Rohan on 12-03-13 for define variables.end
int replOrderLineNo = 0;
double grossRate = 0d;
double convQtyStduom = 0d;
......@@ -148,6 +157,11 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
connectionObject = connDriver.getConnectDB("DriverITM");
*/
System.out.println("====>extraparams((" +xtraParams+ "))");
//Changed by Rohna on 25-03-13 for set Actual qty zero when repanishment confirm.start
DistCommon discommon = new DistCommon();
invPndReserve = discommon.getDisparams("999999","PND_INVSTAT",conn);
dsoInvstat = discommon.getDisparams( "999999", "DEEP_STORE_INVSTAT", conn );
//Changed by Rohna on 25-03-13 for set Actual qty zero when repanishment confirm.end
conn.setAutoCommit(false);
......@@ -1109,7 +1123,61 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
System.out.println( updCnt + " rows updated successfully" );
}
pstmt.close();pstmt = null;
//changed by Rohan on 21-03-13 for update actual qty to zero when scan is confirm.start
sql = "SELECT R.REPL_ORDER,R.LINE_NO__ORD,L.INV_STAT FROM REPL_ISS_DET R,LOCATION L"
+" WHERE R.TRAN_ID = ? AND R.LOC_CODE = L.LOC_CODE AND L.INV_STAT NOT IN (?) ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
pstmt.setString(2, dsoInvstat);
rs = pstmt.executeQuery();
while(rs.next())
{
replOrder1 = rs.getString("REPL_ORDER");
lineNo1 = rs.getInt("LINE_NO__ORD");
invState = rs.getString("INV_STAT");
if(invState.trim().equalsIgnoreCase(invPndReserve.trim()))
{
updateSql = "UPDATE REPL_ORD_DET SET ACTUAL_QTY = 0 WHERE (REPL_ORDER,LINE_NO) IN(SELECT PICK_ORDER,LINE_NO__PICK FROM "
+" REPL_ORD_DET WHERE REPL_ORDER = ? AND LINE_NO = ? )";
}
else
{
updateSql = "UPDATE REPL_ORD_DET SET ACTUAL_QTY = 0 WHERE REPL_ORDER = ? AND LINE_NO = ? ";
}
pstmt1 = conn.prepareStatement(updateSql);
pstmt1.setString(1,replOrder1);
pstmt1.setInt(2,lineNo1);
updCnt = pstmt1.executeUpdate();
if(updCnt > 0)
{
System.out.println("Repl Order"+replOrder1+"Line no"+lineNo1+"Update with actual qty 0");
}
pstmt.clearParameters();
}
if(pstmt1 != null)
{
pstmt1.close();
pstmt1 = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs= null;
}
//changed by Rohan on 21-03-13 for update actual qty to zero when scan is confirm.end
//update the status of repl order in wave_task_det table
//Changed by sumit on 31/07/12 updating wave_status
//updateSql = "UPDATE WAVE_TASK_DET SET STATUS = 'Y' WHERE REF_ID = ? ";
......
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