Commit ea391b8f authored by wansari's avatar wansari

W15GSUN003 updated for re-palletization new ref ser stock transfer.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99918 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 550ddec8
...@@ -363,6 +363,12 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -363,6 +363,12 @@ public class ScheduleAWMSInOutTasks implements Schedule
+" AND P.LOT_NO = S.LOT_NO" +" AND P.LOT_NO = S.LOT_NO"
+" AND P.LOT_SL = S.LOT_SL AND S.QUANTITY > 0"; +" AND P.LOT_SL = S.LOT_SL AND S.QUANTITY > 0";
} }
else if("RPZ".equalsIgnoreCase(refSer))
{
sql = "SELECT S.ITEM_CODE,S.QUANTITY,S.LOT_NO,S.LOT_SL,P.LOC_CODE,S.LOC_CODE AS LOC_CODE_FROM,S.ALLOC_QTY,P.NO_ART,"+
" S.SITE_CODE FROM STOCK S,PALLET_REQ_DET P WHERE S.INV_STAT IN ('AWMS','AWMSQ')" +
" AND P.TRAN_ID = ? AND P.LINE_NO = ? AND (S.LOC_CODE = P.PALLET_NO OR S.LOC_CODE = ? ) AND S.QUANTITY > 0";
}
insertSql = "INSERT INTO STOCK_TRANSFER_DET(TRAN_ID, LINE_NO, ITEM_CODE, QUANTITY, LOC_CODE__FR," insertSql = "INSERT INTO STOCK_TRANSFER_DET(TRAN_ID, LINE_NO, ITEM_CODE, QUANTITY, LOC_CODE__FR,"
+ " LOC_CODE__TO, LOT_NO__FR, LOT_NO__TO, LOT_SL__FR, LOT_SL__TO, ACCT_CODE__CR, ACCT_CODE__DR," + " LOC_CODE__TO, LOT_NO__FR, LOT_NO__TO, LOT_SL__FR, LOT_SL__TO, ACCT_CODE__CR, ACCT_CODE__DR,"
...@@ -425,7 +431,7 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -425,7 +431,7 @@ public class ScheduleAWMSInOutTasks implements Schedule
pstmt.setString(1, refId); pstmt.setString(1, refId);
pstmt.setString(2, lineNoInterface); pstmt.setString(2, lineNoInterface);
//Changed by wasim on 4-12-2015 to check Q loc code if not found data [start] //Changed by wasim on 4-12-2015 to check Q loc code if not found data [start]
if("PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer)) if("PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer) || "RPZ".equalsIgnoreCase(refSer))
{ {
locCodeQuarnt = checkNullAndTrim(rsInterface.getString("PALLET_NO")); locCodeQuarnt = checkNullAndTrim(rsInterface.getString("PALLET_NO"));
rePalltLocCodeTo = checkNullAndTrim(rsInterface.getString("BAY_NO"));//Added by wasim on 12-01-2016 rePalltLocCodeTo = checkNullAndTrim(rsInterface.getString("BAY_NO"));//Added by wasim on 12-01-2016
...@@ -473,7 +479,7 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -473,7 +479,7 @@ public class ScheduleAWMSInOutTasks implements Schedule
System.out.println("Final location code TO is=["+locCodeTo+"]"); System.out.println("Final location code TO is=["+locCodeTo+"]");
} }
//else if("PR".equalsIgnoreCase(refSer))Changed by wasim on 19-11-2015 to add new ref ser PRS //else if("PR".equalsIgnoreCase(refSer))Changed by wasim on 19-11-2015 to add new ref ser PRS
else if("PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer)) else if("PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer) || "RPZ".equalsIgnoreCase(refSer))
{ {
locCodeFrom = checkNullAndTrim(rs.getString("LOC_CODE_FROM")); locCodeFrom = checkNullAndTrim(rs.getString("LOC_CODE_FROM"));
//locCodeTo = checkNullAndTrim(rs.getString("LOC_CODE")); //locCodeTo = checkNullAndTrim(rs.getString("LOC_CODE"));
...@@ -571,7 +577,7 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -571,7 +577,7 @@ public class ScheduleAWMSInOutTasks implements Schedule
} }
//if("PR".equalsIgnoreCase(refSer))Changed by wasim on 19-11-2015 to add new ref ser PRS //if("PR".equalsIgnoreCase(refSer))Changed by wasim on 19-11-2015 to add new ref ser PRS
//if("PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer)) Changed by wasim on 19-11-2015 to add new ref ser D-SO to allocate stock on from location //if("PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer)) Changed by wasim on 19-11-2015 to add new ref ser D-SO to allocate stock on from location
if("PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer) || "D-SO".equalsIgnoreCase(refSer) || "S-ORD".equalsIgnoreCase(refSer)) if("PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer) || "D-SO".equalsIgnoreCase(refSer) || "S-ORD".equalsIgnoreCase(refSer) || "RPZ".equalsIgnoreCase(refSer))
{ {
if((quantity-allocQty) > 0) if((quantity-allocQty) > 0)
{ {
...@@ -588,7 +594,7 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -588,7 +594,7 @@ public class ScheduleAWMSInOutTasks implements Schedule
//if("D-SO".equalsIgnoreCase(refSer) || "S-ORD".equalsIgnoreCase(refSer) || "PR".equalsIgnoreCase(refSer)) //if("D-SO".equalsIgnoreCase(refSer) || "S-ORD".equalsIgnoreCase(refSer) || "PR".equalsIgnoreCase(refSer))
//Changed by wasim on 19-11-2015 to remove ref ser PRS/PR //Changed by wasim on 19-11-2015 to remove ref ser PRS/PR
//if("D-SO".equalsIgnoreCase(refSer) || "S-ORD".equalsIgnoreCase(refSer) || "PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer)) //if("D-SO".equalsIgnoreCase(refSer) || "S-ORD".equalsIgnoreCase(refSer) || "PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer))
if("D-SO".equalsIgnoreCase(refSer) || "S-ORD".equalsIgnoreCase(refSer) || "PZ".equalsIgnoreCase(refSer) || "PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer)) if("D-SO".equalsIgnoreCase(refSer) || "S-ORD".equalsIgnoreCase(refSer) || "PZ".equalsIgnoreCase(refSer) || "PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer) || "RPZ".equalsIgnoreCase(refSer))
{ {
//HashMap allocation = new HashMap(); //HashMap allocation = new HashMap();
ArrayList allocLocList = new ArrayList(); ArrayList allocLocList = new ArrayList();
...@@ -608,7 +614,7 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -608,7 +614,7 @@ public class ScheduleAWMSInOutTasks implements Schedule
hashMap.put("chg_user", userId); hashMap.put("chg_user", userId);
hashMap.put("chg_term", chgTerm); hashMap.put("chg_term", chgTerm);
if(("PZ".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer) || "PR".equalsIgnoreCase(refSer) || "D-SO".equalsIgnoreCase(refSer) || "S-ORD".equalsIgnoreCase(refSer)) && allocQty > 0) if(("PZ".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer) || "PR".equalsIgnoreCase(refSer) || "D-SO".equalsIgnoreCase(refSer) || "S-ORD".equalsIgnoreCase(refSer) || "RPZ".equalsIgnoreCase(refSer)) && allocQty > 0)
{ {
//allocation = checkStockAllocation(siteCode,itemCode,lotNo,lotSl,locCodeFrom,locCodeTo,conn); //allocation = checkStockAllocation(siteCode,itemCode,lotNo,lotSl,locCodeFrom,locCodeTo,conn);
allocLocList = checkStockAllocation(siteCode,itemCode,lotNo,lotSl,locCodeFrom,locCodeTo,conn); allocLocList = checkStockAllocation(siteCode,itemCode,lotNo,lotSl,locCodeFrom,locCodeTo,conn);
...@@ -649,7 +655,7 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -649,7 +655,7 @@ public class ScheduleAWMSInOutTasks implements Schedule
pstmtUpdate.close();pstmtUpdate = null; pstmtUpdate.close();pstmtUpdate = null;
//if("PR".equalsIgnoreCase(refSer))//Changed by wasim on 19-11-2015 to add new ref ser PRS //if("PR".equalsIgnoreCase(refSer))//Changed by wasim on 19-11-2015 to add new ref ser PRS
if("PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer)) if("PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer) || "RPZ".equalsIgnoreCase(refSer))
{ {
sqlUpdate = "UPDATE PALLET_REQ_DET SET STATUS = 'V' WHERE TRAN_ID = ? AND LINE_NO = ?"; sqlUpdate = "UPDATE PALLET_REQ_DET SET STATUS = 'V' WHERE TRAN_ID = ? AND LINE_NO = ?";
pstmtUpdate = conn.prepareStatement(sqlUpdate); pstmtUpdate = conn.prepareStatement(sqlUpdate);
...@@ -666,7 +672,7 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -666,7 +672,7 @@ public class ScheduleAWMSInOutTasks implements Schedule
rs.close();rs = null; rs.close();rs = null;
//if("PR".equalsIgnoreCase(refSer) && isRecordExist)//Changed by wasim on 19-11-2015 to add new ref ser PRS //if("PR".equalsIgnoreCase(refSer) && isRecordExist)//Changed by wasim on 19-11-2015 to add new ref ser PRS
if(("PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer)) && isRecordExist) if(("PR".equalsIgnoreCase(refSer) || "PRS".equalsIgnoreCase(refSer) || "RPZ".equalsIgnoreCase(refSer)) && isRecordExist)
{ {
System.out.println(" created successfully PR/PRS Case---------------["+tranID+"]refId["+refId); System.out.println(" created successfully PR/PRS Case---------------["+tranID+"]refId["+refId);
headerFlag = true; headerFlag = true;
...@@ -713,7 +719,7 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -713,7 +719,7 @@ public class ScheduleAWMSInOutTasks implements Schedule
rsInterface.close();rsInterface = null; rsInterface.close();rsInterface = null;
//if(isRecordExist && !"PR".equalsIgnoreCase(refSer)) //if(isRecordExist && !"PR".equalsIgnoreCase(refSer))
if(isRecordExist && (!"PR".equalsIgnoreCase(refSer) && !"PRS".equalsIgnoreCase(refSer)))//Changed by wasim on 19-11-2015 to add new ref ser PRS if(isRecordExist && (!"PR".equalsIgnoreCase(refSer) && !"PRS".equalsIgnoreCase(refSer) && !"RPZ".equalsIgnoreCase(refSer)))//Changed by wasim on 19-11-2015 to add new ref ser PRS
{ {
System.out.println("Inside record exist block------------");//CONFSUCC System.out.println("Inside record exist block------------");//CONFSUCC
StockTransferConf stkConf = new StockTransferConf(); StockTransferConf stkConf = new StockTransferConf();
......
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