Commit 0b6d768e authored by ppatro's avatar ppatro

Issues in repelneishment inserting duplicate records


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92289 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 344bd2e3
......@@ -621,15 +621,25 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
//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 * FROM PICK_ORD_DET "
//Changed By Pragyan 06/12/2012 To get valid Pick Order.start
/*sql = " SELECT * FROM PICK_ORD_DET "
//+ " WHERE SALE_ORDER = ? AND LINE_NO__SORD = ? "
+ " WHERE ITEM_CODE = ? "
+ " AND LOC_CODE = ? "
+ " AND LOT_NO = ? "
+ " AND LOT_SL = ? "
+ " AND REPL_ORDER = ? "
+ " AND LINE_NO__REPL = ? ";
+ " AND LINE_NO__REPL = ? ";*/
sql = " SELECT * FROM PICK_ORD_DET P"
//+ " WHERE SALE_ORDER = ? AND LINE_NO__SORD = ? "
+ " WHERE P.ITEM_CODE = ? "
+ " AND P.LOC_CODE = ? "
+ " AND P.LOT_NO = ? "
+ " AND P.LOT_SL = ? "
+ " AND P.REPL_ORDER = ? "
+ " AND P.LINE_NO__REPL = ? AND FN_IS_VALID_PICK_ORDER(P.PICK_ORDER) = 'Y'";
//Changed By Pragyan 06/12/2012 To get valid Pick Order.end
pstmtPick = conn.prepareStatement(sql);
//pstmtPick.setString(1, saleOrder);
......@@ -978,11 +988,15 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
updCnt = pstmtUpd.executeUpdate();
pstmtUpd.clearParameters();
}
//Changed By Pragyan To update only on valid Pick Orders AND FN_IS_VALID_PICK_ORDER(P.PICK_ORDER) = 'Y'
/*updateSql = "UPDATE PICK_ORD_DET SET LOC_CODE = ?, LOT_SL = ?, lot_sl__new = ? "
+ " WHERE PICK_ORDER = ? AND LINE_NO = ? ";*/
/*updateSql = "UPDATE PICK_ORD_DET SET LOC_CODE = ?, LOT_SL = ?, lot_sl__new = ? "
+ " WHERE REPL_ORDER = ? AND LINE_NO__REPL = ? ";*/
updateSql = "UPDATE PICK_ORD_DET SET LOC_CODE = ?, LOT_SL = ?, lot_sl__new = ? "
+ " WHERE REPL_ORDER = ? AND LINE_NO__REPL = ? ";
+ " WHERE REPL_ORDER = ? AND LINE_NO__REPL = ? AND FN_IS_VALID_PICK_ORDER(PICK_ORDER) = 'Y'";
pstmtUpd = conn.prepareStatement(updateSql);
pstmtUpd.setString(1, locCodeTo);
pstmtUpd.setString(2, lotSlNew);
......
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