12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468 |
- //package com.gyee.generation.service;
- //
- //import com.gyee.common.contant.ContantXk;
- //import com.gyee.common.model.PointData;
- //import com.gyee.common.model.StringUtils;
- //import com.gyee.generation.init.CacheContext;
- //import com.gyee.generation.model.auto.*;
- //import com.gyee.generation.model.vo.Location;
- //import com.gyee.generation.service.auto.*;
- //import com.gyee.generation.util.DateUtils;
- //import com.gyee.generation.util.realtimesource.IEdosUtil;
- //import com.gyee.generation.util.statisticcs.Initial;
- //import org.slf4j.Logger;
- //import org.slf4j.LoggerFactory;
- //import org.springframework.stereotype.Service;
- //
- //import javax.annotation.Resource;
- //import java.math.BigDecimal;
- //import java.math.RoundingMode;
- //import java.util.*;
- //import java.util.stream.Collectors;
- //
- //@Service
- //public class WindpowerInfoMonthService {
- //
- // private static final Logger logger = LoggerFactory.getLogger(WindpowerInfoMonthService.class);
- // @Resource
- // private IEdosUtil edosUtil;
- //
- // @Resource
- // private IProEconWindpowerInfoDayService proEconWindpowerInfoDayService;
- // @Resource
- // private IProEconWindpowerInfoMonthService proEconWindpowerInfoMonthService;
- // @Resource
- // private IProEconWindpowerInfoYearService proEconWindpowerInfoYearService;
- // @Resource
- // private IProEconWindturbineInfoDayService proEconWindturbineInfoDayService;
- // @Resource
- // private IProEconWindturbineInfoMonthService proEconWindturbineInfoMonthService;
- // @Resource
- // private IProEconWindturbineInfoYearService proEconWindturbineInfoYearService;
- //
- //
- // /**
- // * 计算区域日信息
- // * @param recordDate
- // * @throws Exception
- // */
- // public void calRegionInfoDay(Date recordDate) throws Exception {
- //
- // List<ProEconWindpowerInfoMonth> wpinfodayls = proEconWindpowerInfoMonthService.list().stream()
- // .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
- //// && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
- // && i.getLocation().equals(Location.cp.getValue()))
- // .collect(Collectors.toList());
- // if(!wpinfodayls.isEmpty())
- // {
- //
- // Map<String, Map<String, List<ProEconWindpowerInfoMonth>>>rgmap=new HashMap<>();
- //
- //
- //
- //
- // for(ProEconWindpowerInfoMonth wpinfo:wpinfodayls)
- // {
- //
- // if(rgmap.containsKey(wpinfo.getCompanyId()))
- // {
- // Map<String, List<ProEconWindpowerInfoMonth>> map=rgmap.get(wpinfo.getCompanyId());
- // List<ProEconWindpowerInfoMonth> qbls=map.get("qb");
- // List<ProEconWindpowerInfoMonth> gfls=map.get("fd");
- // List<ProEconWindpowerInfoMonth> fdls=map.get("gf");
- //
- // if(wpinfo.getForeignKeyId().equals("-1"))
- // {
- // fdls.add(wpinfo);
- // }else if(wpinfo.getForeignKeyId().equals("-2")){
- // gfls.add(wpinfo);
- // }
- // qbls.add(wpinfo);
- // }else
- // {
- // Map<String, List<ProEconWindpowerInfoMonth>> map=new HashMap<>();
- //
- // List<ProEconWindpowerInfoMonth> qbls=new ArrayList<>();
- // List<ProEconWindpowerInfoMonth> gfls=new ArrayList<>();
- // List<ProEconWindpowerInfoMonth> fdls=new ArrayList<>();
- //
- // if(wpinfo.getForeignKeyId().equals("-1"))
- // {
- // fdls.add(wpinfo);
- // }else if(wpinfo.getForeignKeyId().equals("-2")){
- // gfls.add(wpinfo);
- // }
- // qbls.add(wpinfo);
- // map.put("qb",qbls);
- // map.put("fd",fdls);
- // map.put("gf",gfls);
- // }
- // }
- //
- //
- // //判断是否有重复记录,先删除重复记录
- // List<String> idls = proEconWindpowerInfoMonthService.list().stream()
- // .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
- //// && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
- // && i.getLocation().equals(Location.rg.getValue())).map(ProEconWindpowerInfoMonth::getId)
- // .collect(Collectors.toList());
- //
- // if (idls != null && idls.size() > 0) {
- //
- // proEconWindpowerInfoMonthService.removeByIds(idls);
- //
- // }
- // for(Map.Entry<String, Map<String, List<ProEconWindpowerInfoMonth>>> entry:rgmap.entrySet()){
- // Map<String, List<ProEconWindpowerInfoMonth>> map=entry.getValue();
- // List<ProEconWindpowerInfoMonth> qbls=map.get("qb");
- // List<ProEconWindpowerInfoMonth> gfls=map.get("fd");
- // List<ProEconWindpowerInfoMonth> fdls=map.get("gf");
- //// if(CacheContext.cpwpmap.size()==qbls.size())
- //// {
- //
- // ProEconWindpowerInfoMonth qb=new ProEconWindpowerInfoMonth();
- // ProEconWindpowerInfoMonth fd=new ProEconWindpowerInfoMonth();
- // ProEconWindpowerInfoMonth gf=new ProEconWindpowerInfoMonth();
- //
- // if(CacheContext.rgmap.containsKey(entry.getKey()))
- // {
- // ProBasicRegion cp=CacheContext.rgmap.get(entry.getKey());
- // gf.setRegionId(cp.getId());
- //
- // gf.setRecordDate(DateUtils.truncDay(recordDate));
- // gf.setForeignKeyId("-2");
- // gf.setLocation(Location.rg.getValue());
- //
- // fd.setRegionId(cp.getId());
- //
- // fd.setRecordDate(DateUtils.truncDay(recordDate));
- // fd.setForeignKeyId("-1");
- // fd.setLocation(Location.rg.getValue());
- //
- // qb.setRegionId(cp.getId());
- //
- // qb.setRecordDate(DateUtils.truncDay(recordDate));
- // qb.setForeignKeyId("0");
- // qb.setLocation(Location.rg.getValue());
- //
- // //计算区域级全部
- // calCp(qb,qbls);
- // //计算公司级风电场站
- // calCp(fd,fdls);
- // //计算公司级光电场站
- // calCp(gf,gfls);
- //
- // proEconWindpowerInfoMonthService.save(qb);
- // proEconWindpowerInfoMonthService.save(fd);
- // proEconWindpowerInfoMonthService.save(gf);
- // }
- //
- //
- //// }else
- //// {
- //// logger.debug("公司所属场站数量与保存的场站日信息数量不一致,未进行{0}统计-------结束", entry.getKey());
- ////
- //// }
- //
- //
- //
- //
- //
- // };
- // }
- //
- // }
- //
- // /**
- // * 计算公司日信息
- // * @param recordDate
- // * @throws Exception
- // */
- // public void calCompanyInfoDay(Date recordDate) throws Exception {
- //
- // List<ProEconWindpowerInfoMonth> wpinfodayls = proEconWindpowerInfoMonthService.list().stream()
- // .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
- //// && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
- // && i.getLocation().equals(Location.wp.getValue()))
- // .collect(Collectors.toList());
- // if(!wpinfodayls.isEmpty())
- // {
- //
- // Map<String, Map<String, List<ProEconWindpowerInfoMonth>>>cpmap=new HashMap<>();
- //
- //
- //
- //
- // for(ProEconWindpowerInfoMonth wpinfo:wpinfodayls)
- // {
- //
- // if(cpmap.containsKey(wpinfo.getCompanyId()))
- // {
- // Map<String, List<ProEconWindpowerInfoMonth>> map=cpmap.get(wpinfo.getCompanyId());
- // List<ProEconWindpowerInfoMonth> qbls=map.get("qb");
- // List<ProEconWindpowerInfoMonth> gfls=map.get("fd");
- // List<ProEconWindpowerInfoMonth> fdls=map.get("gf");
- //
- // if(wpinfo.getWindpowerstationId().indexOf("FDC")>=0)
- // {
- // fdls.add(wpinfo);
- // }else {
- // gfls.add(wpinfo);
- // }
- // qbls.add(wpinfo);
- // }else
- // {
- // Map<String, List<ProEconWindpowerInfoMonth>> map=new HashMap<>();
- //
- // List<ProEconWindpowerInfoMonth> qbls=new ArrayList<>();
- // List<ProEconWindpowerInfoMonth> gfls=new ArrayList<>();
- // List<ProEconWindpowerInfoMonth> fdls=new ArrayList<>();
- //
- // if(wpinfo.getWindpowerstationId().indexOf("FDC")>=0)
- // {
- // fdls.add(wpinfo);
- // }else {
- // gfls.add(wpinfo);
- // }
- // qbls.add(wpinfo);
- // map.put("qb",qbls);
- // map.put("fd",fdls);
- // map.put("gf",gfls);
- // }
- // }
- //
- //
- // //判断是否有重复记录,先删除重复记录
- // List<String> idls = proEconWindpowerInfoMonthService.list().stream()
- // .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
- //// && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
- // && i.getLocation().equals(Location.cp.getValue())).map(ProEconWindpowerInfoMonth::getId)
- // .collect(Collectors.toList());
- //
- // if (idls != null && idls.size() > 0) {
- //
- // proEconWindpowerInfoMonthService.removeByIds(idls);
- //
- // }
- // for(Map.Entry<String, Map<String, List<ProEconWindpowerInfoMonth>>> entry:cpmap.entrySet()){
- // Map<String, List<ProEconWindpowerInfoMonth>> map=entry.getValue();
- // List<ProEconWindpowerInfoMonth> qbls=map.get("qb");
- // List<ProEconWindpowerInfoMonth> gfls=map.get("fd");
- // List<ProEconWindpowerInfoMonth> fdls=map.get("gf");
- //// if(CacheContext.cpwpmap.size()==qbls.size())
- //// {
- //
- // ProEconWindpowerInfoMonth qb=new ProEconWindpowerInfoMonth();
- // ProEconWindpowerInfoMonth fd=new ProEconWindpowerInfoMonth();
- // ProEconWindpowerInfoMonth gf=new ProEconWindpowerInfoMonth();
- //
- // if(CacheContext.cpmap.containsKey(entry.getKey()))
- // {
- // ProBasicCompany cp=CacheContext.cpmap.get(entry.getKey());
- // gf.setRegionId(cp.getRegionId());
- // gf.setCompanyId(cp.getId());
- // gf.setRecordDate(DateUtils.truncDay(recordDate));
- // gf.setForeignKeyId("-2");
- // gf.setLocation(Location.cp.getValue());
- //
- //
- //
- // fd.setRegionId(cp.getRegionId());
- // fd.setCompanyId(cp.getId());
- // fd.setRecordDate(DateUtils.truncDay(recordDate));
- // fd.setForeignKeyId("-1");
- // fd.setLocation(Location.cp.getValue());
- //
- // qb.setRegionId(cp.getRegionId());
- // qb.setCompanyId(cp.getId());
- // qb.setRecordDate(DateUtils.truncDay(recordDate));
- // qb.setForeignKeyId("0");
- // qb.setLocation(Location.cp.getValue());
- //
- // //计算公司级全部场站
- // calCp(qb,qbls);
- // //计算公司级风电场站
- // calCp(fd,fdls);
- // //计算公司级光电场站
- // calCp(gf,gfls);
- //
- // proEconWindpowerInfoMonthService.save(qb);
- // proEconWindpowerInfoMonthService.save(fd);
- // proEconWindpowerInfoMonthService.save(gf);
- // }
- //
- //
- //// }else
- //// {
- //// logger.debug("公司所属场站数量与保存的场站日信息数量不一致,未进行{0}统计-------结束", entry.getKey());
- ////
- //// }
- //
- //
- //
- //
- //
- // };
- // }
- //
- // }
- //
- // private void calCp(ProEconWindpowerInfoMonth pewp,List<ProEconWindpowerInfoMonth> ls) throws Exception {
- //
- // if(!ls.isEmpty())
- // {
- // DoubleSummaryStatistics summaryStatistics=ls.stream().mapToDouble(n -> n.getYzdfs()).summaryStatistics();
- // //日最大风速
- // pewp.setYzdfs(summaryStatistics.getMax());
- // //日最小风速
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYzxfs()).summaryStatistics();
- // pewp.setYzxfs(summaryStatistics.getMin());
- // //日平均风速
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYpjfs()).summaryStatistics();
- // pewp.setYpjfs(summaryStatistics.getAverage());
- //
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYzdgl()).summaryStatistics();
- // //日最大功率
- // pewp.setYzdgl(summaryStatistics.getMax());
- // //日最小功率
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYzxgl()).summaryStatistics();
- // pewp.setYzxgl(summaryStatistics.getMin());
- // //日平均功率
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYpjgl()).summaryStatistics();
- // pewp.setYpjgl(summaryStatistics.getAverage());
- //
- //
- // //日发电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYfdl()).summaryStatistics();
- // pewp.setYfdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- // //日可用电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYkydl()).summaryStatistics();
- // pewp.setYkydl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- // //日理论发电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYllfdl()).summaryStatistics();
- // pewp.setYllfdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- // //日故障损失电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYgzssdl()).summaryStatistics();
- // pewp.setYgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- // //日场内受累故障损失电量
- //
- // pewp.setYcnslgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- // //日检修损失电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYjxssdl()).summaryStatistics();
- // pewp.setYjxssdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- // //日场内受累检修损失电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYcnsljxssdl()).summaryStatistics();
- // pewp.setYcnsljxssdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- // //日待机损失电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYdjssdl()).summaryStatistics();
- // pewp.setYdjssdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- // //日缺陷降出力损失电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYqxjclssdl()).summaryStatistics();
- // pewp.setYqxjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- // //日手动停机损失电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYsdtjssdl()).summaryStatistics();
- // pewp.setYsdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- // //日性能损失电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYxnssdl()).summaryStatistics();
- // pewp.setYxnssdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- // //日限电停机损失电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYxdtjssdl()).summaryStatistics();
- // pewp.setYxdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- // //日限电降出力损失电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYxdjclssdl()).summaryStatistics();
- // pewp.setYxdjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- // //日场外受累电网损失电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYcwsldwssdl()).summaryStatistics();
- // pewp.setYcwsldwssdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- // //日场外受累天气损失电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYcwsltqssdl()).summaryStatistics();
- // pewp.setYcwsltqssdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- // //日增发电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYzfdl()).summaryStatistics();
- // pewp.setYzfdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- // //日欠发电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYqfdl()).summaryStatistics();
- // pewp.setYqfdl(StringUtils.round(summaryStatistics.getSum(),2));
- //
- // //日自耗电
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYzhd()).summaryStatistics();
- // pewp.setYzhd(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- // double rfdlsyz=0.0;
- // double rswdlsyz=0.0;
- // double rgwgwdlsyz=0.0;
- // double rnwgwdlsyz=0.0;
- //
- // //日发电量(升压站)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYfdldb()).summaryStatistics();
- // rfdlsyz=StringUtils.round(summaryStatistics.getSum(),2);
- // pewp.setYfdldb(rfdlsyz);
- //
- // //日上网电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYswdldb()).summaryStatistics();
- // rswdlsyz=StringUtils.round(summaryStatistics.getSum(),2);
- // pewp.setYswdldb(rswdlsyz);
- //
- // //日工网购网电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYgwgwdldb()).summaryStatistics();
- // rgwgwdlsyz=StringUtils.round(summaryStatistics.getSum(),2);
- // pewp.setYgwgwdldb(rgwgwdlsyz);
- //
- //
- // //日农网购网电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYnwgwdldb()).summaryStatistics();
- // rnwgwdlsyz=StringUtils.round(summaryStatistics.getSum(),2);
- // pewp.setYnwgwdldb(rnwgwdlsyz);
- //
- //
- // //日综合场用电量(电表)
- // pewp.setYzhcydldb(StringUtils.round(rfdlsyz-rswdlsyz+rgwgwdlsyz+rnwgwdlsyz,2));
- //
- //
- // //日厂用电量
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYfdcydldb()).summaryStatistics();
- // pewp.setYfdcydldb(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- //
- // //日最大功率(出线)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYzdglcx()).summaryStatistics();
- // pewp.setYzdglcx(summaryStatistics.getMax());
- // //日最小功率(出线)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYzxglcx()).summaryStatistics();
- // pewp.setYzxglcx(summaryStatistics.getMin());
- // //日平均功率(出线)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYpjglcx()).summaryStatistics();
- // pewp.setYpjglcx(summaryStatistics.getAverage());
- //
- //
- //
- // //日合计待机小时
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjdjxs()).summaryStatistics();
- // pewp.setYhjdjxs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计维护停机小时
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjjxtjxs()).summaryStatistics();
- // pewp.setYhjjxtjxs(StringUtils.round(summaryStatistics.getSum(),2));
- // // 日合计待机小时
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjdjxs()).summaryStatistics();
- // pewp.setYhjdjxs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计运行小时
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjyxxs()).summaryStatistics();
- // pewp.setYhjyxxs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电小时
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjxdxs()).summaryStatistics();
- // pewp.setYhjxdxs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计通讯中断小时
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjtxzdxs()).summaryStatistics();
- // pewp.setYhjtxzdxs(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- // //日合计故障次数
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjdjcs()).summaryStatistics();
- // pewp.setYhjdjcs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计检修次数
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjjxtjcs()).summaryStatistics();
- // pewp.setYhjjxtjcs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计待机次数
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjdjcs()).summaryStatistics();
- // pewp.setYhjdjcs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计性能次数
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjyxcs()).summaryStatistics();
- // pewp.setYhjyxcs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电停机次数
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjxdcs()).summaryStatistics();
- // pewp.setYhjxdcs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计通讯中断次数
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjtxzdcs()).summaryStatistics();
- // pewp.setYhjtxzdcs(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- // //日合计故障小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjgzxsmx()).summaryStatistics();
- // pewp.setYhjgzxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场内受累故障小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjcnslgzxsmx()).summaryStatistics();
- // pewp.setYhjcnslgzxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计检修小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjjxxsmx()).summaryStatistics();
- // pewp.setYhjjxxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场内受累检修小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjcnsljxxsmx()).summaryStatistics();
- // pewp.setYhjcnsljxxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计待机小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjdjxsmx()).summaryStatistics();
- // pewp.setYhjdjxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计缺陷降出力小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjqxjclxsmx()).summaryStatistics();
- // pewp.setYhjqxjclxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计手动停机小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjsdtjxsmx()).summaryStatistics();
- // pewp.setYhjsdtjxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计性能小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjxnxsmx()).summaryStatistics();
- // pewp.setYhjxnxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电停机小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjxdtjxsmx()).summaryStatistics();
- // pewp.setYhjxdtjxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电降出力小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjxdjclxsmx()).summaryStatistics();
- // pewp.setYhjxdjclxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场外受累电网小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjcwsldwxsmx()).summaryStatistics();
- // pewp.setYhjcwsldwxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场外受累电网小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjcwsltqxsmx()).summaryStatistics();
- // pewp.setYhjcwsltqxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计通讯中断小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjtxzdxsmx()).summaryStatistics();
- // pewp.setYhjtxzdxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计离线小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjlxxsmx()).summaryStatistics();
- // pewp.setYhjlxxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- // //日合计故障次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjgzcsmx()).summaryStatistics();
- // pewp.setYhjgzcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场内受累故障次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjcnslgzcsmx()).summaryStatistics();
- // pewp.setYhjcnslgzcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计检修次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjjxcsmx()).summaryStatistics();
- // pewp.setYhjjxcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场内受累检修次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjcnsljxcsmx()).summaryStatistics();
- // pewp.setYhjcnsljxcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计待机次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjdjcsmx()).summaryStatistics();
- // pewp.setYhjdjcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计缺陷降出力次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjqxjclcsmx()).summaryStatistics();
- // pewp.setYhjqxjclcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计手动停机次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjsdtjcsmx()).summaryStatistics();
- // pewp.setYhjsdtjcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计性能次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjxncsmx()).summaryStatistics();
- // pewp.setYhjxncsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电停机次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjxdtjcsmx()).summaryStatistics();
- // pewp.setYhjxdtjcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电降出力次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjxdjclcsmx()).summaryStatistics();
- // pewp.setYhjxdjclcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场外受累电网次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjcwsldwcsmx()).summaryStatistics();
- // pewp.setYhjcwsldwcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场外受累电网次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjcwsltqcsmx()).summaryStatistics();
- // pewp.setYhjcwsltqcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计通讯中断次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjtxzdcsmx()).summaryStatistics();
- // pewp.setYhjtxzdcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计离线次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getYhjlxcsmx()).summaryStatistics();
- // pewp.setYhjlxcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // }
- // }
- // /**
- // * 计算场站日信息
- // * @param recordDate
- // * @throws Exception
- // */
- // public void calWindpowerInfoDay(Date recordDate) throws Exception {
- // Calendar c=Calendar.getInstance();
- // c.setTime(recordDate);
- //
- // Date end=c.getTime();
- //
- // Date begin= DateUtils.truncDay(c.getTime());
- //
- //
- //
- // //判断是否有重复记录,先删除重复记录
- // List<String> idls = proEconWindpowerInfoMonthService.list().stream()
- // .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
- // && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
- // && i.getLocation().equals(Location.wp.getValue())).map(ProEconWindpowerInfoMonth::getId)
- // .collect(Collectors.toList());
- //
- // if (idls != null && idls.size() > 0) {
- //
- // proEconWindpowerInfoMonthService.removeByIds(idls);
- //
- // }
- // for(ProBasicWindpowerstation wp:CacheContext.wpls)
- // {
- // if(CacheContext.wppointmap.containsKey(wp.getId()))
- // {
- // Map<String, ProBasicWppoint> pointmap=CacheContext.wppointmap.get(wp.getId());
- //
- // ProEconWindpowerInfoMonth pewp=new ProEconWindpowerInfoMonth();
- // Initial.initial(pewp);
- // pewp.setRegionId(wp.getRegionId());
- // pewp.setCompanyId(wp.getCompanyId());
- // pewp.setRecordDate(DateUtils.truncDay(recordDate));
- // pewp.setForeignKeyId("0");
- // pewp.setWindpowerstationId(wp.getId());
- // pewp.setLocation(Location.wp.getValue());
- // if(pointmap.containsKey(ContantXk.SSPJFS));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.SSPJFS);
- // List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(),begin.getTime()/1000,end.getTime()/1000);
- // if(!pointls.isEmpty())
- // {
- // DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
- // //日最大风速
- // pewp.setYzdfs(summaryStatistics.getMax());
- // //日最小风速
- // pewp.setYzxfs(summaryStatistics.getMin());
- // //日平均风速
- // pewp.setYpjfs(summaryStatistics.getAverage());
- // }
- //
- // }
- //
- // if(pointmap.containsKey(ContantXk.SSZGL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.SSZGL);
- // List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(),begin.getTime()/1000,end.getTime()/1000);
- // if(!pointls.isEmpty())
- // {
- // DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
- // //日最大功率
- // pewp.setYzdgl(summaryStatistics.getMax());
- // //日最小功率
- // pewp.setYzxgl(summaryStatistics.getMin());
- // //日平均功率
- // pewp.setYpjgl(summaryStatistics.getAverage());
- // }
- // }
- //
- //
- // if(pointmap.containsKey(ContantXk.RFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RFDL);
- //
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日发电量
- // pewp.setYfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RKYDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RKYDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日可用电量
- // pewp.setYkydl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- //
- // if(pointmap.containsKey(ContantXk.RLLFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RLLFDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日理论发电量
- // pewp.setYllfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- //
- //
- //
- // if(pointmap.containsKey(ContantXk.RGZSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RGZSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日故障损失电量
- // pewp.setYgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RCNSLGZSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCNSLGZSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场内受累故障损失电量
- // pewp.setYcnslgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RJXSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RJXSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日检修损失电量
- // pewp.setYjxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RCNSLJXSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCNSLJXSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场内受累检修损失电量
- // pewp.setYcnsljxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RDJSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RDJSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日待机损失电量
- // pewp.setYdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RQXJCLSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RQXJCLSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日缺陷降出力损失电量
- // pewp.setYqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RSDTJSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RSDTJSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日手动停机损失电量
- // pewp.setYsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RXNSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RXNSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日性能损失电量
- // pewp.setYxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RXDTJSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RXDTJSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日限电停机损失电量
- // pewp.setYxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- //
- // if(pointmap.containsKey(ContantXk.RXDJCLSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RXDJCLSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日限电降出力损失电量
- // pewp.setYxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RCWSLDWSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCWSLDWSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场外受累电网损失电量
- // pewp.setYcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RCWSLTQSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCWSLTQSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场外受累天气损失电量
- // pewp.setYcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RZFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RZFDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日增发电量
- // pewp.setYzfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RQFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RQFDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日欠发电量
- // pewp.setYqfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RZHD));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RZHD);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日自耗电
- // pewp.setYzhd(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // double rfdlsyz=0.0;
- // double rswdlsyz=0.0;
- // double rgwgwdlsyz=0.0;
- // double rnwgwdlsyz=0.0;
- // if(pointmap.containsKey(ContantXk.RFDLSYZ));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RFDLSYZ);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日发电量(升压站)
- // rfdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYfdldb(rfdlsyz);
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RSWDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RSWDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日上网电量
- // rswdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYswdldb(rswdlsyz);
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RGWGWDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RGWGWDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日工网购网电量
- // rgwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYgwgwdldb(rgwgwdlsyz);
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RNWGWDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RNWGWDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日农网购网电量
- // rnwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYnwgwdldb(rnwgwdlsyz);
- //
- // }
- // }
- //
- // //日综合场用电量(电表)
- // pewp.setYzhcydldb(StringUtils.round(rfdlsyz-rswdlsyz+rgwgwdlsyz+rnwgwdlsyz,2));
- //
- //
- // if(pointmap.containsKey(ContantXk.RCYDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCYDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日厂用电量
- // pewp.setYfdcydldb(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.TPOINT_WP_CXGL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.TPOINT_WP_CXGL);
- // List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(),begin.getTime()/1000,end.getTime()/1000);
- // if(!pointls.isEmpty())
- // {
- // DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
- // //日最大功率(出线)
- // pewp.setYzdglcx(summaryStatistics.getMax());
- // //日最小功率(出线)
- // pewp.setYzxglcx(summaryStatistics.getMin());
- // //日平均功率(出线)
- // pewp.setYpjglcx(summaryStatistics.getAverage());
- // }
- //
- // }
- //
- // List<ProEconWindpowerInfoDay> wpinfodayls = proEconWindpowerInfoDayService.list().stream()
- // .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
- //// && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
- // && i.getLocation().equals(Location.wp.getValue()))
- // .collect(Collectors.toList());
- // //统计14种状态明细指标的时长和次数
- // calDetiall(pewp,recordDate,wpinfodayls);
- // //统计7种状态指标的时长和次数
- // calSimple(pewp,recordDate,wpinfodayls);
- //
- // proEconWindpowerInfoMonthService.save(pewp);
- //
- //
- //// wpinfodayls.add(pewp);
- // proEconWindpowerInfoMonthService.save(pewp);
- //
- // }
- //
- //
- // }
- //
- // }
- //
- //
- //
- //
- // /**
- // * 计算项目日信息
- // * @param recordDate
- // * @throws Exception
- // */
- // public void calProjectInfoDay(Date recordDate) throws Exception {
- // Calendar c=Calendar.getInstance();
- // c.setTime(recordDate);
- //
- // Date end=c.getTime();
- //
- // Date begin= DateUtils.truncDay(c.getTime());
- //
- // //判断是否有重复记录,先删除重复记录
- // List<String> idls = proEconWindpowerInfoMonthService.list().stream()
- // .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
- // && CacheContext.proMap.containsKey(i.getProjectId())
- // && i.getLocation().equals(Location.pj.getValue())).map(ProEconWindpowerInfoMonth::getId)
- // .collect(Collectors.toList());
- //
- // if (idls != null && idls.size() > 0) {
- //
- // proEconWindpowerInfoMonthService.removeByIds(idls);
- //
- // }
- // for(ProBasicProject wp:CacheContext.projects)
- // {
- // if(CacheContext.wppointmap.containsKey(wp.getId()))
- // {
- // Map<String, ProBasicWppoint> pointmap=CacheContext.wppointmap.get(wp.getId());
- //
- // ProEconWindpowerInfoMonth pewp=new ProEconWindpowerInfoMonth();
- // Initial.initial(pewp);
- // pewp.setForeignKeyId("0");
- // pewp.setWindpowerstationId(wp.getWindpowerstationId());
- // pewp.setProjectId(wp.getId());
- // pewp.setLocation(Location.pj.getValue());
- // pewp.setRecordDate(DateUtils.truncDay(recordDate));
- // if(pointmap.containsKey(ContantXk.SSPJFS));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.SSPJFS);
- // List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(),begin.getTime()/1000,end.getTime()/1000);
- // if(!pointls.isEmpty())
- // {
- // DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
- // //日最大风速
- // pewp.setYzdfs(summaryStatistics.getMax());
- // //日最小风速
- // pewp.setYzxfs(summaryStatistics.getMin());
- // //日平均风速
- // pewp.setYpjfs(summaryStatistics.getAverage());
- // }
- //
- // }
- //
- // if(pointmap.containsKey(ContantXk.SSZGL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.SSZGL);
- // List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(),begin.getTime()/1000,end.getTime()/1000);
- // if(!pointls.isEmpty())
- // {
- // DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
- // //日最大功率
- // pewp.setYzdgl(summaryStatistics.getMax());
- // //日最小功率
- // pewp.setYzxgl(summaryStatistics.getMin());
- // //日平均功率
- // pewp.setYpjgl(summaryStatistics.getAverage());
- // }
- // }
- //
- //
- // if(pointmap.containsKey(ContantXk.RFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RFDL);
- //
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日发电量
- // pewp.setYfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RKYDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RKYDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日可用电量
- // pewp.setYkydl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- //
- //
- //
- // if(pointmap.containsKey(ContantXk.RLLFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RLLFDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日理论发电量
- // pewp.setYllfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- //
- // if(pointmap.containsKey(ContantXk.RGZSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RGZSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日故障损失电量
- // pewp.setYgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RCNSLGZSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCNSLGZSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场内受累故障损失电量
- // pewp.setYcnslgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RJXSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RJXSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日检修损失电量
- // pewp.setYjxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RCNSLJXSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCNSLJXSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场内受累检修损失电量
- // pewp.setYcnsljxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RDJSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RDJSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日待机损失电量
- // pewp.setYdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RQXJCLSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RQXJCLSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日缺陷降出力损失电量
- // pewp.setYqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RSDTJSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RSDTJSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日手动停机损失电量
- // pewp.setYsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RXNSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RXNSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日性能损失电量
- // pewp.setYxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RXDTJSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RXDTJSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日限电停机损失电量
- // pewp.setYxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- //
- // if(pointmap.containsKey(ContantXk.RXDJCLSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RXDJCLSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日限电降出力损失电量
- // pewp.setYxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RCWSLDWSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCWSLDWSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场外受累电网损失电量
- // pewp.setYcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RCWSLTQSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCWSLTQSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场外受累天气损失电量
- // pewp.setYcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RZFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RZFDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日增发电量
- // pewp.setYzfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RQFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RQFDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日欠发电量
- // pewp.setYqfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RZHD));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RZHD);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日自耗电
- // pewp.setYzhd(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // double rfdlsyz=0.0;
- // double rswdlsyz=0.0;
- // double rgwgwdlsyz=0.0;
- // double rnwgwdlsyz=0.0;
- // if(pointmap.containsKey(ContantXk.RFDLSYZ));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RFDLSYZ);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日发电量(升压站)
- // rfdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYfdldb(rfdlsyz);
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RSWDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RSWDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日上网电量
- // rswdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYswdldb(rswdlsyz);
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RGWGWDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RGWGWDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日工网购网电量
- // rgwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYgwgwdldb(rgwgwdlsyz);
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RNWGWDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RNWGWDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日农网购网电量
- // rnwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYnwgwdldb(rnwgwdlsyz);
- //
- // }
- // }
- //
- // //日综合场用电量(电表)
- // pewp.setYzhcydldb(StringUtils.round(rfdlsyz-rswdlsyz+rgwgwdlsyz+rnwgwdlsyz,2));
- //
- //
- // if(pointmap.containsKey(ContantXk.RCYDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCYDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日厂用电量
- // pewp.setYfdcydldb(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.TPOINT_WP_CXGL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.TPOINT_WP_CXGL);
- // List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(),begin.getTime()/1000,end.getTime()/1000);
- // if(!pointls.isEmpty())
- // {
- // DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
- // //日最大功率(出线)
- // pewp.setYzdglcx(summaryStatistics.getMax());
- // //日最小功率(出线)
- // pewp.setYzxglcx(summaryStatistics.getMin());
- // //日平均功率(出线)
- // pewp.setYpjglcx(summaryStatistics.getAverage());
- // }
- //
- // }
- //
- // List<ProEconWindpowerInfoDay> wpinfodayls = proEconWindpowerInfoDayService.list().stream()
- // .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
- //// && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
- // && i.getLocation().equals(Location.pj.getValue()))
- // .collect(Collectors.toList());
- // //统计14种状态明细指标的时长和次数
- // calDetiall(pewp,recordDate,wpinfodayls);
- // //统计7种状态指标的时长和次数
- // calSimple(pewp,recordDate,wpinfodayls);
- //
- // proEconWindpowerInfoMonthService.save(pewp);
- //
- // proEconWindpowerInfoMonthService.save(pewp);
- //
- // }
- //
- //
- // }
- //
- // }
- //
- //
- // /**
- // * 计算线路日信息
- // * @param recordDate
- // * @throws Exception
- // */
- // public void calLineInfoDay(Date recordDate) throws Exception {
- // Calendar c=Calendar.getInstance();
- // c.setTime(recordDate);
- //
- // Date end=c.getTime();
- //
- // Date begin= DateUtils.truncDay(c.getTime());
- //
- // //判断是否有重复记录,先删除重复记录
- // List<String> idls = proEconWindpowerInfoMonthService.list().stream()
- // .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
- // && CacheContext.lnmap.containsKey(i.getLineId())
- // && i.getLocation().equals(Location.ln.getValue()) ).map(ProEconWindpowerInfoMonth::getId)
- // .collect(Collectors.toList());
- //
- // if (idls != null && idls.size() > 0) {
- //
- // proEconWindpowerInfoMonthService.removeByIds(idls);
- //
- // }
- // for(ProBasicLine wp:CacheContext.lines)
- // {
- // if(CacheContext.wppointmap.containsKey(wp.getId()))
- // {
- // Map<String, ProBasicWppoint> pointmap=CacheContext.wppointmap.get(wp.getId());
- //
- // ProEconWindpowerInfoMonth pewp=new ProEconWindpowerInfoMonth();
- // Initial.initial(pewp);
- // pewp.setForeignKeyId("0");
- // pewp.setLineId(wp.getId());
- // pewp.setLocation(Location.ln.getValue());
- // pewp.setProjectId(wp.getProjectId());
- // pewp.setRecordDate(DateUtils.truncDay(recordDate));
- // if(pointmap.containsKey(ContantXk.SSPJFS));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.SSPJFS);
- // List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(),begin.getTime()/1000,end.getTime()/1000);
- // if(!pointls.isEmpty())
- // {
- // DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
- // //日最大风速
- // pewp.setYzdfs(summaryStatistics.getMax());
- // //日最小风速
- // pewp.setYzxfs(summaryStatistics.getMin());
- // //日平均风速
- // pewp.setYpjfs(summaryStatistics.getAverage());
- // }
- //
- // }
- //
- // if(pointmap.containsKey(ContantXk.SSZGL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.SSZGL);
- // List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(),begin.getTime()/1000,end.getTime()/1000);
- // if(!pointls.isEmpty())
- // {
- // DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
- // //日最大功率
- // pewp.setYzdgl(summaryStatistics.getMax());
- // //日最小功率
- // pewp.setYzxgl(summaryStatistics.getMin());
- // //日平均功率
- // pewp.setYpjgl(summaryStatistics.getAverage());
- // }
- // }
- //
- //
- // if(pointmap.containsKey(ContantXk.RFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RFDL);
- //
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日发电量
- // pewp.setYfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RKYDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RKYDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日可用电量
- // pewp.setYkydl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- //
- //
- //
- // if(pointmap.containsKey(ContantXk.RLLFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RLLFDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日理论发电量
- // pewp.setYllfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- //
- // if(pointmap.containsKey(ContantXk.RGZSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RGZSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日故障损失电量
- // pewp.setYgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RCNSLGZSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCNSLGZSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场内受累故障损失电量
- // pewp.setYcnslgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RJXSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RJXSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日检修损失电量
- // pewp.setYjxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RCNSLJXSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCNSLJXSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场内受累检修损失电量
- // pewp.setYcnsljxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RDJSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RDJSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日待机损失电量
- // pewp.setYdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RQXJCLSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RQXJCLSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日缺陷降出力损失电量
- // pewp.setYqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RSDTJSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RSDTJSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日手动停机损失电量
- // pewp.setYsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RXNSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RXNSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日性能损失电量
- // pewp.setYxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RXDTJSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RXDTJSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日限电停机损失电量
- // pewp.setYxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- //
- // if(pointmap.containsKey(ContantXk.RXDJCLSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RXDJCLSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日限电降出力损失电量
- // pewp.setYxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RCWSLDWSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCWSLDWSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场外受累电网损失电量
- // pewp.setYcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RCWSLTQSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCWSLTQSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场外受累天气损失电量
- // pewp.setYcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RZFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RZFDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日增发电量
- // pewp.setYzfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RQFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RQFDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日欠发电量
- // pewp.setYqfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RZHD));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RZHD);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日自耗电
- // pewp.setYzhd(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // double rfdlsyz=0.0;
- // double rswdlsyz=0.0;
- // double rgwgwdlsyz=0.0;
- // double rnwgwdlsyz=0.0;
- // if(pointmap.containsKey(ContantXk.RFDLSYZ));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RFDLSYZ);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日发电量(升压站)
- // rfdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYfdldb(rfdlsyz);
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RSWDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RSWDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日上网电量
- // rswdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYswdldb(rswdlsyz);
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RGWGWDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RGWGWDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日工网购网电量
- // rgwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYgwgwdldb(rgwgwdlsyz);
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RNWGWDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RNWGWDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日农网购网电量
- // rnwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYnwgwdldb(rnwgwdlsyz);
- //
- // }
- // }
- //
- // //日综合场用电量(电表)
- // pewp.setYzhcydldb(StringUtils.round(rfdlsyz-rswdlsyz+rgwgwdlsyz+rnwgwdlsyz,2));
- //
- //
- // if(pointmap.containsKey(ContantXk.RCYDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCYDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日厂用电量
- // pewp.setYfdcydldb(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.TPOINT_WP_CXGL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.TPOINT_WP_CXGL);
- // List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(),begin.getTime()/1000,end.getTime()/1000);
- // if(!pointls.isEmpty())
- // {
- // DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
- // //日最大功率(出线)
- // pewp.setYzdglcx(summaryStatistics.getMax());
- // //日最小功率(出线)
- // pewp.setYzxglcx(summaryStatistics.getMin());
- // //日平均功率(出线)
- // pewp.setYpjglcx(summaryStatistics.getAverage());
- // }
- //
- // }
- //
- // List<ProEconWindpowerInfoDay> wpinfodayls = proEconWindpowerInfoDayService.list().stream()
- // .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
- //// && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
- // && i.getLocation().equals(Location.ln.getValue()))
- // .collect(Collectors.toList());
- // //统计14种状态明细指标的时长和次数
- // calDetiall(pewp,recordDate,wpinfodayls);
- // //统计7种状态指标的时长和次数
- // calSimple(pewp,recordDate,wpinfodayls);
- //
- // proEconWindpowerInfoMonthService.save(pewp);
- //
- // }
- //
- //
- // }
- //
- // }
- //
- //
- //
- // /**
- // * 计算方阵日信息
- // * @param recordDate
- // * @throws Exception
- // */
- // public void calSquareInfoDay(Date recordDate) throws Exception {
- // Calendar c=Calendar.getInstance();
- // c.setTime(recordDate);
- //
- // Date end=c.getTime();
- //
- // Date begin= DateUtils.truncDay(c.getTime());
- //
- // //判断是否有重复记录,先删除重复记录
- // List<String> idls = proEconWindpowerInfoMonthService.list().stream()
- // .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0 && i.getLocation().equals(Location.sq.getValue()) ).map(ProEconWindpowerInfoMonth::getId)
- // .collect(Collectors.toList());
- //
- // if (idls != null && idls.size() > 0) {
- //
- // proEconWindpowerInfoMonthService.removeByIds(idls);
- //
- // }
- // for(ProBasicSquare wp:CacheContext.sqls)
- // {
- // if(CacheContext.wppointmap.containsKey(wp.getId()))
- // {
- // Map<String, ProBasicWppoint> pointmap=CacheContext.wppointmap.get(wp.getId());
- //
- // ProEconWindpowerInfoMonth pewp=new ProEconWindpowerInfoMonth();
- // Initial.initial(pewp);
- // pewp.setForeignKeyId("0");
- // pewp.setSquareId(wp.getId());
- // pewp.setLocation(Location.sq.getValue());
- // if(pointmap.containsKey(ContantXk.SSPJFS));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.SSPJFS);
- // List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(),begin.getTime()/1000,end.getTime()/1000);
- // if(!pointls.isEmpty())
- // {
- // DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
- // //日最大风速
- // pewp.setYzdfs(summaryStatistics.getMax());
- // //日最小风速
- // pewp.setYzxfs(summaryStatistics.getMin());
- // //日平均风速
- // pewp.setYpjfs(summaryStatistics.getAverage());
- // }
- //
- // }
- //
- // if(pointmap.containsKey(ContantXk.SSZGL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.SSZGL);
- // List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(),begin.getTime()/1000,end.getTime()/1000);
- // if(!pointls.isEmpty())
- // {
- // DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
- // //日最大功率
- // pewp.setYzdgl(summaryStatistics.getMax());
- // //日最小功率
- // pewp.setYzxgl(summaryStatistics.getMin());
- // //日平均功率
- // pewp.setYpjgl(summaryStatistics.getAverage());
- // }
- // }
- //
- //
- // if(pointmap.containsKey(ContantXk.RFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RFDL);
- //
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日发电量
- // pewp.setYfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RKYDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RKYDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日可用电量
- // pewp.setYkydl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- //
- //
- //
- // if(pointmap.containsKey(ContantXk.RLLFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RLLFDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日理论发电量
- // pewp.setYllfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- //
- // if(pointmap.containsKey(ContantXk.RGZSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RGZSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日故障损失电量
- // pewp.setYgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RCNSLGZSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCNSLGZSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场内受累故障损失电量
- // pewp.setYcnslgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RJXSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RJXSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日检修损失电量
- // pewp.setYjxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RCNSLJXSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCNSLJXSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场内受累检修损失电量
- // pewp.setYcnsljxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RDJSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RDJSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日待机损失电量
- // pewp.setYdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RQXJCLSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RQXJCLSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日缺陷降出力损失电量
- // pewp.setYqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RSDTJSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RSDTJSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日手动停机损失电量
- // pewp.setYsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RXNSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RXNSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日性能损失电量
- // pewp.setYxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RXDTJSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RXDTJSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日限电停机损失电量
- // pewp.setYxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- //
- // if(pointmap.containsKey(ContantXk.RXDJCLSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RXDJCLSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日限电降出力损失电量
- // pewp.setYxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RCWSLDWSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCWSLDWSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场外受累电网损失电量
- // pewp.setYcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RCWSLTQSSDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCWSLTQSSDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日场外受累天气损失电量
- // pewp.setYcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RZFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RZFDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日增发电量
- // pewp.setYzfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RQFDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RQFDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日欠发电量
- // pewp.setYqfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- // if(pointmap.containsKey(ContantXk.RZHD));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RZHD);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日自耗电
- // pewp.setYzhd(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // double rfdlsyz=0.0;
- // double rswdlsyz=0.0;
- // double rgwgwdlsyz=0.0;
- // double rnwgwdlsyz=0.0;
- // if(pointmap.containsKey(ContantXk.RFDLSYZ));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RFDLSYZ);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日发电量(升压站)
- // rfdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYfdldb(rfdlsyz);
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RSWDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RSWDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日上网电量
- // rswdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYswdldb(rswdlsyz);
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RGWGWDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RGWGWDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日工网购网电量
- // rgwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYgwgwdldb(rgwgwdlsyz);
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.RNWGWDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RNWGWDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日农网购网电量
- // rnwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
- // pewp.setYnwgwdldb(rnwgwdlsyz);
- //
- // }
- // }
- //
- // //日综合场用电量(电表)
- // pewp.setYzhcydldb(StringUtils.round(rfdlsyz-rswdlsyz+rgwgwdlsyz+rnwgwdlsyz,2));
- //
- //
- // if(pointmap.containsKey(ContantXk.RCYDL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.RCYDL);
- // PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
- // if(StringUtils.notEmp(pointValue))
- // {
- // //日厂用电量
- // pewp.setYfdcydldb(StringUtils.round(pointValue.getPointValueInDouble(),2));
- //
- // }
- // }
- //
- // if(pointmap.containsKey(ContantXk.TPOINT_WP_CXGL));
- // {
- // ProBasicWppoint point=pointmap.get(ContantXk.TPOINT_WP_CXGL);
- // List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(),begin.getTime()/1000,end.getTime()/1000);
- // if(!pointls.isEmpty())
- // {
- // DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
- // //日最大功率(出线)
- // pewp.setYzdglcx(summaryStatistics.getMax());
- // //日最小功率(出线)
- // pewp.setYzxglcx(summaryStatistics.getMin());
- // //日平均功率(出线)
- // pewp.setYpjglcx(summaryStatistics.getAverage());
- // }
- //
- // }
- //
- // List<ProEconWindpowerInfoDay> wpinfodayls = proEconWindpowerInfoDayService.list().stream()
- // .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
- //// && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
- // && i.getLocation().equals(Location.sq.getValue()))
- // .collect(Collectors.toList());
- //
- //
- // List<ProEconWindpowerInfoMonth> monthls =null;
- // Calendar cl=Calendar.getInstance();
- // cl.setTime(recordDate);
- // if(cl.get(Calendar.DAY_OF_MONTH)==1)
- // {
- // monthls=new ArrayList<>();
- // }else
- // {
- // cl.add(Calendar.DAY_OF_MONTH,-1);
- //
- // }
- //
- // monthls = proEconWindpowerInfoMonthService.list().stream()
- // .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(cl.getTime()))==0
- //// && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
- // && i.getLocation().equals(Location.sq.getValue()))
- // .collect(Collectors.toList());
- // //统计14种状态明细指标的时长和次数
- // calDetiall(pewp,recordDate,wpinfodayls,monthls);
- // //统计7种状态指标的时长和次数
- // calSimple(pewp,recordDate,wpinfodayls);
- //
- // proEconWindpowerInfoMonthService.save(pewp);
- //
- // }
- //
- //
- // }
- //
- // }
- // private void calDetiall(ProEconWindpowerInfoMonth pewp,Date recordDate,List<ProEconWindpowerInfoDay> ls,List<ProEconWindpowerInfoMonth> monthls) throws Exception {
- // // 0 待机
- //// 1 手动停机
- //// 2 正常发电
- //// 3 发电降出力
- //// 4 故障
- //// 5 故障受累
- //// 6 检修
- //// 7 检修受累
- //// 8 限电降出力
- //// 9 限电停机
- //// 10 电网受累
- //// 11 环境受累
- //// 12 通讯中断
- //// 13 设备离线
- //
- //
- // if(monthls.isEmpty())
- // {
- // if(!ls.isEmpty())
- // {
- //
- // //日合计故障小时(明细)
- // DoubleSummaryStatistics summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjgzxsmx()).summaryStatistics();
- // pewp.setYhjgzxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场内受累故障小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcnslgzxsmx()).summaryStatistics();
- // pewp.setYhjcnslgzxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计检修小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjjxxsmx()).summaryStatistics();
- // pewp.setYhjjxxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场内受累检修小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcnsljxxsmx()).summaryStatistics();
- // pewp.setYhjcnsljxxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计待机小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjdjxsmx()).summaryStatistics();
- // pewp.setYhjdjxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计缺陷降出力小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjqxjclxsmx()).summaryStatistics();
- // pewp.setYhjqxjclxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计手动停机小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjsdtjxsmx()).summaryStatistics();
- // pewp.setYhjsdtjxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计性能小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxnxsmx()).summaryStatistics();
- // pewp.setYhjxnxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电停机小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxdtjxsmx()).summaryStatistics();
- // pewp.setYhjxdtjxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电降出力小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxdjclxsmx()).summaryStatistics();
- // pewp.setYhjxdjclxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场外受累电网小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcwsldwxsmx()).summaryStatistics();
- // pewp.setYhjcwsldwxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场外受累电网小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcwsltqxsmx()).summaryStatistics();
- // pewp.setYhjcwsltqxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计通讯中断小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjtxzdxsmx()).summaryStatistics();
- // pewp.setYhjtxzdxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计离线小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjlxxsmx()).summaryStatistics();
- // pewp.setYhjlxxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- // //日合计故障次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjgzcsmx()).summaryStatistics();
- // pewp.setYhjgzcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场内受累故障次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcnslgzcsmx()).summaryStatistics();
- // pewp.setYhjcnslgzcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计检修次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjjxcsmx()).summaryStatistics();
- // pewp.setYhjjxcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场内受累检修次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcnsljxcsmx()).summaryStatistics();
- // pewp.setYhjcnsljxcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计待机次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjdjcsmx()).summaryStatistics();
- // pewp.setYhjdjcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计缺陷降出力次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjqxjclcsmx()).summaryStatistics();
- // pewp.setYhjqxjclcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计手动停机次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjsdtjcsmx()).summaryStatistics();
- // pewp.setYhjsdtjcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计性能次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxncsmx()).summaryStatistics();
- // pewp.setYhjxncsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电停机次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxdtjcsmx()).summaryStatistics();
- // pewp.setYhjxdtjcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电降出力次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxdjclcsmx()).summaryStatistics();
- // pewp.setYhjxdjclcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场外受累电网次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcwsldwcsmx()).summaryStatistics();
- // pewp.setYhjcwsldwcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场外受累电网次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcwsltqcsmx()).summaryStatistics();
- // pewp.setYhjcwsltqcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计通讯中断次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjtxzdcsmx()).summaryStatistics();
- // pewp.setYhjtxzdcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计离线次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjlxcsmx()).summaryStatistics();
- // pewp.setYhjlxcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // }
- // }else {
- // if(!ls.isEmpty())
- // {
- // ProEconWindpowerInfoMonth monthdata=monthls.get(0);
- // //日合计故障小时(明细)
- // DoubleSummaryStatistics summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjgzxsmx()).summaryStatistics();
- //
- // pewp.setYhjgzxsmx(StringUtils.round( monthdata.getYhjgzxsmx()+summaryStatistics.getSum(),2));
- // //日合计场内受累故障小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcnslgzxsmx()).summaryStatistics();
- // pewp.setYhjcnslgzxsmx(StringUtils.round(monthdata.getYhjcnslgzxsmx()+summaryStatistics.getSum(),2));
- // //日合计检修小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjjxxsmx()).summaryStatistics();
- // pewp.setYhjjxxsmx(StringUtils.round(monthdata.getRhjjxxsmx()+summaryStatistics.getSum(),2));
- // //日合计场内受累检修小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcnsljxxsmx()).summaryStatistics();
- // pewp.setYhjcnsljxxsmx(StringUtils.round(monthdata.getRhjcnsljxxsmx()+summaryStatistics.getSum(),2));
- // //日合计待机小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjdjxsmx()).summaryStatistics();
- // pewp.setYhjdjxsmx(StringUtils.round(monthdata.getRhjdjxsmx()+summaryStatistics.getSum(),2));
- // //日合计缺陷降出力小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjqxjclxsmx()).summaryStatistics();
- // pewp.setYhjqxjclxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计手动停机小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjsdtjxsmx()).summaryStatistics();
- // pewp.setYhjsdtjxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计性能小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxnxsmx()).summaryStatistics();
- // pewp.setYhjxnxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电停机小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxdtjxsmx()).summaryStatistics();
- // pewp.setYhjxdtjxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电降出力小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxdjclxsmx()).summaryStatistics();
- // pewp.setYhjxdjclxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场外受累电网小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcwsldwxsmx()).summaryStatistics();
- // pewp.setYhjcwsldwxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场外受累电网小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcwsltqxsmx()).summaryStatistics();
- // pewp.setYhjcwsltqxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计通讯中断小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjtxzdxsmx()).summaryStatistics();
- // pewp.setYhjtxzdxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计离线小时(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjlxxsmx()).summaryStatistics();
- // pewp.setYhjlxxsmx(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- // //日合计故障次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjgzcsmx()).summaryStatistics();
- // pewp.setYhjgzcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场内受累故障次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcnslgzcsmx()).summaryStatistics();
- // pewp.setYhjcnslgzcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计检修次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjjxcsmx()).summaryStatistics();
- // pewp.setYhjjxcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场内受累检修次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcnsljxcsmx()).summaryStatistics();
- // pewp.setYhjcnsljxcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计待机次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjdjcsmx()).summaryStatistics();
- // pewp.setYhjdjcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计缺陷降出力次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjqxjclcsmx()).summaryStatistics();
- // pewp.setYhjqxjclcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计手动停机次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjsdtjcsmx()).summaryStatistics();
- // pewp.setYhjsdtjcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计性能次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxncsmx()).summaryStatistics();
- // pewp.setYhjxncsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电停机次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxdtjcsmx()).summaryStatistics();
- // pewp.setYhjxdtjcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电降出力次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxdjclcsmx()).summaryStatistics();
- // pewp.setYhjxdjclcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场外受累电网次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcwsldwcsmx()).summaryStatistics();
- // pewp.setYhjcwsldwcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计场外受累电网次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjcwsltqcsmx()).summaryStatistics();
- // pewp.setYhjcwsltqcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计通讯中断次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjtxzdcsmx()).summaryStatistics();
- // pewp.setYhjtxzdcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计离线次数(明细)
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjlxcsmx()).summaryStatistics();
- // pewp.setYhjlxcsmx(StringUtils.round(summaryStatistics.getSum(),2));
- // }
- // }
- //
- //
- //
- // }
- //
- //
- //
- // private void calSimple(ProEconWindpowerInfoMonth pewp,Date recordDate,List<ProEconWindpowerInfoDay> ls) throws Exception {
- //// 0 待机
- //// 1 运行
- //// 2 故障
- //// 3 检修
- //// 4 限电
- //// 5 受累
- //// 6 离线
- // if(!ls.isEmpty())
- // {
- // //日合计待机小时
- // DoubleSummaryStatistics summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjdjxs()).summaryStatistics();
- // pewp.setYhjdjxs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计维护停机小时
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjjxtjxs()).summaryStatistics();
- // pewp.setYhjjxtjxs(StringUtils.round(summaryStatistics.getSum(),2));
- // // 日合计待机小时
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjdjxs()).summaryStatistics();
- // pewp.setYhjdjxs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计运行小时
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjyxxs()).summaryStatistics();
- // pewp.setYhjyxxs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电小时
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxdxs()).summaryStatistics();
- // pewp.setYhjxdxs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计通讯中断小时
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjtxzdxs()).summaryStatistics();
- // pewp.setYhjtxzdxs(StringUtils.round(summaryStatistics.getSum(),2));
- //
- //
- // //日合计故障次数
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjdjcs()).summaryStatistics();
- // pewp.setYhjdjcs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计检修次数
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjjxtjcs()).summaryStatistics();
- // pewp.setYhjjxtjcs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计待机次数
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjdjcs()).summaryStatistics();
- // pewp.setYhjdjcs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计性能次数
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjyxcs()).summaryStatistics();
- // pewp.setYhjyxcs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计限电停机次数
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjxdcs()).summaryStatistics();
- // pewp.setYhjxdcs(StringUtils.round(summaryStatistics.getSum(),2));
- // //日合计通讯中断次数
- // summaryStatistics=ls.stream().mapToDouble(n -> n.getRhjtxzdcs()).summaryStatistics();
- // pewp.setYhjtxzdcs(StringUtils.round(summaryStatistics.getSum(),2));
- // }
- //
- // }
- //
- //}
- //
- //
- //
- //
- //
- //
- //
|