Commit 4eb7340f authored by steurwadkar's avatar steurwadkar

Changes made to generate wave task from distribution order

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@182894 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c51e99e2
...@@ -288,7 +288,16 @@ public class CheckSheetIC extends ValidatorEJB implements CheckSheetICLocal,Chec ...@@ -288,7 +288,16 @@ public class CheckSheetIC extends ValidatorEJB implements CheckSheetICLocal,Chec
" AND SD.REF_SER = ?"; " AND SD.REF_SER = ?";
pstmt = conn.prepareStatement( sql ); pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, shipmentId ); pstmt.setString( 1, shipmentId );
//Changed by Santosh on 02/04/2018 to generate wave task from dist order [Start]
if("S-ORD".equalsIgnoreCase(tranRefSer))
{
pstmt.setString( 2, "S-DSP" ); pstmt.setString( 2, "S-DSP" );
}
else if("D-ORD".equalsIgnoreCase(tranRefSer))
{
pstmt.setString( 2, "D-ISS" );
}
//Changed by Santosh on 02/04/2018 to generate wave task from dist order [End]
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
......
...@@ -190,6 +190,7 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -190,6 +190,7 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
int remainProNo = 0,siteTranCnt = 0; int remainProNo = 0,siteTranCnt = 0;
DistCommon distCommon = new DistCommon(); DistCommon distCommon = new DistCommon();
//Changes by Dadaso pawar on 01/03/15 [END] //Changes by Dadaso pawar on 01/03/15 [END]
int pendLineCnt = 0;
try try
{ {
//Changed and Commented By Santosh on 14-06-2016 :[START] //Changed and Commented By Santosh on 14-06-2016 :[START]
...@@ -1308,6 +1309,36 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -1308,6 +1309,36 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
//chamged by sankara on 26/06/14 for pro number end. //chamged by sankara on 26/06/14 for pro number end.
if("D-ORD".equalsIgnoreCase(tranRefSer)) if("D-ORD".equalsIgnoreCase(tranRefSer))
{
sql = " SELECT COUNT(1) AS PEND_LINE_CNT FROM DISTORDER_DET "
+ " WHERE (CASE WHEN QTY_ORDER IS NULL THEN 0 ELSE QTY_ORDER END) - (CASE WHEN QTY_SHIPPED IS NULL THEN 0 ELSE QTY_SHIPPED END) > 0 "
+ " AND DIST_ORDER = (SELECT DIST_ORDER FROM DISTORD_ISS D,SHIP_DOCS S WHERE D.TRAN_ID = S.REF_ID AND S.SHIPMENT_ID = ?)";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
if(rs.next())
{
pendLineCnt = rs.getInt("PEND_LINE_CNT");
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
System.out.println("pending lines cnt in distribution order["+pendLineCnt+"]");
if(pendLineCnt == 0)
{ {
sSQLUpdatSord = " UPDATE DISTORDER SET STATUS = ? WHERE " sSQLUpdatSord = " UPDATE DISTORDER SET STATUS = ? WHERE "
+ " DIST_ORDER IN (SELECT DIST_ORDER FROM DISTORD_ISS D,SHIP_DOCS S " + " DIST_ORDER IN (SELECT DIST_ORDER FROM DISTORD_ISS D,SHIP_DOCS S "
...@@ -1328,6 +1359,7 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -1328,6 +1359,7 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
} }
} }
} }
}
if(isAllDespConfirmed) if(isAllDespConfirmed)
{ {
//changed by sankara on 22/09/14 for sitetransporter //changed by sankara on 22/09/14 for sitetransporter
......
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