Commit 9b5e56b8 authored by wansari's avatar wansari

W15GSUN003 changed by wasim to change code for roll back and commit for stock...

W15GSUN003 changed by wasim to change code for roll back and commit for stock tranasfer and inventory hold..


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98914 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d71d4c38
...@@ -460,6 +460,7 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -460,6 +460,7 @@ public class ScheduleAWMSInOutTasks implements Schedule
if( errString != null && errString.indexOf( "VTCONPARM" ) > -1) if( errString != null && errString.indexOf( "VTCONPARM" ) > -1)
{ {
System.out.println("Despatch/Dist issue created successfully"); System.out.println("Despatch/Dist issue created successfully");
conn.commit();
} }
else else
{ {
...@@ -474,13 +475,19 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -474,13 +475,19 @@ public class ScheduleAWMSInOutTasks implements Schedule
if( errString != null && errString.indexOf( "VTCONPARM" ) > -1) if( errString != null && errString.indexOf( "VTCONPARM" ) > -1)
{ {
System.out.println("Despatch/Dist issue created successfully"); System.out.println("Despatch/Dist issue created successfully and commited");
conn.commit();
} }
else else
{ {
throw new Exception (errString); throw new Exception (errString);
} }
} }
else if ("PZ".equalsIgnoreCase(refSer) || "PR".equalsIgnoreCase(refSer))
{
System.out.println("Stock Transfer for PZ/PR completed successfully and committed");
conn.commit();
}
} }
else else
{ {
...@@ -562,7 +569,7 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -562,7 +569,7 @@ public class ScheduleAWMSInOutTasks implements Schedule
sql = "SELECT P.ITEM_CODE,P.LOT_NO,P.LOT_SL," sql = "SELECT P.ITEM_CODE,P.LOT_NO,P.LOT_SL,"
+ " P.LOC_CODE,P.SITE_CODE,P.PALLET_NO FROM PALLET_DET P,STOCK S WHERE TRAN_ID = ? AND P.LINE_NO = ?" + " P.LOC_CODE,P.SITE_CODE,P.PALLET_NO FROM PALLET_DET P,STOCK S WHERE TRAN_ID = ? AND P.LINE_NO = ?"
+ " AND P.ITEM_CODE = S.ITEM_CODE AND P.SITE_CODE = S.SITE_CODE" + " AND P.ITEM_CODE = S.ITEM_CODE AND P.SITE_CODE = S.SITE_CODE"
+ " AND P.PALLET_NO = S.LOC_CODE AND P.LOT_NO = S.LOT_NO AND P.LOT_SL = S.LOT_SL"; + " AND P.LOC_CODE = S.LOC_CODE AND P.LOT_NO = S.LOT_NO AND P.LOT_SL = S.LOT_SL";
} }
else if("PR".equalsIgnoreCase(refSer)) else if("PR".equalsIgnoreCase(refSer))
{ {
...@@ -660,7 +667,8 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -660,7 +667,8 @@ public class ScheduleAWMSInOutTasks implements Schedule
System.out.println("Return String from inventory holdr="+errString); System.out.println("Return String from inventory holdr="+errString);
if( errString != null && errString.indexOf( "VTCNFSUCC" ) > -1) if( errString != null && errString.indexOf( "VTCNFSUCC" ) > -1)
{ {
System.out.println("Inventory successfully go to hold"); System.out.println("Inventory successfully go to hold and committed transaction"+invtranId);
conn.commit();
/*sql = "UPDATE INTERFACE2 SET SCHEDULE_STATUS = 'Y' WHERE REF_ID = ? "; /*sql = "UPDATE INTERFACE2 SET SCHEDULE_STATUS = 'Y' WHERE REF_ID = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, refId); pstmt.setString(1, refId);
......
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