Commit 6034de51 authored by ppatro's avatar ppatro

missing sqls and replenishment pos and confirm


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92097 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b07559a6
...@@ -100,7 +100,7 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote, ...@@ -100,7 +100,7 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
double stkGrossRate = 0d; double stkGrossRate = 0d;
double stkRate = 0d; double stkRate = 0d;
double quantity = 0.0,pickQty = 0, actualQty = 0; double quantity = 0.0,pickQty = 0, actualQty = 0,qtyOrd = 0.0;
double noArt = 0.0; double noArt = 0.0;
double shipperSize = 0,itemGrossWeight = 0, caseGrossWeight = 0, itemNetWeight = 0, caseNetWeight = 0; double shipperSize = 0,itemGrossWeight = 0, caseGrossWeight = 0, itemNetWeight = 0, caseNetWeight = 0;
...@@ -618,12 +618,13 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote, ...@@ -618,12 +618,13 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
// 16/10/11 manoharan update sordalloc // 16/10/11 manoharan update sordalloc
// 18/09/12 manoharan as the lot_sl also changed and allocation may be for case pick as well as active pick // 18/09/12 manoharan as the lot_sl also changed and allocation may be for case pick as well as active pick
// reduce the quantity in existing and insert new for the active // reduce the quantity in existing and insert new for the active
if ("A".equals(orderType) || "E".equals(orderType) || "Q".equals(orderType) || "T".equals(orderType) ) //if ("A".equals(orderType) || "E".equals(orderType) || "Q".equals(orderType) || "T".equals(orderType) )
if ("A".equals(orderType) || "E".equals(orderType) || "Q".equals(orderType))
{ {
sql = " SELECT EXP_LEV, ITEM_CODE__ORD, " sql = " SELECT EXP_LEV, ITEM_CODE__ORD, "
+ " ITEM_REF, UNIT, DATE_ALLOC, STATUS, ITEM_GRADE, EXP_DATE, ALLOC_MODE, SITE_CODE, " + " ITEM_REF, UNIT, DATE_ALLOC, STATUS, ITEM_GRADE, EXP_DATE, ALLOC_MODE, SITE_CODE, "
+ " CONV__QTY_STDUOM, UNIT__STD, MFG_DATE, SITE_CODE__MFG, REAS_CODE FROM SORDALLOC " + " CONV__QTY_STDUOM, UNIT__STD, MFG_DATE, SITE_CODE__MFG, REAS_CODE,QUANTITY FROM SORDALLOC "
+ " WHERE SALE_ORDER = ? AND LINE_NO = ? " + " WHERE SALE_ORDER = ? AND LINE_NO = ? "
+ " AND ITEM_CODE = ? " + " AND ITEM_CODE = ? "
+ " AND LOC_CODE = ? " + " AND LOC_CODE = ? "
...@@ -666,13 +667,44 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote, ...@@ -666,13 +667,44 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
dateAlloc = rs1.getTimestamp("DATE_ALLOC"); dateAlloc = rs1.getTimestamp("DATE_ALLOC");
expDate = rs1.getTimestamp("EXP_DATE"); expDate = rs1.getTimestamp("EXP_DATE");
mfgDate = rs1.getTimestamp("MFG_DATE"); mfgDate = rs1.getTimestamp("MFG_DATE");
qtyOrd = rs1.getDouble( "QUANTITY" );
} }
rs1.close(); rs1.close();
rs1 = null; rs1 = null;
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
updateSql = "UPDATE SORDALLOC SET QUANTITY = quantity - ?, QTY_ALLOC = QTY_ALLOC - ? " //LOC_CODE = ? ,LOT_SL = ? "
sql = " SELECT SUM(QUANTITY) PICKQTY FROM PICK_ORD_DET "
+ " WHERE SALE_ORDER = ? AND LINE_NO__SORD = ? "
+ " AND ITEM_CODE = ? "
+ " AND LOC_CODE = ? "
+ " AND LOT_NO = ? "
+ " AND LOT_SL = ? "
+ " AND REPL_ORDER = ? "
+ " AND LINE_NO__REPL = ? ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, saleOrder);
pstmt1.setString(2, lineNoSord);
pstmt1.setString(3, itemCode);
pstmt1.setString(4, locCodeTo);
pstmt1.setString(5, lotNo);
pstmt1.setString(6, lotSl);
pstmt1.setString(7, replOrder);
pstmt1.setInt(8, replOrderLineNo);
rs1 = pstmt1.executeQuery();
if(rs1.next())
{
pickQty = rs1.getDouble(1);
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
//updateSql = "UPDATE SORDALLOC SET QUANTITY = quantity - ?, QTY_ALLOC = QTY_ALLOC - ? " //LOC_CODE = ? ,LOT_SL = ? "
updateSql = "UPDATE SORDALLOC SET QTY_ALLOC = QTY_ALLOC - ? " //LOC_CODE = ? ,LOT_SL = ? "
+ " WHERE SALE_ORDER = ? AND LINE_NO = ? " + " WHERE SALE_ORDER = ? AND LINE_NO = ? "
+ " AND ITEM_CODE = ? " + " AND ITEM_CODE = ? "
+ " AND LOC_CODE = ? " + " AND LOC_CODE = ? "
...@@ -680,14 +712,15 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote, ...@@ -680,14 +712,15 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
+ " AND LOT_SL = ? " + " AND LOT_SL = ? "
+ " AND QTY_ALLOC > 0"; + " AND QTY_ALLOC > 0";
pstmtUpd = conn.prepareStatement(updateSql); pstmtUpd = conn.prepareStatement(updateSql);
pstmtUpd.setDouble(1, actualQty); //locCodeTo); //pstmtUpd.setDouble(1, actualQty); //locCodeTo);
pstmtUpd.setDouble(2, actualQty); //lotSlNew); //added by Kunal on 11/09/12 as per S Manoharan sir intruction //pstmtUpd.setDouble(1, actualQty); //lotSlNew); //added by Kunal on 11/09/12 as per S Manoharan sir intruction
pstmtUpd.setString(3, saleOrder); pstmtUpd.setDouble(1, pickQty); //lotSlNew); //added by Kunal on 11/09/12 as per S Manoharan sir intruction
pstmtUpd.setString(4, lineNoSord); pstmtUpd.setString(2, saleOrder);
pstmtUpd.setString(5, itemCode); pstmtUpd.setString(3, lineNoSord);
pstmtUpd.setString(6, locCode); pstmtUpd.setString(4, itemCode);
pstmtUpd.setString(7, lotNo); pstmtUpd.setString(5, locCode);
pstmtUpd.setString(8, lotSl); pstmtUpd.setString(6, lotNo);
pstmtUpd.setString(7, lotSl);
updCnt = pstmtUpd.executeUpdate(); updCnt = pstmtUpd.executeUpdate();
System.out.println("manohar 18/09/12 sordalloc updated updCnt [" + updCnt + "]"); System.out.println("manohar 18/09/12 sordalloc updated updCnt [" + updCnt + "]");
...@@ -722,9 +755,11 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote, ...@@ -722,9 +755,11 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
pstmtUpd.setString(7, lotSlNew); pstmtUpd.setString(7, lotSlNew);
pstmtUpd.setString(8, locCodeTo); pstmtUpd.setString(8, locCodeTo);
pstmtUpd.setString(9, itemRef); pstmtUpd.setString(9, itemRef);
pstmtUpd.setDouble(10, actualQty); //pstmtUpd.setDouble(10, actualQty);
pstmtUpd.setDouble(10, qtyOrd);
pstmtUpd.setString(11, unit); pstmtUpd.setString(11, unit);
pstmtUpd.setDouble(12, actualQty); //pstmtUpd.setDouble(12, actualQty);
pstmtUpd.setDouble(12, pickQty);
pstmtUpd.setTimestamp(13, dateAlloc); pstmtUpd.setTimestamp(13, dateAlloc);
pstmtUpd.setString(14, status); pstmtUpd.setString(14, status);
pstmtUpd.setString(15, itemGrade); pstmtUpd.setString(15, itemGrade);
...@@ -745,6 +780,8 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote, ...@@ -745,6 +780,8 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
} }
else else
{ {
System.out.println("manohar 26/10/12 ");
updateSql = "UPDATE SORDALLOC SET LOC_CODE = ? ,LOT_SL = ? " updateSql = "UPDATE SORDALLOC SET LOC_CODE = ? ,LOT_SL = ? "
+ " WHERE " + " WHERE "
//"SALE_ORDER = ? AND LINE_NO = ? AND " + //"SALE_ORDER = ? AND LINE_NO = ? AND " +
......
...@@ -32,6 +32,7 @@ public class ReplIssPos extends ValidatorEJB implements ReplIssPosRemote, ReplIs ...@@ -32,6 +32,7 @@ public class ReplIssPos extends ValidatorEJB implements ReplIssPosRemote, ReplIs
String orderType = ""; String orderType = "";
String locCodeTo = ""; String locCodeTo = "";
String lotSl = ""; String lotSl = "";
String lineNoIss = "";
//Changed by sumit on 09/10/12 start //Changed by sumit on 09/10/12 start
String ptcn = ""; String ptcn = "";
String errString = ""; String errString = "";
...@@ -132,8 +133,19 @@ public class ReplIssPos extends ValidatorEJB implements ReplIssPosRemote, ReplIs ...@@ -132,8 +133,19 @@ public class ReplIssPos extends ValidatorEJB implements ReplIssPosRemote, ReplIs
parentNode = parentNodeList.item(ctr); parentNode = parentNodeList.item(ctr);
locCodeTo = genericUtility.getColumnValueFromNode("loc_code__to", parentNode); locCodeTo = genericUtility.getColumnValueFromNode("loc_code__to", parentNode);
lotSl = genericUtility.getColumnValueFromNode("lot_sl", parentNode); lotSl = genericUtility.getColumnValueFromNode("lot_sl", parentNode);
lineNoIss = genericUtility.getColumnValueFromNode("line_no", parentNode);
System.out.println("Location Code["+locCodeTo+"] and lot_sl["+lotSl+"] and tran_id["+tranId+"]");
if(lineNoIss == null || lineNoIss.trim().length() <= 0)
{
lineNoIss = "0";
}
else
{
lineNoIss = lineNoIss.trim();
}
System.out.println("Location Code["+locCodeTo+"] and lineNoIss["+lineNoIss+"] and tran_id["+tranId+"]");
//Commented By Mahesh Patidar on 07/08/12 //Commented By Mahesh Patidar on 07/08/12
// parentNodeList = dom.getElementsByTagName("Detail2"); // parentNodeList = dom.getElementsByTagName("Detail2");
// parentNodeListLength = parentNodeList.getLength(); // parentNodeListLength = parentNodeList.getLength();
...@@ -143,11 +155,11 @@ public class ReplIssPos extends ValidatorEJB implements ReplIssPosRemote, ReplIs ...@@ -143,11 +155,11 @@ public class ReplIssPos extends ValidatorEJB implements ReplIssPosRemote, ReplIs
if (locCodeTo != null && locCodeTo.trim().length() > 0) if (locCodeTo != null && locCodeTo.trim().length() > 0)
{ {
locCtr++; locCtr++;
sql = "update repl_iss_det set loc_code__to = ? where tran_id = ? and lot_sl = ? "; sql = "update repl_iss_det set loc_code__to = ? where tran_id = ? and line_no = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString( 1, locCodeTo); pstmt.setString( 1, locCodeTo);
pstmt.setString( 2, tranId); pstmt.setString( 2, tranId);
pstmt.setString( 3, lotSl); pstmt.setInt( 3, Integer.parseInt(lineNoIss));
pstmt.executeUpdate(); pstmt.executeUpdate();
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
......
...@@ -34339,4 +34339,10 @@ VALUES ( ...@@ -34339,4 +34339,10 @@ VALUES (
NULL, NULL,
'A'); 'A');
----- 26/10/12
update messages set msg_str = 'Weight / Cases Exceed' , msg_descr = 'Click
OK to Add Carton Click Cancel and Deselect to remove Carton' where msg_no
= 'VTWGTEXD ';
commit; commit;
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