xieshengjie 2 tahun lalu
induk
melakukan
468300740a

TEMPAT SAMPAH
WebRoot/WEB-INF/classes/com/hcks/cmfds/service/monitor/MonitorService.class


+ 155 - 0
WebRoot/pages/health/gatab.jsp

@@ -0,0 +1,155 @@
+<%@ page language="java" contentType="text/html;charset=utf-8"%>
+<%@include file="/pages/includes/taglibs.jsp"%>
+
+<html>
+<head>
+
+<title>宁夏集控</title>
+<style>
+	body{
+		font-size: 12px;
+		margin-left: 0px;
+		margin-top: 0px;
+		margin-right: 0px;
+		margin-bottom: 0px;
+	}
+	@font-face {
+    font-family: 'fontNameRegular';
+    src: url('<%=request.getContextPath() %>/resource/fonts/DS-DIGIT-webfont.eot');
+    src: local('<%=request.getContextPath() %>/resource/fonts/DS-DIGIT-webfont Regular'), 
+              local('<%=request.getContextPath() %>/resource/fonts/DS-DIGIT-webfont'), 
+              url('<%=request.getContextPath() %>/resource/fonts/DS-DIGIT-webfont.woff') format('woff'), 
+              url('<%=request.getContextPath() %>/resource/fonts/DS-DIGIT-webfont.ttf') format('truetype'), 
+              url('<%=request.getContextPath() %>/resource/fonts/DS-DIGIT-webfont.svg#fontName') format('svg');
+    font-size: 20px;
+	font-weight: bolder;
+	}  
+	
+	.text_value {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 14px;
+	color: #000;
+	text-decoration: none;
+	font-weight: bold;
+}
+	
+</style>
+
+<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
+
+<script src="<%=request.getContextPath() %>/resource/plugin/jqueryui/js/jquery-ui-1.9.2.custom.js" type="text/javascript"></script>
+
+<script src="<%=request.getContextPath() %>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.widget.js"></script>
+<script src="<%=request.getContextPath() %>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.tabs.js"></script>
+
+
+<script  type="text/javascript">
+$(function() {
+		$("#windfarm").attr("value", '<s:property value="windfarm"/>');
+
+		$( "#tabs" ).tabs({  
+
+        select: function(event, ui) {  
+
+         // ui.tab锚元素选中的标签页  
+
+       	 //  ui.panel 锚元素选中的标签页的内容  
+
+         // ui.index 锚元素选中的标签页的索引(从0开始)  
+
+		
+        if(ui.index==0)
+		{
+			var windfarm2 =$(window.frames[1].document).find("#windfarm").val();
+			var windfarm3 =$(window.frames[2].document).find("#windfarm").val();
+			
+			if(windfarm2!=null)
+			{
+				$("#tab1").attr("src","<%=request.getContextPath() %>/gradeassessment/gadayindex.action?windfarm=" + windfarm2);
+			}else if(windfarm3!=null)
+			{
+				$("#tab1").attr("src","<%=request.getContextPath() %>/gradeassessment/gadayindex.action?windfarm=" + windfarm3);
+
+			}
+			$("#tab2").attr("src","about:blank");
+			$("#tab3").attr("src","about:blank");
+			
+		}else if(ui.index==1)
+		{
+			var windfarm1 =$(window.frames[0].document).find("#windfarm").val();
+			var windfarm3 =$(window.frames[2].document).find("#windfarm").val();
+			
+			if(windfarm1!=null)
+			{
+				$("#tab2").attr("src","<%=request.getContextPath() %>/gradeassessment/gamonthindex.action?windfarm=" + windfarm1);
+			}else if(windfarm3!=null)
+			{
+				$("#tab2").attr("src","<%=request.getContextPath() %>/gradeassessment/gamonthindex.action?windfarm=" + windfarm3);
+
+			}
+			$("#tab1").attr("src","about:blank");
+			$("#tab3").attr("src","about:blank");
+	
+		}else if(ui.index==2)
+		{
+			var windfarm2 =$(window.frames[1].document).find("#windfarm").val();
+			var windfarm1 =$(window.frames[0].document).find("#windfarm").val();
+			
+			if(windfarm1!=null)
+			{
+				$("#tab3").attr("src","<%=request.getContextPath() %>/gradeassessment/gayearindex.action?windfarm=" + windfarm1);
+			}else if(windfarm2!=null)
+			{
+				$("#tab3").attr("src","<%=request.getContextPath() %>/gradeassessment/gayearindex.action?windfarm=" + windfarm2);
+
+			}
+			$("#tab2").attr("src","about:blank");
+			$("#tab1").attr("src","about:blank");
+		}		
+		else
+		{
+			$("#tab1").attr("src","about:blank");
+			$("#tab2").attr("src","about:blank");
+			$("#tab3").attr("src","about:blank");
+
+		}
+       }  
+
+    });  
+    var windfarm=$("#windfarm").val();
+    $("#tab1").attr("src","<%=request.getContextPath() %>/gradeassessment/gadayindex.action?windfarm="+windfarm);
+});
+</script>
+</head>
+
+<body>
+<!-- 
+<table width="100%">
+			<tr>
+				<td align="left" class="text_value">
+				<s:property value="windfarmname"/>
+				</td>
+			</tr>
+</table> -->
+<div id="tabs" style="width: 1880px;height: 800px;border: 0px;margin: 0px">
+	<ul >
+		<li><a href="#tabs-1" >风机日信息量化评级管理</a></li>
+		<li><a href="#tabs-2">风机月信息量化评级管理</a></li>
+		<li><a href="#tabs-3">风机年信息量化评级管理</a></li>
+	</ul>
+	<div id="tabs-1" style="border: 0px;margin: 0px">
+		<iframe id="tab1" src="" style="border: 0px;margin: 0px" marginwidth="0px" marginheight="0px"  frameborder="0" width="1890px" height="770px" scrolling="auto"></iframe>
+	</div>
+	<div id="tabs-2">
+		<iframe id="tab2" src="" style="border: 0px;margin: 0px" marginwidth="0px" marginheight="0px"  frameborder="0" width="1890px" height="770px" scrolling="auto"></iframe>
+	</div>
+	<div id="tabs-3">
+		<iframe id="tab3" src="" style="border: 0px;margin: 0px" marginwidth="0px" marginheight="0px"  frameborder="0" width="1890px" height="770px" scrolling="auto"></iframe>
+	</div>
+	
+</div>
+<s:hidden id="windfarm"></s:hidden>
+<s:hidden id="windfarmname"></s:hidden>
+</body>
+</html>
+

