12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172 |
- package com.gyee.runeconomy.service;
- import com.gyee.common.util.DateUtils;
- import com.gyee.common.vo.benchmark.ValueVo;
- import com.gyee.runeconomy.model.auto.ProEconWpwindDayInfo;
- import com.gyee.runeconomy.service.auto.IProEconWpwindDayInfoService;
- import com.gyee.runeconomy.util.StringUtils;
- import org.springframework.stereotype.Service;
- import javax.annotation.Resource;
- import java.util.*;
- import java.util.stream.Collectors;
- @Service
- public class WpwindDayInfoService {
- @Resource
- private IProEconWpwindDayInfoService proEconWpwindDayInfoService;
- private String jfplday;
- private String jfplmonth;
- private String jfplyear;
- public List<ProEconWpwindDayInfo> getWindpowerstationthewindinfo(String wpId, Date recorddate) {
- List<ProEconWpwindDayInfo> list =new ArrayList<>();
- if (StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate)) {
- list = proEconWpwindDayInfoService.list().stream().filter(i->
- i.getWindpowerstationId().equals(wpId)
- && i.getRecordDate().compareTo(DateUtils.truncate(recorddate)) ==0
- ).collect(Collectors.toList());
- }
- return list;
- }
- public Map<String, Object> wprfxpl(String wpId, String recorddate) {
- Map<String, Object> map = new HashMap<String, Object>();
- List<ValueVo> vos = new ArrayList<ValueVo>();
- if (StringUtils.notEmp(recorddate) && StringUtils.notEmp(wpId)) {
- Date date = DateUtils.parseDate(recorddate);
- List<ProEconWpwindDayInfo> wtdls = getWindpowerstationthewindinfo(wpId, date);
- if (!wtdls.isEmpty()) {
- ProEconWpwindDayInfo winfo = wtdls.get(0);
- int cb = (int) winfo.getCb().intValue();
- int cd = (int) winfo.getCd().intValue();
- int cg = (int) winfo.getCg().intValue();
- jfplday = "静风频率为" + cb;
- jfplmonth = "静风频率为" + cd;
- jfplyear = "静风频率为" + cg;
- for (int i = 0; i < 16; i++) {
- ValueVo vo = new ValueVo();
- double temp1=0.0;
- double temp2=0.0;
- double temp3=0.0;
- switch (i) {
- case 0:
- temp1=null !=winfo.getN4()?winfo.getN4():0.0;
- temp2=null !=winfo.getN()?winfo.getN():0.0;
- temp3=null !=winfo.getN4()?winfo.getN4():0.0;
- vo.setName("N (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 1:
- temp1=null !=winfo.getNne4()?winfo.getNne4():0.0;
- temp2=null !=winfo.getNne()?winfo.getNne():0.0;
- temp3=null !=winfo.getNne4()?winfo.getNne4():0.0;
- vo.setName("NNE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 2:
- temp1=null !=winfo.getNe4()?winfo.getNe4():0.0;
- temp2=null !=winfo.getNe()?winfo.getNe():0.0;
- temp3=null !=winfo.getNe4()?winfo.getNe4():0.0;
- vo.setName("NE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 3:
- temp1=null !=winfo.getEne4()?winfo.getEne4():0.0;
- temp2=null !=winfo.getEne()?winfo.getEne():0.0;
- temp3=null !=winfo.getEne4()?winfo.getEne4():0.0;
- vo.setName("ENE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 4:
- temp1=null !=winfo.getE4()?winfo.getE4():0.0;
- temp2=null !=winfo.getE()?winfo.getE():0.0;
- temp3=null !=winfo.getE4()?winfo.getE4():0.0;
- vo.setName("E (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 5:
- temp1=null !=winfo.getEse4()?winfo.getEse4():0.0;
- temp2=null !=winfo.getEse()?winfo.getEse():0.0;
- temp3=null !=winfo.getEse4()?winfo.getEse4():0.0;
- vo.setName("ESE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 6:
- temp1=null !=winfo.getSe4()?winfo.getSe4():0.0;
- temp2=null !=winfo.getSe()?winfo.getSe():0.0;
- temp3=null !=winfo.getSe4()?winfo.getSe4():0.0;
- vo.setName("SE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 7:
- temp1=null !=winfo.getSse4()?winfo.getSse4():0.0;
- temp2=null !=winfo.getSse()?winfo.getSse():0.0;
- temp3=null !=winfo.getSse4()?winfo.getSse4():0.0;
- vo.setName("SSE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 8:
- temp1=null !=winfo.getS4()?winfo.getS4():0.0;
- temp2=null !=winfo.getS()?winfo.getS():0.0;
- temp3=null !=winfo.getS4()?winfo.getS4():0.0;
- vo.setName("S (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 9:
- temp1=null !=winfo.getSsw4()?winfo.getSsw4():0.0;
- temp2=null !=winfo.getSsw()?winfo.getSsw():0.0;
- temp3=null !=winfo.getSsw4()?winfo.getSsw4():0.0;
- vo.setName("SSW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 10:
- temp1=null !=winfo.getSw4()?winfo.getSw4():0.0;
- temp2=null !=winfo.getSw()?winfo.getSw():0.0;
- temp3=null !=winfo.getSw4()?winfo.getSw4():0.0;
- vo.setName("SW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 11:
- temp1=null !=winfo.getWsw4()?winfo.getWsw4():0.0;
- temp2=null !=winfo.getWsw()?winfo.getWsw():0.0;
- temp3=null !=winfo.getWsw4()?winfo.getWsw4():0.0;
- vo.setName("WSW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 12:
- temp1=null !=winfo.getW4()?winfo.getW4():0.0;
- temp2=null !=winfo.getW()?winfo.getW():0.0;
- temp3=null !=winfo.getW4()?winfo.getW4():0.0;
- vo.setName("W (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 13:
- temp1=null !=winfo.getWnw4()?winfo.getWnw4():0.0;
- temp2=null !=winfo.getWnw()?winfo.getWnw():0.0;
- temp3=null !=winfo.getWnw4()?winfo.getWnw4():0.0;
- vo.setName("WNW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 14:
- temp1=null !=winfo.getNw4()?winfo.getNw4():0.0;
- temp2=null !=winfo.getNw()?winfo.getNw():0.0;
- temp3=null !=winfo.getNw4()?winfo.getNw4():0.0;
- vo.setName("NW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 15:
- temp1=null !=winfo.getNnw4()?winfo.getNnw4():0.0;
- temp2=null !=winfo.getNnw()?winfo.getNnw():0.0;
- temp3=null !=winfo.getNnw4()?winfo.getNnw4():0.0;
- vo.setName("NNW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- default:
- break;
- }
- vos.add(vo);
- }
- }
- map.put("jfpl", jfplday);
- map.put("data", vos);
- }
- return map;
- }
- public Map<String, Object> wpyfxpl(String wpId, String recorddate) {
- Map<String, Object> map = new HashMap<String, Object>();
- List<ValueVo> vos = new ArrayList<ValueVo>();
- if (StringUtils.notEmp(recorddate) && StringUtils.notEmp(wpId)) {
- Date date = DateUtils.parseDate(recorddate);
- List<ProEconWpwindDayInfo> wtdls =getWindpowerstationthewindinfo(wpId, date);
- if (!wtdls.isEmpty()) {
- ProEconWpwindDayInfo winfo = wtdls.get(0);
- int cb = (int) winfo.getCb().intValue();
- int cd = (int) winfo.getCd().intValue();
- int cg = (int) winfo.getCg().intValue();
- jfplday = "静风频率为" + cb;
- jfplmonth = "静风频率为" + cd;
- jfplyear = "静风频率为" + cg;
- for (int i = 0; i < 16; i++) {
- ValueVo vo = new ValueVo();
- double temp1=0.0;
- double temp2=0.0;
- double temp3=0.0;
- switch (i) {
- case 0:
- temp1=null !=winfo.getN10()?winfo.getN10():0.0;
- temp2=null !=winfo.getN7()?winfo.getN7():0.0;
- temp3=null !=winfo.getN10()?winfo.getN10():0.0;
- vo.setName("N (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 1:
- temp1=null !=winfo.getNne10()?winfo.getNne10():0.0;
- temp2=null !=winfo.getNne7()?winfo.getNne7():0.0;
- temp3=null !=winfo.getNne10()?winfo.getNne10():0.0;
- vo.setName("NNE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 2:
- temp1=null !=winfo.getNe10()?winfo.getNe10():0.0;
- temp2=null !=winfo.getNe7()?winfo.getNe7():0.0;
- temp3=null !=winfo.getNe10()?winfo.getNe10():0.0;
- vo.setName("NE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 3:
- temp1=null !=winfo.getEne10()?winfo.getEne10():0.0;
- temp2=null !=winfo.getEne7()?winfo.getEne7():0.0;
- temp3=null !=winfo.getEne10()?winfo.getEne10():0.0;
- vo.setName("ENE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 4:
- temp1=null !=winfo.getE10()?winfo.getE10():0.0;
- temp2=null !=winfo.getE7()?winfo.getE7():0.0;
- temp3=null !=winfo.getE10()?winfo.getE10():0.0;
- vo.setName("E (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 5:
- temp1=null !=winfo.getEse10()?winfo.getEse10():0.0;
- temp2=null !=winfo.getEse7()?winfo.getEse7():0.0;
- temp3=null !=winfo.getEse10()?winfo.getEse10():0.0;
- vo.setName("ESE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 6:
- temp1=null !=winfo.getSe10()?winfo.getSe10():0.0;
- temp2=null !=winfo.getSe7()?winfo.getSe7():0.0;
- temp3=null !=winfo.getSe10()?winfo.getSe10():0.0;
- vo.setName("SE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 7:
- temp1=null !=winfo.getSse10()?winfo.getSse10():0.0;
- temp2=null !=winfo.getSse7()?winfo.getSse7():0.0;
- temp3=null !=winfo.getSse10()?winfo.getSse10():0.0;
- vo.setName("SSE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 8:
- temp1=null !=winfo.getS10()?winfo.getS10():0.0;
- temp2=null !=winfo.getS7()?winfo.getS7():0.0;
- temp3=null !=winfo.getS10()?winfo.getS10():0.0;
- vo.setName("S (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 9:
- temp1=null !=winfo.getSsw10()?winfo.getSsw10():0.0;
- temp2=null !=winfo.getSsw7()?winfo.getSsw7():0.0;
- temp3=null !=winfo.getSsw10()?winfo.getSsw10():0.0;
- vo.setName("SSW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 10:
- temp1=null !=winfo.getSw10()?winfo.getSw10():0.0;
- temp2=null !=winfo.getSw7()?winfo.getSw7():0.0;
- temp3=null !=winfo.getSw10()?winfo.getSw10():0.0;
- vo.setName("SW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 11:
- temp1=null !=winfo.getWsw10()?winfo.getWsw10():0.0;
- temp2=null !=winfo.getWsw7()?winfo.getWsw7():0.0;
- temp3=null !=winfo.getWsw10()?winfo.getWsw10():0.0;
- vo.setName("WSW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 12:
- temp1=null !=winfo.getW10()?winfo.getW10():0.0;
- temp2=null !=winfo.getW7()?winfo.getW7():0.0;
- temp3=null !=winfo.getW10()?winfo.getW10():0.0;
- vo.setName("W (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 13:
- temp1=null !=winfo.getWnw10()?winfo.getWnw10():0.0;
- temp2=null !=winfo.getWnw7()?winfo.getWnw7():0.0;
- temp3=null !=winfo.getWnw10()?winfo.getWnw10():0.0;
- vo.setName("WNW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 14:
- temp1=null !=winfo.getNw10()?winfo.getNw10():0.0;
- temp2=null !=winfo.getNw7()?winfo.getNw7():0.0;
- temp3=null !=winfo.getNw10()?winfo.getNw10():0.0;
- vo.setName("NW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 15:
- temp1=null !=winfo.getNnw10()?winfo.getNnw10():0.0;
- temp2=null !=winfo.getNnw7()?winfo.getNnw7():0.0;
- temp3=null !=winfo.getNnw10()?winfo.getNnw10():0.0;
- vo.setName("NNW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- default:
- break;
- }
- vos.add(vo);
- }
- }
- map.put("jfpl", jfplmonth);
- map.put("data", vos);
- }
- return map;
- }
- public Map<String, Object> wpnfxpl(String wpId, String recorddate) {
- Map<String, Object> map = new HashMap<String, Object>();
- List<ValueVo> vos = new ArrayList<ValueVo>();
- if (StringUtils.notEmp(recorddate) && StringUtils.notEmp(wpId)) {
- Date date = DateUtils.parseDate(recorddate);
- List<ProEconWpwindDayInfo> wtdls = getWindpowerstationthewindinfo(wpId, date);
- if (!wtdls.isEmpty()) {
- ProEconWpwindDayInfo winfo = wtdls.get(0);
- int cb = (int) winfo.getCb().intValue();
- int cd = (int) winfo.getCd().intValue();
- int cg = (int) winfo.getCg().intValue();
- jfplday = "静风频率为" + cb;
- jfplmonth = "静风频率为" + cd;
- jfplyear = "静风频率为" + cg;
- for (int i = 0; i < 16; i++) {
- ValueVo vo = new ValueVo();
- double temp1=0.0;
- double temp2=0.0;
- double temp3=0.0;
- switch (i) {
- case 0:
- temp1=null !=winfo.getN16()?winfo.getN16():0.0;
- temp2=null !=winfo.getN13()?winfo.getN13():0.0;
- temp3=null !=winfo.getN16()?winfo.getN16():0.0;
- vo.setName("N (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 1:
- temp1=null !=winfo.getNne16()?winfo.getNne16():0.0;
- temp2=null !=winfo.getNne13()?winfo.getNne13():0.0;
- temp3=null !=winfo.getNne16()?winfo.getNne16():0.0;
- vo.setName("NNE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 2:
- temp1=null !=winfo.getNe16()?winfo.getNe16():0.0;
- temp2=null !=winfo.getNe13()?winfo.getNe13():0.0;
- temp3=null !=winfo.getNe16()?winfo.getNe16():0.0;
- vo.setName("NE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 3:
- temp1=null !=winfo.getEne16()?winfo.getEne16():0.0;
- temp2=null !=winfo.getEne13()?winfo.getEne13():0.0;
- temp3=null !=winfo.getEne16()?winfo.getEne16():0.0;
- vo.setName("ENE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 4:
- temp1=null !=winfo.getE16()?winfo.getE16():0.0;
- temp2=null !=winfo.getE13()?winfo.getE13():0.0;
- temp3=null !=winfo.getE16()?winfo.getE16():0.0;
- vo.setName("E (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 5:
- temp1=null !=winfo.getEse16()?winfo.getEse16():0.0;
- temp2=null !=winfo.getEse13()?winfo.getEse13():0.0;
- temp3=null !=winfo.getEse16()?winfo.getEse16():0.0;
- vo.setName("ESE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 6:
- temp1=null !=winfo.getSe16()?winfo.getSe16():0.0;
- temp2=null !=winfo.getSe13()?winfo.getSe13():0.0;
- temp3=null !=winfo.getSe16()?winfo.getSe16():0.0;
- vo.setName("SE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 7:
- temp1=null !=winfo.getSse16()?winfo.getSse16():0.0;
- temp2=null !=winfo.getSse13()?winfo.getSse13():0.0;
- temp3=null !=winfo.getSse16()?winfo.getSse16():0.0;
- vo.setName("SSE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 8:
- temp1=null !=winfo.getS16()?winfo.getS16():0.0;
- temp2=null !=winfo.getS13()?winfo.getS13():0.0;
- temp3=null !=winfo.getS16()?winfo.getS16():0.0;
- vo.setName("S (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 9:
- temp1=null !=winfo.getSsw16()?winfo.getSsw16():0.0;
- temp2=null !=winfo.getSsw13()?winfo.getSsw13():0.0;
- temp3=null !=winfo.getSsw16()?winfo.getSsw16():0.0;
- vo.setName("SSW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 10:
- temp1=null !=winfo.getSw16()?winfo.getSw16():0.0;
- temp2=null !=winfo.getSw13()?winfo.getSw13():0.0;
- temp3=null !=winfo.getSw16()?winfo.getSw16():0.0;
- vo.setName("SW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 11:
- temp1=null !=winfo.getWsw16()?winfo.getWsw16():0.0;
- temp2=null !=winfo.getWsw13()?winfo.getWsw13():0.0;
- temp3=null !=winfo.getWsw16()?winfo.getWsw16():0.0;
- vo.setName("WSW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 12:
- temp1=null !=winfo.getW16()?winfo.getW16():0.0;
- temp2=null !=winfo.getW13()?winfo.getW13():0.0;
- temp3=null !=winfo.getW16()?winfo.getW16():0.0;
- vo.setName("W (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 13:
- temp1=null !=winfo.getWnw16()?winfo.getWnw16():0.0;
- temp2=null !=winfo.getWnw13()?winfo.getWnw13():0.0;
- temp3=null !=winfo.getWnw16()?winfo.getWnw16():0.0;
- vo.setName("WNW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 14:
- temp1=null !=winfo.getNw16()?winfo.getNw16():0.0;
- temp2=null !=winfo.getNw13()?winfo.getNw13():0.0;
- temp3=null !=winfo.getNw16()?winfo.getNw16():0.0;
- vo.setName("NW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 15:
- temp1=null !=winfo.getNnw16()?winfo.getNnw16():0.0;
- temp2=null !=winfo.getNnw13()?winfo.getNnw13():0.0;
- temp3=null !=winfo.getNnw16()?winfo.getNnw16():0.0;
- vo.setName("NNW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- default:
- break;
- }
- vos.add(vo);
- }
- }
- map.put("jfpl", jfplyear);
- map.put("data", vos);
- }
- return map;
- }
- public Map<String, Object> wprzdfs(String wpId, String recorddate) {
- Map<String, Object> map = new HashMap<String, Object>();
- List<ValueVo> vos = new ArrayList<ValueVo>();
- if (StringUtils.notEmp(recorddate) && StringUtils.notEmp(wpId)) {
- Date date = DateUtils.parseDate(recorddate);
- List<ProEconWpwindDayInfo> wtdls = getWindpowerstationthewindinfo(wpId, date);
- if (!wtdls.isEmpty()) {
- ProEconWpwindDayInfo winfo = wtdls.get(0);
- int cb = (int) winfo.getCb().intValue();
- int cd = (int) winfo.getCd().intValue();
- int cg = (int) winfo.getCg().intValue();
- jfplday = "静风频率为" + cb;
- jfplmonth = "静风频率为" + cd;
- jfplyear = "静风频率为" + cg;
- for (int i = 0; i < 16; i++) {
- ValueVo vo = new ValueVo();
- double temp1 = 0.0;
- double temp2 = 0.0;
- double temp3 = 0.0;
- switch (i) {
- case 0:
- temp1 = null != winfo.getN4() ? winfo.getN4() : 0.0;
- temp2 = null != winfo.getN() ? winfo.getN() : 0.0;
- temp3 = null != winfo.getN2() ? winfo.getN2() : 0.0;
- vo.setName("N (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- // vo.setName("N(" + winfo.getN4() + "/" + winfo.getN() + ")");
- //
- // vo.setData1(winfo.getN2());
- break;
- case 1:
- temp1 = null != winfo.getNne4() ? winfo.getNne4() : 0.0;
- temp2 = null != winfo.getNne() ? winfo.getNne() : 0.0;
- temp3 = null != winfo.getNne2() ? winfo.getNne2() : 0.0;
- vo.setName("NNE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- // vo.setName("NNE(" + winfo.getNne4() + "/" + winfo.getNne() + ")");
- //
- // vo.setData1(winfo.getNne2());
- break;
- case 2:
- temp1 = null != winfo.getNe4() ? winfo.getNe4() : 0.0;
- temp2 = null != winfo.getNe() ? winfo.getNe() : 0.0;
- temp3 = null != winfo.getNe2() ? winfo.getNe2() : 0.0;
- vo.setName("NE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- // vo.setName("NE(" + winfo.getNe4() + "/" + winfo.getNe() + ")");
- //
- // vo.setData1(winfo.getNe2());
- break;
- case 3:
- temp1 = null != winfo.getEne4() ? winfo.getEne4() : 0.0;
- temp2 = null != winfo.getEne() ? winfo.getEne() : 0.0;
- temp3 = null != winfo.getEne2() ? winfo.getEne2() : 0.0;
- vo.setName("ENE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- // vo.setName("ENE(" + winfo.getEne4() + "/" + winfo.getEne() + ")");
- //
- // vo.setData1(winfo.getEne2());
- break;
- case 4:
- temp1 = null != winfo.getE4() ? winfo.getE4() : 0.0;
- temp2 = null != winfo.getE() ? winfo.getE() : 0.0;
- temp3 = null != winfo.getE2() ? winfo.getE2() : 0.0;
- vo.setName("E (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- //vo.setName("E(" + winfo.getE4() + "/" + winfo.getE() + ")");
- break;
- case 5:
- temp1 = null != winfo.getEse4() ? winfo.getEse4() : 0.0;
- temp2 = null != winfo.getEse() ? winfo.getEse() : 0.0;
- temp3 = null != winfo.getEse2() ? winfo.getEse2() : 0.0;
- vo.setName("ESE (" + temp1 + "/" + temp2 + ")");
- //vo.setName("ESE(" + winfo.getEse4() + "/" + winfo.getEse() + ")");
- vo.setData1(temp3);
- break;
- case 6:
- temp1 = null != winfo.getSe4() ? winfo.getSe4() : 0.0;
- temp2 = null != winfo.getSe() ? winfo.getSe() : 0.0;
- temp3 = null != winfo.getSe2() ? winfo.getSe2() : 0.0;
- vo.setName("SE (" + temp1 + "/" + temp2 + ")");
- //vo.setName("SE(" + winfo.getSe4() + "/" + winfo.getSe() + ")");
- vo.setData1(temp3);
- break;
- case 7:
- temp1 = null != winfo.getSse4() ? winfo.getSse4() : 0.0;
- temp2 = null != winfo.getSse() ? winfo.getSse() : 0.0;
- temp3 = null != winfo.getSse2() ? winfo.getSse2() : 0.0;
- vo.setName("SSE (" + temp1 + "/" + temp2 + ")");
- // vo.setName("SSE(" + winfo.getSse4() + "/" + winfo.getSse() + ")");
- vo.setData1(temp3);
- break;
- case 8:
- temp1 = null != winfo.getS4() ? winfo.getS4() : 0.0;
- temp2 = null != winfo.getS() ? winfo.getS() : 0.0;
- temp3 = null != winfo.getS2() ? winfo.getS2() : 0.0;
- vo.setName("S (" + temp1 + "/" + temp2 + ")");
- //vo.setName("S(" + winfo.getS4() + "/" + winfo.getS() + ")");
- vo.setData1(temp3);
- break;
- case 9:
- temp1 = null != winfo.getSsw4() ? winfo.getSsw4() : 0.0;
- temp2 = null != winfo.getSsw() ? winfo.getSsw() : 0.0;
- temp3 = null != winfo.getSsw2() ? winfo.getSsw2() : 0.0;
- vo.setName("SSW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- // vo.setName("SSW(" + winfo.getSsw4() + "/" + winfo.getSsw() + ")");
- // vo.setData1(winfo.getSsw2());
- break;
- case 10:
- temp1 = null != winfo.getSw4() ? winfo.getSw4() : 0.0;
- temp2 = null != winfo.getSw() ? winfo.getSw() : 0.0;
- temp3 = null != winfo.getSw2() ? winfo.getSw2() : 0.0;
- vo.setName("SW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- // vo.setName("SW(" + winfo.getSw4() + "/" + winfo.getSw() + ")");
- //
- // vo.setData1(winfo.getSw2());
- break;
- case 11:
- temp1 = null != winfo.getWsw4() ? winfo.getWsw4() : 0.0;
- temp2 = null != winfo.getWsw() ? winfo.getWsw() : 0.0;
- temp3 = null != winfo.getWsw2() ? winfo.getWsw2() : 0.0;
- vo.setName("WSW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- // vo.setName("WSW(" + winfo.getWsw4() + "/" + winfo.getWsw() + ")");
- //
- // vo.setData1(winfo.getWsw2());
- break;
- case 12:
- temp1 = null != winfo.getW4() ? winfo.getW4() : 0.0;
- temp2 = null != winfo.getW() ? winfo.getW() : 0.0;
- temp3 = null != winfo.getW2() ? winfo.getW2() : 0.0;
- vo.setName("W (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- // vo.setName("W(" + winfo.getW4() + "/" + winfo.getW() + ")");
- //
- // vo.setData1(winfo.getW2());
- break;
- case 13:
- temp1 = null != winfo.getWnw4() ? winfo.getWnw4() : 0.0;
- temp2 = null != winfo.getWnw() ? winfo.getWnw() : 0.0;
- temp3 = null != winfo.getWnw2() ? winfo.getWnw2() : 0.0;
- vo.setName("WNW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- // vo.setName("WNW(" + winfo.getWnw4() + "/" + winfo.getWnw() + ")");
- //
- // vo.setData1(winfo.getWnw2());
- break;
- case 14:
- temp1 = null != winfo.getNw4() ? winfo.getNw4() : 0.0;
- temp2 = null != winfo.getNw() ? winfo.getNw() : 0.0;
- temp3 = null != winfo.getNw2() ? winfo.getNw2() : 0.0;
- vo.setName("NW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- // vo.setName("NW(" + winfo.getNw4() + "/" + winfo.getNw() + ")");
- //
- // vo.setData1(winfo.getNw2());
- break;
- case 15:
- temp1 = null != winfo.getNnw4() ? winfo.getNnw4() : 0.0;
- temp2 = null != winfo.getNnw() ? winfo.getNnw() : 0.0;
- temp3 = null != winfo.getNnw2() ? winfo.getNnw2() : 0.0;
- vo.setName("NNW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- // vo.setName("NNW(" + winfo.getNnw4() + "/" + winfo.getNnw() + ")");
- //
- // vo.setData1(winfo.getNnw2());
- break;
- default:
- break;
- }
- vos.add(vo);
- }
- }
- }
- map.put("jfpl", jfplday);
- map.put("data", vos);
- return map;
- }
- public Map<String, Object> wpyzdfs(String wpId, String recorddate) {
- Map<String, Object> map = new HashMap<String, Object>();
- List<ValueVo> vos = new ArrayList<ValueVo>();
- if (StringUtils.notEmp(recorddate) && StringUtils.notEmp(wpId)) {
- Date date = DateUtils.parseDate(recorddate);
- List<ProEconWpwindDayInfo> wtdls =getWindpowerstationthewindinfo(wpId, date);
- if (!wtdls.isEmpty()) {
- ProEconWpwindDayInfo winfo = wtdls.get(0);
- int cb = (int) winfo.getCb().intValue();
- int cd = (int) winfo.getCd().intValue();
- int cg = (int) winfo.getCg().intValue();
- jfplday = "静风频率为" + cb;
- jfplmonth = "静风频率为" + cd;
- jfplyear = "静风频率为" + cg;
- for (int i = 0; i < 16; i++) {
- ValueVo vo = new ValueVo();
- double temp1 = 0.0;
- double temp2 = 0.0;
- double temp3 = 0.0;
- switch (i) {
- case 0:
- temp1 = null != winfo.getN10() ? winfo.getN10() : 0.0;
- temp2 = null != winfo.getN7() ? winfo.getN7() : 0.0;
- temp3 = null != winfo.getN8() ? winfo.getN8() : 0.0;
- vo.setName("N (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 1:
- temp1 = null != winfo.getNne10() ? winfo.getNne10() : 0.0;
- temp2 = null != winfo.getNne7() ? winfo.getNne7() : 0.0;
- temp3 = null != winfo.getNne8() ? winfo.getNne8() : 0.0;
- vo.setName("NNE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 2:
- temp1 = null != winfo.getNe10() ? winfo.getNe10() : 0.0;
- temp2 = null != winfo.getNe7() ? winfo.getNe7() : 0.0;
- temp3 = null != winfo.getNe8() ? winfo.getNe8() : 0.0;
- vo.setName("NE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 3:
- temp1 = null != winfo.getEne10() ? winfo.getEne10() : 0.0;
- temp2 = null != winfo.getEne7() ? winfo.getEne7() : 0.0;
- temp3 = null != winfo.getEne8() ? winfo.getEne8() : 0.0;
- vo.setName("ENE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 4:
- temp1 = null != winfo.getE10() ? winfo.getE10() : 0.0;
- temp2 = null != winfo.getE7() ? winfo.getE7() : 0.0;
- temp3 = null != winfo.getE8() ? winfo.getE8() : 0.0;
- vo.setName("E (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 5:
- temp1 = null != winfo.getEse10() ? winfo.getEse10() : 0.0;
- temp2 = null != winfo.getEse7() ? winfo.getEse7() : 0.0;
- temp3 = null != winfo.getEse8() ? winfo.getEse8() : 0.0;
- vo.setName("ESE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 6:
- temp1 = null != winfo.getSe10() ? winfo.getSe10() : 0.0;
- temp2 = null != winfo.getSe7() ? winfo.getSe7() : 0.0;
- temp3 = null != winfo.getSe8() ? winfo.getSe8() : 0.0;
- vo.setName("SE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 7:
- temp1 = null != winfo.getSse10() ? winfo.getSse10() : 0.0;
- temp2 = null != winfo.getSse7() ? winfo.getSse7() : 0.0;
- temp3 = null != winfo.getSse8() ? winfo.getSse8() : 0.0;
- vo.setName("SSE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 8:
- temp1 = null != winfo.getS10() ? winfo.getS10() : 0.0;
- temp2 = null != winfo.getS7() ? winfo.getS7() : 0.0;
- temp3 = null != winfo.getS8() ? winfo.getS8() : 0.0;
- vo.setName("S (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 9:
- temp1 = null != winfo.getSsw10() ? winfo.getSsw10() : 0.0;
- temp2 = null != winfo.getSsw7() ? winfo.getSsw7() : 0.0;
- temp3 = null != winfo.getSsw8() ? winfo.getSsw8() : 0.0;
- vo.setName("SSW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 10:
- temp1 = null != winfo.getSw10() ? winfo.getSw10() : 0.0;
- temp2 = null != winfo.getSw7() ? winfo.getSw7() : 0.0;
- temp3 = null != winfo.getSw8() ? winfo.getSw8() : 0.0;
- vo.setName("SW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 11:
- temp1 = null != winfo.getWsw10() ? winfo.getWsw10() : 0.0;
- temp2 = null != winfo.getWsw7() ? winfo.getWsw7() : 0.0;
- temp3 = null != winfo.getWsw8() ? winfo.getWsw8() : 0.0;
- vo.setName("WSW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 12:
- temp1 = null != winfo.getW10() ? winfo.getW10() : 0.0;
- temp2 = null != winfo.getW7() ? winfo.getW7() : 0.0;
- temp3 = null != winfo.getW8() ? winfo.getW8() : 0.0;
- vo.setName("W (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 13:
- temp1 = null != winfo.getWnw10() ? winfo.getWnw10() : 0.0;
- temp2 = null != winfo.getWnw7() ? winfo.getWnw7() : 0.0;
- temp3 = null != winfo.getWnw8() ? winfo.getWnw8() : 0.0;
- vo.setName("WNW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 14:
- temp1 = null != winfo.getNw10() ? winfo.getNw10() : 0.0;
- temp2 = null != winfo.getNw7() ? winfo.getNw7() : 0.0;
- temp3 = null != winfo.getNw8() ? winfo.getNw8() : 0.0;
- vo.setName("NW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 15:
- temp1 = null != winfo.getNnw10() ? winfo.getNnw10() : 0.0;
- temp2 = null != winfo.getNnw7() ? winfo.getNnw7() : 0.0;
- temp3 = null != winfo.getNnw8() ? winfo.getNnw8() : 0.0;
- vo.setName("NNW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- default:
- break;
- }
- vos.add(vo);
- }
- }
- map.put("jfpl", jfplmonth);
- map.put("data", vos);
- }
- return map;
- }
- public Map<String, Object> wpnzdfs(String wpId, String recorddate) {
- Map<String, Object> map = new HashMap<String, Object>();
- List<ValueVo> vos = new ArrayList<ValueVo>();
- if (StringUtils.notEmp(recorddate) && StringUtils.notEmp(wpId)) {
- Date date = DateUtils.parseDate(recorddate);
- List<ProEconWpwindDayInfo> wtdls =getWindpowerstationthewindinfo(wpId, date);
- if (!wtdls.isEmpty()) {
- ProEconWpwindDayInfo winfo = wtdls.get(0);
- int cb = (int) winfo.getCb().intValue();
- int cd = (int) winfo.getCd().intValue();
- int cg = (int) winfo.getCg().intValue();
- jfplday = "静风频率为" + cb;
- jfplmonth = "静风频率为" + cd;
- jfplyear = "静风频率为" + cg;
- for (int i = 0; i < 16; i++) {
- ValueVo vo = new ValueVo();
- double temp1 = 0.0;
- double temp2 = 0.0;
- double temp3 = 0.0;
- switch (i) {
- case 0:
- temp1 = null != winfo.getN16() ? winfo.getN16() : 0.0;
- temp2 = null != winfo.getN13() ? winfo.getN13() : 0.0;
- temp3 = null != winfo.getN14() ? winfo.getN14() : 0.0;
- vo.setName("N (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 1:
- temp1 = null != winfo.getNne16() ? winfo.getNne16() : 0.0;
- temp2 = null != winfo.getNne13() ? winfo.getNne13() : 0.0;
- temp3 = null != winfo.getNne14() ? winfo.getNne14() : 0.0;
- vo.setName("NNE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 2:
- temp1 = null != winfo.getNe16() ? winfo.getNe16() : 0.0;
- temp2 = null != winfo.getNe13() ? winfo.getNe13() : 0.0;
- temp3 = null != winfo.getNe14() ? winfo.getNe14() : 0.0;
- vo.setName("NE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 3:
- temp1 = null != winfo.getEne16() ? winfo.getEne16() : 0.0;
- temp2 = null != winfo.getEne13() ? winfo.getEne13() : 0.0;
- temp3 = null != winfo.getEne14() ? winfo.getEne14() : 0.0;
- vo.setName("ENE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 4:
- temp1 = null != winfo.getE16() ? winfo.getE16() : 0.0;
- temp2 = null != winfo.getE13() ? winfo.getE13() : 0.0;
- temp3 = null != winfo.getE14() ? winfo.getE14() : 0.0;
- vo.setName("E (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 5:
- temp1 = null != winfo.getEse16() ? winfo.getEse16() : 0.0;
- temp2 = null != winfo.getEse13() ? winfo.getEse13() : 0.0;
- temp3 = null != winfo.getEse14() ? winfo.getEse14() : 0.0;
- vo.setName("ESE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 6:
- temp1 = null != winfo.getSe16() ? winfo.getSe16() : 0.0;
- temp2 = null != winfo.getSe13() ? winfo.getSe13() : 0.0;
- temp3 = null != winfo.getSe14() ? winfo.getSe14() : 0.0;
- vo.setName("SE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 7:
- temp1 = null != winfo.getSse16() ? winfo.getSse16() : 0.0;
- temp2 = null != winfo.getSse13() ? winfo.getSse13() : 0.0;
- temp3 = null != winfo.getSse14() ? winfo.getSse14() : 0.0;
- vo.setName("SSE (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 8:
- temp1 = null != winfo.getS16() ? winfo.getS16() : 0.0;
- temp2 = null != winfo.getS13() ? winfo.getS13() : 0.0;
- temp3 = null != winfo.getS14() ? winfo.getS14() : 0.0;
- vo.setName("S (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 9:
- temp1 = null != winfo.getSsw16() ? winfo.getSsw16() : 0.0;
- temp2 = null != winfo.getSsw13() ? winfo.getSsw13() : 0.0;
- temp3 = null != winfo.getSsw14() ? winfo.getSsw14() : 0.0;
- vo.setName("SSW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 10:
- temp1 = null != winfo.getSw16() ? winfo.getSw16() : 0.0;
- temp2 = null != winfo.getSw13() ? winfo.getSw13() : 0.0;
- temp3 = null != winfo.getSw14() ? winfo.getSw14() : 0.0;
- vo.setName("SW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 11:
- temp1 = null != winfo.getWsw16() ? winfo.getWsw16() : 0.0;
- temp2 = null != winfo.getWsw13() ? winfo.getWsw13() : 0.0;
- temp3 = null != winfo.getWsw14() ? winfo.getWsw14() : 0.0;
- vo.setName("WSW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 12:
- temp1 = null != winfo.getW16() ? winfo.getW16() : 0.0;
- temp2 = null != winfo.getW13() ? winfo.getW13() : 0.0;
- temp3 = null != winfo.getW14() ? winfo.getW14() : 0.0;
- vo.setName("W (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 13:
- temp1 = null != winfo.getWnw16() ? winfo.getWnw16() : 0.0;
- temp2 = null != winfo.getWnw13() ? winfo.getWnw13() : 0.0;
- temp3 = null != winfo.getWnw14() ? winfo.getWnw14() : 0.0;
- vo.setName("WNW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 14:
- temp1 = null != winfo.getNw16() ? winfo.getNw16() : 0.0;
- temp2 = null != winfo.getNw13() ? winfo.getNw13() : 0.0;
- temp3 = null != winfo.getNw14() ? winfo.getNw14() : 0.0;
- vo.setName("NW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- case 15:
- temp1 = null != winfo.getNnw16() ? winfo.getNnw16() : 0.0;
- temp2 = null != winfo.getNnw13() ? winfo.getNnw13() : 0.0;
- temp3 = null != winfo.getNnw14() ? winfo.getNnw14() : 0.0;
- vo.setName("NNW (" + temp1 + "/" + temp2 + ")");
- vo.setData1(temp3);
- break;
- default:
- break;
- }
- vos.add(vo);
- }
- }
- map.put("jfpl", jfplyear);
- map.put("data", vos);
- }
- return map;
- }
- }
|