Commit 8722fbb6 authored by sshinde's avatar sshinde

Modify ProductionVsBudget Report For Showing Graph CountryWise


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97443 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1f26aff2
......@@ -2,15 +2,12 @@
*
*/
package ibase.dashboard.mfg.bean;
import java.rmi.RemoteException;
import java.util.HashMap;
import java.util.List;
import java.util.Properties;
import ibase.dashboard.mfg.ejb.ProductionVsBudgetReportRemote;
import ibase.system.config.AppConnectParm;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import java.util.HashMap;
import java.util.List;
import javax.naming.InitialContext;
......@@ -93,14 +90,12 @@ public class ProductionVsBudgetReportBean
public String generatePDF(HashMap<String, List<String>> hashMap ,String exportPDFPath,String exportImagePath,String preyearMonth,String rptTitle,String userID) throws RemoteException, ITMException
public String generatePDF(HashMap<String, List<String>> hashMap ,String exportPDFPath,String exportImagePath,String preyearMonth,String rptTitle,String userID,HashMap<String,List<String>> chartNameMap,HashMap<String, String> cntryIdNDescrMap) throws RemoteException, ITMException
{
String resultString="false";
try
{
resultString= budgetReportRemote.generatePDF(hashMap,exportPDFPath,exportImagePath,preyearMonth,rptTitle,userID);
resultString= budgetReportRemote.generatePDF(hashMap,exportPDFPath,exportImagePath,preyearMonth,rptTitle,userID,chartNameMap,cntryIdNDescrMap);
}
catch (Exception e)
{
......@@ -111,9 +106,6 @@ public class ProductionVsBudgetReportBean
return resultString;
}
public boolean getRoleValid(String userCode, String roleCode) throws RemoteException, ITMException
{
boolean isRoleExists=false;
......@@ -127,10 +119,7 @@ public class ProductionVsBudgetReportBean
System.out.println("ibase.dashboard.mfg.bean :ProductionVsBudgetReportBean "+e.getMessage());
e.printStackTrace();
}
return isRoleExists;
}
}
package ibase.dashboard.mfg.bean;
import ibase.scheduler.utility.interfaces.Schedule;
import ibase.system.config.ConnDriver;
import ibase.utility.CommonConstants;
......
......@@ -15,6 +15,6 @@ public interface ProductionVsBudgetReportLocal extends ValidatorLocal{
public String getGeoLoCodeXmlData() throws RemoteException, ITMException;
public String getUnitFormXmlData() throws RemoteException, ITMException;
public boolean getRoleValid(String userCode, String roleCode) throws RemoteException, ITMException;
public String generatePDF(HashMap<String, List<String>> hashMap ,String exportPDFPath,String exportImagePath,String preyearMonth,String rptTitle,String userID) throws RemoteException, ITMException;
public String generatePDF(HashMap<String, List<String>> hashMap ,String exportPDFPath,String exportImagePath,String preyearMonth,String rptTitle,String userID,HashMap<String,List<String>> chartNameMap,HashMap<String, String> cntryIdNDescrMap) throws RemoteException, ITMException;
}
......@@ -16,6 +16,6 @@ public interface ProductionVsBudgetReportRemote extends ValidatorRemote
public String getGeoLoCodeXmlData() throws RemoteException, ITMException;
public String getUnitFormXmlData() throws RemoteException, ITMException;
public boolean getRoleValid(String userCode, String roleCode) throws RemoteException, ITMException;
public String generatePDF(HashMap<String, List<String>> hashMap ,String exportPDFPath,String exportImagePath,String preyearMonth,String rptTitle,String userID) throws RemoteException, ITMException;
public String generatePDF(HashMap<String, List<String>> hashMap ,String exportPDFPath,String exportImagePath,String preyearMonth,String rptTitle,String userID,HashMap<String,List<String>> chartNameMap,HashMap<String, String> cntryIdNDescrMap) throws RemoteException, ITMException;
}
package ibase.dashboard.mfg.bean;
package ibase.dashboard.mfg.servlet;
import ibase.dashboard.mfg.bean.ProductionVsBudgetReportBean;
import ibase.webitm.utility.ITMException;
import java.io.IOException;
import java.util.HashMap;
......@@ -17,8 +18,6 @@ public class ProductionVsBudgetReportServlet extends HttpServlet
{
doPost( request, response );
}
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
ProductionVsBudgetReportBean bean=null;
......@@ -27,14 +26,16 @@ public class ProductionVsBudgetReportServlet extends HttpServlet
String preyearMonth ="";
String rptTitle ="";
String userID ="";
System.out.println(" ENTER - ProductionVsBudgetReportServlet ***********************");
try
{
bean = new ProductionVsBudgetReportBean();
bean = new ProductionVsBudgetReportBean();
HttpSession session= request.getSession();
HashMap <String, List<String>> gridDataMap = (HashMap<String, List<String>>) session.getAttribute("gridDataMap");
HashMap <String, List<String>> cntryWiseChrtNameMap = (HashMap<String, List<String>>) session.getAttribute("cntryWiseChrtNameMap");
HashMap <String,String> cntryIdNDescrMap=(HashMap<String,String>) session.getAttribute("cntryIdNDescrMap");
userID =(String)request.getParameter("userID");
exportPDFPath =(String)request.getParameter("exportPDFPath");
exportImagePath =(String)request.getParameter("exportImagePath");
......@@ -42,8 +43,7 @@ public class ProductionVsBudgetReportServlet extends HttpServlet
rptTitle =(String)request.getParameter("rptTitle");
System.out.println("userID inside servlet====="+userID);
//call EJB method for PDF creation*******************
String resultString= bean.generatePDF(gridDataMap, exportPDFPath, exportImagePath, preyearMonth, rptTitle,userID);
String resultString= bean.generatePDF(gridDataMap, exportPDFPath, exportImagePath, preyearMonth, rptTitle,userID,cntryWiseChrtNameMap,cntryIdNDescrMap);
response.setContentType("text/html");
System.out.println("resultString is ="+resultString);
if(resultString.equals("false"))
......@@ -55,6 +55,7 @@ public class ProductionVsBudgetReportServlet extends HttpServlet
response.getWriter().write("true");
}
}
catch (Exception e)
{
System.out.println("Exception :ProductionVsBudgetReportServlet : ProductionVsBudgetReportServlet) :"+e.getMessage()); //$NON-NLS-1$
......@@ -73,8 +74,4 @@ public class ProductionVsBudgetReportServlet extends HttpServlet
userID="";
}
}
}
\ 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