Browse Source

山西国电版本整合

shilin 2 years ago
parent
commit
e3b319a7d6

+ 22 - 55
WebRoot/pages/apdata/goodhistory.jsp

@@ -60,9 +60,9 @@ function changeFc(fcId){
 					//$("#windturbineid").append("<option value=''>请选择</option>"); 
 				
 					for(var i=0; i<data.length; i++){
-						$("#windturbineid").append("<option value='"+data[i].id+"'>"+data[i].code+"</option>"); 
+						$("#windturbineid").append("<option value='"+data[i].id+"'>"+data[i].name+"</option>"); 
 					}
-					$("#windturbineid").val('<s:property value="windturbineid"/>');
+					$("#windturbineid").val('<s:property value="wtId"/>');
 				}else{
 					$("#windturbineid").empty();
 					//$("#windturbineid").append("<option value=''>请选择</option>"); 
@@ -79,10 +79,8 @@ function changeFc(fcId){
 	
 		 if("" == $("#beginDate").val()){
 			alert("请选择查询开始日期!");
-			return;
 		}else if("" == $("#endDate").val()){
 			alert("请选择查询结束日期!");
-			return;
 		}
 		else{
 	
@@ -101,8 +99,8 @@ function changeFc(fcId){
 	
 			
 $(document).ready(function () {
-$("#windturbineid").val('<s:property  value="windturbineid"/>');
-changeFc('<s:property  value="windfarm"/>');
+
+changeFc("<s:property value='windfarm'/>");
 
 setTimeout("showJqGrid()",1000);
 
@@ -119,7 +117,7 @@ var url = '<%=request.getContextPath() %>/wtgoodness/goodhistorylist.action?wind
 
 var datatype = 'json';
 
-var colNames = ['日期','风机','编号','日发电量','日理论发电量','日平均功率','日运行小时',
+var colNames = ['日期','风机','日发电量','日理论发电量','日平均功率','日运行小时',
 				'日待机小时','日故障小时','日维护小时','日中断小时','日有效风时','日损失电量',
 				'日报警次数','日停机次数','日不饱和次数','日设备可利用率', '日平均温度','日平均湿度',
 				'日平均压强','日拟合优度','日实际/保证'];
@@ -128,18 +126,17 @@ var colModel = [
 
 
 { name: 'recorddate', index: 'recorddate', width: 100, align: 'center',formatter:'date',formatoptions: {newformat:'Y-m-d'}},
-{ name: 'windturbineid', index: 'windturbineid', width: 80, align: 'center',hidden : true},
-{ name: 'code', index: 'code', width: 80, align: 'center'},
-{ name: 'c4', index: 'c4', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'c7', index: 'c7', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'c10', index: 'c10', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'c13', index: 'c13', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'c16', index: 'c16', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'c19', index: 'c19', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'c22', index: 'c22', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'c25', index: 'c25', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'c28', index: 'c28', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'c31', index: 'c31', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
+{ name: 'windturbineid', index: 'windturbineid', width: 100, align: 'center'},
+{ name: 'c1', index: 'c1', width: 100, align: 'center'},
+{ name: 'c4', index: 'c4', width: 100, align: 'center'},
+{ name: 'c7', index: 'c7', width: 100, align: 'center'},
+{ name: 'c13', index: 'c13', width: 100, align: 'center'},
+{ name: 'c16', index: 'c16', width: 100, align: 'center'},
+{ name: 'c19', index: 'c19', width: 100, align: 'center'},
+{ name: 'c22', index: 'c22', width: 100, align: 'center'},
+{ name: 'c25', index: 'c25', width: 100, align: 'center'},
+{ name: 'c28', index: 'c28', width: 100, align: 'center'},
+{ name: 'c31', index: 'c31', width: 100, align: 'center'},
 { name: 'c34', index: 'c34', width: 100, align: 'center'},
 { name: 'c37', index: 'c37', width: 100, align: 'center'},
 { name: 'c40', index: 'c40', width: 100, align: 'center'},
@@ -174,34 +171,8 @@ multiselect,rownumbers);}
 function goPage() {
 		$("#f1").attr("action", "goodnessindex.action").submit();
 	}
-	
-function toDownloadExcel(){
-	var windturbineid=$("#windturbineid").find("option:selected").val(); 
-	var beginDate=$("#beginDate").val();  
- 	var endDate=$("#endDate").val();  
-	var d1 = new Date(beginDate.replace(/\-/g, "\/"));  
- 	var d2 = new Date(endDate.replace(/\-/g, "\/"));  
- 	if(""==windturbineid||undefined==windturbineid){
- 		alert("请选择查询风机!");
- 		return;
- 	}
-	if("" == beginDate){
-		alert("请选择查询开始日期!");
-		return;
-	}else if("" == endDate){
-		alert("请选择查询结束日期!");
-		return;
-	}else if(d1 >d2){
-		alert("开始时间不能大于结束时间!");
-		return;
-	}
-	
-	var url = '<%=request.getContextPath() %>/wtgoodness/toDownLoadExcel.action?windturbineid='+windturbineid
-					 +"&beginDate="+beginDate+"&endDate="+endDate;
-	$('#toexcel').attr('href',url); 
-	
-}
 </script>
+
 <style type="text/css">
 
 
@@ -220,14 +191,14 @@ fieldset legend {
 
 <fieldset style="height: 60px" id="fst">
     <legend  class="item_Name">查询条件</legend>
-   <table width="1200px" cellpadding="0" cellspacing="0" class="dataform">
+   <table width="1000px" cellpadding="0" cellspacing="0" class="dataform">
 	<tr>
 		
 		<th width="100px" class="item_Name">
 			风场:
 		</th>
 		<td width="120px" class="item_Name">
-			<s:select  list="wps" cssStyle="width:150px" listKey="id" listValue="name" id="windfarm" name="windfarm" headerKey="" headerValue="请选择" onchange="javascript:changeFc(this.value);"></s:select>
+			<s:select  list="wps" cssStyle="width:100px" listKey="id" listValue="name" id="windfarm" name="windfarm" headerKey="" headerValue="请选择" onchange="javascript:changeFc(this.value);"></s:select>
 		</td>
 		<th width="100px"  class="item_Name">
 			风机:
@@ -251,13 +222,9 @@ fieldset legend {
 			<s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})" 
 			id="endDate" name="endDate" title="结束日期" onchange="javascript:queryData();"/>
 		</td>
-		<td style="text-align: left">
-		  <!-- <input type="button" class="button" onclick="javascript:goPage();"
-					value="返回" /> 
-		   <input type="button" class="button" onclick="javascript:toDownloadExcel();"
-					value="导出" /> -->
-		 <a href="#"  onclick="javascript:goPage();">返回</a>&nbsp;&nbsp; 
-		 <a href="#"  onclick="javascript:toDownloadExcel();" id="toexcel">导出</a>
+		<td style="text-align: right">
+		 <input	type="button" class="button" onclick="javascript:goPage();"
+					value="返回" />
 		</td>
 	</tr>
 </table>

+ 21 - 19
WebRoot/pages/apdata/goodness.jsp

@@ -66,7 +66,9 @@ fieldset legend {
     }
     
     function history(windturbineid, recorddate) {
-		$("#f1").attr("action", "../wtgoodness/goodhistoryindex.action?windturbineid="+windturbineid+"&recorddate="+recorddate).submit();
+    	$("#wtId").val(windturbineid);
+    	$("#recorddate").val(recorddate);
+		$("#f1").attr("action", "goodhistoryindex.action").submit();
 	}
 		
 	function queryData(){
@@ -88,7 +90,6 @@ fieldset legend {
 		function toExcel() {
 			  if("" == $("#recorddate").val()){
 			alert("请选择查询日期!");
-			return;
 		}
 		else{
 			var windfarm=$("#windfarm").find("option:selected").val(); 
@@ -117,10 +118,10 @@ var url = '<%=request.getContextPath() %>/wtgoodness/goodnesslist.action?windfar
 
 var datatype = 'json';
 
-var colNames = ['风场', '风机','编号','型号',
-				'日排行榜', '日拟合优度','日风速',
-				'月排行榜', '月拟合优度','月风速',
-				'年排行榜', '年拟合优度','年风速',
+var colNames = ['风场', '风机','型号',
+				'日排行榜', '日拟合优度(%)','日风速(m/s)',
+				'月排行榜', '月拟合优度(%)','月风速(m/s)',
+				'年排行榜', '年拟合优度(%)','年风速(m/s)',
 				'操作'
 				];
 
@@ -128,18 +129,17 @@ var colModel = [
 
 
 { name: 'name', index: 'name', width: 100, align: 'center'},
-{ name: 'windturbineid', index: 'windturbineid', width: 100, align: 'center',hidden : true},
-{ name: 'code', index: 'code', width: 100, align: 'center'},
+{ name: 'windturbineid', index: 'windturbineid', width: 100, align: 'center'},
 { name: 'modelid', index: 'modelid', width: 100, align: 'center'},
-{ name: 'daytop', index: 'daytop', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
-{ name: 'daygoodness', index: 'daygoodness', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'dayspeed', index: 'dayspeed', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'monthtop', index: 'monthtop', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
-{ name: 'monthgoodness', index: 'monthgoodness', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'monthspeed', index: 'monthspeed', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'yeartop', index: 'yeartop', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
-{ name: 'yeargoodness', index: 'yeargoodness', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
-{ name: 'yearspeed', index: 'yearspeed', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
+{ name: 'daytop', index: 'daytop', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'daygoodness', index: 'daygoodness', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'dayspeed', index: 'dayspeed', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'monthtop', index: 'monthtop', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'monthgoodness', index: 'monthgoodness', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'monthspeed', index: 'monthspeed', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'yeartop', index: 'yeartop', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'yeargoodness', index: 'yeargoodness', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
+{ name: 'yearspeed', index: 'yearspeed', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
 { name: 'yearspeed', index: 'yearspeed', width: 200, align: 'center',formatter:displaybuttons}
 ];
 
@@ -189,8 +189,8 @@ fieldset legend {
 		<th width="100px" class="item_Name">
 			风场:
 		</th>
-		<td width="150px" class="item_Name">
-			<s:select list="wps" cssStyle="width:150px" listKey="id" listValue="name" id="windfarm" name="windfarm" headerKey="" headerValue="请选择" onchange="javascript:queryData();"></s:select>
+		<td width="100px" class="item_Name">
+			<s:select  list="wps" cssStyle="width:100px" listKey="id" listValue="name" id="windfarm" name="windfarm" headerKey="" headerValue="请选择" onchange="javascript:queryData();"></s:select>
 		</td>
 	
 		<th width="100px" class="item_Name">
@@ -215,6 +215,8 @@ fieldset legend {
 </table>
 
 <div id='gridPager'></div>
+<input type="hidden" id="wtId" name="wtId">
+<input type="hidden" id="recorddate" name="recorddate">
 </form>
 
 </body>

File diff suppressed because it is too large
+ 551 - 487
WebRoot/pages/monitor/monitornews.jsp


+ 10 - 359
src/com/hcks/cmfds/action/apdata/WindturbinegoodhistoryAction.java

@@ -1,8 +1,5 @@
 package com.hcks.cmfds.action.apdata;
 
-
-import java.io.InputStream;
-import java.io.OutputStream;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
@@ -11,9 +8,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import jxl.Workbook;
-import jxl.write.Label;
-
 import org.apache.struts2.convention.annotation.Action;
 import org.apache.struts2.convention.annotation.Namespace;
 import org.apache.struts2.convention.annotation.Result;
@@ -26,19 +20,9 @@ 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.Windturbineanalysisday;
-import com.hcks.cmfds.model.Windturbineinfoday;
-import com.hcks.cmfds.model.Windturbineinfoday3;
 import com.hcks.cmfds.service.CacheContext;
-import com.hcks.cmfds.service.WindturbineInfoDayService;
 import com.hcks.cmfds.service.WindturbineanalysisdayService;
-import com.hcks.cmfds.service.WindturbinegoodnessService;
-import com.hcks.cmfds.service.Windturbineinfoday3Service;
-import com.hcks.cmfds.vo.WindturbineanalysisdayVo;
-
-/**
- * @author Administrator
- *
- */
+
 @Namespace("/wtgoodness")
 @Result(name = "json", type = "json", params = { "textName", "json" })
 public class WindturbinegoodhistoryAction extends PaginationAction {
@@ -50,165 +34,22 @@ public class WindturbinegoodhistoryAction extends PaginationAction {
 	private String json;
 	private String windfarm;
 	private String windturbineid;
+	private String wtId;;
 	private Date recorddate;
 	private String url1;
 	private Map<String, List<Windturbine>> wtsmap;
 	private List<Windturbineanalysisday> vos;
-	private List<Windturbineinfoday3> wtinfos;
 	private WindturbineanalysisdayService windturbineanalysisdayService;
-	private Windturbineinfoday3Service windturbineinfoday3Service;
-	private WindturbineInfoDayService windturbineInfoDayService;
-	private WindturbinegoodnessService windturbinegoodnessService;
 	private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
-	
+
 	@Action(value = "goodhistoryindex", results = { @Result(name = "success", location = "/pages/apdata/goodhistory.jsp") })
 	public String goodhistoryindex() {
 
 		initial();
 		vos = new ArrayList<Windturbineanalysisday>();
-		wtinfos = new ArrayList<Windturbineinfoday3>();
 		return SUCCESS;
 	}
-	
-	@Action(value = "toDownLoadExcel", results = { @Result(name = "success", type = "stream") })
-	public String toDownLoadExcel() throws Exception {
-		// 定义request ,response.
-		// 查询下载附件.
-		// 设置下载头信息.begin
-		response.setCharacterEncoding("UTF-8");
-		response.setContentType("application/vnd.ms-excel");
-		response.setHeader("Content-Disposition", "attachment; filename="
-				+ new String("单机性能分析记录.xls".getBytes("GB2312"), "iso8859-1"));
-		response.setHeader("Pragma", "No-cache");
-		response.setHeader("Cache-Control", "No-cache");
-		response.setDateHeader("Expires", 0);
-		// 这个地方一定要进行编码的转换要不然中文字符会出现乱码.
-		// 设置下载头信息.end,
-		OutputStream output = null;
-		InputStream fis = null;
-		
-		try {
-			output = response.getOutputStream();
-			jxl.write.WritableWorkbook wwb = Workbook.createWorkbook(output);
-			jxl.write.WritableSheet ws = wwb.createSheet("单机历史性能分析记录", 0);
-			// 设置标题.ws.addCell(new jxl.write.Label(列, 行, 内容.));
-			ws.addCell(new Label(0, 0, "日期"));
-			ws.addCell(new Label(1, 0, "编号"));
-			ws.addCell(new Label(2, 0, "日发电量")); 
-			ws.addCell(new Label(3, 0, "日理论发电量"));
-			ws.addCell(new Label(4, 0, "日平均功率"));
-			ws.addCell(new Label(5, 0, "日运行小时"));
-			ws.addCell(new Label(6, 0, "日待机小时"));
-			ws.addCell(new Label(7, 0, "日故障小时"));
-			ws.addCell(new Label(8, 0, "日维护小时"));
-			ws.addCell(new Label(9, 0, "日中断小时"));
-			ws.addCell(new Label(10, 0, "日有效风时"));
-			ws.addCell(new Label(11, 0, "日损失电量"));
-			ws.addCell(new Label(12, 0, "日报警次数"));
-			ws.addCell(new Label(13, 0, "日停机次数"));
-			ws.addCell(new Label(14, 0, "日不饱和次数"));
-			ws.addCell(new Label(15, 0, "日设备可利用率"));
-			ws.addCell(new Label(16, 0, "日平均温度"));
-			ws.addCell(new Label(17, 0, "日平均湿度"));
-			ws.addCell(new Label(18, 0, "日平均压强"));
-			ws.addCell(new Label(19, 0, "日拟合优度"));
-			ws.addCell(new Label(20, 0, "日实际/保证"));
-
-			// 设置显示长度.
-			ws.setColumnView(0, 20);
-			ws.setColumnView(1, 20);
-			ws.setColumnView(2, 20);
-			ws.setColumnView(3, 20);
-			ws.setColumnView(4, 20);
-			ws.setColumnView(5, 20);
-			ws.setColumnView(6, 20);
-			ws.setColumnView(7, 20);
-			ws.setColumnView(8, 20);
-			ws.setColumnView(9, 20);
-			ws.setColumnView(10, 20);
-			ws.setColumnView(11, 20);
-			ws.setColumnView(12, 20);
-			ws.setColumnView(13, 20);
-			ws.setColumnView(14, 20);
-			ws.setColumnView(15, 20);
-			ws.setColumnView(16, 20);
-			ws.setColumnView(17, 20);
-			ws.setColumnView(18, 20);
-			ws.setColumnView(19, 20);
-
-			int i = 0;
-			initial();
-			Map<String, Object> params = new HashMap<String, Object>();
-			if(StringUtils.notEmp(windturbineid))
-			{
-				params.put("windturbineid", windturbineid);
-			}
 
-			if(StringUtils.notEmp(beginDate))
-			{
-				params.put("@recorddate", DateUtils.truncate(beginDate));
-			}
-			if(StringUtils.notEmp(endDate))
-			{
-				params.put("$recorddate", DateUtils.truncate(endDate));
-			}
-			QueryOrder orders=new QueryOrder("recorddate", "desc");
-			vos = windturbineanalysisdayService.findByProperties(params, orders);
-			List<WindturbineanalysisdayVo> wVo = windturbinegoodnessService.getWindturbineanalysisdayVoList(vos, params, orders);
-			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-			for (int j = 0; j < wVo.size(); j++) {
-				WindturbineanalysisdayVo vo = wVo.get(j);
-
-				ws.addCell(new Label(0, i + 1, vo.getRecorddate()==null?"":sdf.format(vo.getRecorddate())));
-				ws.addCell(new Label(1, i + 1, vo.getCode()==null?"":vo.getCode()));
-				ws.addCell(new Label(2, i + 1, "" + vo.getC4()));
-				ws.addCell(new Label(3, i + 1, "" + vo.getC7()));
-				ws.addCell(new Label(4, i + 1, "" + vo.getC10()));
-				ws.addCell(new Label(5, i + 1, "" + vo.getC13()));
-				ws.addCell(new Label(6, i + 1, "" + vo.getC16()));
-				ws.addCell(new Label(7, i + 1, "" + vo.getC19()));
-				ws.addCell(new Label(8, i + 1, "" + vo.getC22()));
-				ws.addCell(new Label(9, i + 1, "" + vo.getC25()));
-				ws.addCell(new Label(10, i + 1, "" + vo.getC28()));
-				ws.addCell(new Label(11, i + 1, "" + vo.getC31()));
-				ws.addCell(new Label(12, i + 1, "" + vo.getC34()));
-				ws.addCell(new Label(13, i + 1, "" + vo.getC37()));
-				ws.addCell(new Label(14, i + 1, "" + vo.getC40()));
-				ws.addCell(new Label(15, i + 1, "" + vo.getC43()));
-				ws.addCell(new Label(16, i + 1, "" + vo.getC46()));
-				ws.addCell(new Label(17, i + 1, "" + vo.getC49()));
-				ws.addCell(new Label(18, i + 1, "" + vo.getC52()));
-				ws.addCell(new Label(19, i + 1, "" + vo.getC55()));
-				ws.addCell(new Label(20, i + 1, "" + vo.getC58()));
-				i++;
-			}
-			wwb.write();
-			wwb.close();
-		} catch (Exception e) {
-			System.out.println("Error!");
-			e.printStackTrace();
-		} finally {// 正常关闭输入输出流.
-			try {
-				if (fis != null) {
-					fis.close();
-					fis = null;
-				}
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-			try {
-				if (output != null) {
-					output.close();
-					output = null;
-				}
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-		}
-		
-		return null;
-	}
-	
 	@Action(value = "goodhistorylist")
 	public String goodhistorylist() throws Exception {
 
@@ -231,174 +72,10 @@ public class WindturbinegoodhistoryAction extends PaginationAction {
 		
 		QueryOrder orders=new QueryOrder("recorddate", "desc");
 		vos = windturbineanalysisdayService.findByProperties(params, orders);
-		
-		List<WindturbineanalysisdayVo> vols=new ArrayList<WindturbineanalysisdayVo>();
 
 		if (null != vos && !vos.isEmpty()) {
-			double c4=0.0;
-			double c7=0.0;
-			double c10=0.0;
-			double c13=0.0;
-			double c16=0.0;
-			double c19=0.0;
-			double c22=0.0;
-			double c25=0.0;
-			double c28=0.0;
-			double c31=0.0;
-			double c34=0.0;
-			double c37=0.0;
-			double c40=0.0;
-			double c43=0.0;
-			double c46=0.0;
-			double c49=0.0;
-			double c52=0.0;
-			double c55=0.0;
-			double c58=0.0;
-			
-			for(Windturbineanalysisday po:vos)
-			{
-				WindturbineanalysisdayVo vo=new WindturbineanalysisdayVo();
-				vo.setId(po.getId());
-				vo.setWindturbineid(po.getWindturbineid());
-				if(CacheContext.wtmap.containsKey(po.getWindturbineid()))
-				{
-					Windturbine wt=CacheContext.wtmap.get(po.getWindturbineid());
-					vo.setCode(wt.getCode());
-				}
-				vo.setRecorddate(po.getRecorddate());
-				vo.setC1(po.getC1());
-				vo.setC2(po.getC2());
-				vo.setC3(po.getC3());
-				
-				if(StringUtils.notEmp(po.getWindturbineid()))
-				{
-					params.put("windturbineid",po.getWindturbineid());
-				}
-
-				if(StringUtils.notEmp(po.getRecorddate()))
-				{
-					params.put("@recorddate", DateUtils.truncate(po.getRecorddate()));
-				}
-				if(StringUtils.notEmp(po.getRecorddate()))
-				{
-					params.put("$recorddate", DateUtils.truncate(po.getRecorddate()));
-				}
-				orders=new QueryOrder("recorddate", "desc");
-				List<Windturbineinfoday3> vos2 = windturbineinfoday3Service.findByProperties(params, orders);
-				vo.setC4(vos2.get(0).getDaydl2());
-				c4+=vos2.get(0).getDaydl2();
-			//	vo.setC4(po.getC4());  //日发电量
-				vo.setC5(po.getC5());
-				vo.setC6(po.getC6());
-			//	vo.setC7(po.getC7());  //理论
-				
-				vo.setC8(po.getC8());
-				vo.setC9(po.getC9());
-				vo.setC10(po.getC10());
-				c10+=po.getC10();
-				vo.setC11(po.getC11());
-				vo.setC12(po.getC12());
-				List<Windturbineinfoday> vos3 = windturbineInfoDayService.findByProperties(params, orders);
-				vo.setC13(vos3.get(0).getRunhours());
-				c13+=vos3.get(0).getRunhours();
-			//	vo.setC13(po.getC13()); //日运行小时
-				vo.setC14(po.getC14());
-				vo.setC15(po.getC15());
-				vo.setC16(vos3.get(0).getStophours());
-				c16+=vos3.get(0).getStophours();
-			//	vo.setC16(po.getC16()); //日待机小时
-				vo.setC17(po.getC17());
-				vo.setC18(po.getC18());
-				vo.setC19(vos3.get(0).getFaulthours());
-				c19+=vos3.get(0).getFaulthours();
-			//	vo.setC19(po.getC19());//日故障小时
-				vo.setC20(po.getC20());
-				vo.setC21(po.getC21());
-				vo.setC22(vos3.get(0).getMaintainhours());
-				c22+=vos3.get(0).getMaintainhours();
-			//	vo.setC22(po.getC22());//日维护小时
-				vo.setC23(po.getC23());
-				vo.setC24(po.getC24());
-				vo.setC25(vos3.get(0).getInterrupthours());
-				c25+=vos3.get(0).getInterrupthours();
-			//	vo.setC25(po.getC25());//日中断小时
-				vo.setC26(po.getC26());
-				vo.setC27(po.getC27());
-				vo.setC28(po.getC28());
-				c28+=po.getC28();
-				vo.setC29(po.getC29());
-				vo.setC30(po.getC30());
-			//	vo.setC31(po.getC31());   //损失
-				vo.setC31(vos2.get(0).getDaynhgzssdl()+vos2.get(0).getDaynhwhssdl()+vos2.get(0).getDaynhxdssdl()+vos2.get(0).getDaynhqfdl()+vos2.get(0).getDaynhcfdl());
-				c31+=vos2.get(0).getDaynhgzssdl()+vos2.get(0).getDaynhwhssdl()+vos2.get(0).getDaynhxdssdl()+vos2.get(0).getDaynhqfdl()+vos2.get(0).getDaynhcfdl();
-				vo.setC7(vos3.get(0).getGeneratingcapacity()+vo.getC31());
-				c7+=vos3.get(0).getGeneratingcapacity()+vo.getC31();
-				
-				vo.setC32(po.getC32());
-				vo.setC33(po.getC33());
-				vo.setC34(po.getC34());
-				c34+=po.getC34();
-				vo.setC35(po.getC35());
-				vo.setC36(po.getC36());
-				vo.setC37(po.getC37());
-				c37+=po.getC37();
-				vo.setC38(po.getC38());
-				vo.setC39(po.getC39());
-				vo.setC40(po.getC40());
-				c40+=po.getC40();
-				vo.setC41(po.getC41());
-				vo.setC42(po.getC42());
-				vo.setC43(po.getC43());
-				c43+=po.getC43();
-				vo.setC44(po.getC44());
-				vo.setC45(po.getC45());
-				vo.setC46(po.getC46());
-				c46+=po.getC46();
-				vo.setC47(po.getC47());
-				vo.setC48(po.getC48());
-				vo.setC49(po.getC49());
-				c49+=po.getC49();
-				vo.setC50(po.getC50());
-				vo.setC51(po.getC51());
-				vo.setC52(po.getC52());
-				c52+=po.getC52();
-				vo.setC53(po.getC53());
-				vo.setC54(po.getC54());
-				vo.setC55(po.getC55());
-				c55+=po.getC55();
-				vo.setC56(po.getC56());
-				vo.setC57(po.getC57());
-				vo.setC58(po.getC58());
-				c58+=po.getC58();
-				vo.setC59(po.getC59());
-				vo.setC60(po.getC60());
-				vols.add(vo);
-			}
-			WindturbineanalysisdayVo  newVo= new WindturbineanalysisdayVo();
-			newVo.setRecorddate(null);
-			newVo.setWindturbineid(null);
-			newVo.setCode("合计");
-			newVo.setC4(c4);
-			newVo.setC7(c7);
-			newVo.setC10(c10);
-			newVo.setC13(c13);
-			newVo.setC16(c16);
-			newVo.setC19(c19);
-			newVo.setC22(c22);
-			newVo.setC25(c25);
-			newVo.setC28(c28);
-			newVo.setC31(c31);
-			newVo.setC34(c34);
-			newVo.setC37(c37);
-			newVo.setC40(c40);
-			newVo.setC43(c43);
-			newVo.setC46(c46);
-			newVo.setC49(c49);
-			newVo.setC52(c52);
-			newVo.setC55(c55);
-			newVo.setC58(c58);
-			vols.add(newVo);
-			json = JsonUtils.getJsons(vols);
+
+			json = JsonUtils.getJsons(vos);
 		} else {
 			json = JsonUtils.getJsons(new ArrayList<Windturbineanalysisday>());
 		}
@@ -567,14 +244,6 @@ public class WindturbinegoodhistoryAction extends PaginationAction {
 	public void setVos(List<Windturbineanalysisday> vos) {
 		this.vos = vos;
 	}
-	
-	public List<Windturbineinfoday3> getWtinfos() {
-		return wtinfos;
-	}
-
-	public void setWtinfos(List<Windturbineinfoday3> wtinfos) {
-		this.wtinfos = wtinfos;
-	}
 
 	public WindturbineanalysisdayService getWindturbineanalysisdayService() {
 		return windturbineanalysisdayService;
@@ -600,32 +269,14 @@ public class WindturbinegoodhistoryAction extends PaginationAction {
     	this.recorddate = recorddate;
     }
 
-	public Windturbineinfoday3Service getWindturbineinfoday3Service() {
-		return windturbineinfoday3Service;
-	}
-
-	public void setWindturbineinfoday3Service(
-			Windturbineinfoday3Service windturbineinfoday3Service) {
-		this.windturbineinfoday3Service = windturbineinfoday3Service;
-	}
-
-	public WindturbineInfoDayService getWindturbineInfoDayService() {
-		return windturbineInfoDayService;
-	}
-
-	public void setWindturbineInfoDayService(
-			WindturbineInfoDayService windturbineInfoDayService) {
-		this.windturbineInfoDayService = windturbineInfoDayService;
-	}
-
-	public WindturbinegoodnessService getWindturbinegoodnessService() {
-		return windturbinegoodnessService;
+	public String getWtId() {
+		return wtId;
 	}
 
-	public void setWindturbinegoodnessService(
-			WindturbinegoodnessService windturbinegoodnessService) {
-		this.windturbinegoodnessService = windturbinegoodnessService;
+	public void setWtId(String wtId) {
+		this.wtId = wtId;
 	}
 	
+	
 
 }

+ 5 - 23
src/com/hcks/cmfds/action/apdata/WindturbinegoodnessAction.java

@@ -2,9 +2,6 @@ package com.hcks.cmfds.action.apdata;
 
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.math.BigDecimal;
-import java.sql.ResultSet;
-import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
@@ -18,7 +15,6 @@ import jxl.write.Label;
 import org.apache.struts2.convention.annotation.Action;
 import org.apache.struts2.convention.annotation.Namespace;
 import org.apache.struts2.convention.annotation.Result;
-import org.springframework.jdbc.core.RowMapper;
 
 import com.hcks.cmfds.commons.lang.QueryOrder;
 import com.hcks.cmfds.commons.util.DateUtils;
@@ -27,11 +23,9 @@ import com.hcks.cmfds.commons.util.StringUtils;
 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.model.Windturbinegoodness;
 import com.hcks.cmfds.service.CacheContext;
 import com.hcks.cmfds.service.WindturbinegoodnessService;
-import com.hcks.cmfds.vo.StatisticalAnalysisTopVo;
 import com.hcks.cmfds.vo.WindturbinegoodnessVo;
 
 @Namespace("/wtgoodness")
@@ -126,7 +120,7 @@ public class WindturbinegoodnessAction extends PaginationAction {
 				WindturbinegoodnessVo vo = vos.get(j);
 
 				ws.addCell(new Label(0, i + 1, "" + vo.getName()));
-				ws.addCell(new Label(1, i + 1, "" + vo.getCode()));
+				ws.addCell(new Label(1, i + 1, "" + vo.getWindturbineid()));
 				ws.addCell(new Label(2, i + 1, "" + vo.getModelid()));
 				ws.addCell(new Label(3, i + 1, "" + vo.getDaytop()));
 				ws.addCell(new Label(4, i + 1, "" + vo.getDaygoodness()));
@@ -219,11 +213,6 @@ public class WindturbinegoodnessAction extends PaginationAction {
 					Windpowerstation wp = wpmap.get(po.getWindtpowerstationid());
 					vo.setName(wp.getName());
 				}
-				if(CacheContext.wtmap.containsKey(po.getWindturbineid()))
-				{
-					Windturbine wt=CacheContext.wtmap.get(po.getWindturbineid());
-					vo.setCode(wt.getCode());
-				}
 				vo.setWindturbineid(po.getWindturbineid());
 				vo.setYeargoodness(po.getYeargoodness());
 				vo.setYearspeed(po.getYearspeed());
@@ -268,11 +257,9 @@ public class WindturbinegoodnessAction extends PaginationAction {
 
 		params.put("recorddate", DateUtils.truncate(recorddate));
 		QueryOrder order = new QueryOrder("daytop", "asc");
-		
+
 		List<Windturbinegoodness> ls = windturbinegoodnessService.findByProperties(params, order);
-		
-		Map<String,Double> speedMap = windturbinegoodnessService.getWindturbineinfo3Speed(windfarm, recorddate, recorddate);
-		
+
 		if (null != ls && !ls.isEmpty()) {
 
 			Map<String, Equipmentmodel> mlmap = CacheContext.mlmap;
@@ -281,7 +268,7 @@ public class WindturbinegoodnessAction extends PaginationAction {
 			for (Windturbinegoodness po : ls) {
 				WindturbinegoodnessVo vo = new WindturbinegoodnessVo();
 				vo.setDaygoodness(po.getDaygoodness());
-				vo.setDayspeed(speedMap.get(po.getWindturbineid()));
+				vo.setDayspeed(po.getDayspeed());
 				vo.setDaytop(po.getDaytop());
 				vo.setId(po.getId());
 				vo.setModelid(po.getModelid());
@@ -299,18 +286,13 @@ public class WindturbinegoodnessAction extends PaginationAction {
 					Windpowerstation wp = wpmap.get(po.getWindtpowerstationid());
 					vo.setName(wp.getName());
 				}
-				if(CacheContext.wtmap.containsKey(po.getWindturbineid()))
-				{
-					Windturbine wt=CacheContext.wtmap.get(po.getWindturbineid());
-					vo.setCode(wt.getCode());
-				}
 				vo.setWindturbineid(po.getWindturbineid());
 				vo.setYeargoodness(po.getYeargoodness());
 				vo.setYearspeed(po.getYearspeed());
 				vo.setYeartop(po.getYeartop());
 				vos.add(vo);
 			}
-			
+
 			json = JsonUtils.wrapListForGrid(vos, getPage());
 		} else {
 			json = JsonUtils.wrapListForGrid(new ArrayList<WindturbinegoodnessVo>(), getPage());

+ 102 - 327
src/com/hcks/cmfds/service/WindturbinegoodnessService.java

@@ -2,11 +2,8 @@ package com.hcks.cmfds.service;
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
-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.HashMap;
 import java.util.List;
@@ -14,38 +11,24 @@ import java.util.Map;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.jdbc.core.RowMapper;
 import org.springframework.stereotype.Service;
 
 import com.excelsior.xFunction.xFunctionException;
 import com.hcks.cmfds.Constant;
-import com.hcks.cmfds.commons.lang.QueryOrder;
 import com.hcks.cmfds.commons.util.DateUtils;
-import com.hcks.cmfds.commons.util.JsonUtils;
 import com.hcks.cmfds.commons.util.StringUtils;
 import com.hcks.cmfds.core.persistence.GenericJdbcDao;
 import com.hcks.cmfds.model.WindTurbineTestingPointAi;
-import com.hcks.cmfds.model.Windturbine;
-import com.hcks.cmfds.model.Windturbineanalysisday;
 import com.hcks.cmfds.model.Windturbinegoodness;
-import com.hcks.cmfds.model.Windturbineinfoday;
-import com.hcks.cmfds.model.Windturbineinfoday3;
 import com.hcks.cmfds.util.EdosUtil;
 import com.hcks.cmfds.util.IEdosUtil;
 import com.hcks.cmfds.util.edos.PointData;
 import com.hcks.cmfds.vo.DataVo;
-import com.hcks.cmfds.vo.StatisticalAnalysisTopVo;
-import com.hcks.cmfds.vo.WindturbineanalysisdayVo;
 
 @Service
 public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodness> {
 
     private IEdosUtil ednaApiUtil = new EdosUtil();
-    @Autowired
-    private Windturbineinfoday3Service windturbineinfoday3Service;
-    @Autowired
-    private WindturbineInfoDayService windturbineInfoDayService;
 
     /**
      * 初始化折线图数据
@@ -81,16 +64,16 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
         // WindTurbineTestingPointAi fs = map.get(Constant.TPOINT_WT_PJFS);
 
         if (null != sjgl) {
-            List<PointData> sjglls = ednaApiUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) 25, 3600L);
+            List<PointData> sjglls = ednaApiUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
             int count = 0;
             double temp = 0;
             for (int i = 0; i < vos.size(); i++) {
-                vos.get(i).setTime(sjglls.get(i).getPointTime() * 1000);
+                vos.get(i).setTime(sjglls.get(i ).getPointTime() * 1000);
 
-                if (i < sjglls.size() && StringUtils.notEmp(sjglls.get(i).getPointTime())) {
+                if (i < sjglls.size() && StringUtils.notEmp(sjglls.get(i ).getPointTime())) {
 
                     if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
-                        temp = sjglls.get(i).getPointValueInDouble();
+                        temp = sjglls.get(i ).getPointValueInDouble();
                         if (Math.abs(temp) < 10000) {
                             vos.get(i).setValue1(StringUtils.round(temp, 2));// 实际功率
                         }
@@ -111,10 +94,10 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
             double temp = 0;
             for (int i = 0; i < vos.size(); i++) {
                 // vos.get(i).setTime(bzglls.get(i).getPointTime() * 1000);
-                if (i < bzglls.size() && StringUtils.notEmp(bzglls.get(i).getPointTime())) {
+                if (i < bzglls.size() && StringUtils.notEmp(bzglls.get(i ).getPointTime())) {
 
                     if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
-                        temp = bzglls.get(i).getPointValueInDouble();
+                        temp = bzglls.get(i ).getPointValueInDouble();
                         if (Math.abs(temp) < 10000) {
                             vos.get(i).setValue2(StringUtils.round(temp, 2));// 保证功率
                         }
@@ -135,11 +118,11 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
             int count = 0;
             double temp = 0;
             for (int i = 0; i < vos.size(); i++) {
-                vos.get(i).setTime(pjfsls.get(i).getPointTime() * 1000);
-                if (i < pjfsls.size() && StringUtils.notEmp(pjfsls.get(i).getPointTime())) {
+                vos.get(i).setTime(pjfsls.get(i ).getPointTime() * 1000);
+                if (i < pjfsls.size() && StringUtils.notEmp(pjfsls.get(i ).getPointTime())) {
 
                     if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
-                        temp = pjfsls.get(i).getPointValueInDouble();
+                        temp = pjfsls.get(i ).getPointValueInDouble();
                         vos.get(i).setValue3(StringUtils.round(temp, 2));// 风速
                         count++;
                     } else {
@@ -209,24 +192,9 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
 
         WindTurbineTestingPointAi fdl = map.get(Constant.TPOINT_WT_RFDL);
         WindTurbineTestingPointAi whss = map.get(Constant.RJXSSDL);
-        WindTurbineTestingPointAi whss3 = map.get(Constant.RJXSSDL_ZS);
-        WindTurbineTestingPointAi whss4 = map.get(Constant.RLZSSDL_ZS);   
         WindTurbineTestingPointAi gzss = map.get(Constant.RGZSSDL);
-        WindTurbineTestingPointAi gzss3 = map.get(Constant.RGZSSDL_ZS);
-        WindTurbineTestingPointAi gzss4 = map.get(Constant.NSZSSDL_ZS);
-        
         WindTurbineTestingPointAi xdss = map.get(Constant.RXDSSDL);
-        WindTurbineTestingPointAi xdss3 = map.get(Constant.RQFSSDL_ZS);
-        WindTurbineTestingPointAi xdss4 = map.get(Constant.RXDSSDL_ZS);
-        
-        
         WindTurbineTestingPointAi qfss = map.get(Constant.RQFSSDL);
-        WindTurbineTestingPointAi qfss3 = map.get(Constant.RDJSSDL_ZS);
-        WindTurbineTestingPointAi qfss4 = map.get(Constant.RSTSSDL_ZS);
-        WindTurbineTestingPointAi qfss5 = map.get(Constant.RXNSSDL_ZS);
-        WindTurbineTestingPointAi qfss6 = map.get(Constant.RQXSSDL_ZS);
-        
-        
         WindTurbineTestingPointAi fs = map.get(Constant.TPOINT_WT_FJSSFS);
 
         try {
@@ -279,13 +247,9 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
         try {
             if (null != whss) {
                 List<PointData> whssls = ednaApiUtil.getHistoryDatasSnap(whss, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
-                List<PointData> whssls3 = ednaApiUtil.getHistoryDatasSnap(whss3, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
-                List<PointData> whssls4 = ednaApiUtil.getHistoryDatasSnap(whss4, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
+
                 int count = 0;
                 double temp1 = 0;
-                double temp3 = 0;
-                double temp4 = 0;
-                
                 for (int i = 0; i < length; i++) {
 
                     if (i < whssls.size() && StringUtils.notEmp(whssls.get(i + 1).getPointTime())) {
@@ -293,14 +257,8 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
                         vos.get(i).setTime(whssls.get(i + 1).getPointTime() * 1000);
                         if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
                             if (i != 0) {
-                              //  temp1 = whssls.get(i + 1).getPointValueInDouble();
-                                temp3 = whssls3.get(i + 1).getPointValueInDouble();
-                                temp4 = whssls4.get(i + 1).getPointValueInDouble();
-                                temp1=temp3+temp4;
-                             //   double temp2 = whssls.get(i).getPointValueInDouble();
-                                double temp2  = whssls3.get(i).getPointValueInDouble()+whssls4.get(i).getPointValueInDouble();
-                                
-                                
+                                temp1 = whssls.get(i + 1).getPointValueInDouble();
+                                double temp2 = whssls.get(i).getPointValueInDouble();
                                 temp1 = temp1 - temp2;
 
                                 // temp1 = new BigDecimal(temp1).divide(new
@@ -311,10 +269,7 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
                                 count++;
 
                             } else {
-                            	
-                            	
-                            	
-                                temp1 = whssls3.get(i + 1).getPointValueInDouble()+ whssls4.get(i + 1).getPointValueInDouble();
+                                temp1 = whssls.get(i + 1).getPointValueInDouble();
                                 vos.get(i).setValue2(StringUtils.round(temp1, 2));// 维护损失电量
                             }
 
@@ -340,8 +295,6 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
         try {
             if (null != gzss) {
                 List<PointData> gzssls = ednaApiUtil.getHistoryDatasSnap(gzss, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
-                List<PointData> gzssls3 = ednaApiUtil.getHistoryDatasSnap(gzss3, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
-                List<PointData> gzssls4 = ednaApiUtil.getHistoryDatasSnap(gzss4, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
 
                 int count = 0;
                 double temp1 = 0;
@@ -352,8 +305,8 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
                         vos.get(i).setTime(gzssls.get(i + 1).getPointTime() * 1000);
                         if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
                             if (i != 0) {
-                                temp1 = gzssls3.get(i + 1).getPointValueInDouble()+gzssls4.get(i + 1).getPointValueInDouble();
-                                double temp2 = gzssls3.get(i).getPointValueInDouble()+gzssls4.get(i).getPointValueInDouble();
+                                temp1 = gzssls.get(i + 1).getPointValueInDouble();
+                                double temp2 = gzssls.get(i).getPointValueInDouble();
                                 temp1 = temp1 - temp2;
 
                                 // temp1 = new BigDecimal(temp1).divide(new
@@ -370,7 +323,7 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
                                 count++;
 
                             } else {
-                                temp1 = gzssls3.get(i + 1).getPointValueInDouble()+gzssls4.get(i + 1).getPointValueInDouble();
+                                temp1 = gzssls.get(i + 1).getPointValueInDouble();
                                 vos.get(i).setValue3(StringUtils.round(temp1, 2));// 维护损失电量
                             }
 
@@ -391,8 +344,6 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
         try {
             if (null != xdss) {
                 List<PointData> xdssls = ednaApiUtil.getHistoryDatasSnap(xdss, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
-                List<PointData> xdssls3 = ednaApiUtil.getHistoryDatasSnap(xdss3, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
-                List<PointData> xdssls4 = ednaApiUtil.getHistoryDatasSnap(xdss4, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
 
                 int count = 0;
                 double temp1 = 0;
@@ -403,8 +354,8 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
                         vos.get(i).setTime(xdssls.get(i + 1).getPointTime() * 1000);
                         if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
                             if (i != 0) {
-                                temp1 = xdssls3.get(i + 1).getPointValueInDouble()+xdssls4.get(i + 1).getPointValueInDouble();
-                                double temp2 = xdssls3.get(i).getPointValueInDouble()+xdssls4.get(i + 1).getPointValueInDouble();
+                                temp1 = xdssls.get(i + 1).getPointValueInDouble();
+                                double temp2 = xdssls.get(i).getPointValueInDouble();
                                 temp1 = temp1 - temp2;
 
                                 // temp1 = new BigDecimal(temp1).divide(new
@@ -421,7 +372,7 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
                                 count++;
 
                             } else {
-                                temp1 = xdssls3.get(i + 1).getPointValueInDouble()+xdssls4.get(i + 1).getPointValueInDouble();
+                                temp1 = xdssls.get(i + 1).getPointValueInDouble();
                                 vos.get(i).setValue4(StringUtils.round(temp1, 2));// 限电损失电量
                             }
 
@@ -442,10 +393,6 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
         try {
             if (null != qfss) {
                 List<PointData> qfssls = ednaApiUtil.getHistoryDatasSnap(qfss, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
-                List<PointData> qfssls3 = ednaApiUtil.getHistoryDatasSnap(qfss3, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
-                List<PointData> qfssls4 = ednaApiUtil.getHistoryDatasSnap(qfss4, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
-                List<PointData> qfssls5 = ednaApiUtil.getHistoryDatasSnap(qfss5, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
-                List<PointData> qfssls6 = ednaApiUtil.getHistoryDatasSnap(qfss6, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
 
                 int count = 0;
                 double temp1 = 0;
@@ -456,8 +403,8 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
                         vos.get(i).setTime(qfssls.get(i + 1).getPointTime() * 1000);
                         if (vos.get(i).getTime() <= DateUtils.now().getTime()) {
                             if (i != 0) {
-                                temp1 = qfssls3.get(i + 1).getPointValueInDouble()+qfssls4.get(i + 1).getPointValueInDouble()+qfssls5.get(i + 1).getPointValueInDouble()+qfssls6.get(i + 1).getPointValueInDouble();
-                                double temp2 = qfssls3.get(i).getPointValueInDouble()+qfssls4.get(i).getPointValueInDouble()+qfssls5.get(i).getPointValueInDouble()+qfssls6.get(i).getPointValueInDouble();
+                                temp1 = qfssls.get(i + 1).getPointValueInDouble();
+                                double temp2 = qfssls.get(i).getPointValueInDouble();
                                 temp1 = temp1 - temp2;
 
                                 // temp1 = new BigDecimal(temp1).divide(new
@@ -474,7 +421,7 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
                                 count++;
 
                             } else {
-                                temp1 = qfssls3.get(i + 1).getPointValueInDouble()+qfssls4.get(i + 1).getPointValueInDouble()+qfssls5.get(i + 1).getPointValueInDouble()+qfssls6.get(i + 1).getPointValueInDouble();
+                                temp1 = qfssls.get(i + 1).getPointValueInDouble();
                                 vos.get(i).setValue5(StringUtils.round(temp1, 2));// 欠发损失电量
                             }
 
@@ -552,29 +499,28 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
         List<Long> to = new ArrayList<Long>();
         List<Integer> ztls = new ArrayList<Integer>();
         Date endDate = sdfs.parse(sdf.format(DateUtils.addDays(recorddate, 1)) + " 00:00:00");
-        Date beginDate = sdfs.parse(sdf.format(recorddate) + " 01:00:00");
+        Date beginDate = sdfs.parse(sdf.format(recorddate) + " 00:00:00");
 
-        int length = 230;
+        int length = 240;
         String plotBands = null;
         StringBuilder sb = new StringBuilder("");
         Map<String, WindTurbineTestingPointAi> map = CacheContext.wtpAimap.get(wpId);
 
         WindTurbineTestingPointAi fjzt = map.get(Constant.FJZT);
         Map<String, Map<String, Double>> plotBandMap = new HashMap<String, Map<String, Double>>();
-        
+        try {
 
             if (null != fjzt) {
                 List<PointData> fjztls = ednaApiUtil.getHistoryDatasSnap(fjzt, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 360L);
 
+              
                 for (int i = 0; i < fjztls.size(); i++) {
-                    if (i < fjztls.size() - 1) {
+                    if (i < fjztls.size() ) {
                         from.add(fjztls.get(i).getPointTime() * 1000);
                         ztls.add(Double.valueOf(fjztls.get(i).getPointValueInDouble()).intValue());
                     }
-                    if (i != 0) {
-                        to.add(fjztls.get(i).getPointTime() * 1000);
-
-                    }
+                    
+                    to.add(fjztls.get(i).getPointTime() * 1000);
 
                 }
 
@@ -582,71 +528,69 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
 
             Integer state = ztls.get(0);
             double begin = -1;
-            double end = 0.1;
             int beginnum = 0;
             int endnum = 1;
             StringBuilder temp = new StringBuilder();
-            int length1 = 229;
-            for (int i = 0; i < length1; i++) {
+            int lastzt=0;
+            int finalzt=0;
+            double end = 0;
+			for (int i = 0; i < length; i++) {
 
                 Integer zt = ztls.get(i);
                 if (i < length - 1) {
-                    zt = ztls.get(i);
+                    zt = ztls.get(i + 1);
                 }
 
                 if (StringUtils.notEmp(zt)) {
                     if (zt != state) {
+                    	lastzt=state;
                         sb.append("{");
                         sb.append("id: '").append(i).append("',");
                         sb.append(getColor(temp, state));
                         state = zt;
-                        sb.append("from: ").append(begin).append(",");
+                        sb.append("from: ").append(StringUtils.round(begin, 2)).append(",");
                         Date begindate = new Date(from.get(beginnum));
                         if (i != 0) {
                             begin = end;
                             beginnum = endnum;
                             end = end + 0.1;
                             endnum++;
-                            if(endnum>=229){
-                            	endnum=228;
-                            }
                         } else {
                             begin = 0.0;
                         }
-                        sb.append("to: ").append(end);
+                        sb.append("to: ").append(StringUtils.round(end, 2));
                         sb.append(", events: { click: function (e) {plotBandAjax(" + i + ");}}},");
 
                         Date enddate = new Date(to.get(endnum));
 
-                        plotBandMap.put(String.valueOf(i), getPlotBand(map, begindate, enddate));
-
+                        plotBandMap.put(String.valueOf(i), getPlotBand(map, begindate, enddate,lastzt));
+                        beginnum++;
                     } else {
                         end = end + 0.1;
                         endnum++;
-                        if(endnum>=229){
-                        	endnum=228;
-                        }
                     }
 
                 }
+                finalzt=zt;
 
             }
             sb.append("{");
-            sb.append("id: '230' ,");
+            sb.append("id: '240' ,");
             sb.append(getColor(temp, state));
-            sb.append("from: ").append(begin).append(",");
-            sb.append("to: ").append(end);
-            sb.append(", events: { click: function (e) {plotBandAjax(230); }}},");
+            sb.append("from: ").append(StringUtils.round(begin, 2)).append(",");
+            sb.append("to: ").append(StringUtils.round(end, 2));
+            sb.append(", events: { click: function (e) {plotBandAjax(240); }}},");
             Date begindate = new Date(from.get(beginnum));
-            Long da = to.get(228);
-            Date enddate = new Date(da);
-            plotBandMap.put(String.valueOf(230), getPlotBand(map, begindate, enddate));
+            Date enddate = new Date(to.get(239));
+            plotBandMap.put(String.valueOf(240), getPlotBand(map, begindate, enddate,finalzt));
             // ////////////////////////////////////////////////
 
             if (sb.length() >= 1) {
                 plotBands = sb.substring(0, sb.length() - 1);
             }
-        
+		} catch (Exception ex) {
+			ex.printStackTrace();
+        }
         request.getSession().setAttribute("plotBandMap", plotBandMap);
 
         // sb.append("]");
@@ -654,7 +598,7 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
         return plotBands;
     }
 
-    public Map<String, Double> getPlotBand(Map<String, WindTurbineTestingPointAi> map, Date begindate, Date enddate) throws Exception {
+    public Map<String, Double> getPlotBand(Map<String, WindTurbineTestingPointAi> map, Date begindate, Date enddate,int zt) throws Exception {
         WindTurbineTestingPointAi fdlAi = map.get(Constant.TPOINT_WT_RFDL);
         WindTurbineTestingPointAi fsAi = map.get(Constant.TPOINT_WT_FJSSFS);
         WindTurbineTestingPointAi llfdlAi = map.get(Constant.TPOINT_WT_RFDLBZ);
@@ -667,11 +611,15 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
         double beginfdl = 0.0;
         double endfdl = 0.0;
         double fdl = 0.0;
-        List<PointData> beginfdlls = ednaApiUtil.getHistoryDatasSnap(fdlAi, begindate.getTime() / 1000, begindate.getTime() / 1000, (long) 1, 1L);
+		List<PointData> beginfdlls = ednaApiUtil.getHistoryDatasSnap(fdlAi,
+				begindate.getTime() / 1000, begindate.getTime() / 1000+10,
+				(long) 1, 1L);
         if (!beginfdlls.isEmpty()) {
             beginfdl = beginfdlls.get(0).getPointValueInDouble();
         }
-        List<PointData> endfdlls = ednaApiUtil.getHistoryDatasSnap(fdlAi, enddate.getTime() / 1000, enddate.getTime() / 1000, (long) 1, 1L);
+		List<PointData> endfdlls = ednaApiUtil.getHistoryDatasSnap(fdlAi,
+				enddate.getTime() / 1000, enddate.getTime() / 1000+10, (long) 1,
+				1L);
         if (!endfdlls.isEmpty()) {
             endfdl = endfdlls.get(0).getPointValueInDouble();
         }
@@ -682,11 +630,15 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
         double beginllfdl = 0.0;
         double endllfdl = 0.0;
         double llfdl = 0.0;
-        List<PointData> beginllfdls = ednaApiUtil.getHistoryDatasSnap(llfdlAi, begindate.getTime() / 1000, begindate.getTime() / 1000, (long) 1, 1L);
+		List<PointData> beginllfdls = ednaApiUtil.getHistoryDatasSnap(llfdlAi,
+				begindate.getTime() / 1000, begindate.getTime() / 1000+10,
+				(long) 1, 1L);
         if (!beginllfdls.isEmpty()) {
             beginllfdl = beginllfdls.get(0).getPointValueInDouble();
         }
-        List<PointData> endllfdls = ednaApiUtil.getHistoryDatasSnap(llfdlAi, enddate.getTime() / 1000, enddate.getTime() / 1000, (long) 1, 1L);
+		List<PointData> endllfdls = ednaApiUtil.getHistoryDatasSnap(llfdlAi,
+				enddate.getTime() / 1000, enddate.getTime() / 1000+10, (long) 1,
+				1L);
         if (!endllfdls.isEmpty()) {
             endllfdl = endllfdls.get(0).getPointValueInDouble();
         }
@@ -698,18 +650,25 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
 
         // 风机状态
         double fjzt = 0.0;
-        List<PointData> fjztls = ednaApiUtil.getHistoryDatasSnap(fjztAi, begindate.getTime() / 1000, begindate.getTime() / 1000, (long) 1, 1L);
-        if (!fjztls.isEmpty()) {
-            fjzt = fjztls.get(0).getPointValueInDouble();
-            tempmap.put("fjzt", fjzt);
-
-        }
-
+//		List<PointData> fjztls = ednaApiUtil.getHistoryDatasSnap(fjztAi,
+//				begindate.getTime() / 1000+2, enddate.getTime() / 1000+10, (long) 1,
+//				3600L);
+//        if (!fjztls.isEmpty()) {
+//            fjzt = fjztls.get(0).getPointValueInDouble();
+//            tempmap.put("fjzt", fjzt);
+//
+//        }
+        fjzt=Double.valueOf(zt);
+        tempmap.put("fjzt", fjzt);
         // 风速
         double fs = 0.0;
-        Double time1 = new BigDecimal(DateUtils.minutesDiff(begindate, enddate)).divide(new BigDecimal(6), 2, RoundingMode.HALF_EVEN).doubleValue();
+		Double time1 = new BigDecimal(DateUtils.minutesDiff(begindate, enddate))
+				.divide(new BigDecimal(60), 2, RoundingMode.HALF_EVEN)
+				.doubleValue();
 
-        List<PointData> fsls = ednaApiUtil.getHistoryDatasSnap(fsAi, begindate.getTime() / 1000, enddate.getTime() / 1000, (long) time1.longValue(), 360L);
+		List<PointData> fsls = ednaApiUtil.getHistoryDatasSnap(fsAi,
+				begindate.getTime() / 1000, enddate.getTime() / 1000,
+				(long) time1.longValue(), 60L);
         if (!fsls.isEmpty()) {
             for (PointData po : fsls) {
                 fs = fs + po.getPointValueInDouble();
@@ -717,13 +676,19 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
             if (time1 == 0) {
                 time1 = 1.0;
             }
-            double fstemp = new BigDecimal(fs).divide(new BigDecimal(time1.intValue()), 2, RoundingMode.HALF_EVEN).doubleValue();
+			double fstemp = new BigDecimal(fs).divide(
+					new BigDecimal(time1.doubleValue()), 2,
+					RoundingMode.HALF_EVEN).doubleValue();
             tempmap.put("fs", StringUtils.round(fstemp, 2));
         }
         // 功率
         double gl = 0.0;
-        Double time2 = new BigDecimal(DateUtils.minutesDiff(begindate, enddate)).divide(new BigDecimal(6), 2, RoundingMode.HALF_EVEN).doubleValue();
-        List<PointData> glls = ednaApiUtil.getHistoryDatasSnap(glAi, begindate.getTime() / 1000, enddate.getTime() / 1000, (long) time2.longValue(), 360L);
+		Double time2 = new BigDecimal(DateUtils.minutesDiff(begindate, enddate))
+				.divide(new BigDecimal(60), 2, RoundingMode.HALF_EVEN)
+				.doubleValue();
+		List<PointData> glls = ednaApiUtil.getHistoryDatasSnap(glAi,
+				begindate.getTime() / 1000, enddate.getTime() / 1000,
+				(long) time2.longValue(), 60L);
         if (!glls.isEmpty()) {
             for (PointData po : glls) {
                 gl = gl + po.getPointValueInDouble();
@@ -731,7 +696,9 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
             if (time2 == 0) {
                 time2 = 1.0;
             }
-            double gltemp = new BigDecimal(gl).divide(new BigDecimal(time2.intValue()), 2, RoundingMode.HALF_EVEN).doubleValue();
+			double gltemp = new BigDecimal(gl).divide(
+					new BigDecimal(time2.doubleValue()), 2,
+					RoundingMode.HALF_EVEN).doubleValue();
             tempmap.put("gl", StringUtils.round(gltemp, 2));
         }
         // 时长
@@ -744,7 +711,17 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
             tempmap.put("fdl", 0.0);
             tempmap.put("gl", 0.0);
         }
-        tempmap.put("ssdl", StringUtils.round(llfdl - fdl, 2));
+        double ssdl=StringUtils.round(llfdl - fdl, 2);
+        
+        if(llfdl<fdl)
+        {
+        	ssdl=0;
+        }
+        if(ssdl<0)
+        {
+        	ssdl=0;
+        }
+        tempmap.put("ssdl", ssdl);
         tempmap.put("ks", Double.valueOf(begindate.getTime()));
         tempmap.put("js", Double.valueOf(enddate.getTime()));
         return tempmap;
@@ -767,7 +744,7 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
                 break;
             case 3:
                 temp.setLength(0);
-                temp.append("color: '#DDDDDD',");
+                temp.append("color: '#FFFFFF',");
                 break;
             case 4:
                 temp.setLength(0);
@@ -787,206 +764,4 @@ public class WindturbinegoodnessService extends GenericJdbcDao<Windturbinegoodne
         }
         return String.valueOf(temp);
     }
-    
-    
-    
-    public List<WindturbineanalysisdayVo> getWindturbineanalysisdayVoList(List<Windturbineanalysisday> vos,
-    		Map<String, Object> params,QueryOrder orders){
-    	List<WindturbineanalysisdayVo> vols=new ArrayList<WindturbineanalysisdayVo>();
-    	if (null != vos && !vos.isEmpty()) {
-			double c4=0.0;
-			double c7=0.0;
-			double c10=0.0;
-			double c13=0.0;
-			double c16=0.0;
-			double c19=0.0;
-			double c22=0.0;
-			double c25=0.0;
-			double c28=0.0;
-			double c31=0.0;
-			double c34=0.0;
-			double c37=0.0;
-			double c40=0.0;
-			double c43=0.0;
-			double c46=0.0;
-			double c49=0.0;
-			double c52=0.0;
-			double c55=0.0;
-			double c58=0.0;
-			
-			for(Windturbineanalysisday po:vos)
-			{
-				WindturbineanalysisdayVo vo=new WindturbineanalysisdayVo();
-				vo.setId(po.getId());
-				vo.setWindturbineid(po.getWindturbineid());
-				if(CacheContext.wtmap.containsKey(po.getWindturbineid()))
-				{
-					Windturbine wt=CacheContext.wtmap.get(po.getWindturbineid());
-					vo.setCode(wt.getCode());
-				}
-				vo.setRecorddate(po.getRecorddate());
-				vo.setC1(po.getC1());
-				vo.setC2(po.getC2());
-				vo.setC3(po.getC3());
-				
-				if(StringUtils.notEmp(po.getWindturbineid()))
-				{
-					params.put("windturbineid",po.getWindturbineid());
-				}
-
-				if(StringUtils.notEmp(po.getRecorddate()))
-				{
-					params.put("@recorddate", DateUtils.truncate(po.getRecorddate()));
-				}
-				if(StringUtils.notEmp(po.getRecorddate()))
-				{
-					params.put("$recorddate", DateUtils.truncate(po.getRecorddate()));
-				}
-				orders=new QueryOrder("recorddate", "desc");
-				List<Windturbineinfoday3> vos2 = windturbineinfoday3Service.findByProperties(params, orders);
-				vo.setC4(vos2.get(0).getDaydl2());
-				c4+=vos2.get(0).getDaydl2();
-			//	vo.setC4(po.getC4());  //日发电量
-				vo.setC5(po.getC5());
-				vo.setC6(po.getC6());
-			//	vo.setC7(po.getC7());  //理论
-				vo.setC7(vos2.get(0).getDaynhdl());
-				c7+=vos2.get(0).getDaynhdl();
-				vo.setC8(po.getC8());
-				vo.setC9(po.getC9());
-				vo.setC10(po.getC10());
-				c10+=po.getC10();
-				vo.setC11(po.getC11());
-				vo.setC12(po.getC12());
-				List<Windturbineinfoday> vos3 = windturbineInfoDayService.findByProperties(params, orders);
-				vo.setC13(vos3.get(0).getRunhours());
-				c13+=vos3.get(0).getRunhours();
-			//	vo.setC13(po.getC13()); //日运行小时
-				vo.setC14(po.getC14());
-				vo.setC15(po.getC15());
-				vo.setC16(vos3.get(0).getStophours());
-				c16+=vos3.get(0).getStophours();
-			//	vo.setC16(po.getC16()); //日待机小时
-				vo.setC17(po.getC17());
-				vo.setC18(po.getC18());
-				vo.setC19(vos3.get(0).getFaulthours());
-				c19+=vos3.get(0).getFaulthours();
-			//	vo.setC19(po.getC19());//日故障小时
-				vo.setC20(po.getC20());
-				vo.setC21(po.getC21());
-				vo.setC22(vos3.get(0).getMaintainhours());
-				c22+=vos3.get(0).getMaintainhours();
-			//	vo.setC22(po.getC22());//日维护小时
-				vo.setC23(po.getC23());
-				vo.setC24(po.getC24());
-				vo.setC25(vos3.get(0).getInterrupthours());
-				c25+=vos3.get(0).getInterrupthours();
-			//	vo.setC25(po.getC25());//日中断小时
-				vo.setC26(po.getC26());
-				vo.setC27(po.getC27());
-				vo.setC28(po.getC28());
-				c28+=po.getC28();
-				vo.setC29(po.getC29());
-				vo.setC30(po.getC30());
-			//	vo.setC31(po.getC31());   //损失
-				vo.setC31(vos2.get(0).getDaynhgzssdl()+vos2.get(0).getDaynhwhssdl()+vos2.get(0).getDaynhxdssdl()+vos2.get(0).getDaynhqfdl()+vos2.get(0).getDaynhcfdl());
-				c31+=vos2.get(0).getDaynhgzssdl()+vos2.get(0).getDaynhwhssdl()+vos2.get(0).getDaynhxdssdl()+vos2.get(0).getDaynhqfdl()+vos2.get(0).getDaynhcfdl();
-				vo.setC32(po.getC32());
-				vo.setC33(po.getC33());
-				vo.setC34(po.getC34());
-				c34+=po.getC34();
-				vo.setC35(po.getC35());
-				vo.setC36(po.getC36());
-				vo.setC37(po.getC37());
-				c37+=po.getC37();
-				vo.setC38(po.getC38());
-				vo.setC39(po.getC39());
-				vo.setC40(po.getC40());
-				c40+=po.getC40();
-				vo.setC41(po.getC41());
-				vo.setC42(po.getC42());
-				vo.setC43(po.getC43());
-				c43+=po.getC43();
-				vo.setC44(po.getC44());
-				vo.setC45(po.getC45());
-				vo.setC46(po.getC46());
-				c46+=po.getC46();
-				vo.setC47(po.getC47());
-				vo.setC48(po.getC48());
-				vo.setC49(po.getC49());
-				c49+=po.getC49();
-				vo.setC50(po.getC50());
-				vo.setC51(po.getC51());
-				vo.setC52(po.getC52());
-				c52+=po.getC52();
-				vo.setC53(po.getC53());
-				vo.setC54(po.getC54());
-				vo.setC55(po.getC55());
-				c55+=po.getC55();
-				vo.setC56(po.getC56());
-				vo.setC57(po.getC57());
-				vo.setC58(po.getC58());
-				c58+=po.getC58();
-				vo.setC59(po.getC59());
-				vo.setC60(po.getC60());
-				vols.add(vo);
-			}
-			WindturbineanalysisdayVo  newVo= new WindturbineanalysisdayVo();
-			newVo.setRecorddate(null);
-			newVo.setWindturbineid(null);
-			newVo.setCode("合计");
-			newVo.setC4(c4);
-			newVo.setC7(c7);
-			newVo.setC10(c10);
-			newVo.setC13(c13);
-			newVo.setC16(c16);
-			newVo.setC19(c19);
-			newVo.setC22(c22);
-			newVo.setC25(c25);
-			newVo.setC28(c28);
-			newVo.setC31(c31);
-			newVo.setC34(c34);
-			newVo.setC37(c37);
-			newVo.setC40(c40);
-			newVo.setC43(c43);
-			newVo.setC46(c46);
-			newVo.setC49(c49);
-			newVo.setC52(c52);
-			newVo.setC55(c55);
-			newVo.setC58(c58);
-			vols.add(newVo);
-			return vols;
-		} else {
-			return new ArrayList<WindturbineanalysisdayVo>();
-		}
-    	
-    	
-    }
-    List<Object> objs = new ArrayList<Object>();
-    public Map<String,Double> getWindturbineinfo3Speed(String windfarm,Date begin,Date end){
-    	List<Object> objs = new ArrayList<Object>();
-		objs.add(begin);
-		objs.add(end);
-		objs.add(windfarm);
-    	String sql = "select sum(t1.dayspeed)/count(t1.windturbineid) speed,t1.windturbineid from windturbineinfoday3 t1 where  t1.recorddate>=? " +
-				"and t1.recorddate<=? and t1.windpowerstationid=? group by t1.windturbineid ";
-		
-		@SuppressWarnings("unchecked")
-		List<StatisticalAnalysisTopVo> newVolist = operate.query(sql, objs.toArray(new Object[0]), new RowMapper() {
-			
-			@Override
-			public Object mapRow(ResultSet rs, int arg1) throws SQLException {
-				StatisticalAnalysisTopVo newVo = new StatisticalAnalysisTopVo();
-				newVo.setSpeed(rs.getBigDecimal("speed").setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
-				newVo.setWindturbine(rs.getString("windturbineid"));
-				return newVo;
-			}
-		});
-		Map<String,Double> newSpeedMap = new HashMap<String, Double>();
-		for(int i=0;i<newVolist.size();i++){
-			newSpeedMap.put(newVolist.get(i).getWindturbine(), newVolist.get(i).getSpeed());
-		}
-    	
-		return newSpeedMap;
-    }
 }