Commit c5b7e788 authored by 史余彬's avatar 史余彬

环境监测大屏显示, 实时数据接口

parent 78c22011
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
var layer = '50'; var layer = '50';
var kqid = 1; var kqid = 1;
$.getJSON('http://192.168.1.3:8080/MineJSON/vzigbee.action?type=8&param=' $.getJSON('http://192.168.1.11:8080/MineJSON/vzigbee.action?type=8&param='
+ rowData.personcode+ '-' + rowData.personcode+ '-'
+ (Date.parse(new Date(starttime)) / 1000)+ '-' + (Date.parse(new Date(starttime)) / 1000)+ '-'
+ (Date.parse(new Date(endtime)) / 1000) + (Date.parse(new Date(endtime)) / 1000)
......
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/co2jiance.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/co2jiance.jsp"
</script> </script>
...@@ -34,6 +34,10 @@ ...@@ -34,6 +34,10 @@
field : 'zduan', field : 'zduan',
width : 50, width : 50,
},{
title : '设备名称',
field : 'zkname',
width : 50,
}, { }, {
title : '站点编号', title : '站点编号',
field : 'sensorname', field : 'sensorname',
......
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/cojiance.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/cojiance.jsp"
</script> </script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/fengsu.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/fengsu.jsp"
//window.location.href="http://localhost:8080/MineTRS/tubiao/fengsu.jsp" //window.location.href="http://localhost:8080/MineTRS/tubiao/fengsu.jsp"
</script> </script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/fengya.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/fengya.jsp"
//window.location.href="http://localhost:8080/MineTRS/tubiao/fengya.jsp" //window.location.href="http://localhost:8080/MineTRS/tubiao/fengya.jsp"
</script> </script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/o2jiance.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/o2jiance.jsp"
</script> </script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/shidu.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/shidu.jsp"
//window.location.href="http://localhost:8080/MineTRS/tubiao/fengya.jsp" //window.location.href="http://localhost:8080/MineTRS/tubiao/fengya.jsp"
</script> </script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/wendu.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/wendu.jsp"
//window.location.href="http://localhost:8080/MineTRS/tubiao/fengya.jsp" //window.location.href="http://localhost:8080/MineTRS/tubiao/fengya.jsp"
</script> </script>
<!DOCTYPE html>
<html>
<title>环境监测大屏</title>
<head>
<%--<script>window.location.href='http://192.168.1.11:8080/MineTT/jinda/index.html';</script>--%>
<script type="text/javascript" src="${pageContext.request.contextPath}/jslib/jquery-1.8.2.min.js" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
window.open("http://192.168.1.11:8080/MineTT/jinda/disscreen.jsp",'top');
})
</script>
</head>
<body>
</body>
</html>
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
<html> <html>
<title>三维动画</title> <title>三维动画</title>
<head> <head>
<%--<script>window.location.href='http://192.168.1.3:8080/MineTT/jinda/index.html';</script>--%> <%--<script>window.location.href='http://192.168.1.11:8080/MineTT/jinda/index.html';</script>--%>
<script type="text/javascript" src="${pageContext.request.contextPath}/jslib/jquery-1.8.2.min.js" charset="utf-8"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/jslib/jquery-1.8.2.min.js" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$(function() { $(function() {
window.open("http://192.168.1.3:8080/MineTT/jinda/index.html",'top'); window.open("http://192.168.1.11:8080/MineTT/jinda/index.html",'top');
}) })
</script> </script>
......
<xml> <xml>
<InterLink ip="192.168.1.3:8080"> <InterLink ip="192.168.1.11:8080">
</InterLink> </InterLink>
<MachineList> <MachineList>
<machine id="572283213433474205D4FF37" zkname="定位" name="人员定位基站0-1" position="1.22,123.27,13.63" rotation="90,180,0" scale="10,10,10" type="Zigbee" layer="0"/> <machine id="572283213433474205D4FF37" zkname="定位" name="人员定位基站0-1" position="1.22,123.27,13.63" rotation="90,180,0" scale="10,10,10" type="Zigbee" layer="0"/>
...@@ -9,21 +9,25 @@ ...@@ -9,21 +9,25 @@
<machine id="571368313137474205D7FF30" zkname="开停2" name="开停传感器2-2" position="-643.53,-138.4,1184.56" rotation="0,50,0" type="Onoff" scale="100,100,100" layer="2"/> <machine id="571368313137474205D7FF30" zkname="开停2" name="开停传感器2-2" position="-643.53,-138.4,1184.56" rotation="0,50,0" type="Onoff" scale="100,100,100" layer="2"/>
<machine id="571368313137474205D7FF30" zkname="风速" name="风速传感器2-1" position="-753.2,-144.78,1230.19" rotation="0,0,0" type="Fengsu" scale="20,20,20" layer="2"/> <machine id="571368313137474205D7FF30" zkname="风速" name="风速传感器2-1" position="-753.2,-144.78,1230.19" rotation="0,0,0" type="Fengsu" scale="20,20,20" layer="2"/>
<machine id="571368313137474205D7FF30" zkname="压力" name="负压传感器2-1" position="-770.43,-142.28,1225.95" rotation="90,158.4,0" type="Fuya" scale="100,100,100" layer="2"/> <machine id="571368313137474205D7FF30" zkname="压力" name="负压传感器2-1" position="-770.43,-142.28,1225.95" rotation="90,158.4,0" type="Fuya" scale="100,100,100" layer="2"/>
<machine id="571368313137474205D7FF30" zkname="压力" name="负压传感器2-1" position="-763.322,-141.8,1227.975" rotation="90,163.221,0" type="Fuya" scale="10,10,10" layer="2"/>
<machine id="571368313137474205D7FF30" zkname="co-2-1" name="一氧化碳传感器2-1" position="-627.345,-139.9625,1179.59" rotation="90,-42.78363,0" type="Fuya" scale="10,10,10" layer="2"/>
<machine id="572276213433474205D6FF37" zkname="定位" name="人员定位基站4-1" position="105.3,-366,-10.63" rotation="90,0,0" scale="10,10,10" type="Zigbee" layer="4"/> <machine id="572276213433474205D6FF37" zkname="定位" name="人员定位基站4-1" position="105.3,-366,-10.63" rotation="90,0,0" scale="10,10,10" type="Zigbee" layer="4"/>
<machine id="571365313137474205D8FF30" zkname="co" name="一氧化碳传感器4-1" position="263.65,-366.06,-441.41" rotation="90,-79.6,0" type="Co" scale="10,10,10" layer="4"/> <machine id="571365313137474205D8FF30" zkname="co-4-1" name="一氧化碳传感器4-1" position="263.65,-366.06,-441.41" rotation="90,-79.6,0" type="Co" scale="10,10,10" layer="4"/>
<machine id="571365313137474205D8FF30" zkname="co-4-2" name="一氧化碳传感器4-2" position="260.471,-365.886,-501.9611" rotation="90,-98.6,0" type="Co" scale="10,10,10" layer="4"/>
<machine id="572289203433474205D6FF37" zkname="定位" name="人员定位基站5-1" position="108.55,-633.9,-10.71" rotation="90,0,0" scale="10,10,10" type="Zigbee" layer="5"/> <machine id="572289203433474205D6FF37" zkname="定位" name="人员定位基站5-1" position="108.55,-633.9,-10.71" rotation="90,0,0" scale="10,10,10" type="Zigbee" layer="5"/>
<machine id="572253213433474205D5FF37" zkname="定位" name="人员定位基站5-2" position="181.46,-633.87,-804.65" rotation="90,180,0" type="Zigbee" scale="10,10,10" layer="5"/> <machine id="572253213433474205D5FF37" zkname="定位" name="人员定位基站5-2" position="181.46,-633.87,-804.65" rotation="90,180,0" type="Zigbee" scale="10,10,10" layer="5"/>
<machine id="572268433137474205D9FF30" zkname="co" name="一氧化碳传感器5-1" position="281.85,-632.74,-385.03" rotation="90,-90,0" type="Co" scale="10,10,10" layer="5"/> <machine id="572268433137474205D9FF30" zkname="co-5-3" name="一氧化碳传感器5-3" position="281.85,-632.74,-385.03" rotation="90,-90,0" type="Co" scale="10,10,10" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="风速" name="风速传感器5-1" position="197.45,-637.3,-902.05" rotation="0,107,0" type="Fengsu" scale="20,20,20" layer="5"/> <machine id="571364313137474205D7FF30" zkname="风速" name="风速传感器5-1" position="197.45,-637.3,-902.05" rotation="0,107,0" type="Fengsu" scale="20,20,20" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="co" name="一氧化碳传感器5-2" position="186.04,-633.8,-805.03" rotation="90,-180,0" type="Co" scale="10,10,10" layer="5"/> <machine id="571364313137474205D7FF30" zkname="co-5-1" name="一氧化碳传感器5-1" position="186.04,-633.8,-805.03" rotation="90,-180,0" type="Co" scale="10,10,10" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="co2" name="二氧化碳传感器5-1" position="189.781,-633.32,-805.207" rotation="0,-159,0" type="Co2" scale="1,1,1" layer="5"/> <machine id="571364313137474205D7FF30" zkname="co2" name="二氧化碳传感器5-1" position="189.781,-633.32,-805.207" rotation="0,-159,0" type="Co2" scale="1,1,1" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="温度" name="温湿度传感器5-1" position="178.69,-633.6,-805" rotation="0,172.4,0" type="Wendu" scale="1,1,1" layer="5"/> <machine id="571364313137474205D7FF30" zkname="温度" name="温湿度传感器5-1" position="178.69,-633.6,-805" rotation="0,172.4,0" type="Wendu" scale="1,1,1" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="湿度" name="温湿度传感器5-1" position="175.6,-633.6,-806.259" rotation="0,144.6,0" type="Shidu" scale="1,1,1" layer="5"/> <machine id="571364313137474205D7FF30" zkname="湿度" name="温湿度传感器5-1" position="175.6,-633.6,-806.259" rotation="0,144.6,0" type="Shidu" scale="1,1,1" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="o2" name="氧气传感器5-1" position="173.84,-633.73,-809.05" rotation="-90,90,0" type="O2" scale="2,2,2" layer="5"/> <machine id="571364313137474205D7FF30" zkname="o2" name="氧气传感器5-1" position="173.84,-633.73,-809.05" rotation="-90,90,0" type="O2" scale="2,2,2" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="压力" name="气压传感器5-1" position="191.88,-633.07,-808.52" rotation="90,-93.2,0" type="Qiya" scale="100,100,100" layer="5"/> <machine id="571364313137474205D7FF30" zkname="压力" name="气压传感器5-1" position="191.88,-633.07,-808.52" rotation="90,-93.2,0" type="Qiya" scale="100,100,100" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="co-5-2" name="一氧化碳传感器5-2" position="180.48,-633.8,-873.936" rotation="90,3.64,0" type="Co" scale="10,10,10" layer="5"/>
</MachineList> </MachineList>
<BirthPos> <BirthPos>
<pos id="1" machineid="572283213433474205D4FF37" name="地面井口" position="2.6,118.17,-3.5" layer="0"/> <pos id="1" machineid="572283213433474205D4FF37" name="地面井口" position="2.6,118.17,-3.5" layer="0"/>
......
...@@ -5,18 +5,20 @@ ...@@ -5,18 +5,20 @@
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>大屏显示</title> <title>大屏显示</title>
<style type="text/css"> <style type="text/css">
</style> </style>
<link rel="stylesheet" type="text/css" href="../themes/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="../themes/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../themes/icon.css"> <link rel="stylesheet" type="text/css" href="../themes/icon.css">
<script type="text/javascript" src="../js/jquery-1.7.1.js"></script> <script type="text/javascript" src="../js/jquery-1.7.1.js"></script>
<script type="text/javascript" src="../js/jquery-ui-1.8.20.custom.min.js"></script> <script type="text/javascript" src="../js/jquery-ui-1.8.20.custom.min.js"></script>
<script type="text/javascript" src="../js/highcharts.js"></script> <script type="text/javascript" src="../js/highcharts.js"></script>
<script type="text/javascript" src="../js/highcharts-more.js"></script>
<script type="text/javascript" src="../js/jquery.easyui.min.js"></script> <script type="text/javascript" src="../js/jquery.easyui.min.js"></script>
<script> <script>
/** /**
* 表格数据初始化 * 表格数据初始化
*/ */
function initpolygon1(polygon,title,value1,name) { function initpolygon1(polygon,title,value1,name,min, max) {
$('#'+polygon).highcharts({ $('#'+polygon).highcharts({
chart: { chart: {
type: 'gauge', type: 'gauge',
...@@ -34,7 +36,8 @@ ...@@ -34,7 +36,8 @@
}, },
title: { title: {
text: name+'号传感器实时温度图' text: name+'(传感器)',
style: { "color": "", "fontSize": "18px" }
}, },
pane: [{ pane: [{
...@@ -46,8 +49,8 @@ ...@@ -46,8 +49,8 @@
}], }],
yAxis: [{ yAxis: [{
min: 0, min: min,
max: 85, max: max,
minorTickPosition: 'outside', minorTickPosition: 'outside',
tickPosition: 'outside', tickPosition: 'outside',
labels: { labels: {
...@@ -60,14 +63,14 @@ ...@@ -60,14 +63,14 @@
}], }],
pane: 0, pane: 0,
title: { title: {
text: '<span style="font-size:8px">温度 '+value1.toFixed(2)+'</span><br/>℃', text: '<span style="font-size:8px">' + name + ":" + value1.toFixed(2)+'</span><br/>℃',
y: -40 y: -40
} }
}], }],
tooltip: { tooltip: {
enabled: true, enabled: true,
formatter: function () { formatter: function () {
return '温度' +value1.toFixed(2)+'' return name + '' +value1.toFixed(2)+''
} }
}, },
plotOptions: { plotOptions: {
...@@ -85,7 +88,6 @@ ...@@ -85,7 +88,6 @@
}] }]
}, },
function(chart) { function(chart) {
setInterval(function() { setInterval(function() {
var left = chart.series[0].points[0], var left = chart.series[0].points[0],
...@@ -106,17 +108,85 @@ ...@@ -106,17 +108,85 @@
// 页面加载初始化 // 页面加载初始化
$(function() { $(function() {
$('#tt').tabs({
border: false,
onSelect: function (title) {
$.ajax({ $.ajax({
url: "/MineTT/online!EnvironmentRealTimeData.do?token=laowangzhuanyong", url: "/MineTT/online!EnvironmentRealTimeData.do?token=laowangzhuanyong",
type: "get", type: "get",
success: function(data) { success: function(data) {
console.log(data) changeCharts(title, data)
}
})
}
})
})
/**
* 根据不同的传感器调整图表
*/
function changeCharts(sensorname, data) {
var deviceType = '';
var measureMax;
var measureMin;
if ("氧气" === sensorname) {
deviceType = 'yq';
measureMin = 0;
measureMax = 25;
} else if ("一氧化碳" === sensorname) {
deviceType = 'yyht';
measureMin = 0;
measureMax = 1000;
} else if ("二氧化碳" === sensorname) {
deviceType = 'eyht';
measureMin = 0;
measureMax = 0.5;
} else if ("温度" === sensorname) {
deviceType = 'wd';
measureMin = 0;
measureMax = 80;
} else if ("湿度" === sensorname) {
deviceType = 'sd';
measureMin = 0;
measureMax = 95;
} else if ("压力" === sensorname) {
deviceType = 'yl';
measureMin = 0;
measureMax = 5;
} else if ("风速" === sensorname) {
deviceType = 'fs';
measureMin = 0.4;
measureMax = 15;
}
$("#"+deviceType).empty()
const arrAll = JSON.parse(data);
$.each(arrAll, function(key, val) {
if (sensorname === key) {
$.each(val, function(index, val) {
var ifbj = '';
var color = '';
if (val.ifbj === '0') {
ifbj = '正常'
color = 'black'
} else {
ifbj = '报警'
color = 'red'
} }
$("#"+deviceType).append("<div class='a' style='width: 430px ; height: 49%; float: left;margin-top: 20px; margin-left: 20px; border:1px solid #5896f3'>" +
"<div id='" + deviceType + index + "' style='width: 98%;height: 49%' class='chart1'>正在刷新 ,请稍后.." +
"<img alt='请稍候' src='../themes/azure/images/progressBar/progressBar_l.gif'>" +
"</div> </br>" +
"<p style='font-size: 15px; margin-left: 10px; margin-top: -10px'>设备号: " + val.sensorname +"</p></br>" +
"<p style='font-size: 15px; margin-left: 10px; margin-top: -10px'>中断: " + val.zduan +"</p></br>" +
"<p style='font-size: 15px; margin-left: 10px; margin-top: -10px'>时间: " + val.jctime +"</p></br>" +
"<p style='font-size: 15px; margin-left: 10px; margin-top: -10px';color: " + color + "'>报警: " + ifbj + "</p></br>" +
"</div>")
initpolygon1(deviceType+index, sensorname, val.value2, sensorname, measureMin, measureMax)
}) })
for (var i = 0 ; i < 10 ; i++) {
$("#wd").append("<div style='width: 400px; height: 200px; float: left;margin-top: 20px; margin-left: 20px; border:1px solid #5896f3'></div>")
} }
}) })
}
</script> </script>
</head> </head>
...@@ -124,26 +194,26 @@ ...@@ -124,26 +194,26 @@
<body> <body>
<div id="tt" class="easyui-tabs" style="width:auto;height:auto;"> <div id="tt" class="easyui-tabs" style="width:auto;height:auto;">
<div id="wd" title="温度" style="padding:20px;"> <div id="yq" title="氧气" data-options="iconCls:'icon-reload',closable:true" style="padding:20px">
</div> </div>
<div title="湿度" data-options="closable:true" style="overflow:auto;padding:20px;display:none;"> <div id="yyht" title="一氧化碳" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
湿度
</div> </div>
<div title="风速" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;display:none;"> <div id="eyht" title="二氧化碳" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
风速
</div> </div>
<div title="压力" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;display:none;"> <div id="wd" title="温度" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
压力
</div> </div>
<div title="一氧化碳" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;display:none;"> <div id="sd" title="湿度" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
一氧化碳
</div> </div>
<div title="二氧化碳" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;display:none;"> <div id="fs" title="风速" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
二氧化碳
</div> </div>
<div title="氧气" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;display:none;"> <div id="yl" title="压力" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
氧气
</div> </div>
</div> </div>
......
/*
Highcharts JS v4.0.1 (2014-04-24)
(c) 2009-2014 Torstein Honsi
License: www.highcharts.com/license
*/
(function(m,C){function K(a,b,c){this.init.call(this,a,b,c)}var O=m.arrayMin,P=m.arrayMax,s=m.each,F=m.extend,o=m.merge,Q=m.map,q=m.pick,x=m.pInt,p=m.getOptions().plotOptions,h=m.seriesTypes,u=m.extendClass,L=m.splat,r=m.wrap,M=m.Axis,y=m.Tick,H=m.Point,R=m.Pointer,S=m.CenteredSeriesMixin,z=m.TrackerMixin,t=m.Series,v=Math,D=v.round,A=v.floor,T=v.max,U=m.Color,w=function(){};F(K.prototype,{init:function(a,b,c){var d=this,e=d.defaultOptions;d.chart=b;if(b.angular)e.background={};d.options=a=o(e,a);
(a=a.background)&&s([].concat(L(a)).reverse(),function(a){var g=a.backgroundColor,a=o(d.defaultBackgroundOptions,a);if(g)a.backgroundColor=g;a.color=a.backgroundColor;c.options.plotBands.unshift(a)})},defaultOptions:{center:["50%","50%"],size:"85%",startAngle:0},defaultBackgroundOptions:{shape:"circle",borderWidth:1,borderColor:"silver",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#FFF"],[1,"#DDD"]]},from:Number.MIN_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"}});
var G=M.prototype,y=y.prototype,V={getOffset:w,redraw:function(){this.isDirty=!1},render:function(){this.isDirty=!1},setScale:w,setCategories:w,setTitle:w},N={isRadial:!0,defaultRadialGaugeOptions:{labels:{align:"center",x:0,y:null},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1,tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},zIndex:2},defaultRadialXOptions:{gridLineWidth:1,labels:{align:null,distance:15,x:0,y:null},
maxPadding:0,minPadding:0,showLastLabel:!1,tickLength:0},defaultRadialYOptions:{gridLineInterpolation:"circle",labels:{align:"right",x:-3,y:-2},showLastLabel:!1,title:{x:4,text:null,rotation:90}},setOptions:function(a){a=this.options=o(this.defaultOptions,this.defaultRadialOptions,a);if(!a.plotBands)a.plotBands=[]},getOffset:function(){G.getOffset.call(this);this.chart.axisOffset[this.side]=0;this.center=this.pane.center=S.getCenter.call(this.pane)},getLinePath:function(a,b){var c=this.center,b=q(b,
c[2]/2-this.offset);return this.chart.renderer.symbols.arc(this.left+c[0],this.top+c[1],b,b,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0})},setAxisTranslation:function(){G.setAxisTranslation.call(this);if(this.center)this.transA=this.isCircular?(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):this.center[2]/2/(this.max-this.min||1),this.minPixelPadding=this.isXAxis?this.transA*this.minPointOffset:0},beforeSetTickPositions:function(){this.autoConnect&&(this.max+=this.categories&&
1||this.pointRange||this.closestPointRange||0)},setAxisSize:function(){G.setAxisSize.call(this);if(this.isRadial){this.center=this.pane.center=m.CenteredSeriesMixin.getCenter.call(this.pane);if(this.isCircular)this.sector=this.endAngleRad-this.startAngleRad;this.len=this.width=this.height=this.center[2]*q(this.sector,1)/2}},getPosition:function(a,b){return this.postTranslate(this.isCircular?this.translate(a):0,q(this.isCircular?b:this.translate(a),this.center[2]/2)-this.offset)},postTranslate:function(a,
b){var c=this.chart,d=this.center,a=this.startAngleRad+a;return{x:c.plotLeft+d[0]+Math.cos(a)*b,y:c.plotTop+d[1]+Math.sin(a)*b}},getPlotBandPath:function(a,b,c){var d=this.center,e=this.startAngleRad,f=d[2]/2,g=[q(c.outerRadius,"100%"),c.innerRadius,q(c.thickness,10)],k=/%$/,l,n=this.isCircular;this.options.gridLineInterpolation==="polygon"?d=this.getPlotLinePath(a).concat(this.getPlotLinePath(b,!0)):(n||(g[0]=this.translate(a),g[1]=this.translate(b)),g=Q(g,function(a){k.test(a)&&(a=x(a,10)*f/100);
return a}),c.shape==="circle"||!n?(a=-Math.PI/2,b=Math.PI*1.5,l=!0):(a=e+this.translate(a),b=e+this.translate(b)),d=this.chart.renderer.symbols.arc(this.left+d[0],this.top+d[1],g[0],g[0],{start:a,end:b,innerR:q(g[1],g[0]-g[2]),open:l}));return d},getPlotLinePath:function(a,b){var c=this,d=c.center,e=c.chart,f=c.getPosition(a),g,k,l;c.isCircular?l=["M",d[0]+e.plotLeft,d[1]+e.plotTop,"L",f.x,f.y]:c.options.gridLineInterpolation==="circle"?(a=c.translate(a))&&(l=c.getLinePath(0,a)):(s(e.xAxis,function(a){a.pane===
c.pane&&(g=a)}),l=[],a=c.translate(a),d=g.tickPositions,g.autoConnect&&(d=d.concat([d[0]])),b&&(d=[].concat(d).reverse()),s(d,function(f,c){k=g.getPosition(f,a);l.push(c?"L":"M",k.x,k.y)}));return l},getTitlePosition:function(){var a=this.center,b=this.chart,c=this.options.title;return{x:b.plotLeft+a[0]+(c.x||0),y:b.plotTop+a[1]-{high:0.5,middle:0.25,low:0}[c.align]*a[2]+(c.y||0)}}};r(G,"init",function(a,b,c){var i;var d=b.angular,e=b.polar,f=c.isX,g=d&&f,k,l;l=b.options;var n=c.pane||0;if(d){if(F(this,
g?V:N),k=!f)this.defaultRadialOptions=this.defaultRadialGaugeOptions}else if(e)F(this,N),this.defaultRadialOptions=(k=f)?this.defaultRadialXOptions:o(this.defaultYAxisOptions,this.defaultRadialYOptions);a.call(this,b,c);if(!g&&(d||e)){a=this.options;if(!b.panes)b.panes=[];this.pane=(i=b.panes[n]=b.panes[n]||new K(L(l.pane)[n],b,this),n=i);n=n.options;b.inverted=!1;l.chart.zoomType=null;this.startAngleRad=b=(n.startAngle-90)*Math.PI/180;this.endAngleRad=l=(q(n.endAngle,n.startAngle+360)-90)*Math.PI/
180;this.offset=a.offset||0;if((this.isCircular=k)&&c.max===C&&l-b===2*Math.PI)this.autoConnect=!0}});r(y,"getPosition",function(a,b,c,d,e){var f=this.axis;return f.getPosition?f.getPosition(c):a.call(this,b,c,d,e)});r(y,"getLabelPosition",function(a,b,c,d,e,f,g,k,l){var n=this.axis,j=f.y,i=f.align,h=(n.translate(this.pos)+n.startAngleRad+Math.PI/2)/Math.PI*180%360;n.isRadial?(a=n.getPosition(this.pos,n.center[2]/2+q(f.distance,-25)),f.rotation==="auto"?d.attr({rotation:h}):j===null&&(j=n.chart.renderer.fontMetrics(d.styles.fontSize).b-
d.getBBox().height/2),i===null&&(i=n.isCircular?h>20&&h<160?"left":h>200&&h<340?"right":"center":"center",d.attr({align:i})),a.x+=f.x,a.y+=j):a=a.call(this,b,c,d,e,f,g,k,l);return a});r(y,"getMarkPath",function(a,b,c,d,e,f,g){var k=this.axis;k.isRadial?(a=k.getPosition(this.pos,k.center[2]/2+d),b=["M",b,c,"L",a.x,a.y]):b=a.call(this,b,c,d,e,f,g);return b});p.arearange=o(p.area,{lineWidth:1,marker:null,threshold:null,tooltip:{pointFormat:'<span style="color:{series.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},
trackByArea:!0,dataLabels:{verticalAlign:null,xLow:0,xHigh:0,yLow:0,yHigh:0},states:{hover:{halo:!1}}});h.arearange=u(h.area,{type:"arearange",pointArrayMap:["low","high"],toYData:function(a){return[a.low,a.high]},pointValKey:"low",getSegments:function(){var a=this;s(a.points,function(b){if(!a.options.connectNulls&&(b.low===null||b.high===null))b.y=null;else if(b.low===null&&b.high!==null)b.y=b.high});t.prototype.getSegments.call(this)},translate:function(){var a=this.yAxis;h.area.prototype.translate.apply(this);
s(this.points,function(b){var c=b.low,d=b.high,e=b.plotY;d===null&&c===null?b.y=null:c===null?(b.plotLow=b.plotY=null,b.plotHigh=a.translate(d,0,1,0,1)):d===null?(b.plotLow=e,b.plotHigh=null):(b.plotLow=e,b.plotHigh=a.translate(d,0,1,0,1))})},getSegmentPath:function(a){var b,c=[],d=a.length,e=t.prototype.getSegmentPath,f,g;g=this.options;var k=g.step;for(b=HighchartsAdapter.grep(a,function(a){return a.plotLow!==null});d--;)f=a[d],f.plotHigh!==null&&c.push({plotX:f.plotX,plotY:f.plotHigh});a=e.call(this,
b);if(k)k===!0&&(k="left"),g.step={left:"right",center:"center",right:"left"}[k];c=e.call(this,c);g.step=k;g=[].concat(a,c);c[0]="L";this.areaPath=this.areaPath.concat(a,c);return g},drawDataLabels:function(){var a=this.data,b=a.length,c,d=[],e=t.prototype,f=this.options.dataLabels,g,k=this.chart.inverted;if(f.enabled||this._hasPointLabels){for(c=b;c--;)g=a[c],g.y=g.high,g._plotY=g.plotY,g.plotY=g.plotHigh,d[c]=g.dataLabel,g.dataLabel=g.dataLabelUpper,g.below=!1,k?(f.align="left",f.x=f.xHigh):f.y=
f.yHigh;e.drawDataLabels&&e.drawDataLabels.apply(this,arguments);for(c=b;c--;)g=a[c],g.dataLabelUpper=g.dataLabel,g.dataLabel=d[c],g.y=g.low,g.plotY=g._plotY,g.below=!0,k?(f.align="right",f.x=f.xLow):f.y=f.yLow;e.drawDataLabels&&e.drawDataLabels.apply(this,arguments)}},alignDataLabel:function(){h.column.prototype.alignDataLabel.apply(this,arguments)},getSymbol:h.column.prototype.getSymbol,drawPoints:w});p.areasplinerange=o(p.arearange);h.areasplinerange=u(h.arearange,{type:"areasplinerange",getPointSpline:h.spline.prototype.getPointSpline});
(function(){var a=h.column.prototype;p.columnrange=o(p.column,p.arearange,{lineWidth:1,pointRange:null});h.columnrange=u(h.arearange,{type:"columnrange",translate:function(){var b=this,c=b.yAxis,d;a.translate.apply(b);s(b.points,function(a){var f=a.shapeArgs,g=b.options.minPointLength,k;a.tooltipPos=null;a.plotHigh=d=c.translate(a.high,0,1,0,1);a.plotLow=a.plotY;k=d;a=a.plotY-d;a<g&&(g-=a,a+=g,k-=g/2);f.height=a;f.y=k})},trackerGroups:["group","dataLabels"],drawGraph:w,pointAttrToOptions:a.pointAttrToOptions,
drawPoints:a.drawPoints,drawTracker:a.drawTracker,animate:a.animate,getColumnMetrics:a.getColumnMetrics})})();p.gauge=o(p.line,{dataLabels:{enabled:!0,defer:!1,y:15,borderWidth:1,borderColor:"silver",borderRadius:3,crop:!1,style:{fontWeight:"bold"},verticalAlign:"top",zIndex:2},dial:{},pivot:{},tooltip:{headerFormat:""},showInLegend:!1});z={type:"gauge",pointClass:u(H,{setState:function(a){this.state=a}}),angular:!0,drawGraph:w,fixedBox:!0,forceDL:!0,trackerGroups:["group","dataLabels"],translate:function(){var a=
this.yAxis,b=this.options,c=a.center;this.generatePoints();s(this.points,function(d){var e=o(b.dial,d.dial),f=x(q(e.radius,80))*c[2]/200,g=x(q(e.baseLength,70))*f/100,k=x(q(e.rearLength,10))*f/100,l=e.baseWidth||3,n=e.topWidth||1,j=b.overshoot,i=a.startAngleRad+a.translate(d.y,null,null,null,!0);j&&typeof j==="number"?(j=j/180*Math.PI,i=Math.max(a.startAngleRad-j,Math.min(a.endAngleRad+j,i))):b.wrap===!1&&(i=Math.max(a.startAngleRad,Math.min(a.endAngleRad,i)));i=i*180/Math.PI;d.shapeType="path";d.shapeArgs=
{d:e.path||["M",-k,-l/2,"L",g,-l/2,f,-n/2,f,n/2,g,l/2,-k,l/2,"z"],translateX:c[0],translateY:c[1],rotation:i};d.plotX=c[0];d.plotY=c[1]})},drawPoints:function(){var a=this,b=a.yAxis.center,c=a.pivot,d=a.options,e=d.pivot,f=a.chart.renderer;s(a.points,function(c){var b=c.graphic,l=c.shapeArgs,e=l.d,j=o(d.dial,c.dial);b?(b.animate(l),l.d=e):c.graphic=f[c.shapeType](l).attr({stroke:j.borderColor||"none","stroke-width":j.borderWidth||0,fill:j.backgroundColor||"black",rotation:l.rotation}).add(a.group)});
c?c.animate({translateX:b[0],translateY:b[1]}):a.pivot=f.circle(0,0,q(e.radius,5)).attr({"stroke-width":e.borderWidth||0,stroke:e.borderColor||"silver",fill:e.backgroundColor||"black"}).translate(b[0],b[1]).add(a.group)},animate:function(a){var b=this;if(!a)s(b.points,function(a){var d=a.graphic;d&&(d.attr({rotation:b.yAxis.startAngleRad*180/Math.PI}),d.animate({rotation:a.shapeArgs.rotation},b.options.animation))}),b.animate=null},render:function(){this.group=this.plotGroup("group","series",this.visible?
"visible":"hidden",this.options.zIndex,this.chart.seriesGroup);t.prototype.render.call(this);this.group.clip(this.chart.clipRect)},setData:function(a,b){t.prototype.setData.call(this,a,!1);this.processData();this.generatePoints();q(b,!0)&&this.chart.redraw()},drawTracker:z&&z.drawTrackerPoint};h.gauge=u(h.line,z);p.boxplot=o(p.column,{fillColor:"#FFFFFF",lineWidth:1,medianWidth:2,states:{hover:{brightness:-0.3}},threshold:null,tooltip:{pointFormat:'<span style="color:{series.color}">●</span> <b> {series.name}</b><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>'},
whiskerLength:"50%",whiskerWidth:2});h.boxplot=u(h.column,{type:"boxplot",pointArrayMap:["low","q1","median","q3","high"],toYData:function(a){return[a.low,a.q1,a.median,a.q3,a.high]},pointValKey:"high",pointAttrToOptions:{fill:"fillColor",stroke:"color","stroke-width":"lineWidth"},drawDataLabels:w,translate:function(){var a=this.yAxis,b=this.pointArrayMap;h.column.prototype.translate.apply(this);s(this.points,function(c){s(b,function(b){c[b]!==null&&(c[b+"Plot"]=a.translate(c[b],0,1,0,1))})})},drawPoints:function(){var a=
this,b=a.points,c=a.options,d=a.chart.renderer,e,f,g,k,l,n,j,i,h,m,p,I,r,o,J,u,w,t,v,x,z,y,E=a.doQuartiles!==!1,B=parseInt(a.options.whiskerLength,10)/100;s(b,function(b){h=b.graphic;z=b.shapeArgs;p={};o={};u={};y=b.color||a.color;if(b.plotY!==C)if(e=b.pointAttr[b.selected?"selected":""],w=z.width,t=A(z.x),v=t+w,x=D(w/2),f=A(E?b.q1Plot:b.lowPlot),g=A(E?b.q3Plot:b.lowPlot),k=A(b.highPlot),l=A(b.lowPlot),p.stroke=b.stemColor||c.stemColor||y,p["stroke-width"]=q(b.stemWidth,c.stemWidth,c.lineWidth),p.dashstyle=
b.stemDashStyle||c.stemDashStyle,o.stroke=b.whiskerColor||c.whiskerColor||y,o["stroke-width"]=q(b.whiskerWidth,c.whiskerWidth,c.lineWidth),u.stroke=b.medianColor||c.medianColor||y,u["stroke-width"]=q(b.medianWidth,c.medianWidth,c.lineWidth),u["stroke-linecap"]="round",j=p["stroke-width"]%2/2,i=t+x+j,m=["M",i,g,"L",i,k,"M",i,f,"L",i,l],E&&(j=e["stroke-width"]%2/2,i=A(i)+j,f=A(f)+j,g=A(g)+j,t+=j,v+=j,I=["M",t,g,"L",t,f,"L",v,f,"L",v,g,"L",t,g,"z"]),B&&(j=o["stroke-width"]%2/2,k+=j,l+=j,r=["M",i-x*B,
k,"L",i+x*B,k,"M",i-x*B,l,"L",i+x*B,l]),j=u["stroke-width"]%2/2,n=D(b.medianPlot)+j,J=["M",t,n,"L",v,n],h)b.stem.animate({d:m}),B&&b.whiskers.animate({d:r}),E&&b.box.animate({d:I}),b.medianShape.animate({d:J});else{b.graphic=h=d.g().add(a.group);b.stem=d.path(m).attr(p).add(h);if(B)b.whiskers=d.path(r).attr(o).add(h);if(E)b.box=d.path(I).attr(e).add(h);b.medianShape=d.path(J).attr(u).add(h)}})}});p.errorbar=o(p.boxplot,{color:"#000000",grouping:!1,linkedTo:":previous",tooltip:{pointFormat:'<span style="color:{series.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},
whiskerWidth:null});h.errorbar=u(h.boxplot,{type:"errorbar",pointArrayMap:["low","high"],toYData:function(a){return[a.low,a.high]},pointValKey:"high",doQuartiles:!1,drawDataLabels:h.arearange?h.arearange.prototype.drawDataLabels:w,getColumnMetrics:function(){return this.linkedParent&&this.linkedParent.columnMetrics||h.column.prototype.getColumnMetrics.call(this)}});p.waterfall=o(p.column,{lineWidth:1,lineColor:"#333",dashStyle:"dot",borderColor:"#333"});h.waterfall=u(h.column,{type:"waterfall",upColorProp:"fill",
pointArrayMap:["low","y"],pointValKey:"y",init:function(a,b){b.stacking=!0;h.column.prototype.init.call(this,a,b)},translate:function(){var a=this.yAxis,b,c,d,e,f,g,k,l,n;b=this.options.threshold;h.column.prototype.translate.apply(this);l=b;d=this.points;for(c=0,b=d.length;c<b;c++){e=d[c];f=e.shapeArgs;g=this.getStack(c);n=g.points[this.index+","+c];if(isNaN(e.y))e.y=this.yData[c];k=T(l,l+e.y)+n[0];f.y=a.translate(k,0,1);e.isSum||e.isIntermediateSum?(f.y=a.translate(n[1],0,1),f.height=a.translate(n[0],
0,1)-f.y):l+=g.total;f.height<0&&(f.y+=f.height,f.height*=-1);e.plotY=f.y=D(f.y)-this.borderWidth%2/2;f.height=D(f.height);e.yBottom=f.y+f.height}},processData:function(a){var b=this.yData,c=this.points,d,e=b.length,f=this.options.threshold||0,g,k,l,n,j,i;k=g=l=n=f;for(i=0;i<e;i++)j=b[i],d=c&&c[i]?c[i]:{},j==="sum"||d.isSum?b[i]=k:j==="intermediateSum"||d.isIntermediateSum?(b[i]=g,g=f):(k+=j,g+=j),l=Math.min(k,l),n=Math.max(k,n);t.prototype.processData.call(this,a);this.dataMin=l;this.dataMax=n},
toYData:function(a){if(a.isSum)return"sum";else if(a.isIntermediateSum)return"intermediateSum";return a.y},getAttribs:function(){h.column.prototype.getAttribs.apply(this,arguments);var a=this.options,b=a.states,c=a.upColor||this.color,a=m.Color(c).brighten(0.1).get(),d=o(this.pointAttr),e=this.upColorProp;d[""][e]=c;d.hover[e]=b.hover.upColor||a;d.select[e]=b.select.upColor||c;s(this.points,function(a){if(a.y>0&&!a.color)a.pointAttr=d,a.color=c})},getGraphPath:function(){var a=this.data,b=a.length,
c=D(this.options.lineWidth+this.borderWidth)%2/2,d=[],e,f,g;for(g=1;g<b;g++)f=a[g].shapeArgs,e=a[g-1].shapeArgs,f=["M",e.x+e.width,e.y+c,"L",f.x,e.y+c],a[g-1].y<0&&(f[2]+=e.height,f[5]+=e.height),d=d.concat(f);return d},getExtremes:w,getStack:function(a){var b=this.yAxis.stacks,c=this.stackKey;this.processedYData[a]<this.options.threshold&&(c="-"+c);return b[c][a]},drawGraph:t.prototype.drawGraph});p.bubble=o(p.scatter,{dataLabels:{format:"{point.z}",inside:!0,style:{color:"white",textShadow:"0px 0px 3px black"},
verticalAlign:"middle"},marker:{lineColor:null,lineWidth:1},minSize:8,maxSize:"20%",states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0});z=u(H,{haloPath:function(){return H.prototype.haloPath.call(this,this.shapeArgs.r+this.series.options.states.hover.halo.size)}});h.bubble=u(h.scatter,{type:"bubble",pointClass:z,pointArrayMap:["y","z"],parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],bubblePadding:!0,
pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor"},applyOpacity:function(a){var b=this.options.marker,c=q(b.fillOpacity,0.5),a=a||b.fillColor||this.color;c!==1&&(a=U(a).setOpacity(c).get("rgba"));return a},convertAttribs:function(){var a=t.prototype.convertAttribs.apply(this,arguments);a.fill=this.applyOpacity(a.fill);return a},getRadii:function(a,b,c,d){var e,f,g,k=this.zData,l=[],n=this.options.sizeBy!=="width";for(f=0,e=k.length;f<e;f++)g=b-a,g=g>0?(k[f]-a)/(b-
a):0.5,n&&g>=0&&(g=Math.sqrt(g)),l.push(v.ceil(c+g*(d-c))/2);this.radii=l},animate:function(a){var b=this.options.animation;if(!a)s(this.points,function(a){var d=a.graphic,a=a.shapeArgs;d&&a&&(d.attr("r",1),d.animate({r:a.r},b))}),this.animate=null},translate:function(){var a,b=this.data,c,d,e=this.radii;h.scatter.prototype.translate.call(this);for(a=b.length;a--;)c=b[a],d=e?e[a]:0,c.negative=c.z<(this.options.zThreshold||0),d>=this.minPxSize/2?(c.shapeType="circle",c.shapeArgs={x:c.plotX,y:c.plotY,
r:d},c.dlBox={x:c.plotX-d,y:c.plotY-d,width:2*d,height:2*d}):c.shapeArgs=c.plotY=c.dlBox=C},drawLegendSymbol:function(a,b){var c=x(a.itemStyle.fontSize)/2;b.legendSymbol=this.chart.renderer.circle(c,a.baseline-c,c).attr({zIndex:3}).add(b.legendGroup);b.legendSymbol.isMarker=!0},drawPoints:h.column.prototype.drawPoints,alignDataLabel:h.column.prototype.alignDataLabel});M.prototype.beforePadding=function(){var a=this,b=this.len,c=this.chart,d=0,e=b,f=this.isXAxis,g=f?"xData":"yData",k=this.min,l={},
n=v.min(c.plotWidth,c.plotHeight),j=Number.MAX_VALUE,i=-Number.MAX_VALUE,h=this.max-k,m=b/h,p=[];this.tickPositions&&(s(this.series,function(b){var g=b.options;if(b.bubblePadding&&(b.visible||!c.options.chart.ignoreHiddenSeries))if(a.allowZoomOutside=!0,p.push(b),f)s(["minSize","maxSize"],function(a){var b=g[a],f=/%$/.test(b),b=x(b);l[a]=f?n*b/100:b}),b.minPxSize=l.minSize,b=b.zData,b.length&&(j=v.min(j,v.max(O(b),g.displayNegative===!1?g.zThreshold:-Number.MAX_VALUE)),i=v.max(i,P(b)))}),s(p,function(a){var b=
a[g],c=b.length,n;f&&a.getRadii(j,i,l.minSize,l.maxSize);if(h>0)for(;c--;)typeof b[c]==="number"&&(n=a.radii[c],d=Math.min((b[c]-k)*m-n,d),e=Math.max((b[c]-k)*m+n,e))}),p.length&&h>0&&q(this.options.min,this.userMin)===C&&q(this.options.max,this.userMax)===C&&(e-=b,m*=(b+d-e)/b,this.min+=d/m,this.max+=e/m))};(function(){function a(a,b,c){a.call(this,b,c);if(this.chart.polar)this.closeSegment=function(a){var b=this.xAxis.center;a.push("L",b[0],b[1])},this.closedStacks=!0}function b(a,b){var c=this.chart,
d=this.options.animation,e=this.group,j=this.markerGroup,i=this.xAxis.center,h=c.plotLeft,m=c.plotTop;if(c.polar){if(c.renderer.isSVG)d===!0&&(d={}),b?(c={translateX:i[0]+h,translateY:i[1]+m,scaleX:0.001,scaleY:0.001},e.attr(c),j&&j.attr(c)):(c={translateX:h,translateY:m,scaleX:1,scaleY:1},e.animate(c,d),j&&j.animate(c,d),this.animate=null)}else a.call(this,b)}var c=t.prototype,d=R.prototype,e;c.toXY=function(a){var b,c=this.chart,d=a.plotX;b=a.plotY;a.rectPlotX=d;a.rectPlotY=b;d=(d/Math.PI*180+this.xAxis.pane.options.startAngle)%
360;d<0&&(d+=360);a.clientX=d;b=this.xAxis.postTranslate(a.plotX,this.yAxis.len-b);a.plotX=a.polarPlotX=b.x-c.plotLeft;a.plotY=a.polarPlotY=b.y-c.plotTop};c.orderTooltipPoints=function(a){if(this.chart.polar&&(a.sort(function(a,b){return a.clientX-b.clientX}),a[0]))a[0].wrappedClientX=a[0].clientX+360,a.push(a[0])};h.area&&r(h.area.prototype,"init",a);h.areaspline&&r(h.areaspline.prototype,"init",a);h.spline&&r(h.spline.prototype,"getPointSpline",function(a,b,c,d){var e,j,i,h,m,p,o;if(this.chart.polar){e=
c.plotX;j=c.plotY;a=b[d-1];i=b[d+1];this.connectEnds&&(a||(a=b[b.length-2]),i||(i=b[1]));if(a&&i)h=a.plotX,m=a.plotY,b=i.plotX,p=i.plotY,h=(1.5*e+h)/2.5,m=(1.5*j+m)/2.5,i=(1.5*e+b)/2.5,o=(1.5*j+p)/2.5,b=Math.sqrt(Math.pow(h-e,2)+Math.pow(m-j,2)),p=Math.sqrt(Math.pow(i-e,2)+Math.pow(o-j,2)),h=Math.atan2(m-j,h-e),m=Math.atan2(o-j,i-e),o=Math.PI/2+(h+m)/2,Math.abs(h-o)>Math.PI/2&&(o-=Math.PI),h=e+Math.cos(o)*b,m=j+Math.sin(o)*b,i=e+Math.cos(Math.PI+o)*p,o=j+Math.sin(Math.PI+o)*p,c.rightContX=i,c.rightContY=
o;d?(c=["C",a.rightContX||a.plotX,a.rightContY||a.plotY,h||e,m||j,e,j],a.rightContX=a.rightContY=null):c=["M",e,j]}else c=a.call(this,b,c,d);return c});r(c,"translate",function(a){a.call(this);if(this.chart.polar&&!this.preventPostTranslate)for(var a=this.points,b=a.length;b--;)this.toXY(a[b])});r(c,"getSegmentPath",function(a,b){var c=this.points;if(this.chart.polar&&this.options.connectEnds!==!1&&b[b.length-1]===c[c.length-1]&&c[0].y!==null)this.connectEnds=!0,b=[].concat(b,[c[0]]);return a.call(this,
b)});r(c,"animate",b);r(c,"setTooltipPoints",function(a,b){this.chart.polar&&F(this.xAxis,{tooltipLen:360});return a.call(this,b)});if(h.column)e=h.column.prototype,r(e,"animate",b),r(e,"translate",function(a){var b=this.xAxis,c=this.yAxis.len,d=b.center,e=b.startAngleRad,h=this.chart.renderer,i,m;this.preventPostTranslate=!0;a.call(this);if(b.isRadial){b=this.points;for(m=b.length;m--;)i=b[m],a=i.barX+e,i.shapeType="path",i.shapeArgs={d:h.symbols.arc(d[0],d[1],c-i.plotY,null,{start:a,end:a+i.pointWidth,
innerR:c-q(i.yBottom,c)})},this.toXY(i),i.tooltipPos=[i.plotX,i.plotY],i.ttBelow=i.plotY>d[1]}}),r(e,"alignDataLabel",function(a,b,d,e,h,j){if(this.chart.polar){a=b.rectPlotX/Math.PI*180;if(e.align===null)e.align=a>20&&a<160?"left":a>200&&a<340?"right":"center";if(e.verticalAlign===null)e.verticalAlign=a<45||a>315?"bottom":a>135&&a<225?"top":"middle";c.alignDataLabel.call(this,b,d,e,h,j)}else a.call(this,b,d,e,h,j)});r(d,"getIndex",function(a,b){var c,d=this.chart,e;d.polar?(e=d.xAxis[0].center,c=
b.chartX-e[0]-d.plotLeft,d=b.chartY-e[1]-d.plotTop,c=180-Math.round(Math.atan2(c,d)/Math.PI*180)):c=a.call(this,b);return c});r(d,"getCoordinates",function(a,b){var c=this.chart,d={xAxis:[],yAxis:[]};c.polar?s(c.axes,function(a){var e=a.isXAxis,f=a.center,h=b.chartX-f[0]-c.plotLeft,f=b.chartY-f[1]-c.plotTop;d[e?"xAxis":"yAxis"].push({axis:a,value:a.translate(e?Math.PI-Math.atan2(h,f):Math.sqrt(Math.pow(h,2)+Math.pow(f,2)),!0)})}):d=a.call(this,b);return d})})()})(Highcharts);
...@@ -109,7 +109,6 @@ public class OnlineAction extends BaseAction implements ModelDriven<Online> { ...@@ -109,7 +109,6 @@ public class OnlineAction extends BaseAction implements ModelDriven<Online> {
map.put("温度", wenduhistoryServiceI.realTimeWendu()); map.put("温度", wenduhistoryServiceI.realTimeWendu());
map.put("湿度", shiduhistoryServiceI.realTimeShidu()); map.put("湿度", shiduhistoryServiceI.realTimeShidu());
map.put("开停", mechineServiceI.realTimeKaiting()); map.put("开停", mechineServiceI.realTimeKaiting());
response.addHeader("Access-Control-Allow-Origin", "*");
super.writeJson(map); super.writeJson(map);
} }
......
...@@ -17,16 +17,18 @@ public class EnvKaitingRealModel implements Serializable { ...@@ -17,16 +17,18 @@ public class EnvKaitingRealModel implements Serializable {
private String ifbj; private String ifbj;
private Date jctime; private Date jctime;
private String value2; private String value2;
private String zduan;
public EnvKaitingRealModel() {} public EnvKaitingRealModel() {}
public EnvKaitingRealModel(int id, String zkname, String sensorname, String ifbj, Date jctime, String value2) { public EnvKaitingRealModel(int id, String zkname, String sensorname, String ifbj, Date jctime, String value2, String zduan) {
this.id = id; this.id = id;
this.zkname = zkname; this.zkname = zkname;
this.sensorname = sensorname; this.sensorname = sensorname;
this.ifbj = ifbj; this.ifbj = ifbj;
this.jctime = jctime; this.jctime = jctime;
this.value2 = value2; this.value2 = value2;
this.zduan = zduan;
} }
@Id @Id
@Column( @Column(
...@@ -98,4 +100,14 @@ public class EnvKaitingRealModel implements Serializable { ...@@ -98,4 +100,14 @@ public class EnvKaitingRealModel implements Serializable {
public void setValue2(String value2) { public void setValue2(String value2) {
this.value2 = value2; this.value2 = value2;
} }
@Column(
name = "zduan"
)
public String getZduan() { return zduan; }
public void setZduan(String zduan) {
this.zduan = zduan;
}
} }
...@@ -87,11 +87,11 @@ public class Co2historyServiceImpl extends BaseServiceImpl implements Co2history ...@@ -87,11 +87,11 @@ public class Co2historyServiceImpl extends BaseServiceImpl implements Co2history
private List<THeryanghuatan> find(EryanghuatanHistory eryanghuatan) { private List<THeryanghuatan> find(EryanghuatanHistory eryanghuatan) {
String hql = "from THeryanghuatan t where 1=1 "; String hql = "from THeryanghuatan t where 1=1 ";
List<Object> values = new ArrayList(); List<Object> values = new ArrayList();
hql = this.addWhere(eryanghuatan, hql, values); /* hql = this.addWhere(eryanghuatan, hql, values);
if (eryanghuatan.getSort() != null && eryanghuatan.getOrder() != null) { if (eryanghuatan.getSort() != null && eryanghuatan.getOrder() != null) {
hql = hql + " order by " + eryanghuatan.getSort() + " " + eryanghuatan.getOrder(); hql = hql + " order by " + eryanghuatan.getSort() + " " + eryanghuatan.getOrder();
} }
*/
return this.eryanghuatanDao.find(hql, values, eryanghuatan.getPage(), eryanghuatan.getRows()); return this.eryanghuatanDao.find(hql, values, eryanghuatan.getPage(), eryanghuatan.getRows());
} }
...@@ -128,8 +128,10 @@ public class Co2historyServiceImpl extends BaseServiceImpl implements Co2history ...@@ -128,8 +128,10 @@ public class Co2historyServiceImpl extends BaseServiceImpl implements Co2history
@Override @Override
public List realTimeCo2() { public List realTimeCo2() {
String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from (select id, zkname, sensorname, ifbj, jctime, value2, rank() over (Partition by sensorname order by jctime desc) " + String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from" +
"from tab_eryanghuatan) a inner join tab_station b on a.sensorname = b.station where a.rank = 1 and jctime > (now() - interval '6 hour')"; " (select id, zkname, sensorname, ifbj , jctime, value2, rank() over (partition by sensorname order by jctime )"+
" from tab_eryanghuatan where jctime > (now() - interval '1 hour')) a" +
" inner join tab_station b on a.sensorname = b.station where a.rank = 1";
List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list(); List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list();
return list; return list;
} }
......
...@@ -90,10 +90,10 @@ public class CohistoryServiceImpl extends BaseServiceImpl implements CohistorySe ...@@ -90,10 +90,10 @@ public class CohistoryServiceImpl extends BaseServiceImpl implements CohistorySe
String hql = "from THyiyanghuatan t where 1=1 "; String hql = "from THyiyanghuatan t where 1=1 ";
List<Object> values = new ArrayList(); List<Object> values = new ArrayList();
hql = this.addWhere(yiyanghuatan, hql, values); hql = this.addWhere(yiyanghuatan, hql, values);
if (yiyanghuatan.getSort() != null && yiyanghuatan.getOrder() != null) { /*if (yiyanghuatan.getSort() != null && yiyanghuatan.getOrder() != null) {
hql = hql + " order by " + yiyanghuatan.getSort() + " " + yiyanghuatan.getOrder(); hql = hql + " order by " + yiyanghuatan.getSort() + " " + yiyanghuatan.getOrder();
} }
System.out.println("==================================" + hql);*/
return this.yiyanghuatanDao.find(hql, values, yiyanghuatan.getPage(), yiyanghuatan.getRows()); return this.yiyanghuatanDao.find(hql, values, yiyanghuatan.getPage(), yiyanghuatan.getRows());
} }
...@@ -130,8 +130,10 @@ public class CohistoryServiceImpl extends BaseServiceImpl implements CohistorySe ...@@ -130,8 +130,10 @@ public class CohistoryServiceImpl extends BaseServiceImpl implements CohistorySe
@Override @Override
public List realTimeCo() { public List realTimeCo() {
String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from (select id, zkname, sensorname, ifbj, jctime, value2, rank() over (Partition by sensorname order by jctime desc) " + String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from" +
"from tab_yiyanghuatan) a inner join tab_station b on a.sensorname = b.station where a.rank = 1 and jctime > (now() - interval '6 hour')"; " (select id, zkname, sensorname, ifbj , jctime, value2, rank() over (partition by zkname order by jctime )"+
" from tab_yiyanghuatan where jctime > (now() - interval '1 hour')) a" +
" inner join tab_station b on a.sensorname = b.station where a.rank = 1";
List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list(); List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list();
return list; return list;
} }
......
...@@ -89,9 +89,9 @@ public class FengsuhistoryServiceImpl extends BaseServiceImpl implements Fengsuh ...@@ -89,9 +89,9 @@ public class FengsuhistoryServiceImpl extends BaseServiceImpl implements Fengsuh
String hql = "from THfengsu t where 1=1 "; String hql = "from THfengsu t where 1=1 ";
List<Object> values = new ArrayList(); List<Object> values = new ArrayList();
hql = this.addWhere(fengsuHistory, hql, values); hql = this.addWhere(fengsuHistory, hql, values);
if (fengsuHistory.getSort() != null && fengsuHistory.getOrder() != null) { /*if (fengsuHistory.getSort() != null && fengsuHistory.getOrder() != null) {
hql = hql + " order by " + fengsuHistory.getSort() + " " + fengsuHistory.getOrder(); hql = hql + " order by " + fengsuHistory.getSort() + " " + fengsuHistory.getOrder();
} }*/
return this.fengsuDao.find(hql, values, fengsuHistory.getPage(), fengsuHistory.getRows()); return this.fengsuDao.find(hql, values, fengsuHistory.getPage(), fengsuHistory.getRows());
} }
...@@ -129,8 +129,10 @@ public class FengsuhistoryServiceImpl extends BaseServiceImpl implements Fengsuh ...@@ -129,8 +129,10 @@ public class FengsuhistoryServiceImpl extends BaseServiceImpl implements Fengsuh
@Override @Override
public List realTimeFengsu() { public List realTimeFengsu() {
String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from (select id, zkname, sensorname, ifbj, jctime, value2, rank() over (Partition by sensorname order by jctime desc) " + String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from" +
"from tab_fengsu) a inner join tab_station b on a.sensorname = b.station where a.rank = 1 and jctime > (now() - interval '6 hour')"; " (select id, zkname, sensorname, ifbj , jctime, value2, rank() over (partition by sensorname order by jctime )"+
" from tab_fengsu where jctime > (now() - interval '1 hour')) a" +
" inner join tab_station b on a.sensorname = b.station where a.rank = 1";
List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list(); List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list();
return list; return list;
} }
......
...@@ -90,9 +90,9 @@ public class MechineServiceImpl extends BaseServiceImpl implements MechineServic ...@@ -90,9 +90,9 @@ public class MechineServiceImpl extends BaseServiceImpl implements MechineServic
String hql = "from Tmechine t where 1=1 "; String hql = "from Tmechine t where 1=1 ";
List<Object> values = new ArrayList(); List<Object> values = new ArrayList();
hql = this.addWhere(mechine, hql, values); hql = this.addWhere(mechine, hql, values);
if (mechine.getSort() != null && mechine.getOrder() != null) { /*if (mechine.getSort() != null && mechine.getOrder() != null) {
hql = hql + " order by " + mechine.getSort() + " " + mechine.getOrder(); hql = hql + " order by " + mechine.getSort() + " " + mechine.getOrder();
} }*/
return this.mechineDao.find(hql, values, mechine.getPage(), mechine.getRows()); return this.mechineDao.find(hql, values, mechine.getPage(), mechine.getRows());
} }
...@@ -130,10 +130,11 @@ public class MechineServiceImpl extends BaseServiceImpl implements MechineServic ...@@ -130,10 +130,11 @@ public class MechineServiceImpl extends BaseServiceImpl implements MechineServic
@Override @Override
public List realTimeKaiting() { public List realTimeKaiting() {
String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from (select id, zkname, sensorname, ifbj, jctime, value2, rank() over (Partition by sensorname order by jctime desc) " + String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from" +
"from tab_kaiting) a inner join tab_station b on a.sensorname = b.station where a.rank = 1 and jctime > (now() - interval '6 hour')"; " (select id, zkname, sensorname, ifbj , jctime, value2, rank() over (partition by sensorname order by jctime )"+
" from tab_kaiting where jctime > (now() - interval '1 hour')) a" +
" inner join tab_station b on a.sensorname = b.station where a.rank = 1";
List<EnvKaitingRealModel> list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvKaitingRealModel.class)).list(); List<EnvKaitingRealModel> list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvKaitingRealModel.class)).list();
for (int i = 0;i < list.size(); i++) { for (int i = 0;i < list.size(); i++) {
EnvKaitingRealModel model = list.get(i); EnvKaitingRealModel model = list.get(i);
model.setIfbj("0"); model.setIfbj("0");
......
...@@ -26,6 +26,7 @@ public class OnlineServiceImpl extends BaseServiceImpl implements OnlineServiceI ...@@ -26,6 +26,7 @@ public class OnlineServiceImpl extends BaseServiceImpl implements OnlineServiceI
return onlineDao; return onlineDao;
} }
@Autowired @Autowired
public void setOnlineDao(BaseDaoI<Tonline> onlineDao) { public void setOnlineDao(BaseDaoI<Tonline> onlineDao) {
this.onlineDao = onlineDao; this.onlineDao = onlineDao;
...@@ -83,4 +84,5 @@ public class OnlineServiceImpl extends BaseServiceImpl implements OnlineServiceI ...@@ -83,4 +84,5 @@ public class OnlineServiceImpl extends BaseServiceImpl implements OnlineServiceI
return hql; return hql;
} }
} }
...@@ -90,9 +90,9 @@ public class ShiduhistoryServiceImpl extends BaseServiceImpl implements Shiduhis ...@@ -90,9 +90,9 @@ public class ShiduhistoryServiceImpl extends BaseServiceImpl implements Shiduhis
String hql = "from THshidu t where 1=1 "; String hql = "from THshidu t where 1=1 ";
List<Object> values = new ArrayList(); List<Object> values = new ArrayList();
hql = this.addWhere(shiduHistory, hql, values); hql = this.addWhere(shiduHistory, hql, values);
if (shiduHistory.getSort() != null && shiduHistory.getOrder() != null) { /*if (shiduHistory.getSort() != null && shiduHistory.getOrder() != null) {
hql = hql + " order by " + shiduHistory.getSort() + " " + shiduHistory.getOrder(); hql = hql + " order by " + shiduHistory.getSort() + " " + shiduHistory.getOrder();
} }*/
return this.shiduDao.find(hql, values, shiduHistory.getPage(), shiduHistory.getRows()); return this.shiduDao.find(hql, values, shiduHistory.getPage(), shiduHistory.getRows());
} }
...@@ -130,8 +130,10 @@ public class ShiduhistoryServiceImpl extends BaseServiceImpl implements Shiduhis ...@@ -130,8 +130,10 @@ public class ShiduhistoryServiceImpl extends BaseServiceImpl implements Shiduhis
@Override @Override
public List realTimeShidu() { public List realTimeShidu() {
String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from (select id, zkname, sensorname, ifbj, jctime, value2, rank() over (Partition by sensorname order by jctime desc) " + String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from" +
"from tab_shidu) a inner join tab_station b on a.sensorname = b.station where a.rank = 1 and jctime > (now() - interval '6 hour')"; " (select id, zkname, sensorname, ifbj , jctime, value2, rank() over (partition by sensorname order by jctime )"+
" from tab_shidu where jctime > (now() - interval '1 hour')) a" +
" inner join tab_station b on a.sensorname = b.station where a.rank = 1";
List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list(); List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list();
return list; return list;
} }
......
...@@ -90,9 +90,9 @@ public class WenduhistoryServiceImpl extends BaseServiceImpl implements Wenduhis ...@@ -90,9 +90,9 @@ public class WenduhistoryServiceImpl extends BaseServiceImpl implements Wenduhis
String hql = "from THwendu t where 1=1 "; String hql = "from THwendu t where 1=1 ";
List<Object> values = new ArrayList(); List<Object> values = new ArrayList();
hql = this.addWhere(wenduHistory, hql, values); hql = this.addWhere(wenduHistory, hql, values);
if (wenduHistory.getSort() != null && wenduHistory.getOrder() != null) { /*if (wenduHistory.getSort() != null && wenduHistory.getOrder() != null) {
hql = hql + " order by " + wenduHistory.getSort() + " " + wenduHistory.getOrder(); hql = hql + " order by " + wenduHistory.getSort() + " " + wenduHistory.getOrder();
} }*/
return this.wenduDao.find(hql, values, wenduHistory.getPage(), wenduHistory.getRows()); return this.wenduDao.find(hql, values, wenduHistory.getPage(), wenduHistory.getRows());
} }
...@@ -130,8 +130,10 @@ public class WenduhistoryServiceImpl extends BaseServiceImpl implements Wenduhis ...@@ -130,8 +130,10 @@ public class WenduhistoryServiceImpl extends BaseServiceImpl implements Wenduhis
@Override @Override
public List realTimeWendu() { public List realTimeWendu() {
String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from (select id, zkname, sensorname, ifbj, jctime, value2, rank() over (Partition by sensorname order by jctime desc) " + String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from" +
"from tab_wendu) a inner join tab_station b on a.sensorname = b.station where a.rank = 1 and jctime > (now() - interval '6 hour')"; " (select id, zkname, sensorname, ifbj , jctime, value2, rank() over (partition by sensorname order by jctime )"+
" from tab_wendu where jctime > (now() - interval '1 hour')) a" +
" inner join tab_station b on a.sensorname = b.station where a.rank = 1";
List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list(); List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list();
return list; return list;
} }
......
...@@ -91,9 +91,9 @@ public class YalihistoryServiceImpl extends BaseServiceImpl implements Yalihisto ...@@ -91,9 +91,9 @@ public class YalihistoryServiceImpl extends BaseServiceImpl implements Yalihisto
String hql = "from THyali t where 1=1 "; String hql = "from THyali t where 1=1 ";
List<Object> values = new ArrayList(); List<Object> values = new ArrayList();
hql = this.addWhere(yaliHistory, hql, values); hql = this.addWhere(yaliHistory, hql, values);
if (yaliHistory.getSort() != null && yaliHistory.getOrder() != null) { /*if (yaliHistory.getSort() != null && yaliHistory.getOrder() != null) {
hql = hql + " order by " + yaliHistory.getSort() + " " + yaliHistory.getOrder(); hql = hql + " order by " + yaliHistory.getSort() + " " + yaliHistory.getOrder();
} }*/
return this.yaliDao.find(hql, values, yaliHistory.getPage(), yaliHistory.getRows()); return this.yaliDao.find(hql, values, yaliHistory.getPage(), yaliHistory.getRows());
} }
...@@ -131,9 +131,10 @@ public class YalihistoryServiceImpl extends BaseServiceImpl implements Yalihisto ...@@ -131,9 +131,10 @@ public class YalihistoryServiceImpl extends BaseServiceImpl implements Yalihisto
@Override @Override
public List realTimeYali() { public List realTimeYali() {
String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan " + String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from" +
"from (select id, zkname, sensorname, ifbj, jctime, value2, rank() over (Partition by sensorname order by jctime desc) " + " (select id, zkname, sensorname, ifbj , jctime, value2, rank() over (partition by sensorname order by jctime )"+
"from tab_yali) a inner join tab_station b on a.sensorname = b.station where a.rank = 1 and jctime > (now() - interval '6 hour')"; " from tab_yali where jctime > (now() - interval '1 hour')) a" +
" inner join tab_station b on a.sensorname = b.station where a.rank = 1";
List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list(); List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list();
return list; return list;
} }
......
...@@ -90,9 +90,9 @@ public class o2historyServiceImpl extends BaseServiceImpl implements o2historySe ...@@ -90,9 +90,9 @@ public class o2historyServiceImpl extends BaseServiceImpl implements o2historySe
String hql = "from THyangqi t where 1=1 "; String hql = "from THyangqi t where 1=1 ";
List<Object> values = new ArrayList(); List<Object> values = new ArrayList();
hql = this.addWhere(yangqihistory, hql, values); hql = this.addWhere(yangqihistory, hql, values);
if (yangqihistory.getSort() != null && yangqihistory.getOrder() != null) { /*if (yangqihistory.getSort() != null && yangqihistory.getOrder() != null) {
hql = hql + " order by " + yangqihistory.getSort() + " " + yangqihistory.getOrder(); hql = hql + " order by " + yangqihistory.getSort() + " " + yangqihistory.getOrder();
} }*/
return this.yangqiDao.find(hql, values, yangqihistory.getPage(), yangqihistory.getRows()); return this.yangqiDao.find(hql, values, yangqihistory.getPage(), yangqihistory.getRows());
} }
...@@ -130,8 +130,10 @@ public class o2historyServiceImpl extends BaseServiceImpl implements o2historySe ...@@ -130,8 +130,10 @@ public class o2historyServiceImpl extends BaseServiceImpl implements o2historySe
@Override @Override
public List realTimeO2() { public List realTimeO2() {
String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from (select id, zkname, sensorname, ifbj, jctime, value2, rank() over (Partition by sensorname order by jctime desc) " + String hql = "select a.id, a.zkname, a.sensorname, a.ifbj, a.jctime, a.value2, b.zduan from" +
"from tab_yangqi) a inner join tab_station b on a.sensorname = b.station where a.rank = 1 and jctime > (now() - interval '6 hour')"; " (select id, zkname, sensorname, ifbj , jctime, value2, rank() over (partition by sensorname order by jctime )"+
" from tab_yangqi where jctime > (now() - interval '1 hour')) a" +
" inner join tab_station b on a.sensorname = b.station where a.rank = 1";
List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list(); List list =getCurrentSession().createSQLQuery(hql).setResultTransformer(Transformers.aliasToBean(EnvRealModel.class)).list();
return list; return list;
} }
......
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