Commit fcbda70e authored by prane's avatar prane

component merged used for mrp enhancement process

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@213437 ce508802-f39f-4f6c-b175-0d175dae99d5
parent aa3aaae3
This diff is collapsed.
package ibase.webitm.ejb.mfg;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.rmi.RemoteException;
import org.w3c.dom.Document;
import javax.ejb.Stateless;
@Stateless
public class UpdateDemSuppSummaryIC extends ValidatorEJB implements UpdateDemSuppSummaryICLocal, UpdateDemSuppSummaryICRemote
{
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException
{
Document dom = null;
Document dom1 = null;
Document dom2 = null;
String valueXmlString = "";
System.out.println("\n\nxmlString............."+xmlString);
System.out.println("\n\nxmlString1............"+xmlString1);
System.out.println("\n\nxmlString2............"+xmlString2);
try
{
if(xmlString != null && xmlString.trim().length() > 0)
{
dom = parseString(xmlString);
}
if(xmlString1 != null && xmlString1.trim().length() > 0)
{
dom1 = parseString(xmlString1);
}
if(xmlString2 != null && xmlString2.trim().length() > 0)
{
dom2 = parseString(xmlString2);
}
valueXmlString = itemChanged(dom, dom1, dom2, objContext, currentColumn, editFlag, xtraParams);
}
catch(Exception e)
{
System.out.println("Exception :: InvDemSuppSummaryIC :: itemChanged( String, String ) :==>\n" + e.getMessage());
throw new ITMException(e);
}
return valueXmlString;
}
public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException
{
StringBuffer valueXmlString = new StringBuffer();
int currentFormNo = 0;
E12GenericUtility genericUtility = null;
SimpleDateFormat simpleDateFormat = null;
try
{
genericUtility= new E12GenericUtility();
simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
if(objContext != null && objContext.trim().length()>0)
{
currentFormNo = Integer.parseInt(objContext);
}
valueXmlString = new StringBuffer("<?xml version=\"1.0\"?><Root><Header><editFlag>");
valueXmlString.append(editFlag).append("</editFlag></Header>");
switch (currentFormNo)
{
case 1:
valueXmlString.append("<Detail1>");
if(currentColumn.trim().equals("itm_default"))
{
Calendar cal = Calendar.getInstance();
Date d = new Date();
cal.setTime(d);
cal.set(Calendar.DATE,1);
d = cal.getTime();
String fromDate = simpleDateFormat.format(d);
cal.setTime(d);
cal.add(Calendar.MONTH,3);
cal.set(Calendar.DATE,0);
d = cal.getTime();
String toDate = simpleDateFormat.format(d);
System.out.println("From Date :" + fromDate + " To Date :" + toDate);
valueXmlString.append("<date_from>").append(fromDate).append("</date_from>");
valueXmlString.append("<date_to>").append(toDate).append("</date_to>");
valueXmlString.append("<site_code__from>").append("0").append("</site_code__from>");
valueXmlString.append("<site_code__to>").append("ZZ").append("</site_code__to>");
valueXmlString.append("<item_code__from>").append("0").append("</item_code__from>");
valueXmlString.append("<item_code__to>").append("ZZ").append("</item_code__to>");
valueXmlString.append("<item_ser__from>").append("0").append("</item_ser__from>");
valueXmlString.append("<item_ser__to>").append("ZZ").append("</item_ser__to>");
}
valueXmlString.append("</Detail1>");
break;
}
valueXmlString.append("</Root>");
}
catch(Exception e)
{
System.out.println("Exception :: InvDemSuppSummaryIC :: itemChanged::==>\n"+e.getMessage());
e.printStackTrace();
throw new ITMException(e);
}
return valueXmlString.toString();
}
}
\ No newline at end of file
/********************************************************
Title : InvDemSuppSummaryICLocal
Date : 19/07/12
Developer: Pavan Rane
********************************************************/
package ibase.webitm.ejb.mfg;
import javax.ejb.*;
import java.rmi.RemoteException;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import org.w3c.dom.Document;
@Local
public interface UpdateDemSuppSummaryICLocal extends ValidatorLocal
{
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;
}
/********************************************************
Title : InvDemSuppSummaryICRemote
Date : 19/07/12
Developer: Pavan Rane
********************************************************/
package ibase.webitm.ejb.mfg;
import java.rmi.RemoteException;
import org.w3c.dom.*;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import javax.ejb.Remote;
@Remote
public interface UpdateDemSuppSummaryICRemote extends ValidatorRemote
{
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;
}
package ibase.webitm.ejb.mfg;
import java.rmi.RemoteException;
//import javax.ejb.EJBObject;
import org.w3c.dom.*;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.ProcessLocal;
import javax.ejb.Local; // added for ejb3
@Local // added for ejb3
public interface UpdateDemSuppSummaryPrcLocal extends ibase.webitm.ejb.ProcessLocal//, EJBObject
{
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;
public String getData(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException,ITMException;
public String getData(Document dom, Document dom2, String windowNamem, String xtraParams) throws RemoteException,ITMException;
}
package ibase.webitm.ejb.mfg;
import java.rmi.RemoteException;
//import javax.ejb.EJBObject;
import org.w3c.dom.*;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.ProcessRemote;
import javax.ejb.Remote; // added for ejb3
@Remote // added for ejb3
public interface UpdateDemSuppSummaryPrcRemote extends ibase.webitm.ejb.ProcessRemote //, EJBObject
{
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;
public String getData(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException,ITMException;
public String getData(Document dom, Document dom2, String windowNamem, String xtraParams) throws RemoteException,ITMException;
}
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