Commit d5f6f134 authored by dpawar's avatar dpawar

added auto and manuaaly reconcile


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95155 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 97dfb786
...@@ -280,4 +280,78 @@ public class InterCompReconcileProcess extends ProcessEJB implements InterCompRe ...@@ -280,4 +280,78 @@ public class InterCompReconcileProcess extends ProcessEJB implements InterCompRe
throw new ITMException(e); throw new ITMException(e);
} }
} }
public String getValuesForPopHelp(String sundryType){
System.out.println("in getValuesForPopHelp EJB called222---------------");
System.out.println("SundryType222--->>["+sundryType+"]");
String sql="",sundry;
Connection conn1 = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
GenericUtility genericUtility = GenericUtility.getInstance();
//StringBuffer valueXmlString = new StringBuffer();
/*valueXmlString.append("<?xml version='1.0' encoding='ISO-8859-1'?>" +
"<?xml-stylesheet type=\"text/xsl\" href=\"../xsl/popup.xsl\"?>" +
"<?xml-stylesheet type=\"text/css\" href=\"../css/xtree.css\"?>"); */
StringBuffer valueXmlString = new StringBuffer("<Root>\r\n");
try
{
ConnDriver connDriver = new ConnDriver();
conn1 = connDriver.getConnectDB("DriverITM");
if("customer".equalsIgnoreCase(sundryType))
sql = "select cust_code,cust_name from customer";
else if("supplier".equalsIgnoreCase(sundryType))
sql="select supp_code,sh_name from supplier";
else if("employee".equalsIgnoreCase(sundryType))
sql="select emp_code,emp_fname || ' ' || emp_lname from employee";
else if("loan_party".equalsIgnoreCase(sundryType))
sql="select party_code,party_name from loanparty";
else if("tax_authority".equalsIgnoreCase(sundryType))
sql="select tauth_code,tauth_name from tax_authority";
else if("transporter".equalsIgnoreCase(sundryType))
sql="select tran_code,tran_name from transporter";
else if("sales_pers".equalsIgnoreCase(sundryType))
sql="select sales_pers,sp_name from sales_pers";
else if("strg_customer".equalsIgnoreCase(sundryType))
sql="select sc_code,first_name || ' ' || last_name from strg_customer";
System.out.println("Sql getValuesForPopHelp-->>["+sql+"]");
pstmt = conn1.prepareStatement(sql);
rs = pstmt.executeQuery();
int num = 1;
while (rs.next())
{
valueXmlString.append("<Detail domID='" + num + "'>\r\n");
valueXmlString.append("<sundry_code><![CDATA[").append(rs.getString(1)).append("]]></sundry_code>\r\n");
valueXmlString.append("<sundry_name><![CDATA[").append(rs.getString(2)).append("]]></sundry_name>\r\n");
valueXmlString.append("</Detail>\r\n");
num++;
}
rs.close();
rs = null;
pstmt.close();
pstmt = null ;
}
catch(Exception e){
System.out.println("Exception in getValuesForPopHelp.............");
e.printStackTrace();
}
finally{
try{
if(conn1!=null){
conn1.close();
}
}
catch(Exception e){
e.printStackTrace();
}
}
valueXmlString.append("</Root>\r\n");
System.out.println("\n****ValueXmlString ::[[" + valueXmlString.toString() +"]]:********");
return valueXmlString.toString();
}
} }
\ No newline at end of file
package ibase.webitm.ejb.fin; package ibase.webitm.ejb.fin;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import ibase.webitm.ejb.ProcessLocal; import ibase.webitm.ejb.ProcessLocal;
import javax.ejb.Local; import javax.ejb.Local;
@Local @Local
...@@ -12,4 +15,5 @@ public interface InterCompReconcileProcessLocal extends ProcessLocal { ...@@ -12,4 +15,5 @@ public interface InterCompReconcileProcessLocal extends ProcessLocal {
public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException, ITMException; public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException, ITMException;
public String process(Document dom, Document dom2, String windowName, String xtraParams) throws RemoteException, ITMException; public String process(Document dom, Document dom2, String windowName, String xtraParams) throws RemoteException, ITMException;
public String getValuesForPopHelp(String sundryType);
} }
\ No newline at end of file
package ibase.webitm.ejb.fin; package ibase.webitm.ejb.fin;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import javax.ejb.Remote; import javax.ejb.Remote;
import ibase.webitm.ejb.ProcessRemote; import ibase.webitm.ejb.ProcessRemote;
@Remote @Remote
...@@ -11,4 +15,5 @@ public interface InterCompReconcileProcessRemote extends ProcessRemote { ...@@ -11,4 +15,5 @@ public interface InterCompReconcileProcessRemote extends ProcessRemote {
public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException, ITMException; public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException, ITMException;
public String process(Document dom, Document dom2, String windowName, String xtraParams) throws RemoteException, ITMException; public String process(Document dom, Document dom2, String windowName, String xtraParams) throws RemoteException, ITMException;
public String getValuesForPopHelp(String sundryType);
} }
\ No newline at end of file
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