+ 208 - 0
WebRoot/pages/health/healthCountByTsWindturbine.jsp

@@ -0,0 +1,208 @@
+<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
+<%@include file="/pages/includes/taglibs.jsp" %>
+<head>
+<script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js"></script>
+ <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js"></script>
+ <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js"></script>
+ <script type="text/ecmascript" src="<%=request.getContextPath()%>/resource/js/system/jqdatagridpage.js"></script>
+<%-- <script type="text/ecmascript" src="<%=request.getContextPath()%>/resource/js/system/jqdatagrid.js"></script> --%>
+<script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
+ <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
+ <link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
+<style type="text/css">
+
+a{      /* 统一设置所以样式 */
+     font-family:Arial;
+     font-size:12px;
+     text-align:center;
+     margin:3px;
+}
+a:link,a:visited{  /* 超链接正常状态、被访问过的样式 */
+    color:#000000;
+    padding:4px 10px 4px 10px;
+    background-color:#f1f1f1;
+    text-decoration:none;
+ 
+    border-top:1px solid #EEEEEE; /* 边框实现阴影效果 */
+    border-left:1px solid #EEEEEE;
+    border-bottom:1px solid #717171;
+    border-right:1px solid #717171;
+}
+a:hover{       /* 鼠标指针经过时的超链接 */
+    color:#821818;     /* 改变文字颜色 */
+    padding:5px 8px 3px 12px;  /* 改变文字位置 */
+    background-color:#e2c4c9;  /* 改变背景色 */
+    border-top:1px solid #717171; /* 边框变换,实现“按下去”的效果 */
+    border-left:1px solid #717171;
+    border-bottom:1px solid #EEEEEE;
+    border-right:1px solid #EEEEEE;
+}
+
+fieldset legend {  
+    color:#302A2A;  
+    font: bold 16px/2 Verdana, Geneva, sans-serif;  
+    font-weight: bold;  
+    text-align: left;  
+    text-shadow: 2px 2px 2px rgb(88, 126, 156);  
+}  
+</style>
+<script type="text/javascript">
+	
+	function changeFc(wpid){
+   		var url1 = "<%=request.getContextPath() %>/comboxUtils/findWindturbineByWpid.action?wpid="+wpid;
+   		$.ajax({
+			type:"post",
+			url:url1,
+			dataType:"json",
+			success: function(data){
+				if(data.length != 0){
+					eval(data);
+					$("#wtid").empty();
+					$("#wtid").append("<option value='-1'>请选择</option>"); 
+					for(var i=0; i<data.length; i++){
+						$("#wtid").append("<option value='"+data[i].id+"'>"+data[i].name+"</option>"); 
+					}
+				}else{
+					$("#wtid").empty();
+					$("#wtid").append("<option value='-1'>请选择</option>"); 
+					//$("#wtid").addOption("请选择","");
+				}
+				
+				queryData();
+	  		}		
+		});
+	}
+	
+	
+	
+	function queryData(){
+		 
+			$("#gridTable").jqGrid('GridUnload');	
+			showJqGrid();	
+		
+	} 
+$(document).ready(function () {
+
+showJqGrid();
+
+});
+function showJqGrid() {
+
+var wpId=$("#wpId").find("option:selected").val(); 
+var wtid=$("#wtid").find("option:selected").val(); 
+var year=$("#year").val(); 
+var month=$("#month").val(); 
+var url = '<%=request.getContextPath() %>/healthCount/findWarningtsforwindturbineList.action?wtb.windpowerstationid='+wpId
+					 +"&wtb.windturbineid="+wtid+"&wtb.year="+year +"&wtb.month="+month;
+var id = 'gridTable';
+
+
+var datatype = 'json';
+
+var colNames = ['id','风场', '风机','报警类型','年','月','月报警次数','月报警平均间隔时间(h)','月报警平均消缺时间(h)',
+		  '年报警次数','年报警平均间隔时间(h)','年报警平均消缺时间(h)','总报警次数','总报警平均间隔时间(h)',
+		  '总报警平均消缺时间(h)'];
+
+var colModel = [
+{ name: 'id', index: 'id', width: 20, align: 'center',hidden:true},
+{ name: 'windpowerstationid', index: 'windpowerstationid', width: 70, align: 'center'},
+{ name: 'windturbineid', index: 'windturbineid', width: 80, align: 'center'},
+{ name: 'warningType', index: 'warningtype', width: 150, align: 'center'},
+{ name: 'year', index: 'year', width: 35, align: 'center'},
+{ name: 'month', index: 'month', width: 35, align: 'center'},
+{ name: 'monthWarningNum', index: 'monthWarningNum', width: 130, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'monthMTBF', index: 'monthMTBF', width: 130, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
+{ name: 'monthMTTR', index: 'monthMTTR', width: 130, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
+{ name: 'yearwarning', index: 'yearwarning', width: 130, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'yearMTBF', index: 'yearMTBF', width: 130, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
+{ name: 'yearMTTR', index: 'yearMTTR', width: 130, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
+{ name: 'totalwarningnum', index: 'totalwarningnum', width: 130, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'totalMTBF', index: 'totalMTBF', width: 130, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
+{ name: 'totalMTTR', index: 'totalMTTR', width: 130, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'}
+];
+
+var caption = '风机报警类型统计';
+
+
+var sortname = '';
+
+var gridPagerID ='gridPager';
+
+var sortorder='desc';
+
+var height='600px';
+
+var width='1300px';
+
+var rownumbers=true;
+
+var multiselect=false;
+
+myJqGrid(id, url, datatype, colNames, colModel, caption,  sortname, gridPagerID,sortorder,height,width,
+multiselect,rownumbers);
+} 
+		
+</script>
+<style type="text/css">
+
+
+fieldset legend {  
+    color:#302A2A;  
+    font: bold 16px/2 Verdana, Geneva, sans-serif;  
+    font-weight: bold;  
+    text-align: left;  
+    text-shadow: 2px 2px 2px rgb(88, 126, 156);  
+}  
+</style>
+</head>
+<body>
+
+<form action="" method="post" id="f1">
+
+<fieldset style="height: 60px" id="fst">
+    <legend  class="item_Name">查询条件</legend>
+   <table width="1000px" cellpadding="0" cellspacing="0" class="dataform">
+	<tr>
+		<th width="100px" class="item_Name">
+			风场:
+		</th>
+		<td width="100px" >
+			<!-- onchange="javascript:queryData();" -->
+			<s:select list="wps" cssStyle="width:100px" onchange="javascript:changeFc(this.value)" listKey="code" listValue="name" id="wpId" name="wpId" headerKey="-1" headerValue="请选择" ></s:select>
+		</td>
+		<th width="100px" class="item_Name">
+			风机:
+		</th>
+		<td width="100px" >
+			<!-- onchange="javascript:queryData();" -->
+			<s:select list="wts" cssStyle="width:100px" onchange="javascript:queryData();" listKey="code" listValue="name" id="wtid" name="wtid" headerKey="-1" headerValue="请选择" ></s:select>
+		</td>
+		<th width="100px" class="item_Name">
+			年:
+		</th>
+		<td width="100px" style="text-align: left">
+			<s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy',isShowWeek:true,readOnly:true})" 
+			id="year" name="beginDate" title="开始日期" onchange="javascript:queryData();"/>
+		</td>
+		<th width="100px" class="item_Name">
+			月:
+		</th>
+		<td width="100px" style="text-align: left">
+			<s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'MM',isShowWeek:true,readOnly:true})" 
+			id="month" name="endDate" title="结束日期" onchange="javascript:queryData();"/>
+		</td>
+	</tr>
+</table>
+  </fieldset>
+
+<br/>
+
+<table id='gridTable' >
+
+</table>
+
+<div id='gridPager'></div>
+</form>
+
+</body>
+

+ 209 - 0
WebRoot/pages/health/healthCountByWindturbine.jsp

@@ -0,0 +1,209 @@
+<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
+<%@include file="/pages/includes/taglibs.jsp" %>
+<head>
+<script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js"></script>
+ <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js"></script>
+ <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js"></script>
+ <script type="text/ecmascript" src="<%=request.getContextPath()%>/resource/js/system/jqdatagridpage.js"></script>
+<%-- <script type="text/ecmascript" src="<%=request.getContextPath()%>/resource/js/system/jqdatagrid.js"></script> --%>
+<script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
+ <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
+ <link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
+<style type="text/css">
+
+a{      /* 统一设置所以样式 */
+     font-family:Arial;
+     font-size:12px;
+     text-align:center;
+     margin:3px;
+}
+a:link,a:visited{  /* 超链接正常状态、被访问过的样式 */
+    color:#000000;
+    padding:4px 10px 4px 10px;
+    background-color:#f1f1f1;
+    text-decoration:none;
+ 
+    border-top:1px solid #EEEEEE; /* 边框实现阴影效果 */
+    border-left:1px solid #EEEEEE;
+    border-bottom:1px solid #717171;
+    border-right:1px solid #717171;
+}
+a:hover{       /* 鼠标指针经过时的超链接 */
+    color:#821818;     /* 改变文字颜色 */
+    padding:5px 8px 3px 12px;  /* 改变文字位置 */
+    background-color:#e2c4c9;  /* 改变背景色 */
+    border-top:1px solid #717171; /* 边框变换,实现“按下去”的效果 */
+    border-left:1px solid #717171;
+    border-bottom:1px solid #EEEEEE;
+    border-right:1px solid #EEEEEE;
+}
+
+fieldset legend {  
+    color:#302A2A;  
+    font: bold 16px/2 Verdana, Geneva, sans-serif;  
+    font-weight: bold;  
+    text-align: left;  
+    text-shadow: 2px 2px 2px rgb(88, 126, 156);  
+}  
+</style>
+<script type="text/javascript">
+	
+	function changeFc(wpid){
+   		var url1 = "<%=request.getContextPath() %>/comboxUtils/findWindturbineByWpid.action?wpid="+wpid;
+   		$.ajax({
+			type:"post",
+			url:url1,
+			dataType:"json",
+			success: function(data){
+				if(data.length != 0){
+					eval(data);
+					$("#wtid").empty();
+					$("#wtid").append("<option value='-1'>请选择</option>"); 
+					for(var i=0; i<data.length; i++){
+						$("#wtid").append("<option value='"+data[i].id+"'>"+data[i].name+"</option>"); 
+					}
+				}else{
+					$("#wtid").empty();
+					$("#wtid").append("<option value='-1'>请选择</option>"); 
+					//$("#wtid").addOption("请选择","");
+				}
+				
+				queryData();
+	  		}		
+		});
+	}
+	
+	
+	
+	function queryData(){
+		 
+			$("#gridTable").jqGrid('GridUnload');	
+			showJqGrid();	
+		
+	} 
+$(document).ready(function () {
+
+showJqGrid();
+
+});
+function showJqGrid() {
+
+var wpId=$("#wpId").find("option:selected").val(); 
+var wtid=$("#wtid").find("option:selected").val(); 
+var year=$("#year").val(); 
+var month=$("#month").val(); 
+var url = '<%=request.getContextPath() %>/healthCount/findWarningStatisticsForWindturbinList.action?wb.windpowerstationid='+wpId
+					 +"&wb.windturbineid="+wtid+"&wb.year="+year +"&wb.month="+month;
+var id = 'gridTable';
+
+
+var datatype = 'json';
+
+var colNames = ['id','风场', '风机','报警类型','报警名称','年','月','月报警次数','月报警平均间隔时间(h)','月报警平均消缺时间(h)',
+		  '年报警次数','年报警平均间隔时间(h)','年报警平均消缺时间(h)','总报警次数','总报警平均间隔时间(h)',
+		  '总报警平均消缺时间(h)'];
+
+var colModel = [
+{ name: 'id', index: 'id', width: 20, align: 'center',hidden:true},
+{ name: 'windpowerstationid', index: 'windpowerstationid', width: 70, align: 'center'},
+{ name: 'windturbineid', index: 'windturbineid', width: 80, align: 'center'},
+{ name: 'warningtype', index: 'warningtype', width: 120, align: 'center'},
+{ name: 'warningid', index: 'warningid', width: 300, align: 'center'},
+{ name: 'year', index: 'year', width: 35, align: 'center'},
+{ name: 'month', index: 'month', width: 30, align: 'center'},
+{ name: 'monthWarningNum', index: 'monthWarningNum', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'monthMTBF', index: 'monthMTBF', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
+{ name: 'monthMTTR', index: 'monthMTTR', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
+{ name: 'yearwarning', index: 'yearwarning', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'yearMTBF', index: 'yearMTBF', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
+{ name: 'yearMTTR', index: 'yearMTTR', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
+{ name: 'totalwarningnum', index: 'totalwarningnum', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'totalMTBF', index: 'totalMTBF', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
+{ name: 'totalMTTR', index: 'totalMTTR', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'}
+];
+
+var caption = '风机报警统计';
+
+
+var sortname = '';
+
+var gridPagerID ='gridPager';
+
+var sortorder='desc';
+
+var height='600px';
+
+var width='1300px';
+
+var rownumbers=true;
+
+var multiselect=false;
+
+myJqGrid(id, url, datatype, colNames, colModel, caption,  sortname, gridPagerID,sortorder,height,width,
+multiselect,rownumbers);
+} 
+		
+</script>
+<style type="text/css">
+
+
+fieldset legend {  
+    color:#302A2A;  
+    font: bold 16px/2 Verdana, Geneva, sans-serif;  
+    font-weight: bold;  
+    text-align: left;  
+    text-shadow: 2px 2px 2px rgb(88, 126, 156);  
+}  
+</style>
+</head>
+<body>
+
+<form action="" method="post" id="f1">
+
+<fieldset style="height: 60px" id="fst">
+    <legend  class="item_Name">查询条件</legend>
+   <table width="1000px" cellpadding="0" cellspacing="0" class="dataform">
+	<tr>
+		<th width="100px" class="item_Name">
+			风场:
+		</th>
+		<td width="100px" >
+			<!-- onchange="javascript:queryData();" -->
+			<s:select list="wps" cssStyle="width:100px" onchange="javascript:changeFc(this.value)" listKey="code" listValue="name" id="wpId" name="wpId" headerKey="-1" headerValue="请选择" ></s:select>
+		</td>
+		<th width="100px" class="item_Name">
+			风机:
+		</th>
+		<td width="100px" >
+			<!-- onchange="javascript:queryData();" -->
+			<s:select list="wts" cssStyle="width:100px" onchange="javascript:queryData();" listKey="code" listValue="name" id="wtid" name="wtid" headerKey="-1" headerValue="请选择" ></s:select>
+		</td>
+		<th width="100px" class="item_Name">
+			年:
+		</th>
+		<td width="100px" style="text-align: left">
+			<s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy',isShowWeek:true,readOnly:true})" 
+			id="year" name="beginDate" title="开始日期" onchange="javascript:queryData();"/>
+		</td>
+		<th width="100px" class="item_Name">
+			月:
+		</th>
+		<td width="100px" style="text-align: left">
+			<s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'MM',isShowWeek:true,readOnly:true})" 
+			id="month" name="endDate" title="结束日期" onchange="javascript:queryData();"/>
+		</td>
+	</tr>
+</table>
+  </fieldset>
+
+<br/>
+
+<table id='gridTable' >
+
+</table>
+
+<div id='gridPager'></div>
+</form>
+
+</body>
+

+ 32 - 1
WebRoot/pages/monitor/windeditdata.jsp

@@ -25,7 +25,7 @@
  				$("#clfs").val(res["clfs"]);
  				$("#kbfs").val(res["kbfs"]);
  				$("#dxfs").val(res["dxfs"]);
- 				
+ 				$("#syfs").val(res["syfs"]);
  			}
  		});
 		
@@ -96,6 +96,26 @@
 
 		}
 	
+	function syeditdata() {
+
+		var fs = $("#syfs").val();
+		var edosid = "HB_GD_SYF_JS_XX_XX_XXX_CI0269";
+		$.ajax({
+			url : "/matrix/editdata.action",
+			type : "post",
+			cache : false,
+			dataType : "json",
+			data : {"edosid":edosid,"fs":fs},
+			async : false,
+			ifModified : false,
+			success : function() {
+				alert("寿阳风速补录成功,风速为"+fs+"m/s");
+			}
+		});
+		
+
+		}
+	
 	
 	
 	</script>
@@ -135,6 +155,17 @@
     });	
 	</script>
 	
+	<h1>寿阳风电场</h1>
+    <div id="SY_FDC" class="Dragval">
+        <input type="text" name="" value="" class="Output" id="syfs"/><input type="button" value="风速补录•" onClick="syeditdata()" />
+    </div>
+
+    <script type="text/javascript">
+	$(function() {
+	    $("#SY_FDC").dragval({ step: 0.5, min: 0, max: 25, startValue: 0 });		
+    });	
+	</script>
+	
 	
 </div>
 </body>

+ 2 - 1
WebRoot/pages/warn/warnlayoutJsp.jsp

@@ -236,7 +236,8 @@ body {
 			<h4 style="height:28px;text-align:left;vertical-align: middle;background-image: url('<%=request.getContextPath()%>/resource/images/system/pictures/item_Bg.fw.png')" ><a class="Navigation_Text"  href="#" onclick="goUrl('/event/index.action')">停&nbsp;&nbsp;机&nbsp;&nbsp;事&nbsp;&nbsp;件</a></h4>			 						 
 			<!--  <h4 style="height:28px;text-align:left;vertical-align: middle;background-image: url('<%=request.getContextPath()%>/resource/images/system/pictures/item_Bg.fw.png')" ><a class="Navigation_Text"  href="#" onclick="goUrl('/customwarn/index.action')">自&nbsp;定义报&nbsp;警</a></h4>-->
 			<h4 style="height:28px;text-align:left;vertical-align: middle;background-image: url('<%=request.getContextPath()%>/resource/images/system/pictures/item_Bg.fw.png')" ><a class="Navigation_Text"  href="#" onclick="goUrl('/brownouts/index.action')">限&nbsp;&nbsp;电&nbsp;&nbsp;管&nbsp;&nbsp;理</a></h4>
-			
+			<h4 style="height:28px;text-align:left;vertical-align: middle;background-image: url('<%=request.getContextPath()%>/resource/images/system/pictures/item_Bg.fw.png')" ><a class="Navigation_Text"  href="#" onclick="goUrl('/healthCount/indexForWindturbine.action')">按风机统计</a></h4>
+			<h4 style="height:28px;text-align:left;vertical-align: middle;background-image: url('<%=request.getContextPath()%>/resource/images/system/pictures/item_Bg.fw.png')" ><a class="Navigation_Text"  href="#" onclick="goUrl('/healthCount/indexForTsWindturbine.action')">按风机类型统计</a></h4>
 			</div>
 			
 	

+ 111 - 0
src/com/hcks/cmfds/action/health/ComboxUtils.java

@@ -0,0 +1,111 @@
+package com.hcks.cmfds.action.health;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Namespace;
+import org.apache.struts2.convention.annotation.Result;
+
+import com.hcks.cmfds.commons.util.JsonUtils;
+import com.hcks.cmfds.core.web.action.PaginationAction;
+import com.hcks.cmfds.model.Equipmentmodel;
+import com.hcks.cmfds.model.Windpowerstation;
+import com.hcks.cmfds.model.Windturbine;
+import com.hcks.cmfds.service.CacheContext;
+
+@Namespace("/comboxUtils")
+@Result(name = "json", type = "json", params = { "textName", "json" })
+public class ComboxUtils extends PaginationAction{ 
+	
+	private static final long serialVersionUID = 3L;
+	private String json;
+	private String wpid;
+	
+	@Action(value = "findWindPowerStationForALL")
+	public  String findWindPowerStationForALL(){
+		List<Windpowerstation> list = CacheContext.wpls;
+		json = JsonUtils.toJson(list);
+		return JSON;
+	}
+	
+	@SuppressWarnings("static-access")
+	@Action(value = "findWindPowerStationForFD")
+	public String findWindPowerStationForFD(){
+		List<Windpowerstation> list1=this.findWindpowerstationListForFDUtil();
+		json = JsonUtils.toJson(list1);
+		return JSON;
+	}
+	
+	@Action(value = "findWindPowerStationForGD")
+	public String findWindPowerStationForGD(){
+		List<Windpowerstation> list = CacheContext.wpls;
+		List<Windpowerstation> list1=new ArrayList<Windpowerstation>();
+		for(Windpowerstation wp:list){
+			if(wp.getCode().indexOf("_GDC")>0){
+				list1.add(wp);
+			}
+		}
+		json = JsonUtils.toJson(list1);
+		return JSON;
+	}
+	
+	@Action(value = "findWindturbineByWpid")
+	public String findWindturbineByWpid(){
+		List<Windturbine> list = new ArrayList<Windturbine>();
+		if(CacheContext.wtsmap.containsKey(wpid)){
+			 list= CacheContext.wtsmap.get(wpid);
+		}
+		json = JsonUtils.toJson(list);
+		return JSON;
+	}
+	
+	
+	@SuppressWarnings("static-access")
+	@Action(value = "findWindturbineModelid")
+	public String findWindturbineModelid(){
+		List<Equipmentmodel> list = this.findWindturbineModelidForFDUtil();
+		json = JsonUtils.toJson(list);
+		return JSON;
+	}
+	
+	public static List<Equipmentmodel> findWindturbineModelidForFDUtil(){
+		
+		List<Equipmentmodel> list = CacheContext.mlls;
+		List<Equipmentmodel> list1=new ArrayList<Equipmentmodel>();
+		for(Equipmentmodel e:list){
+			if("风机".equals( e.getName())){
+				list1.add(e);
+			}
+		}
+		return list1;
+	}
+	
+	
+	public static List<Windpowerstation> findWindpowerstationListForFDUtil(){
+		List<Windpowerstation> list = CacheContext.wpls;
+		List<Windpowerstation> list1=new ArrayList<Windpowerstation>();
+		for(Windpowerstation wp:list){
+			if(wp.getCode().indexOf("_FDC")>0){
+				list1.add(wp);
+			}
+		}
+		return list1;
+	}
+	
+	public String getJson() {
+		return json;
+	}
+	public void setJson(String json) {
+		this.json = json;
+	}
+
+	public String getWpid() {
+		return wpid;
+	}
+
+	public void setWpid(String wpid) {
+		this.wpid = wpid;
+	}
+	
+}

+ 164 - 0
src/com/hcks/cmfds/action/health/HealthCountAction.java

@@ -0,0 +1,164 @@
+package com.hcks.cmfds.action.health;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Namespace;
+import org.apache.struts2.convention.annotation.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.hcks.cmfds.commons.lang.PaginationList;
+import com.hcks.cmfds.commons.util.JsonUtils;
+import com.hcks.cmfds.core.web.action.PaginationAction;
+import com.hcks.cmfds.model.Windpowerstation;
+import com.hcks.cmfds.model.Windturbine;
+import com.hcks.cmfds.model.health.WarningStatisticsForWindturbin;
+import com.hcks.cmfds.model.health.Warningtsforwindturbine;
+import com.hcks.cmfds.service.health.WarningStatisticsForWindturbinService;
+import com.hcks.cmfds.service.health.WarningtsforwindturbineService;
+
+
+@Namespace("/healthCount")
+@Result(name = "json", type = "json", params = { "textName", "json" })
+public class HealthCountAction extends PaginationAction{
+	
+	private static final long serialVersionUID = 3L;
+	@Autowired
+	private WarningStatisticsForWindturbinService warningStatisticsForWindturbinService;
+	@Autowired
+	private WarningtsforwindturbineService warningtsforwindturbineService;
+	
+	private String json;
+	private List<Windpowerstation> wps;
+	private List<Windturbine> wts;
+	private WarningStatisticsForWindturbin wb;
+	private Warningtsforwindturbine wtb;
+
+	
+	
+	@Action(value = "indexForMenu", results = { @Result(name = "success", location = "/pages/health/gatab.jsp") })
+	public String indexForMenu(){
+		return SUCCESS;
+	}
+	
+	@Action(value = "indexForWindturbine", results = { @Result(name = "success", location = "/pages/health/healthCountByWindturbine.jsp") })
+	public String indexForWindturbine() {
+		wps=ComboxUtils.findWindpowerstationListForFDUtil();
+		wts=new ArrayList<Windturbine>();
+		return SUCCESS;
+	}
+	
+	@Action(value = "indexForTsWindturbine", results = { @Result(name = "success", location = "/pages/health/healthCountByTsWindturbine.jsp")})
+	public String indexForTsWindturbine() {
+		wps=ComboxUtils.findWindpowerstationListForFDUtil();
+		wts=new ArrayList<Windturbine>();
+		return SUCCESS;
+	}
+	
+	@Action(value = "findWarningStatisticsForWindturbinList")
+	public String findWarningStatisticsForWindturbinList(){
+		PaginationList<WarningStatisticsForWindturbin> list = warningStatisticsForWindturbinService.findAll(
+								getOffset(), getPage() * getPageSize(),wb);
+		
+		Map<String, Object> map = new HashMap<String, Object>();
+		map.put("rows", list);
+		map.put("total", list.getTotal());
+		map.put("pageindex", getPage());
+		BigDecimal total = new BigDecimal(list.getTotal());
+		BigDecimal size = new BigDecimal(getPageSize());
+
+		if (total.remainder(size).doubleValue() != 0) {
+			map.put("pagecount", total.divide(size).intValue() + 1);
+		} else {
+			map.put("pagecount", total.divide(size).intValue());
+		}
+		
+		json = JsonUtils.toJson(map);
+		return JSON;
+	}
+	
+	@Action(value = "findWarningtsforwindturbineList")
+	public String findWarningtsforwindturbineList(){
+		PaginationList<Warningtsforwindturbine> list = warningtsforwindturbineService.findAll(
+				getOffset(), getPage() * getPageSize(),wtb);
+		
+		Map<String, Object> map = new HashMap<String, Object>();
+		map.put("rows", list);
+		map.put("total", list.getTotal());
+		map.put("pageindex", getPage());
+		BigDecimal total = new BigDecimal(list.getTotal());
+		BigDecimal size = new BigDecimal(getPageSize());
+
+		if (total.remainder(size).doubleValue() != 0) {
+			map.put("pagecount", total.divide(size).intValue() + 1);
+		} else {
+			map.put("pagecount", total.divide(size).intValue());
+		}
+		
+		json = JsonUtils.toJson(map);
+		return JSON;
+	}
+
+	public WarningStatisticsForWindturbinService getWarningStatisticsForWindturbinService() {
+		return warningStatisticsForWindturbinService;
+	}
+
+	public void setWarningStatisticsForWindturbinService(
+			WarningStatisticsForWindturbinService warningStatisticsForWindturbinService) {
+		this.warningStatisticsForWindturbinService = warningStatisticsForWindturbinService;
+	}
+
+	public WarningtsforwindturbineService getWarningtsforwindturbineService() {
+		return warningtsforwindturbineService;
+	}
+
+	public void setWarningtsforwindturbineService(
+			WarningtsforwindturbineService warningtsforwindturbineService) {
+		this.warningtsforwindturbineService = warningtsforwindturbineService;
+	}
+
+	public String getJson() {
+		return json;
+	}
+
+	public void setJson(String json) {
+		this.json = json;
+	}
+
+	public List<Windpowerstation> getWps() {
+		return wps;
+	}
+
+	public void setWps(List<Windpowerstation> wps) {
+		this.wps = wps;
+	}
+
+	public List<Windturbine> getWts() {
+		return wts;
+	}
+
+	public void setWts(List<Windturbine> wts) {
+		this.wts = wts;
+	}
+
+	public WarningStatisticsForWindturbin getWb() {
+		return wb;
+	}
+
+	public void setWb(WarningStatisticsForWindturbin wb) {
+		this.wb = wb;
+	}
+
+	public Warningtsforwindturbine getWtb() {
+		return wtb;
+	}
+
+	public void setWtb(Warningtsforwindturbine wtb) {
+		this.wtb = wtb;
+	}
+
+}

+ 144 - 0
src/com/hcks/cmfds/model/health/WarningStatisticsForWindturbin.java

@@ -0,0 +1,144 @@
+package com.hcks.cmfds.model.health;
+
+import java.io.Serializable;
+
+public class WarningStatisticsForWindturbin implements Serializable{
+	private static final long serialVersionUID = 3L;
+	
+	private Integer id;
+	private String modelid;
+	private String windpowerstationid;
+	private String projectid;
+	private String lineid;
+	private String windturbineid;
+	private String warningtype;
+	private String warningid;
+	private String year;
+	private String month;
+	private Integer monthWarningNum;//月报警次数
+	private Double monthMTBF;//月平均间隔时间
+	private Double monthMTTR;//月平均消缺时间
+	private Integer yearwarning;//年报警次数
+	private Double yearMTBF;//年平均间隔时间
+	private Double yearMTTR;//年平均消缺时间
+	private Integer totalwarningnum;//总报警次数
+	private Double totalMTBF;//总平均间隔时间
+	private Double totalMTTR;//总平均消缺时间
+	
+	
+	public Integer getId() {
+		return id;
+	}
+	public void setId(Integer id) {
+		this.id = id;
+	}
+	public String getModelid() {
+		return modelid;
+	}
+	public void setModelid(String modelid) {
+		this.modelid = modelid;
+	}
+	public String getWindpowerstationid() {
+		return windpowerstationid;
+	}
+	public void setWindpowerstationid(String windpowerstationid) {
+		this.windpowerstationid = windpowerstationid;
+	}
+	public String getProjectid() {
+		return projectid;
+	}
+	public void setProjectid(String projectid) {
+		this.projectid = projectid;
+	}
+	public String getLineid() {
+		return lineid;
+	}
+	public void setLineid(String lineid) {
+		this.lineid = lineid;
+	}
+	public String getWindturbineid() {
+		return windturbineid;
+	}
+	public void setWindturbineid(String windturbineid) {
+		this.windturbineid = windturbineid;
+	}
+	public String getWarningtype() {
+		return warningtype;
+	}
+	public void setWarningtype(String warningtype) {
+		this.warningtype = warningtype;
+	}
+	public String getWarningid() {
+		return warningid;
+	}
+	public void setWarningid(String warningid) {
+		this.warningid = warningid;
+	}
+	public String getYear() {
+		return year;
+	}
+	public void setYear(String year) {
+		this.year = year;
+	}
+	public String getMonth() {
+		return month;
+	}
+	public void setMonth(String month) {
+		this.month = month;
+	}
+	public Integer getMonthWarningNum() {
+		return monthWarningNum;
+	}
+	public void setMonthWarningNum(Integer monthWarningNum) {
+		this.monthWarningNum = monthWarningNum;
+	}
+	public Double getMonthMTBF() {
+		return monthMTBF;
+	}
+	public void setMonthMTBF(Double monthMTBF) {
+		this.monthMTBF = monthMTBF;
+	}
+	public Double getMonthMTTR() {
+		return monthMTTR;
+	}
+	public void setMonthMTTR(Double monthMTTR) {
+		this.monthMTTR = monthMTTR;
+	}
+	public Integer getYearwarning() {
+		return yearwarning;
+	}
+	public void setYearwarning(Integer yearwarning) {
+		this.yearwarning = yearwarning;
+	}
+	public Double getYearMTBF() {
+		return yearMTBF;
+	}
+	public void setYearMTBF(Double yearMTBF) {
+		this.yearMTBF = yearMTBF;
+	}
+	public Double getYearMTTR() {
+		return yearMTTR;
+	}
+	public void setYearMTTR(Double yearMTTR) {
+		this.yearMTTR = yearMTTR;
+	}
+	public Integer getTotalwarningnum() {
+		return totalwarningnum;
+	}
+	public void setTotalwarningnum(Integer totalwarningnum) {
+		this.totalwarningnum = totalwarningnum;
+	}
+	public Double getTotalMTBF() {
+		return totalMTBF;
+	}
+	public void setTotalMTBF(Double totalMTBF) {
+		this.totalMTBF = totalMTBF;
+	}
+	public Double getTotalMTTR() {
+		return totalMTTR;
+	}
+	public void setTotalMTTR(Double totalMTTR) {
+		this.totalMTTR = totalMTTR;
+	}
+	
+}

+ 135 - 0
src/com/hcks/cmfds/model/health/Warningtsforwindturbine.java

@@ -0,0 +1,135 @@
+package com.hcks.cmfds.model.health;
+
+import java.io.Serializable;
+
+public class Warningtsforwindturbine implements Serializable{
+	private static final long serialVersionUID = 3L;
+	
+	private Integer id;
+	private String modelid;
+	private String windpowerstationid;
+	private String projectid;
+	private String lineid;
+	private String windturbineid;
+	private String warningType;
+	private String year;
+	private String month;
+	private Integer monthWarningNum;//月报警次数
+	private Double monthMTBF;//月平均间隔时间
+	private Double monthMTTR;//月平均消缺时间
+	private Integer yearwarning;//年报警次数
+	private Double yearMTBF;//年平均间隔时间
+	private Double yearMTTR;//年平均消缺时间
+	private Integer totalwarningnum;//总报警次数
+	private Double totalMTBF;//总平均间隔时间
+	private Double totalMTTR;//总平均消缺时间
+	public Integer getId() {
+		return id;
+	}
+	public void setId(Integer id) {
+		this.id = id;
+	}
+	public String getModelid() {
+		return modelid;
+	}
+	public void setModelid(String modelid) {
+		this.modelid = modelid;
+	}
+	public String getWindpowerstationid() {
+		return windpowerstationid;
+	}
+	public void setWindpowerstationid(String windpowerstationid) {
+		this.windpowerstationid = windpowerstationid;
+	}
+	public String getProjectid() {
+		return projectid;
+	}
+	public void setProjectid(String projectid) {
+		this.projectid = projectid;
+	}
+	public String getLineid() {
+		return lineid;
+	}
+	public void setLineid(String lineid) {
+		this.lineid = lineid;
+	}
+	public String getWindturbineid() {
+		return windturbineid;
+	}
+	public void setWindturbineid(String windturbineid) {
+		this.windturbineid = windturbineid;
+	}
+	public String getWarningType() {
+		return warningType;
+	}
+	public void setWarningType(String warningType) {
+		this.warningType = warningType;
+	}
+	public String getYear() {
+		return year;
+	}
+	public void setYear(String year) {
+		this.year = year;
+	}
+	public String getMonth() {
+		return month;
+	}
+	public void setMonth(String month) {
+		this.month = month;
+	}
+	public Integer getMonthWarningNum() {
+		return monthWarningNum;
+	}
+	public void setMonthWarningNum(Integer monthWarningNum) {
+		this.monthWarningNum = monthWarningNum;
+	}
+	public Double getMonthMTBF() {
+		return monthMTBF;
+	}
+	public void setMonthMTBF(Double monthMTBF) {
+		this.monthMTBF = monthMTBF;
+	}
+	public Double getMonthMTTR() {
+		return monthMTTR;
+	}
+	public void setMonthMTTR(Double monthMTTR) {
+		this.monthMTTR = monthMTTR;
+	}
+	public Integer getYearwarning() {
+		return yearwarning;
+	}
+	public void setYearwarning(Integer yearwarning) {
+		this.yearwarning = yearwarning;
+	}
+	public Double getYearMTBF() {
+		return yearMTBF;
+	}
+	public void setYearMTBF(Double yearMTBF) {
+		this.yearMTBF = yearMTBF;
+	}
+	public Double getYearMTTR() {
+		return yearMTTR;
+	}
+	public void setYearMTTR(Double yearMTTR) {
+		this.yearMTTR = yearMTTR;
+	}
+	public Integer getTotalwarningnum() {
+		return totalwarningnum;
+	}
+	public void setTotalwarningnum(Integer totalwarningnum) {
+		this.totalwarningnum = totalwarningnum;
+	}
+	public Double getTotalMTBF() {
+		return totalMTBF;
+	}
+	public void setTotalMTBF(Double totalMTBF) {
+		this.totalMTBF = totalMTBF;
+	}
+	public Double getTotalMTTR() {
+		return totalMTTR;
+	}
+	public void setTotalMTTR(Double totalMTTR) {
+		this.totalMTTR = totalMTTR;
+	}
+	
+}

+ 91 - 0
src/com/hcks/cmfds/service/health/WarningStatisticsForWindturbinService.java

@@ -0,0 +1,91 @@
+package com.hcks.cmfds.service.health;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang.StringUtils;
+import org.springframework.jdbc.core.RowMapper;
+import org.springframework.stereotype.Service;
+
+import com.hcks.cmfds.commons.lang.PaginationList;
+import com.hcks.cmfds.core.persistence.GenericJdbcDao;
+import com.hcks.cmfds.model.Windturbine;
+import com.hcks.cmfds.model.health.WarningStatisticsForWindturbin;
+import com.hcks.cmfds.service.CacheContext;
+import com.hcks.cmfds.util.edos.Main;
+@Service
+public class WarningStatisticsForWindturbinService 
+	extends GenericJdbcDao<WarningStatisticsForWindturbin>{
+	@SuppressWarnings({ "unchecked", "rawtypes" })
+	public PaginationList<WarningStatisticsForWindturbin> findAll(int offset, int maxResults,
+			WarningStatisticsForWindturbin ws){
+		StringBuffer sb = new StringBuffer();
+		List<Object> objs = new ArrayList<Object>();
+		sb.append(" select t.*,row_number() over(order by t.year desc,t.month desc) ro from WarningStatisticsForWindturbin t where 1=1 ");
+		if(ws!=null&&StringUtils.isNotBlank(ws.getWindpowerstationid())
+				&&!"-1".equals(ws.getWindpowerstationid())){
+			sb.append(" and t.windpowerstationid = ? ");
+			objs.add(ws.getWindpowerstationid());
+		}
+		if(ws!=null&&StringUtils.isNotBlank(ws.getWindturbineid())
+				&&!"-1".equals(ws.getWindturbineid())){
+			sb.append(" and t.windturbineid = ? ");
+			objs.add(ws.getWindturbineid());
+		}
+		if(ws!=null&&StringUtils.isNotBlank(ws.getYear())){
+			sb.append(" and t.year = ? ");
+			objs.add(ws.getYear());
+		}
+		if(ws!=null&&StringUtils.isNotBlank(ws.getMonth())){
+			sb.append(" and t.month = ? ");
+			objs.add(ws.getMonth());
+		}
+		//sb.append("");
+		StringBuilder totalSQL = new StringBuilder(" SELECT count(*) FROM ( ");
+		totalSQL.append(sb.toString());
+		totalSQL.append(" ) totalTable ");
+		int total = operate.queryForInt(totalSQL.toString(), objs.toArray(new Object[0]));
+		objs.add(offset);
+		objs.add(maxResults);
+		//得到list
+		String sqlForList = "select * from ( "+sb.toString()+")  a where a.ro>? and a.ro<=?";
+		
+		PaginationList<WarningStatisticsForWindturbin> list =  new PaginationList<WarningStatisticsForWindturbin>(
+				operate.query(sqlForList, objs.toArray(new Object[0]),
+				new RowMapper() {
+					
+					@Override
+					public Object mapRow(ResultSet rs, int arg1) throws SQLException {
+						WarningStatisticsForWindturbin ws = new WarningStatisticsForWindturbin();
+						ws.setId(rs.getInt("id"));
+						ws.setWindpowerstationid(CacheContext.wpmap.get(rs.getString("windpowerstationid")).getName());
+						ws.setWindturbineid(rs.getString("windturbineid"));
+						ws.setWarningtype(rs.getString("warningtype"));
+						ws.setWarningid(CacheContext.warnmap.get(rs.getString("warningid")).getChinesetext());
+						ws.setYear(rs.getString("year"));
+						ws.setMonth(rs.getString("month"));
+						ws.setMonthWarningNum(rs.getInt("monthWarningNum"));
+						ws.setMonthMTBF(rs.getDouble("monthMTBF"));
+						ws.setMonthMTTR(rs.getDouble("monthMTTR"));
+						ws.setYearwarning(rs.getInt("yearwarning"));
+						ws.setYearMTBF(rs.getDouble("yearMTBF"));
+						ws.setYearMTTR(rs.getDouble("yearMTTR"));
+						ws.setTotalwarningnum(rs.getInt("totalwarningnum"));
+						ws.setTotalMTBF(rs.getDouble("totalMTBF"));
+						ws.setTotalMTTR(rs.getDouble("totalMTTR"));
+						return ws;
+					}
+				
+		}),total);
+		
+		return list;
+		
+	}
+	
+}

+ 85 - 0
src/com/hcks/cmfds/service/health/WarningtsforwindturbineService.java

@@ -0,0 +1,85 @@
+package com.hcks.cmfds.service.health;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.lang.StringUtils;
+import org.springframework.jdbc.core.RowMapper;
+import org.springframework.stereotype.Service;
+
+import com.hcks.cmfds.commons.lang.PaginationList;
+import com.hcks.cmfds.core.persistence.GenericJdbcDao;
+import com.hcks.cmfds.model.health.Warningtsforwindturbine;
+import com.hcks.cmfds.service.CacheContext;
+
+@Service
+public class WarningtsforwindturbineService 
+		extends GenericJdbcDao<Warningtsforwindturbine>{
+	
+	@SuppressWarnings("unchecked")
+	public PaginationList<Warningtsforwindturbine> findAll(int offset, int maxResults,
+			Warningtsforwindturbine ws){
+		
+		StringBuffer sb = new StringBuffer();
+		List<Object> objs = new ArrayList<Object>();
+		
+		sb.append(" select t.*,row_number() over(order by t.year desc,t.month desc)  ro from Warningtsforwindturbine t where 1=1 ");
+		if(ws!=null&&StringUtils.isNotBlank(ws.getWindpowerstationid())
+				&&!"-1".equals(ws.getWindpowerstationid())){
+			sb.append(" and t.windpowerstationid = ? ");
+			objs.add(ws.getWindpowerstationid());
+		}
+		if(ws!=null&&StringUtils.isNotBlank(ws.getWindturbineid())
+				&&!"-1".equals(ws.getWindturbineid())){
+			sb.append(" and t.windturbineid = ? ");
+			objs.add(ws.getWindturbineid());
+		}
+		if(ws!=null&&StringUtils.isNotBlank(ws.getYear())){
+			sb.append(" and t.year = ? ");
+			objs.add(ws.getYear());
+		}
+		if(ws!=null&&StringUtils.isNotBlank(ws.getMonth())){
+			sb.append(" and t.month = ? ");
+			objs.add(ws.getMonth());
+		}
+		StringBuilder totalSQL = new StringBuilder(" SELECT count(*) FROM ( ");
+		totalSQL.append(sb.toString());
+		totalSQL.append(" ) totalTable ");
+		int total = operate.queryForInt(totalSQL.toString(), objs.toArray(new Object[0]));
+		objs.add(offset);
+		objs.add(maxResults);
+		//得到list
+		String sqlForList = "select * from ( "+sb.toString()+")  a where a.ro>? and a.ro<=?";
+		
+		PaginationList<Warningtsforwindturbine> list =  new PaginationList<Warningtsforwindturbine>(
+				operate.query(sqlForList, objs.toArray(new Object[0]),
+				new RowMapper() {
+					
+					@Override
+					public Object mapRow(ResultSet rs, int arg1) throws SQLException {
+						Warningtsforwindturbine ws = new Warningtsforwindturbine();
+						ws.setId(rs.getInt("id"));
+						ws.setWindpowerstationid(CacheContext.wpmap.get(rs.getString("windpowerstationid")).getName());
+						ws.setWindturbineid(rs.getString("windturbineid"));
+						ws.setWarningType(rs.getString("warningtype"));
+						ws.setYear(rs.getString("year"));
+						ws.setMonth(rs.getString("month"));
+						ws.setMonthWarningNum(rs.getInt("monthWarningNum"));
+						ws.setMonthMTBF(rs.getDouble("monthMTBF"));
+						ws.setMonthMTTR(rs.getDouble("monthMTTR"));
+						ws.setYearwarning(rs.getInt("yearwarning"));
+						ws.setYearMTBF(rs.getDouble("yearMTBF"));
+						ws.setYearMTTR(rs.getDouble("yearMTTR"));
+						ws.setTotalwarningnum(rs.getInt("totalwarningnum"));
+						ws.setTotalMTBF(rs.getDouble("totalMTBF"));
+						ws.setTotalMTTR(rs.getDouble("totalMTTR"));
+						return ws;
+					}
+				
+		}),total);
+		return list;
+	}
+
+}

+ 4 - 0
src/com/hcks/cmfds/service/monitor/MonitorService.java

@@ -898,6 +898,10 @@ public class MonitorService {
 			point = new PointData();
 			point = ednaApiUtil.getRealData("HB_GD_DXF_JS_XX_XX_XX_CI0269");
 			map.put("dxfs", point.getPointValueInDouble());
+			
+			point = new PointData();
+			point = ednaApiUtil.getRealData("HB_GD_SYF_JS_XX_XX_XXX_CI0269");
+			map.put("syfs", point.getPointValueInDouble());
 		} catch (Exception e) {
 		
 			e.printStackTrace();