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
import="javax.xml.parsers.DocumentBuilderFactory,javax.xml.parsers.DocumentBuilder,org.w3c.dom.*"%>
<%@page import="javax.xml.parsers.DocumentBuilderFactory,javax.xml.parsers.DocumentBuilder,org.w3c.dom.*"%>
<%@page import="ibase.dashboard.mfg.bean.*"%>
<%@page import="javax.naming.Context"%>
<%@page import="org.w3c.dom.Node"%>
......@@ -14,8 +13,8 @@
<%@ page import="java.io.File,ibase.utility.CommonConstants" %>
<%@page import="java.text.SimpleDateFormat"%>
<jsp:useBean id="productionVsBudgetBean" scope="request"
class="ibase.dashboard.mfg.bean.ProductionVsBudgetReportBean" />
<jsp:useBean id="productionVsBudgetBean" scope="request" class="ibase.dashboard.mfg.bean.ProductionVsBudgetReportBean" />
<%!GenericUtility genericUtility = GenericUtility.getInstance();
String objName = "";
Document dom = null;
......@@ -70,7 +69,14 @@
List<String> cumLstYear = new ArrayList<String>();
List<Double> cumuQty = new ArrayList<Double>();
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("Cache-Control", "no-store, no-cache,must-revalidate");
......@@ -155,16 +161,18 @@ $(document).ready(function(){
$("#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 (var j = 0; j < element.options.length; j++)
{
var checkLoc= "'"+element.options[j].value+"'";
if(checkLoc== location[i])
{
......@@ -175,6 +183,7 @@ function getData(geoLocation,unitForm)
var elementForm = document.getElementById("unit_form");
var unitForm =unitForm.split(",");
for(k=0;k <unitForm.length;k++)
{
for (var l = 0; l < elementForm.options.length; l++)
......@@ -182,6 +191,7 @@ function getData(geoLocation,unitForm)
var checkUnit= "'"+elementForm.options[l].value+"'";
if(checkUnit== unitForm[k])
{
elementForm.options[l].selected = true;
}
}
......@@ -213,13 +223,6 @@ function isLocationSelected()
//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");
calendar = Calendar.getInstance();
......@@ -329,7 +332,7 @@ function isLocationSelected()
geoLoc = request.getParameter("geoLocation");
if (geoLoc != null && geoLoc.trim().length() != 0)
{
geo_loc = geoLoc.split(",");
geo_loc = geoLoc.trim().split(",");
}
}
......@@ -338,7 +341,7 @@ function isLocationSelected()
unitFrm = request.getParameter("unitForm");
if (unitFrm != null && unitFrm.trim().length() != 0)
{
unit_form = unitFrm.split(",");
unit_form = unitFrm.trim().split(",");
}
}
......@@ -366,7 +369,7 @@ function isLocationSelected()
{
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)
checkUnitForm += "'" + unit_form[i] + "'";
......@@ -426,7 +429,7 @@ function isLocationSelected()
chartData.append("</categories>");
//End of Labling setting 1
//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++)
{
......@@ -476,7 +479,7 @@ function isLocationSelected()
chartData.append("</dataset>");
//2. End dataset for Forecasting
//3. Start dataset for Daily Budget Quantity
chartData.append("<dataset seriesName='Cumulative Production' >");
chartData.append("<dataset seriesName='Cumulative Production' color='00cc00' >");
String curCumQtyTem = "";
for (int nodCtr = 0; nodCtr < unitList.getLength(); nodCtr++)
{
......@@ -520,7 +523,7 @@ function isLocationSelected()
chartData.append("</dataset>");
//3. End dataset for Daily Budget 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++)
{
......@@ -555,7 +558,7 @@ function isLocationSelected()
//4. End dataset for Day wise 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 = "";
for (int nodCtr = 0; nodCtr < unitList.getLength(); nodCtr++)
{
......@@ -589,7 +592,7 @@ function isLocationSelected()
chartData.append("</dataset>");
//5. End dataset for Last year 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 = "";
for (int nodCtr = 0; nodCtr < unitList.getLength(); nodCtr++)
{
......@@ -690,8 +693,7 @@ function isLocationSelected()
<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));
if (cumulativePro >= 1000000)
{
......@@ -795,7 +797,7 @@ function isLocationSelected()
<script>
var geoLoc ="<%=this.checkGeoLoc%>";
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