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