Commit 1bb63e7a authored by pjain's avatar pjain

changed by sankar on 20/06/14 updated DealloocArtConf,Shipmentconf,WaveCancelejb


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95290 ce508802-f39f-4f6c-b175-0d175dae99d5
parent cb60c7ef
...@@ -13,7 +13,6 @@ import ibase.webitm.ejb.fin.*; ...@@ -13,7 +13,6 @@ import ibase.webitm.ejb.fin.*;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.util.*; import java.util.*;
import java.util.Date;
import java.text.*; import java.text.*;
import java.sql.*; import java.sql.*;
...@@ -2358,15 +2357,33 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -2358,15 +2357,33 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
System.out.println(" REPL_ORD_DET updated succesfully "); System.out.println(" REPL_ORD_DET updated succesfully ");
} }
pstmt.close(); pstmt = null; pstmt.close(); pstmt = null;
//changed by sankara on 20/06/14 update status in wave_task_det start.
sql = "UPDATE WAVE_TASK_DET SET STATUS = 'Y' WHERE REF_ID = ?"; int replcount = 0;
sql = " SELECT COUNT(*) AS COUNT FROM REPL_ORD_DET RO WHERE RO.REPL_ORDER = ? AND ( RO.CANCEL_MODE <> ? OR RO.CANCEL_MODE IS NULL ) " ;
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, parentReplOrder); pstmt.setString(1, parentReplOrder);
if ( pstmt.executeUpdate() > 0 ) pstmt.setString(2, "Y");
rs = pstmt.executeQuery();
if( rs.next())
{ {
System.out.println(" WAVE_TASK_DET updated succesfully "); replcount = rs.getInt("COUNT");
System.out.println("repl count["+replcount+"]");
} }
rs.close(); rs = null;
pstmt.close(); pstmt = null; pstmt.close(); pstmt = null;
if(replcount == 0)
{
sql = "UPDATE WAVE_TASK_DET SET STATUS = 'Y' WHERE REF_ID = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, parentReplOrder);
if ( pstmt.executeUpdate() > 0 )
{
System.out.println(" WAVE_TASK_DET updated succesfully ");
}
pstmt.close(); pstmt = null;
}
//changed by sankara on 20/06/14 update status in wave_task_det end.
//changed by sankara on 03/05/14 update cancel_mode for parent repl order only //changed by sankara on 03/05/14 update cancel_mode for parent repl order only
//sql = "UPDATE REPL_ORD_DET SET CANCEL_MODE = 'Y' WHERE REPL_ORDER = ? AND LINE_NO = ? "; //sql = "UPDATE REPL_ORD_DET SET CANCEL_MODE = 'Y' WHERE REPL_ORDER = ? AND LINE_NO = ? ";
sql = "UPDATE REPL_ORD_DET SET CANCEL_MODE = 'Y' WHERE REPL_ORDER = ? AND LINE_NO = ? AND ACTUAL_QTY IS NOT NULL "; sql = "UPDATE REPL_ORD_DET SET CANCEL_MODE = 'Y' WHERE REPL_ORDER = ? AND LINE_NO = ? AND ACTUAL_QTY IS NOT NULL ";
...@@ -2378,15 +2395,32 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -2378,15 +2395,32 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
System.out.println(" REPL_ORD_DET updated succesfully "); System.out.println(" REPL_ORD_DET updated succesfully ");
} }
pstmt.close(); pstmt = null; pstmt.close(); pstmt = null;
//changed by sankara on 20/06/14 update status in wave_task_det start
sql = "UPDATE WAVE_TASK_DET SET STATUS = 'Y' WHERE REF_ID = ?"; sql = " SELECT COUNT(*) AS COUNT FROM REPL_ORD_DET RO WHERE RO.REPL_ORDER = ? AND ( RO.CANCEL_MODE <> ? OR RO.CANCEL_MODE IS NULL ) " ;
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, currentReplOrder); pstmt.setString(1, currentReplOrder);
if ( pstmt.executeUpdate() > 0 ) pstmt.setString(2, "Y");
rs = pstmt.executeQuery();
if( rs.next())
{ {
System.out.println(" WAVE_TASK_DET updated succesfully "); replcount = rs.getInt("COUNT");
System.out.println("repl count["+replcount+"]");
} }
rs.close(); rs = null;
pstmt.close(); pstmt = null; pstmt.close(); pstmt = null;
if(replcount == 0)
{
sql = "UPDATE WAVE_TASK_DET SET STATUS = 'Y' WHERE REF_ID = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, currentReplOrder);
if ( pstmt.executeUpdate() > 0 )
{
System.out.println(" WAVE_TASK_DET updated succesfully ");
}
pstmt.close(); pstmt = null;
}
//changed by sankara on 20/06/14 update status in wave_task_det end.
} }
else if( "PSO".equalsIgnoreCase(invStat) ) else if( "PSO".equalsIgnoreCase(invStat) )
{ {
...@@ -3375,7 +3409,9 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -3375,7 +3409,9 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
" FROM REPL_ORD_DET ROD, REPL_ORD_HDR ROH WHERE ROD.REPL_ORDER = ? AND ROD.LINE_NO = ? " + " FROM REPL_ORD_DET ROD, REPL_ORD_HDR ROH WHERE ROD.REPL_ORDER = ? AND ROD.LINE_NO = ? " +
//Changed by Rohan on 27-04-13 for adding order type p and Q //Changed by Rohan on 27-04-13 for adding order type p and Q
//" AND ROH.REPL_ORDER = ROD.REPL_ORDER AND ROH.ORDER_TYPE = 'Q' "; //" AND ROH.REPL_ORDER = ROD.REPL_ORDER AND ROH.ORDER_TYPE = 'Q' ";
" AND ROH.REPL_ORDER = ROD.REPL_ORDER AND ROH.ORDER_TYPE IN ('P','Q') "; //Changed by Sankara on 20/06/14 considered all order type
//" AND ROH.REPL_ORDER = ROD.REPL_ORDER AND ROH.ORDER_TYPE IN ('P','Q') ";
" AND ROH.REPL_ORDER = ROD.REPL_ORDER AND ROH.ORDER_TYPE IN ('E','Q','T','P','I') ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, replOrder); pstmt.setString(1, replOrder);
pstmt.setInt(2, replLine); pstmt.setInt(2, replLine);
...@@ -3479,15 +3515,33 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -3479,15 +3515,33 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
pstmt.close(); pstmt = null; pstmt.close(); pstmt = null;
if(quantity == 0) if(quantity == 0)
{ {
sql = " UPDATE WAVE_TASK_DET SET STATUS ='Y' WHERE REF_ID = ? AND STATUS = 'N'"; //changed by sankara on 20/06/14 for wave_task_det status update from active repl start.
sql = " SELECT COUNT(*) AS COUNT FROM REPL_ORD_DET RO WHERE RO.REPL_ORDER = ? AND ( RO.CANCEL_MODE <> ? OR RO.CANCEL_MODE IS NULL ) " ;
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, replOrder); pstmt.setString(1, replOrder);
if ( pstmt.executeUpdate() > 0) pstmt.setString(2, "Y");
rs = pstmt.executeQuery();
if( rs.next())
{ {
System.out.println(" wave_task_det updated succesfully"); replcount = rs.getInt("COUNT");
System.out.println("repl count["+replcount+"]");
} }
rs.close(); rs = null;
pstmt.close(); pstmt = null; pstmt.close(); pstmt = null;
if(replcount == 0)
{
sql = " UPDATE WAVE_TASK_DET SET STATUS ='Y' WHERE REF_ID = ? AND STATUS = 'N'";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, replOrder);
if ( pstmt.executeUpdate() > 0)
{
System.out.println(" wave_task_det updated succesfully");
}
pstmt.close(); pstmt = null;
}
//changed by sankara on 20/06/14 for wave_task_det status update from active repl ned.
} }
} }
} }
......
...@@ -1130,7 +1130,7 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -1130,7 +1130,7 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
} }
} }
//changed by sankara on 16/06/14 duplicate pro number validation start. /* //changed by sankara on 16/06/14 duplicate pro number validation start.
String proNumber = ""; String proNumber = "";
sql = " SELECT PRO_NO FROM SHIPMENT WHERE SHIPMENT_ID = ? "; sql = " SELECT PRO_NO FROM SHIPMENT WHERE SHIPMENT_ID = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -1169,8 +1169,8 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -1169,8 +1169,8 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
rs.close(); rs.close();
rs = null; rs = null;
} }
//changed by sankara on 16/06/14 duplicate pro number validation end. //changed by sankara on 16/06/14 duplicate pro number validation end. */
if(conn != null) if(conn != null)
{ {
conn.commit(); conn.commit();
} }
......
...@@ -1057,9 +1057,10 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca ...@@ -1057,9 +1057,10 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca
if(!response.contains("No Error")) if(!response.contains("No Error"))
{ {
isError = true; //changed by sankara on 20/06/14 for void package wave cancel
/* isError = true;
retString = getError(response,"NTVOIDPKGS",conn); retString = getError(response,"NTVOIDPKGS",conn);
return retString; return retString;*/
} }
......
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