Commit a13358c4 authored by cmahajan's avatar cmahajan

Add bean class for compl mtd formate report.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102718 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8f7ce168
package ibase.dashboard.sfa.bean;
import java.rmi.RemoteException;
import javax.naming.InitialContext;
import org.json.simple.JSONObject;
import ibase.dashboard.sfa.ejb.ComplianceDB2Remote;
import ibase.system.config.AppConnectParm;
import ibase.webitm.utility.ITMException;
public class ComplDayDetailBean
{
public JSONObject getComplDaywiseData( String dataSourceName, String cellVal, String parameterP1 ) throws RemoteException, ITMException
{
System.out.println("In ComplDayDetailBean :: getComplDaywiseData bean class");
JSONObject retJsonObject = null;
InitialContext ctx = null;
String salesPersCode = "";
String eventDate="";
try
{
//For db Start
String [] rowsValue = parameterP1.trim().split("\\s+");
eventDate =rowsValue[0];
salesPersCode =rowsValue[1];
//For dbEnd
//For base Start
/*eventDate = "07/03/16";
salesPersCode = "X001";
dataSourceName = "DriverITM";*/
//For base End
AppConnectParm appConnect = new AppConnectParm();
ctx = new InitialContext(appConnect.getProperty());
ComplianceDB2Remote complMtdDtlSummary = (ComplianceDB2Remote) ctx.lookup("ibase/ComplianceDB2/remote");
retJsonObject = (JSONObject) complMtdDtlSummary.getComplDayWiseDetail(dataSourceName, eventDate, salesPersCode);
System.out.println("ComplDayDetailBean :: getComplDaywiseData == >> retJsonObject = "+retJsonObject);
}
catch(Exception e )
{
e.printStackTrace();
System.out.println("Exception : ComplDayDetailBean :getComplDaywiseData() :==>\n"+e.getMessage());
throw new ITMException(e);
}
return retJsonObject;
}
}
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