Commit fa7b35b7 authored by vhegde's avatar vhegde

Changed by sankara on 09/05/14 updated...

Changed by sankara on 09/05/14 updated DeallocArtConf,DockTranPos,PoRcpPos,ReplIssIc,WaveCancelEJB for wms bugs


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95052 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f0e01aa5
......@@ -13,6 +13,7 @@ import ibase.webitm.ejb.fin.*;
import java.rmi.RemoteException;
import java.util.*;
import java.util.Date;
import java.text.*;
import java.sql.*;
......
......@@ -34,7 +34,9 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
{
return "";
}
public String postSave(String domString, String tranId,String editFlag, String xtraParams, Connection conn ) throws RemoteException,ITMException
//Changed By Pragyan 09-MAY-14 to Take Local connection
//public String postSave(String domString, String tranId,String editFlag, String xtraParams, Connection conn ) throws RemoteException,ITMException
public String postSave(String domString, String tranId,String editFlag, String xtraParams, Connection conn1 ) throws RemoteException,ITMException
{
System.out.println( "Calling DockTranPos.........................................." );
......@@ -70,7 +72,7 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
InvAllocTraceBean invAllocTrace = null;
HashMap strAllocate = null;
DistCommon distCommon = new DistCommon();
stagingLoc = distCommon.getDisparams( "999999", "STAGING_LOC", conn );
//stagingLoc = distCommon.getDisparams( "999999", "STAGING_LOC", conn );
stkUpdate = new StockUpdate();
invAllocTrace = new InvAllocTraceBean();
double stkRate = 0.0,stkGrossRate = 0.0,convQtyStduom = 0.0,batchSize = 0.0;
......@@ -93,8 +95,23 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
ITMDBAccessEJB itmDBAccess = new ITMDBAccessEJB();
//Changed By 02/05/13 Pragyan To check the sordalloc allocated quantity > quantity then insert new record deducte quantity from old location.end
//Changed By Pragyan 09-MAY-14 to Take Local connection.Start
ConnDriver connDriver = null;
Connection conn=null;
try
{
//Changed By Pragyan 09-MAY-14 to Take Local connection.Start
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverValidator");
if(conn==null)
{
System.out.println("Connection is null");
return "";
}
stagingLoc = distCommon.getDisparams( "999999", "STAGING_LOC", conn );
//Changed By Pragyan 09-MAY-14 to Take Local connection.end
updateRowMap = new HashMap() ;
String applDateFormat = genericUtility.getApplDateFormat();
String dbDateFormat = genericUtility.getDBDateFormat();
......@@ -862,7 +879,18 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
}
catch(Exception e)
{
System.out.println("Exception "+e.getMessage());
System.out.println("Exception before rollback "+e.getMessage());
try
{
conn.rollback();
}
catch (SQLException e1)
{
e1.printStackTrace();
}
e.printStackTrace();
throw new ITMException(e);
}
......
......@@ -665,7 +665,12 @@ public class PoRcpPos extends ValidatorEJB implements PoRcpPosLocal, PoRcpPosRem
pstmt1 = null;
}
}
//Changed By Pragyan 09-MAY-14 To return previous message for quantity mismatch.start
else
{
return errString = itmDBAccessEJB.getErrorString("","VTNTCNF","");
}
//Changed By Pragyan 09-MAY-14 To return previous message for quantity mismatch.end
}
catch(Exception e)
{
......
......@@ -509,8 +509,12 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
pickOrder = checkNull(genericUtility.getColumnValue( "REPL_ORDER", currFormDataDom ));
//Changed By Pragyan 08-May-14 to check the cancel mode for hold stocks
/*sql = " select count (*) from stock where (item_code, site_code, loc_code, lot_no, lot_sl ) in " +
" ( select item_code, site_code, loc_code, lot_no, lot_sl from repl_ord_det where repl_order = ? ) and ( hold_qty > 0 ) ";*/
sql = " select count (*) from stock where (item_code, site_code, loc_code, lot_no, lot_sl ) in " +
" ( select item_code, site_code, loc_code, lot_no, lot_sl from repl_ord_det where repl_order = ? ) and ( hold_qty > 0 ) ";
" ( select item_code, site_code, loc_code, lot_no, lot_sl from repl_ord_det where repl_order = ? " +
" and case when cancel_mode is null then 'N' else cancel_mode end <> 'Y') and ( hold_qty > 0 )";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,replOrder);
rs = pstmt.executeQuery();
......
......@@ -46,7 +46,8 @@ import com.adsionline.ADSIShippingWS.StringReturn;
public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLocal, WaveCancelEJBRemote
{
HashMap<String,String> replHashMap = new HashMap<String,String>();
HashMap<String,String> manStkReplMap = new HashMap<String,String>();
//changed by sankara on 08/05/14 for update calcel_mode in repl_ord_det through wave cancel
//HashMap<String,String> manStkReplMap = new HashMap<String,String>();
/**
* The public method is used for confirming the service complaint transaction
* Returns confirmation message on successfull confirm otherwise returns error message
......@@ -195,9 +196,11 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca
ResultSet rsMan1 = null;
repalnishmentOrd = replOrder;
repalnishmentline = replLineNo;
boolean isManualReplMap = false;
//changed by sankara on 08/05/14 for update calcel_mode in repl_ord_det through wave cancel
//boolean isManualReplMap = false;
boolean isManualStock = false;
manStkReplMap.clear();
//changed by sankara on 08/05/14 for update calcel_mode in repl_ord_det through wave cancel
//manStkReplMap.clear();
PreparedStatement pstmtTask = null;
ResultSet rsTask = null;
PreparedStatement pstmtInv = null;
......@@ -397,9 +400,9 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca
replOrder = checkNull( rsPick.getString("REPL_ORDER") );
replLineNo = checkNull( rsPick.getString("LINE_NO") );
}
//changed by sankara on 08/05/14 for update calcel_mode in repl_ord_det through wave cancel start.
//Creating map of repanishment which contains manual repanishment.start
if(!isManualReplMap)
/*if(!isManualReplMap)
{
System.out.println("*******going for populating Manual Map*************");
sqlMan1 = "SELECT PICK_ORDER,LINE_NO__PICK FROM REPL_ORD_DET WHERE REPL_ORDER = ? AND LINE_NO = ? ";
......@@ -453,9 +456,11 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca
if(isManualReplMap)
{
isManualStock = isManualAllocStock(saleOrder,lineNoSord,conn);
}
System.out.println("isManualStock:::"+isManualStock);
} */
isManualStock = isManualAllocStock(saleOrder,lineNoSord,conn);
System.out.println("isManualStock:::"+isManualStock);
//changed by sankara on 08/05/14 for update calcel_mode in repl_ord_det through wave cancel end
//Changed by Rohan on 22-01-13 to cancle independent Repanishment.start
/*
......@@ -470,7 +475,9 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca
System.out.println("Quantity"+quantity+"refSer"+refSer);
//Changed by Rohan on 01-08-13 to check sale order line item is manually allocate.If stk is manual allocate then do not deallacate qty for line item.
//if(quantity > 0 || !(refSer.trim().equalsIgnoreCase("S-DOC") || refSer.equalsIgnoreCase("RP-PND") || refSer.equalsIgnoreCase("RP-PSO")))
if((quantity > 0 || !(refSer.trim().equalsIgnoreCase("S-DOC") || refSer.equalsIgnoreCase("RP-PND") || refSer.equalsIgnoreCase("RP-PSO"))) && !isManualStock)
//changed by sankara on 08/05/14 for manual stock alloc case wave_cancel update in repl ord det
//if((quantity > 0 || !(refSer.trim().equalsIgnoreCase("S-DOC") || refSer.equalsIgnoreCase("RP-PND") || refSer.equalsIgnoreCase("RP-PSO"))) && !isManualStock)
if((quantity > 0 || !(refSer.trim().equalsIgnoreCase("S-DOC") || refSer.equalsIgnoreCase("RP-PND") || refSer.equalsIgnoreCase("RP-PSO"))) )
{
/*if(!refSer.trim().equalsIgnoreCase("S-DOC") && !refSer.equalsIgnoreCase("RP-PND") && !refSer.equalsIgnoreCase("RP-PSO"))
{
......@@ -849,6 +856,9 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca
// 22/02/10 manoharan if allocation found in sordalloc then deallocate
//if (count > 0 ) // 04/04/12 manoharan
System.out.println("qtyAlloc["+qtyAlloc+"]");
//changed by sankara on 08/05/14 for update calcel_mode in repl_ord_det through wave cancel in manual tock alloc
if(!isManualStock)
{
if (qtyAlloc > 0) // 04/04/12 manoharan
{
if (qtyAlloc - qtyStduom <= 0)
......@@ -968,6 +978,8 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca
*/
}//qty allocate > 0
}//changed by sankara on 08/05/14 for update calcel_mode in repl_ord_det through wave cancel
//Changed by Rohna on 26/03/13 for wave Cancellation error if qty <= 0.start
//else
//{
......@@ -1723,14 +1735,17 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca
}
}
//changed by sankara on 08/05/14 for update calcel_mode in repl_ord_det through wave cancel start.
//Changed by Rohan on 02-08-13 for cheking stock is allocate from manual shipment.start
System.out.println("manStkReplMap"+manStkReplMap.toString()+"replOrdOrg["+replOrdOrg+"]replLineOrg["+replLineOrg+"]");
/* System.out.println("manStkReplMap"+manStkReplMap.toString()+"replOrdOrg["+replOrdOrg+"]replLineOrg["+replLineOrg+"]");
if(manStkReplMap.containsKey(replOrdOrg.trim()+":"+replLineOrg.trim()))
{
isManStk = true;
System.out.println("************************Manually Stock Allocated************************");
}
//Changed by Rohan on 02-08-13 for cheking stock is allocate from manual shipment.end
*/
//changed by sankara on 08/05/14 for update calcel_mode in repl_ord_det through wave cancel end.
if(pstmt1 != null)
{
pstmt1.close();
......
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