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 );
pstmt.setString( 2, "S-DSP" ); //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" );
}
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]
...@@ -1309,22 +1310,53 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -1309,22 +1310,53 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
if("D-ORD".equalsIgnoreCase(tranRefSer)) if("D-ORD".equalsIgnoreCase(tranRefSer))
{ {
sSQLUpdatSord = " UPDATE DISTORDER SET STATUS = ? WHERE " sql = " SELECT COUNT(1) AS PEND_LINE_CNT FROM DISTORDER_DET "
+ " DIST_ORDER IN (SELECT DIST_ORDER FROM DISTORD_ISS D,SHIP_DOCS S " + " 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 "
+ " WHERE D.TRAN_ID = S.REF_ID AND S.SHIPMENT_ID = ?) "; + " AND DIST_ORDER = (SELECT DIST_ORDER FROM DISTORD_ISS D,SHIP_DOCS S WHERE D.TRAN_ID = S.REF_ID AND S.SHIPMENT_ID = ?)";
pstmtSord = conn.prepareStatement(sSQLUpdatSord); pstmt = conn.prepareStatement(sql);
pstmtSord.setString(1, "C"); pstmt.setString(1, tranId);
pstmtSord.setString(2, tranId);
rs = pstmt.executeQuery();
int distOrdCnt = pstmtSord.executeUpdate();
System.out.println("Distorder update cnt ["+distOrdCnt+"]"); if(rs.next())
{
pendLineCnt = rs.getInt("PEND_LINE_CNT");
}
if(pstmtSord != null) if(pstmt != null)
{ {
pstmtSord.close(); pstmt.close();
pstmtSord = null; 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 "
+ " DIST_ORDER IN (SELECT DIST_ORDER FROM DISTORD_ISS D,SHIP_DOCS S "
+ " WHERE D.TRAN_ID = S.REF_ID AND S.SHIPMENT_ID = ?) ";
pstmtSord = conn.prepareStatement(sSQLUpdatSord);
pstmtSord.setString(1, "C");
pstmtSord.setString(2, tranId);
int distOrdCnt = pstmtSord.executeUpdate();
System.out.println("Distorder update cnt ["+distOrdCnt+"]");
if(pstmtSord != null)
{
pstmtSord.close();
pstmtSord = null;
}
} }
} }
} }
......
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