Commit 01aae7db authored by bpandey's avatar bpandey

changes the jsp as per client requrement


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93791 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f140cf3c
<%@page contentType="text/html"%> <%@page contentType="text/html"%>
<%@page <%@page import="javax.xml.parsers.DocumentBuilderFactory,javax.xml.parsers.DocumentBuilder,org.w3c.dom.*"%>
import="javax.xml.parsers.DocumentBuilderFactory,javax.xml.parsers.DocumentBuilder,org.w3c.dom.*"%>
<%@page import="ibase.dashboard.mfg.bean.*"%> <%@page import="ibase.dashboard.mfg.bean.*"%>
<%@page import="javax.naming.Context"%> <%@page import="javax.naming.Context"%>
<%@page import="org.w3c.dom.Node"%> <%@page import="org.w3c.dom.Node"%>
...@@ -14,8 +13,8 @@ ...@@ -14,8 +13,8 @@
<%@ page import="java.io.File,ibase.utility.CommonConstants" %> <%@ page import="java.io.File,ibase.utility.CommonConstants" %>
<%@page import="java.text.SimpleDateFormat"%> <%@page import="java.text.SimpleDateFormat"%>
<jsp:useBean id="productionVsBudgetBean" scope="request" <jsp:useBean id="productionVsBudgetBean" scope="request" class="ibase.dashboard.mfg.bean.ProductionVsBudgetReportBean" />
class="ibase.dashboard.mfg.bean.ProductionVsBudgetReportBean" />
<%!GenericUtility genericUtility = GenericUtility.getInstance(); <%!GenericUtility genericUtility = GenericUtility.getInstance();
String objName = ""; String objName = "";
Document dom = null; Document dom = null;
...@@ -70,7 +69,14 @@ ...@@ -70,7 +69,14 @@
List<String> cumLstYear = new ArrayList<String>(); List<String> cumLstYear = new ArrayList<String>();
List<Double> cumuQty = new ArrayList<Double>(); List<Double> cumuQty = new ArrayList<Double>();
List<String> LBEList = new ArrayList<String>(); List<String> LBEList = new ArrayList<String>();
SimpleDateFormat simpleDateFormat = null;%> SimpleDateFormat simpleDateFormat = null;
Double cumulativePro = 0.0, cumuQtyInDoubl = 0.0, cumLstYearInDouble = 0.0, lbeInDouble = 0.0;
String cumulativeProStr = "", cumuQtyStr = "", cumLstYearStr = "", lbeValStr = "";
%>
<% <%
response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT"); response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");
response.setHeader("Cache-Control", "no-store, no-cache,must-revalidate"); response.setHeader("Cache-Control", "no-store, no-cache,must-revalidate");
...@@ -155,16 +161,18 @@ $(document).ready(function(){ ...@@ -155,16 +161,18 @@ $(document).ready(function(){
$("#unit_form").dropdownchecklist({ firstItemChecksAll: true, maxDropHeight: 100 }); $("#unit_form").dropdownchecklist({ firstItemChecksAll: true, maxDropHeight: 100 });
}); });
function getData(geoLocation,unitForm) function getData(location,unitForm)
{ {
var element = document.getElementById("geo_loc");
var location =geoLocation.split(",");
var element = document.getElementById("geo_loc");
var location =location.split(",");
for(i=0;i<location.length;i++) for(i=0;i<location.length;i++)
{ {
for (var j = 0; j < element.options.length; j++) for (var j = 0; j < element.options.length; j++)
{ {
var checkLoc= "'"+element.options[j].value+"'"; var checkLoc= "'"+element.options[j].value+"'";
if(checkLoc== location[i]) if(checkLoc== location[i])
{ {
...@@ -175,6 +183,7 @@ function getData(geoLocation,unitForm) ...@@ -175,6 +183,7 @@ function getData(geoLocation,unitForm)
var elementForm = document.getElementById("unit_form"); var elementForm = document.getElementById("unit_form");
var unitForm =unitForm.split(","); var unitForm =unitForm.split(",");
for(k=0;k <unitForm.length;k++) for(k=0;k <unitForm.length;k++)
{ {
for (var l = 0; l < elementForm.options.length; l++) for (var l = 0; l < elementForm.options.length; l++)
...@@ -182,6 +191,7 @@ function getData(geoLocation,unitForm) ...@@ -182,6 +191,7 @@ function getData(geoLocation,unitForm)
var checkUnit= "'"+elementForm.options[l].value+"'"; var checkUnit= "'"+elementForm.options[l].value+"'";
if(checkUnit== unitForm[k]) if(checkUnit== unitForm[k])
{ {
elementForm.options[l].selected = true; elementForm.options[l].selected = true;
} }
} }
...@@ -213,13 +223,6 @@ function isLocationSelected() ...@@ -213,13 +223,6 @@ function isLocationSelected()
//ibase.utility.UserInfoBean userInfo = (ibase.utility.UserInfoBean)session.getAttribute("USER_INFO"); //ibase.utility.UserInfoBean userInfo = (ibase.utility.UserInfoBean)session.getAttribute("USER_INFO");
//if(userInfo == null || userInfo.getLoginCode() == null)
// {
// response.sendRedirect(".." + File.separator + ".." + File.separator + "jsp" + File.separator +"login.html");
// return;
// }
simpleDateFormat = new SimpleDateFormat("dd-MMM-yy"); simpleDateFormat = new SimpleDateFormat("dd-MMM-yy");
calendar = Calendar.getInstance(); calendar = Calendar.getInstance();
...@@ -329,7 +332,7 @@ function isLocationSelected() ...@@ -329,7 +332,7 @@ function isLocationSelected()
geoLoc = request.getParameter("geoLocation"); geoLoc = request.getParameter("geoLocation");
if (geoLoc != null && geoLoc.trim().length() != 0) if (geoLoc != null && geoLoc.trim().length() != 0)
{ {
geo_loc = geoLoc.split(","); geo_loc = geoLoc.trim().split(",");
} }
} }
...@@ -338,7 +341,7 @@ function isLocationSelected() ...@@ -338,7 +341,7 @@ function isLocationSelected()
unitFrm = request.getParameter("unitForm"); unitFrm = request.getParameter("unitForm");
if (unitFrm != null && unitFrm.trim().length() != 0) if (unitFrm != null && unitFrm.trim().length() != 0)
{ {
unit_form = unitFrm.split(","); unit_form = unitFrm.trim().split(",");
} }
} }
...@@ -366,7 +369,7 @@ function isLocationSelected() ...@@ -366,7 +369,7 @@ function isLocationSelected()
{ {
for (int i = 0; i < unit_form.length; i++) for (int i = 0; i < unit_form.length; i++)
{ {
if (!geo_loc[i].equals("0")) if (!unit_form[i].equals("0"))
{ {
if (i == unit_form.length - 1) if (i == unit_form.length - 1)
checkUnitForm += "'" + unit_form[i] + "'"; checkUnitForm += "'" + unit_form[i] + "'";
...@@ -426,7 +429,7 @@ function isLocationSelected() ...@@ -426,7 +429,7 @@ function isLocationSelected()
chartData.append("</categories>"); chartData.append("</categories>");
//End of Labling setting 1 //End of Labling setting 1
//2. Start dataset for Forecasting //2. Start dataset for Forecasting
chartData.append("<dataset seriesName='Forecast' >"); chartData.append("<dataset seriesName='Forecast' color='F5F907' >");
for (int nodCtr = 0; nodCtr < unitList.getLength(); nodCtr++) for (int nodCtr = 0; nodCtr < unitList.getLength(); nodCtr++)
{ {
...@@ -476,7 +479,7 @@ function isLocationSelected() ...@@ -476,7 +479,7 @@ function isLocationSelected()
chartData.append("</dataset>"); chartData.append("</dataset>");
//2. End dataset for Forecasting //2. End dataset for Forecasting
//3. Start dataset for Daily Budget Quantity //3. Start dataset for Daily Budget Quantity
chartData.append("<dataset seriesName='Cumulative Production' >"); chartData.append("<dataset seriesName='Cumulative Production' color='00cc00' >");
String curCumQtyTem = ""; String curCumQtyTem = "";
for (int nodCtr = 0; nodCtr < unitList.getLength(); nodCtr++) for (int nodCtr = 0; nodCtr < unitList.getLength(); nodCtr++)
{ {
...@@ -520,7 +523,7 @@ function isLocationSelected() ...@@ -520,7 +523,7 @@ function isLocationSelected()
chartData.append("</dataset>"); chartData.append("</dataset>");
//3. End dataset for Daily Budget Quantity //3. End dataset for Daily Budget Quantity
//4. start dataset for Day wise Quantity //4. start dataset for Day wise Quantity
chartData.append("<dataset seriesName='Day Production'>"); chartData.append("<dataset seriesName='Day Production' color='FF8533'>");
for (int nodCtr = 0; nodCtr < unitList.getLength(); nodCtr++) for (int nodCtr = 0; nodCtr < unitList.getLength(); nodCtr++)
{ {
...@@ -555,7 +558,7 @@ function isLocationSelected() ...@@ -555,7 +558,7 @@ function isLocationSelected()
//4. End dataset for Day wise Quantity //4. End dataset for Day wise Quantity
//5. start dataset for Last year Quantity //5. start dataset for Last year Quantity
chartData.append("<dataset seriesName='Cumulative Last Year' renderAs='Line'>"); chartData.append("<dataset seriesName='Cumulative Last Year' color='1E86A8' renderAs='Line'>");
String prevYearQtyTemp = ""; String prevYearQtyTemp = "";
for (int nodCtr = 0; nodCtr < unitList.getLength(); nodCtr++) for (int nodCtr = 0; nodCtr < unitList.getLength(); nodCtr++)
{ {
...@@ -589,7 +592,7 @@ function isLocationSelected() ...@@ -589,7 +592,7 @@ function isLocationSelected()
chartData.append("</dataset>"); chartData.append("</dataset>");
//5. End dataset for Last year Quantity //5. End dataset for Last year Quantity
//6. Start dataset for Daily Budget Quantity //6. Start dataset for Daily Budget Quantity
chartData.append("<dataset seriesName='Cumulative Budget' renderAs='Line'>"); chartData.append("<dataset seriesName='Cumulative Budget' color='660426' renderAs='Line'>");
String LBETEMP = ""; String LBETEMP = "";
for (int nodCtr = 0; nodCtr < unitList.getLength(); nodCtr++) for (int nodCtr = 0; nodCtr < unitList.getLength(); nodCtr++)
{ {
...@@ -690,8 +693,7 @@ function isLocationSelected() ...@@ -690,8 +693,7 @@ function isLocationSelected()
<td><%=year%>/<%=month%></td> <td><%=year%>/<%=month%></td>
<% <%
Double cumulativePro = 0.0, cumuQtyInDoubl = 0.0, cumLstYearInDouble = 0.0, lbeInDouble = 0.0;
String cumulativeProStr = "", cumuQtyStr = "", cumLstYearStr = "", lbeValStr = "";
cumulativePro = Double.parseDouble(sumDayPro.get(countChart)); cumulativePro = Double.parseDouble(sumDayPro.get(countChart));
if (cumulativePro >= 1000000) if (cumulativePro >= 1000000)
{ {
...@@ -795,7 +797,7 @@ function isLocationSelected() ...@@ -795,7 +797,7 @@ function isLocationSelected()
<script> <script>
var geoLoc ="<%=this.checkGeoLoc%>"; var geoLoc ="<%=this.checkGeoLoc%>";
var unitform ="<%=this.checkUnitForm%>"; var unitform ="<%=this.checkUnitForm%>";
window.onload=getData(geoLoc,unitform); window.onload=getData(geoLoc.trim(),unitform);
......
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