Commit 26eacc7b authored by msingh's avatar msingh

Changes Merging for DDWMS.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99109 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 93d5c86f
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
/**
* PURPOSE : Local Interface for PickIssIC component
* AUTHOR : Gulzar
* DATE : 12/09/11
*/
package ibase.webitm.ejb.wms;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import org.w3c.dom.*;
import javax.ejb.*;
@javax.ejb.Local
public interface LocWisePickWizICLocal extends ValidatorLocal
{
public String wfValData() throws RemoteException, ITMException;
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext,String editFlag, String xtraParams) throws RemoteException, ITMException;
public String wfValData(Document currFormDataDom, Document hdrDataDom, Document allFormDataDom, String objContext, String xtraParams) throws RemoteException, ITMException;
public String itemChanged() throws RemoteException, ITMException;
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException;
public String itemChanged( Document currFormDataDom, Document hdrDataDom, Document allFormDataDom, String objContext, String currentColumn,String editFlag, String xtraParams ) throws RemoteException, ITMException;
}
/**
* PURPOSE : Remote Interface for PicklIssIC component
* AUTHOR : Gulzar
* DATE : 12/09/11
*/
package ibase.webitm.ejb.wms;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import org.w3c.dom.*;
import javax.ejb.*;
@javax.ejb.Remote
public interface LocWisePickWizICRemote extends ValidatorRemote
{
public String wfValData() throws RemoteException, ITMException;
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext,String editFlag, String xtraParams) throws RemoteException, ITMException;
public String wfValData(Document currFormDataDom, Document hdrDataDom, Document allFormDataDom, String objContext, String xtraParams) throws RemoteException, ITMException;
public String itemChanged() throws RemoteException, ITMException;
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException;
public String itemChanged( Document currFormDataDom, Document hdrDataDom, Document allFormDataDom, String objContext, String currentColumn,String editFlag, String xtraParams ) throws RemoteException, ITMException;
}
package ibase.webitm.ejb.wms;
/*
* Author:Wasim Ansari
* Date:02-JUNE-15
* Request ID:D15AKAT002 (PO Case Label Metis)
*/
import ibase.system.config.ConnDriver;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ProcessEJB;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.dis.DistCommon;
import ibase.webitm.ejb.dis.InvAllocTraceBean;
import ibase.webitm.ejb.dis.StockUpdate;
import ibase.webitm.reports.utility.XSDParser;
import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.TreeMap;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@javax.ejb.Stateless
public class POCaseLabelPrc extends ProcessEJB implements POCaseLabelPrcLocal, POCaseLabelPrcRemote
{
GenericUtility genericUtility = GenericUtility.getInstance();
boolean isError = false;
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException,ITMException
{
System.out.println("Entered in case label generation process.");
String retStr = "";
Document detailDom = null;
Document headerDom = null;
GenericUtility genericUtility = GenericUtility.getInstance();
try
{
if(xmlString != null && xmlString.trim().length()!=0)
{
headerDom = genericUtility.parseString(xmlString);
System.out.println("xmlString--->>" + xmlString);
}
if(xmlString2 != null && xmlString2.trim().length()!=0)
{
detailDom = genericUtility.parseString(xmlString2);
System.out.println("xmlString2 --->>" + xmlString2);
}
retStr = process(headerDom, detailDom, windowName, xtraParams);
}
catch (Exception e)
{
System.out.println("Exception :PODProcess :process(String xmlString, String xmlString2, String windowName, String xtraParams):" + e.getMessage() + ":");
e.printStackTrace();
retStr = e.getMessage();
}
return retStr;
}
public String process(Document dom, Document dom2, String windowName, String xtraParams) throws RemoteException,ITMException
{
String retString = "";
String loginEmpCode = "",userId = "",loginSite = "",chgTerm = "";
String errString = "";
String purcOrder = "",itemCode = "",caseLable = "",quantity = "",oldQuantity = "",barCode = "",confirmed = "";
String labelNo = "", descr = "",refSer = "",currDate = "";
int count = 0,caseCount = 0;
Timestamp today = new Timestamp(System.currentTimeMillis());
ConnDriver connDriver = new ConnDriver();
Connection conn = null;
String sql = "";
ResultSet rs = null;
PreparedStatement pstmt = null;
System.out.println(xtraParams);
loginEmpCode = checkNullAndTrim(genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginEmpCode"));
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
loginSite = checkNullAndTrim((genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSiteCode")));
chgTerm = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "chgTerm" );
try
{
System.out.println("Inside Try Block in Post Save.....");
conn = connDriver.getConnectDB("DriverITM");
System.out.println("Today date is="+today);
purcOrder = checkNullAndTrim(( genericUtility.getColumnValue( "purc_order", dom )));
//purcOrder = genericUtility.getColumnValue( "purc_order", dom );
System.out.println("Purchase Order="+purcOrder);
itemCode = checkNullAndTrim(( genericUtility.getColumnValue( "item_code", dom )));
//itemCode = genericUtility.getColumnValue( "item_code", dom );
System.out.println("Item Code="+itemCode);
if(!purcOrder.equalsIgnoreCase("") && !itemCode.equalsIgnoreCase(""))
{
sql = "select * from CASE_LABEL where order_no = ? and item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
pstmt.setString(2, itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
System.out.println("Item Code already present in CASE_LABEL table with this Purchase Order");
errString = itmDBAccessEJB.getErrorString("","VTCASELBL","","",conn);
return errString;
}
else
{
sql = "select confirmed from porder where purc_order = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
rs = pstmt.executeQuery();
if(rs.next())
{
confirmed = checkNullAndTrim(rs.getString("confirmed"));
}
else
{
errString = itmDBAccessEJB.getErrorString("","VTPORD1","","",conn);
return errString;
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if("Y".equalsIgnoreCase(confirmed))
{
System.out.println("Purchase order is confirmed="+purcOrder);
sql = "SELECT QUANTITY FROM PORDDET WHERE ITEM_CODE = ? AND PURC_ORDER = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
pstmt.setString(2, purcOrder);
rs = pstmt.executeQuery();
if(rs.next())
{
quantity = checkNullAndTrim(rs.getString("QUANTITY"));
oldQuantity = quantity;
sql = "SELECT REF_SER FROM TRANSETUP WHERE TRAN_WINDOW = 'w_porder'";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
refSer = checkNullAndTrim(rs.getString("REF_SER"));
System.out.println("Ref Series"+refSer);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
sql = "SELECT DESCR,UDF__STR2 FROM ITEM WHERE ITEM_CODE = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
descr = checkNullAndTrim(rs.getString("DESCR"));
barCode = checkNullAndTrim(rs.getString("UDF__STR2"));
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("Quantity Length="+quantity.length());
if(quantity.length() == 1)
{
quantity = "000"+quantity;
}
else if(quantity.length() == 2)
{
quantity = "00"+quantity;
}
else if(quantity.length() == 3)
{
quantity = "0"+quantity;
}
System.out.println("New Quantity="+quantity);
labelNo = purcOrder + quantity + barCode;
System.out.println("Label Number is="+labelNo);
sql = "Insert into CASE_LABEL (ITEM_CODE,LOT_NO,ORDER_NO,REF_SER,QUANTITY,LABEL_NO,"
+ "CHG_USER,CHG_DATE,CHG_TERM ) "
+ " values (?,?,?,?,?,?,?,?,?)";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
pstmt.setString(2, " ");
pstmt.setString(3, purcOrder);
pstmt.setString(4, refSer);
pstmt.setString(5, oldQuantity);
pstmt.setString(6, labelNo);
pstmt.setString(7, loginEmpCode);
pstmt.setTimestamp(8, today);
pstmt.setString(9, chgTerm);
caseCount = pstmt.executeUpdate();
pstmt.close(); pstmt = null;
System.out.println("Record inserted successfully in Case Label ...."+caseCount);
if(caseCount > 0)
{
retString = itmDBAccessEJB.getErrorString("", "VTPRCCS", "", "", conn);
return retString;
}
else
{
retString = itmDBAccessEJB.getErrorString("", "VTPRCNC", "", "", conn);
return retString;
}
}
else
{
System.out.println("Item Code does not belong to this Purchase Order");
errString = itmDBAccessEJB.getErrorString("","VTPURCDET","","",conn);
return errString;
}
}
else
{
System.out.println("Purchase Order is not Confirmed");
errString = itmDBAccessEJB.getErrorString("","VTNOTCONF","","",conn);
return errString;
}
}//end purchase order check in case label table.
}
else
{
if(purcOrder.equalsIgnoreCase("") || purcOrder.length() < 0)
{
System.out.println("Purchase Order is blank");
errString = itmDBAccessEJB.getErrorString("","VTPORD1","","",conn);
return errString;
}
else if (itemCode.equalsIgnoreCase("") || itemCode.length() < 0)
{
System.out.println("Item Code is blank");
errString = itmDBAccessEJB.getErrorString("","VMITEMCD","","",conn);
return errString;
}
}
}
catch(Exception e)
{
isError = true;
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if ( rs != null )
{
rs.close();
rs = null;
}
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if(isError)
{
System.out.println("Rollbacking.................");
conn.rollback();
}
else
{
System.out.println("commiting.................");
conn.commit();
}
if( conn != null )
{
conn.close();
conn = null;
}
}
catch( Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
}
return retString;
}
private static String checkNullAndTrim(String input)
{
if (input==null)
{
input="";
}
return input.trim();
}
@Override
public String process() throws RemoteException, ITMException {
// TODO Auto-generated method stub
return null;
}
}
/**
Title : PickPostSaveLocalEJB
Date : 04/11/11
Author: Chitranjan Pandey
*/
package ibase.webitm.ejb.wms;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import java.sql.Connection;
import org.w3c.dom.*;
@javax.ejb.Local
public interface POCaseLabelPrcLocal
{
public String process() throws RemoteException,ITMException;
public String process(Document dom, Document dom2, String windowName, String xtraParams) throws RemoteException,ITMException;
public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException,ITMException;
}
\ No newline at end of file
/**
Title : PickPostSaveRemoteEJB
Date : 04/11/11
Author: Chitranjan Pandey
*/
package ibase.webitm.ejb.wms;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import java.sql.Connection;
import org.w3c.dom.*;
@javax.ejb.Remote
public interface POCaseLabelPrcRemote
{
public String process() throws RemoteException,ITMException;
public String process(Document dom, Document dom2, String windowName, String xtraParams) throws RemoteException,ITMException;
public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException,ITMException;
}
\ No newline at end of file
......@@ -31,6 +31,11 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
* @param : xtraParams
*/
// added by cpandey for overloading of confirm method - 07/11/11
//Changed by Manish on 05/11/15 [Start]
String projectName = "";
//Changed by Manish on 05/11/15 [End]
public String confirm(String tranID,String xtraParams, String forcedFlag) throws RemoteException,ITMException
{
......@@ -313,8 +318,8 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
itemCode = rs.getString( "item_code" );
siteCode = rs.getString( "site_code" );
locCode = rs.getString( "loc_code" );
lotNo = rs.getString( "lot_no" );
lotSl = rs.getString( "lot_sl" );
lotNo = checkNullAndTrim(rs.getString( "lot_no" ));
lotSl = checkNullAndTrim(rs.getString( "lot_sl" ));
quantity = rs.getDouble( "quantity" );
noArt = rs.getDouble( "no_art" );
locCodeTo = rs.getString( "loc_code__to" );
......@@ -346,6 +351,20 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
// a separate probably in stockupdate so that we can call the same from various places
//
//
// Changed by Manish on 05/11/15 for DDWMS merging [start]
projectName = distCommon.getDisparams("999999","PROJECT",conn);
if("DDUK".equalsIgnoreCase(projectName))
{
if(lotNo == null || lotNo.trim().length() == 0)
{
lotNo =" ";
}
if(lotSl == null || lotSl.trim().length()==0)
{
lotSl = " ";
}
}
lineNo = rs.getInt( "LINE_NO" );
pstmtStock.setString(1,itemCode);
......
This diff is collapsed.
package ibase.webitm.ejb.wms;
import ibase.webitm.ejb.ActionHandlerLocal;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import java.sql.Connection;
import javax.ejb.Local;
@Local
public interface RefundGateWayPaymentLocal extends ActionHandlerLocal
{
public String actionHandler(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
public String segPay(String tranId,String xtraParams,String forcedFlag,Connection conn) throws RemoteException,Exception;
}
package ibase.webitm.ejb.wms;
import java.rmi.RemoteException;
import java.sql.Connection;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.ActionHandlerRemote;
import javax.ejb.Remote;
@Remote
public interface RefundGateWayPaymentRemote extends ActionHandlerRemote
{
public String actionHandler(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
public String segPay(String tranId,String xtraParams,String forcedFlag,Connection conn) throws RemoteException,Exception;
}
This diff is collapsed.
package ibase.webitm.ejb.wms;
import java.rmi.RemoteException;
import ibase.webitm.ejb.ActionHandlerLocal;
import ibase.webitm.utility.ITMException;
@javax.ejb.Local
public interface SalesReturnConfLocal extends ActionHandlerLocal
{
public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
}
package ibase.webitm.ejb.wms;
import java.rmi.RemoteException;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.ActionHandlerRemote;
@javax.ejb.Remote
public interface SalesReturnConfRemote extends ActionHandlerRemote
{
public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
}
\ No newline at end of file
This diff is collapsed.
/*
* Author:Manish Singh
* Date:30-Apr-15
* Request ID:D15AKAT019 (Site Specification Report)
*/
package ibase.webitm.ejb.wms;
import java.rmi.RemoteException;
import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException;
import javax.ejb.Local;
import org.w3c.dom.Document;
@Local
public interface SiteSpecRptICLocal extends ValidatorLocal
{
public String wfValData() throws RemoteException, ITMException;
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged() throws RemoteException, ITMException;
public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn,String editFlag, String xtraParams) throws RemoteException, ITMException;
public String itemChanged(Document dom, Document dom1, Document dom2,String objContext, String currentColumn, String editFlag,String xtraParams) throws RemoteException, ITMException;
}
This diff is collapsed.
This diff is collapsed.
package ibase.webitm.ejb.wms;
import javax.ejb.Local;
@Local
public interface UploadOrderEJBLocal
{
public String uploadSalesOrder( String xmlString,String xtraParams) throws Exception;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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