WindPowerInfo1Service.java 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572
  1. package com.gyee.generation.service;//package com.gyee.generation.service;
  2. import com.gyee.common.contant.ContantXk;
  3. import com.gyee.common.model.PointData;
  4. import com.gyee.common.model.StringUtils;
  5. import com.gyee.generation.init.CacheContext;
  6. import com.gyee.generation.model.auto.*;
  7. import com.gyee.generation.model.vo.Location;
  8. import com.gyee.generation.service.auto.IProEconPowerstationInfoDay1Service;
  9. import com.gyee.generation.util.DateUtils;
  10. import com.gyee.generation.util.realtimesource.IEdosUtil;
  11. import com.gyee.generation.util.statisticcs.Initial;
  12. import org.springframework.stereotype.Service;
  13. import javax.annotation.Resource;
  14. import java.math.BigDecimal;
  15. import java.math.RoundingMode;
  16. import java.util.*;
  17. import java.util.stream.Collectors;
  18. @Service
  19. public class WindPowerInfo1Service {
  20. // private static final Logger logger = LoggerFactory.getLogger(WindPowerInfo1Service.class);
  21. @Resource
  22. private IEdosUtil edosUtil;
  23. @Resource
  24. private IProEconPowerstationInfoDay1Service proEconPowerstationInfoDay1Service;
  25. /**
  26. * 计算区域日信息
  27. */
  28. public void calRegionInfoDay(Date recordDate) throws Exception {
  29. List<ProEconPowerstationInfoDay1> wpinfodayls = proEconPowerstationInfoDay1Service.list().stream()
  30. .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
  31. // && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
  32. && i.getLocation().equals(Location.cp.getValue()))
  33. .collect(Collectors.toList());
  34. if(!wpinfodayls.isEmpty())
  35. {
  36. Map<String, Map<String, List<ProEconPowerstationInfoDay1>>>rgmap=new HashMap<>();
  37. for(ProEconPowerstationInfoDay1 wpinfo:wpinfodayls)
  38. {
  39. if(rgmap.containsKey(wpinfo.getRegionId()))
  40. {
  41. Map<String, List<ProEconPowerstationInfoDay1>> map=rgmap.get(wpinfo.getRegionId());
  42. List<ProEconPowerstationInfoDay1> qbls=map.get("qb");
  43. List<ProEconPowerstationInfoDay1> gfls=map.get("fd");
  44. List<ProEconPowerstationInfoDay1> fdls=map.get("gf");
  45. if(wpinfo.getForeignKeyId().equals("-1"))
  46. {
  47. fdls.add(wpinfo);
  48. }else if(wpinfo.getForeignKeyId().equals("-2")){
  49. gfls.add(wpinfo);
  50. }
  51. qbls.add(wpinfo);
  52. }else
  53. {
  54. Map<String, List<ProEconPowerstationInfoDay1>> map=new HashMap<>();
  55. List<ProEconPowerstationInfoDay1> qbls=new ArrayList<>();
  56. List<ProEconPowerstationInfoDay1> gfls=new ArrayList<>();
  57. List<ProEconPowerstationInfoDay1> fdls=new ArrayList<>();
  58. if(wpinfo.getForeignKeyId().equals("-1"))
  59. {
  60. fdls.add(wpinfo);
  61. }else if(wpinfo.getForeignKeyId().equals("-2")){
  62. gfls.add(wpinfo);
  63. }
  64. qbls.add(wpinfo);
  65. map.put("qb",qbls);
  66. map.put("fd",fdls);
  67. map.put("gf",gfls);
  68. rgmap.put(wpinfo.getRegionId(),map);
  69. }
  70. }
  71. //判断是否有重复记录,先删除重复记录
  72. List<String> idls = proEconPowerstationInfoDay1Service.list().stream()
  73. .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
  74. // && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
  75. && i.getLocation().equals(Location.rg.getValue())).map(ProEconPowerstationInfoDay1::getId)
  76. .collect(Collectors.toList());
  77. if (idls.size() > 0) {
  78. proEconPowerstationInfoDay1Service.removeByIds(idls);
  79. }
  80. for(Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay1>>> entry:rgmap.entrySet()){
  81. Map<String, List<ProEconPowerstationInfoDay1>> map=entry.getValue();
  82. List<ProEconPowerstationInfoDay1> qbls=map.get("qb");
  83. List<ProEconPowerstationInfoDay1> gfls=map.get("fd");
  84. List<ProEconPowerstationInfoDay1> fdls=map.get("gf");
  85. // if(CacheContext.cpwpmap.size()==qbls.size())
  86. // {
  87. ProEconPowerstationInfoDay1 qb=new ProEconPowerstationInfoDay1();
  88. ProEconPowerstationInfoDay1 fd=new ProEconPowerstationInfoDay1();
  89. ProEconPowerstationInfoDay1 gf=new ProEconPowerstationInfoDay1();
  90. if(CacheContext.rgmap.containsKey(entry.getKey()))
  91. {
  92. ProBasicRegion cp=CacheContext.rgmap.get(entry.getKey());
  93. gf.setRegionId(cp.getId());
  94. gf.setRecordDate(DateUtils.truncDay(recordDate));
  95. gf.setForeignKeyId("-2");
  96. gf.setLocation(Location.rg.getValue());
  97. fd.setRegionId(cp.getId());
  98. fd.setRecordDate(DateUtils.truncDay(recordDate));
  99. fd.setForeignKeyId("-1");
  100. fd.setLocation(Location.rg.getValue());
  101. qb.setRegionId(cp.getId());
  102. qb.setRecordDate(DateUtils.truncDay(recordDate));
  103. qb.setForeignKeyId("0");
  104. qb.setLocation(Location.rg.getValue());
  105. //计算区域级全部
  106. calCp(qb,qbls);
  107. //计算公司级风电场站
  108. calCp(fd,fdls);
  109. //计算公司级光电场站
  110. calCp(gf,gfls);
  111. proEconPowerstationInfoDay1Service.save(qb);
  112. proEconPowerstationInfoDay1Service.save(fd);
  113. proEconPowerstationInfoDay1Service.save(gf);
  114. }
  115. // }else
  116. // {
  117. // logger.debug("公司所属场站数量与保存的场站日信息数量不一致,未进行{0}统计-------结束", entry.getKey());
  118. //
  119. // }
  120. }
  121. }
  122. }
  123. /**
  124. * 计算公司日信息
  125. */
  126. public void calCompanyInfoDay(Date recordDate) {
  127. List<ProEconPowerstationInfoDay1> wpinfodayls = proEconPowerstationInfoDay1Service.list().stream()
  128. .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
  129. && i.getLocation().equals(Location.wp.getValue()))
  130. .collect(Collectors.toList());
  131. if(!wpinfodayls.isEmpty())
  132. {
  133. Map<String, Map<String, List<ProEconPowerstationInfoDay1>>>cpmap=new HashMap<>();
  134. for(ProEconPowerstationInfoDay1 wpinfo:wpinfodayls)
  135. {
  136. if(cpmap.containsKey(wpinfo.getCompanyId()))
  137. {
  138. Map<String, List<ProEconPowerstationInfoDay1>> map=cpmap.get(wpinfo.getCompanyId());
  139. List<ProEconPowerstationInfoDay1> qbls=map.get("qb");
  140. List<ProEconPowerstationInfoDay1> gfls=map.get("fd");
  141. List<ProEconPowerstationInfoDay1> fdls=map.get("gf");
  142. if(wpinfo.getWindpowerstationId().contains("FDC"))
  143. {
  144. fdls.add(wpinfo);
  145. }else {
  146. gfls.add(wpinfo);
  147. }
  148. qbls.add(wpinfo);
  149. }else
  150. {
  151. Map<String, List<ProEconPowerstationInfoDay1>> map=new HashMap<>();
  152. List<ProEconPowerstationInfoDay1> qbls=new ArrayList<>();
  153. List<ProEconPowerstationInfoDay1> gfls=new ArrayList<>();
  154. List<ProEconPowerstationInfoDay1> fdls=new ArrayList<>();
  155. if(wpinfo.getWindpowerstationId().contains("FDC"))
  156. {
  157. fdls.add(wpinfo);
  158. }else {
  159. gfls.add(wpinfo);
  160. }
  161. qbls.add(wpinfo);
  162. map.put("qb",qbls);
  163. map.put("fd",fdls);
  164. map.put("gf",gfls);
  165. cpmap.put(wpinfo.getCompanyId(),map);
  166. }
  167. }
  168. //判断是否有重复记录,先删除重复记录
  169. List<String> idls = proEconPowerstationInfoDay1Service.list().stream()
  170. .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
  171. && i.getLocation().equals(Location.cp.getValue())).map(ProEconPowerstationInfoDay1::getId)
  172. .collect(Collectors.toList());
  173. if (idls.size() > 0) {
  174. proEconPowerstationInfoDay1Service.removeByIds(idls);
  175. }
  176. for(Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay1>>> entry:cpmap.entrySet()){
  177. Map<String, List<ProEconPowerstationInfoDay1>> map=entry.getValue();
  178. List<ProEconPowerstationInfoDay1> qbls=map.get("qb");
  179. List<ProEconPowerstationInfoDay1> gfls=map.get("fd");
  180. List<ProEconPowerstationInfoDay1> fdls=map.get("gf");
  181. // if(CacheContext.cpwpmap.size()==qbls.size())
  182. // {
  183. ProEconPowerstationInfoDay1 qb=new ProEconPowerstationInfoDay1();
  184. ProEconPowerstationInfoDay1 fd=new ProEconPowerstationInfoDay1();
  185. ProEconPowerstationInfoDay1 gf=new ProEconPowerstationInfoDay1();
  186. if(CacheContext.cpmap.containsKey(entry.getKey()))
  187. {
  188. ProBasicCompany cp=CacheContext.cpmap.get(entry.getKey());
  189. gf.setRegionId(cp.getRegionId());
  190. gf.setCompanyId(cp.getId());
  191. gf.setRecordDate(DateUtils.truncDay(recordDate));
  192. gf.setForeignKeyId("-2");
  193. gf.setLocation(Location.cp.getValue());
  194. fd.setRegionId(cp.getRegionId());
  195. fd.setCompanyId(cp.getId());
  196. fd.setRecordDate(DateUtils.truncDay(recordDate));
  197. fd.setForeignKeyId("-1");
  198. fd.setLocation(Location.cp.getValue());
  199. qb.setRegionId(cp.getRegionId());
  200. qb.setCompanyId(cp.getId());
  201. qb.setRecordDate(DateUtils.truncDay(recordDate));
  202. qb.setForeignKeyId("0");
  203. qb.setLocation(Location.cp.getValue());
  204. //计算公司级全部场站
  205. calCp(qb,qbls);
  206. //计算公司级风电场站
  207. calCp(fd,fdls);
  208. //计算公司级光电场站
  209. calCp(gf,gfls);
  210. proEconPowerstationInfoDay1Service.save(qb);
  211. proEconPowerstationInfoDay1Service.save(fd);
  212. proEconPowerstationInfoDay1Service.save(gf);
  213. }
  214. // }else
  215. // {
  216. // logger.debug("公司所属场站数量与保存的场站日信息数量不一致,未进行{0}统计-------结束", entry.getKey());
  217. //
  218. // }
  219. }
  220. }
  221. }
  222. private void calCp(ProEconPowerstationInfoDay1 pewp,List<ProEconPowerstationInfoDay1> ls) {
  223. if(!ls.isEmpty())
  224. {
  225. // DoubleSummaryStatistics summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRzdfs).summaryStatistics();
  226. // //日最大风速
  227. // pewp.setRzdfs(summaryStatistics.getMax());
  228. // //日最小风速
  229. // summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRzxfs).summaryStatistics();
  230. // pewp.setRzxfs(summaryStatistics.getMin());
  231. // //日平均风速
  232. // summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRpjfs).summaryStatistics();
  233. // pewp.setRpjfs(summaryStatistics.getAverage());
  234. //
  235. // summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRzdgl).summaryStatistics();
  236. // //日最大功率
  237. // pewp.setRzdgl(summaryStatistics.getMax());
  238. // //日最小功率
  239. // summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRzxgl).summaryStatistics();
  240. // pewp.setRzxgl(summaryStatistics.getMin());
  241. // //日平均功率
  242. // summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRpjgl).summaryStatistics();
  243. // pewp.setRpjgl(summaryStatistics.getAverage());
  244. //日发电量
  245. DoubleSummaryStatistics summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRfdl).summaryStatistics();
  246. pewp.setRfdl(StringUtils.round(summaryStatistics.getSum(),2));
  247. //日可用电量
  248. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRkydl).summaryStatistics();
  249. pewp.setRkydl(StringUtils.round(summaryStatistics.getSum(),2));
  250. //日理论发电量
  251. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRllfdl).summaryStatistics();
  252. pewp.setRllfdl(StringUtils.round(summaryStatistics.getSum(),2));
  253. //日故障损失电量
  254. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRgzssdl).summaryStatistics();
  255. pewp.setRgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
  256. //日场内受累故障损失电量
  257. pewp.setRcnslgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
  258. //日检修损失电量
  259. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRjxssdl).summaryStatistics();
  260. pewp.setRjxssdl(StringUtils.round(summaryStatistics.getSum(),2));
  261. //日场内受累检修损失电量
  262. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRcnsljxssdl).summaryStatistics();
  263. pewp.setRcnsljxssdl(StringUtils.round(summaryStatistics.getSum(),2));
  264. //日待机损失电量
  265. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRdjssdl).summaryStatistics();
  266. pewp.setRdjssdl(StringUtils.round(summaryStatistics.getSum(),2));
  267. //日缺陷降出力损失电量
  268. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRqxjclssdl).summaryStatistics();
  269. pewp.setRqxjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
  270. //日手动停机损失电量
  271. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRsdtjssdl).summaryStatistics();
  272. pewp.setRsdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
  273. //日性能损失电量
  274. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRxnssdl).summaryStatistics();
  275. pewp.setRxnssdl(StringUtils.round(summaryStatistics.getSum(),2));
  276. //日限电停机损失电量
  277. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRxdtjssdl).summaryStatistics();
  278. pewp.setRxdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
  279. //日限电降出力损失电量
  280. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRxdjclssdl).summaryStatistics();
  281. pewp.setRxdjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
  282. //日场外受累电网损失电量
  283. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRcwsldwssdl).summaryStatistics();
  284. pewp.setRcwsldwssdl(StringUtils.round(summaryStatistics.getSum(),2));
  285. //日场外受累天气损失电量
  286. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRcwsltqssdl).summaryStatistics();
  287. pewp.setRcwsltqssdl(StringUtils.round(summaryStatistics.getSum(),2));
  288. //日增发电量
  289. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRzfdl).summaryStatistics();
  290. pewp.setRzfdl(StringUtils.round(summaryStatistics.getSum(),2));
  291. //日欠发电量
  292. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRqfdl).summaryStatistics();
  293. pewp.setRqfdl(StringUtils.round(summaryStatistics.getSum(),2));
  294. //日自耗电
  295. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRzhd).summaryStatistics();
  296. pewp.setRzhd(StringUtils.round(summaryStatistics.getSum(),2));
  297. //月发电量
  298. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYfdl).summaryStatistics();
  299. pewp.setYfdl(StringUtils.round(summaryStatistics.getSum(),2));
  300. //月可用电量
  301. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYkydl).summaryStatistics();
  302. pewp.setYkydl(StringUtils.round(summaryStatistics.getSum(),2));
  303. //月理论发电量
  304. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYllfdl).summaryStatistics();
  305. pewp.setYllfdl(StringUtils.round(summaryStatistics.getSum(),2));
  306. //月故障损失电量
  307. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYgzssdl).summaryStatistics();
  308. pewp.setYgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
  309. //月场内受累故障损失电量
  310. pewp.setYcnslgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
  311. //月检修损失电量
  312. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYjxssdl).summaryStatistics();
  313. pewp.setYjxssdl(StringUtils.round(summaryStatistics.getSum(),2));
  314. //月场内受累检修损失电量
  315. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYcnsljxssdl).summaryStatistics();
  316. pewp.setYcnsljxssdl(StringUtils.round(summaryStatistics.getSum(),2));
  317. //月待机损失电量
  318. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYdjssdl).summaryStatistics();
  319. pewp.setYdjssdl(StringUtils.round(summaryStatistics.getSum(),2));
  320. //月缺陷降出力损失电量
  321. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYqxjclssdl).summaryStatistics();
  322. pewp.setYqxjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
  323. //月手动停机损失电量
  324. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYsdtjssdl).summaryStatistics();
  325. pewp.setYsdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
  326. //月性能损失电量
  327. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYxnssdl).summaryStatistics();
  328. pewp.setYxnssdl(StringUtils.round(summaryStatistics.getSum(),2));
  329. //月限电停机损失电量
  330. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYxdtjssdl).summaryStatistics();
  331. pewp.setYxdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
  332. //月限电降出力损失电量
  333. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYxdjclssdl).summaryStatistics();
  334. pewp.setYxdjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
  335. //月场外受累电网损失电量
  336. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYcwsldwssdl).summaryStatistics();
  337. pewp.setYcwsldwssdl(StringUtils.round(summaryStatistics.getSum(),2));
  338. //月场外受累天气损失电量
  339. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYcwsltqssdl).summaryStatistics();
  340. pewp.setYcwsltqssdl(StringUtils.round(summaryStatistics.getSum(),2));
  341. //月增发电量
  342. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYzfdl).summaryStatistics();
  343. pewp.setYzfdl(StringUtils.round(summaryStatistics.getSum(),2));
  344. //月欠发电量
  345. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYqfdl).summaryStatistics();
  346. pewp.setYqfdl(StringUtils.round(summaryStatistics.getSum(),2));
  347. //月自耗电
  348. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYzhd).summaryStatistics();
  349. pewp.setYzhd(StringUtils.round(summaryStatistics.getSum(),2));
  350. //年发电量
  351. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNfdl).summaryStatistics();
  352. pewp.setNfdl(StringUtils.round(summaryStatistics.getSum(),2));
  353. //年可用电量
  354. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNkydl).summaryStatistics();
  355. pewp.setNkydl(StringUtils.round(summaryStatistics.getSum(),2));
  356. //年理论发电量
  357. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNllfdl).summaryStatistics();
  358. pewp.setNllfdl(StringUtils.round(summaryStatistics.getSum(),2));
  359. //年故障损失电量
  360. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNgzssdl).summaryStatistics();
  361. pewp.setNgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
  362. //年场内受累故障损失电量
  363. pewp.setNcnslgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
  364. //年检修损失电量
  365. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNjxssdl).summaryStatistics();
  366. pewp.setNjxssdl(StringUtils.round(summaryStatistics.getSum(),2));
  367. //年场内受累检修损失电量
  368. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNcnsljxssdl).summaryStatistics();
  369. pewp.setNcnsljxssdl(StringUtils.round(summaryStatistics.getSum(),2));
  370. //年待机损失电量
  371. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNdjssdl).summaryStatistics();
  372. pewp.setNdjssdl(StringUtils.round(summaryStatistics.getSum(),2));
  373. //年缺陷降出力损失电量
  374. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNqxjclssdl).summaryStatistics();
  375. pewp.setNqxjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
  376. //年手动停机损失电量
  377. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNsdtjssdl).summaryStatistics();
  378. pewp.setNsdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
  379. //年性能损失电量
  380. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNxnssdl).summaryStatistics();
  381. pewp.setNxnssdl(StringUtils.round(summaryStatistics.getSum(),2));
  382. //年限电停机损失电量
  383. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNxdtjssdl).summaryStatistics();
  384. pewp.setNxdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
  385. //年限电降出力损失电量
  386. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNxdjclssdl).summaryStatistics();
  387. pewp.setNxdjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
  388. //年场外受累电网损失电量
  389. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNcwsldwssdl).summaryStatistics();
  390. pewp.setNcwsldwssdl(StringUtils.round(summaryStatistics.getSum(),2));
  391. //年场外受累天气损失电量
  392. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNcwsltqssdl).summaryStatistics();
  393. pewp.setNcwsltqssdl(StringUtils.round(summaryStatistics.getSum(),2));
  394. //年增发电量
  395. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNzfdl).summaryStatistics();
  396. pewp.setNzfdl(StringUtils.round(summaryStatistics.getSum(),2));
  397. //年欠发电量
  398. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNqfdl).summaryStatistics();
  399. pewp.setNqfdl(StringUtils.round(summaryStatistics.getSum(),2));
  400. //年自耗电
  401. summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNzhd).summaryStatistics();
  402. pewp.setNzhd(StringUtils.round(summaryStatistics.getSum(),2));
  403. }
  404. }
  405. /**
  406. * 计算场站日信息
  407. */
  408. public void calWindpowerInfoDay(Date recordDate) throws Exception {
  409. Calendar c=Calendar.getInstance();
  410. c.setTime(recordDate);
  411. Date end=c.getTime();
  412. Date begin= DateUtils.truncDay(c.getTime());
  413. //判断是否有重复记录,先删除重复记录
  414. List<String> idls = proEconPowerstationInfoDay1Service.list().stream()
  415. .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
  416. && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
  417. && i.getLocation().equals(Location.wp.getValue())).map(ProEconPowerstationInfoDay1::getId)
  418. .collect(Collectors.toList());
  419. if (idls.size() > 0) {
  420. proEconPowerstationInfoDay1Service.removeByIds(idls);
  421. }
  422. for(ProBasicPowerstation wp:CacheContext.wpls)
  423. {
  424. if(CacheContext.wppointmap.containsKey(wp.getId()))
  425. {
  426. Map<String, ProBasicPowerstationPoint> pointmap=CacheContext.wppointmap.get(wp.getId());
  427. ProEconPowerstationInfoDay1 pewp=new ProEconPowerstationInfoDay1();
  428. Initial.initial(pewp);
  429. pewp.setRegionId(wp.getRegionId());
  430. pewp.setCompanyId(wp.getCompanyId());
  431. pewp.setRecordDate(DateUtils.truncDay(recordDate));
  432. pewp.setForeignKeyId("0");
  433. pewp.setWindpowerstationId(wp.getId());
  434. pewp.setLocation(Location.wp.getValue());
  435. //昨日的统计结果
  436. List<ProEconPowerstationInfoDay1> pepid1ls =new ArrayList<>();
  437. Calendar cl=Calendar.getInstance();
  438. cl.setTime(recordDate);
  439. //昨日的统计结果
  440. cl.add(Calendar.DAY_OF_MONTH,-1);
  441. if(cl.get(Calendar.DAY_OF_MONTH)!=1)
  442. {
  443. pepid1ls = proEconPowerstationInfoDay1Service.list().stream()
  444. .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(cl.getTime())) == 0
  445. && i.getWindpowerstationId().equals(wp.getId())
  446. && i.getLocation().equals(Location.wp.getValue()))
  447. .collect(Collectors.toList());
  448. }
  449. extracted(recordDate, end, begin, pointmap, pewp,pepid1ls);
  450. //*******************************************年信息统计*********************************************************/
  451. proEconPowerstationInfoDay1Service.save(pewp);
  452. }
  453. }
  454. }
  455. /**
  456. * 计算项目日信息
  457. */
  458. public void calProjectInfoDay(Date recordDate) throws Exception {
  459. Calendar c=Calendar.getInstance();
  460. c.setTime(recordDate);
  461. Date end=c.getTime();
  462. Date begin= DateUtils.truncDay(c.getTime());
  463. //判断是否有重复记录,先删除重复记录
  464. List<String> idls = proEconPowerstationInfoDay1Service.list().stream()
  465. .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
  466. && CacheContext.pjmap.containsKey(i.getProjectId())
  467. && i.getLocation().equals(Location.pj.getValue())).map(ProEconPowerstationInfoDay1::getId)
  468. .collect(Collectors.toList());
  469. if (idls.size() > 0) {
  470. proEconPowerstationInfoDay1Service.removeByIds(idls);
  471. }
  472. for(ProBasicProject pj:CacheContext.pjls)
  473. {
  474. if(CacheContext.wppointmap.containsKey(pj.getId()))
  475. {
  476. Map<String, ProBasicPowerstationPoint> pointmap=CacheContext.wppointmap.get(pj.getId());
  477. ProEconPowerstationInfoDay1 pewp=new ProEconPowerstationInfoDay1();
  478. Initial.initial(pewp);
  479. pewp.setForeignKeyId("0");
  480. pewp.setWindpowerstationId(pj.getWindpowerstationId());
  481. pewp.setProjectId(pj.getId());
  482. pewp.setLocation(Location.pj.getValue());
  483. pewp.setRecordDate(DateUtils.truncDay(recordDate));
  484. //昨日的统计结果
  485. List<ProEconPowerstationInfoDay1> pepid1ls =new ArrayList<>();
  486. Calendar cl=Calendar.getInstance();
  487. cl.setTime(recordDate);
  488. //昨日的统计结果
  489. cl.add(Calendar.DAY_OF_MONTH,-1);
  490. if(cl.get(Calendar.DAY_OF_MONTH)!=1)
  491. {
  492. pepid1ls = proEconPowerstationInfoDay1Service.list().stream()
  493. .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(cl.getTime())) == 0
  494. && i.getProjectId().equals(pj.getId())
  495. && i.getLocation().equals(Location.pj.getValue()))
  496. .collect(Collectors.toList());
  497. }
  498. extracted(recordDate, end, begin, pointmap, pewp,pepid1ls);
  499. proEconPowerstationInfoDay1Service.save(pewp);
  500. }
  501. }
  502. }
  503. /**
  504. * 计算线路日信息
  505. */
  506. public void calLineInfoDay(Date recordDate) throws Exception {
  507. Calendar c=Calendar.getInstance();
  508. c.setTime(recordDate);
  509. Date end=c.getTime();
  510. Date begin= DateUtils.truncDay(c.getTime());
  511. //判断是否有重复记录,先删除重复记录
  512. List<String> idls = proEconPowerstationInfoDay1Service.list().stream()
  513. .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
  514. && CacheContext.lnmap.containsKey(i.getLineId())
  515. && i.getLocation().equals(Location.ln.getValue()) ).map(ProEconPowerstationInfoDay1::getId)
  516. .collect(Collectors.toList());
  517. if (idls.size() > 0) {
  518. proEconPowerstationInfoDay1Service.removeByIds(idls);
  519. }
  520. for(ProBasicLine ln:CacheContext.lnls)
  521. {
  522. if(CacheContext.wppointmap.containsKey(ln.getId()))
  523. {
  524. Map<String, ProBasicPowerstationPoint> pointmap=CacheContext.wppointmap.get(ln.getId());
  525. ProEconPowerstationInfoDay1 pewp=new ProEconPowerstationInfoDay1();
  526. Initial.initial(pewp);
  527. pewp.setForeignKeyId("0");
  528. pewp.setLineId(ln.getId());
  529. pewp.setLocation(Location.ln.getValue());
  530. pewp.setProjectId(ln.getProjectId());
  531. pewp.setRecordDate(DateUtils.truncDay(recordDate));
  532. //昨日的统计结果
  533. List<ProEconPowerstationInfoDay1> pepid1ls =new ArrayList<>();
  534. Calendar cl=Calendar.getInstance();
  535. cl.setTime(recordDate);
  536. //昨日的统计结果
  537. cl.add(Calendar.DAY_OF_MONTH,-1);
  538. if(cl.get(Calendar.DAY_OF_MONTH)!=1)
  539. {
  540. pepid1ls = proEconPowerstationInfoDay1Service.list().stream()
  541. .filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(cl.getTime())) == 0
  542. && i.getLineId().equals(ln.getId())
  543. && i.getLocation().equals(Location.ln.getValue()))
  544. .collect(Collectors.toList());
  545. }
  546. extracted(recordDate, end, begin, pointmap, pewp,pepid1ls);
  547. proEconPowerstationInfoDay1Service.save(pewp);
  548. }
  549. }
  550. }
  551. private void extracted(Date recordDate, Date end, Date begin, Map<String, ProBasicPowerstationPoint> pointmap, ProEconPowerstationInfoDay1 pewp, List<ProEconPowerstationInfoDay1> pepid1ls) throws Exception {
  552. //*******************************************日信息统计*********************************************************/
  553. if(pointmap.containsKey(ContantXk.SSPJFS))
  554. {
  555. ProBasicPowerstationPoint point= pointmap.get(ContantXk.SSPJFS);
  556. List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime()/1000, end.getTime()/1000);
  557. if(!pointls.isEmpty())
  558. {
  559. DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(PointData::getPointValueInDouble).summaryStatistics();
  560. //日最大风速
  561. pewp.setRzdfs(summaryStatistics.getMax());
  562. //日最小风速
  563. pewp.setRzxfs(summaryStatistics.getMin());
  564. //日平均风速
  565. pewp.setRpjfs(summaryStatistics.getAverage());
  566. }
  567. }
  568. if(pointmap.containsKey(ContantXk.SSZGL))
  569. {
  570. ProBasicPowerstationPoint point= pointmap.get(ContantXk.SSZGL);
  571. List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime()/1000, end.getTime()/1000);
  572. if(!pointls.isEmpty())
  573. {
  574. DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(PointData::getPointValueInDouble).summaryStatistics();
  575. //日最大功率
  576. pewp.setRzdgl(summaryStatistics.getMax());
  577. //日最小功率
  578. pewp.setRzxgl(summaryStatistics.getMin());
  579. //日平均功率
  580. pewp.setRpjgl(summaryStatistics.getAverage());
  581. }
  582. }
  583. if(pointmap.containsKey(ContantXk.RFDL))
  584. {
  585. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RFDL);
  586. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  587. if(StringUtils.notEmp(pointValue))
  588. {
  589. //日发电量
  590. pewp.setRfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  591. }
  592. }
  593. if(pointmap.containsKey(ContantXk.RKYDL))
  594. {
  595. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RKYDL);
  596. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  597. if(StringUtils.notEmp(pointValue))
  598. {
  599. //日可用电量
  600. pewp.setRkydl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  601. }
  602. }
  603. if(pointmap.containsKey(ContantXk.RLLFDL))
  604. {
  605. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RLLFDL);
  606. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  607. if(StringUtils.notEmp(pointValue))
  608. {
  609. //日理论发电量
  610. pewp.setRllfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  611. }
  612. }
  613. if(pointmap.containsKey(ContantXk.RGZSSDL))
  614. {
  615. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RGZSSDL);
  616. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  617. if(StringUtils.notEmp(pointValue))
  618. {
  619. //日故障损失电量
  620. pewp.setRgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  621. }
  622. }
  623. if(pointmap.containsKey(ContantXk.RCNSLGZSSDL))
  624. {
  625. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RCNSLGZSSDL);
  626. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  627. if(StringUtils.notEmp(pointValue))
  628. {
  629. //日场内受累故障损失电量
  630. pewp.setRcnslgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  631. }
  632. }
  633. if(pointmap.containsKey(ContantXk.RJXSSDL))
  634. {
  635. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RJXSSDL);
  636. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  637. if(StringUtils.notEmp(pointValue))
  638. {
  639. //日检修损失电量
  640. pewp.setRjxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  641. }
  642. }
  643. if(pointmap.containsKey(ContantXk.RCNSLJXSSDL))
  644. {
  645. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RCNSLJXSSDL);
  646. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  647. if(StringUtils.notEmp(pointValue))
  648. {
  649. //日场内受累检修损失电量
  650. pewp.setRcnsljxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  651. }
  652. }
  653. if(pointmap.containsKey(ContantXk.RDJSSDL))
  654. {
  655. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RDJSSDL);
  656. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  657. if(StringUtils.notEmp(pointValue))
  658. {
  659. //日待机损失电量
  660. pewp.setRdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  661. }
  662. }
  663. if(pointmap.containsKey(ContantXk.RQXJCLSSDL))
  664. {
  665. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RQXJCLSSDL);
  666. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  667. if(StringUtils.notEmp(pointValue))
  668. {
  669. //日缺陷降出力损失电量
  670. pewp.setRqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  671. }
  672. }
  673. if(pointmap.containsKey(ContantXk.RSDTJSSDL))
  674. {
  675. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RSDTJSSDL);
  676. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  677. if(StringUtils.notEmp(pointValue))
  678. {
  679. //日手动停机损失电量
  680. pewp.setRsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  681. }
  682. }
  683. if(pointmap.containsKey(ContantXk.RXNSSDL))
  684. {
  685. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RXNSSDL);
  686. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  687. if(StringUtils.notEmp(pointValue))
  688. {
  689. //日性能损失电量
  690. pewp.setRxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  691. }
  692. }
  693. if(pointmap.containsKey(ContantXk.RXDTJSSDL))
  694. {
  695. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RXDTJSSDL);
  696. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  697. if(StringUtils.notEmp(pointValue))
  698. {
  699. //日限电停机损失电量
  700. pewp.setRxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  701. }
  702. }
  703. if(pointmap.containsKey(ContantXk.RXDJCLSSDL))
  704. {
  705. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RXDJCLSSDL);
  706. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  707. if(StringUtils.notEmp(pointValue))
  708. {
  709. //日限电降出力损失电量
  710. pewp.setRxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  711. }
  712. }
  713. if(pointmap.containsKey(ContantXk.RCWSLDWSSDL))
  714. {
  715. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RCWSLDWSSDL);
  716. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  717. if(StringUtils.notEmp(pointValue))
  718. {
  719. //日场外受累电网损失电量
  720. pewp.setRcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  721. }
  722. }
  723. if(pointmap.containsKey(ContantXk.RCWSLTQSSDL))
  724. {
  725. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RCWSLTQSSDL);
  726. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  727. if(StringUtils.notEmp(pointValue))
  728. {
  729. //日场外受累天气损失电量
  730. pewp.setRcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  731. }
  732. }
  733. if(pointmap.containsKey(ContantXk.RZFDL))
  734. {
  735. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RZFDL);
  736. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  737. if(StringUtils.notEmp(pointValue))
  738. {
  739. //日增发电量
  740. pewp.setRzfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  741. }
  742. }
  743. if(pointmap.containsKey(ContantXk.RQFDL))
  744. {
  745. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RQFDL);
  746. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  747. if(StringUtils.notEmp(pointValue))
  748. {
  749. //日欠发电量
  750. pewp.setRqfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  751. }
  752. }
  753. if(pointmap.containsKey(ContantXk.RZHD))
  754. {
  755. ProBasicPowerstationPoint point= pointmap.get(ContantXk.RZHD);
  756. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  757. if(StringUtils.notEmp(pointValue))
  758. {
  759. //日自耗电
  760. pewp.setRzhd(StringUtils.round(pointValue.getPointValueInDouble(),2));
  761. }
  762. }
  763. //*******************************************日信息统计*********************************************************/
  764. //*******************************************月信息统计*********************************************************/
  765. if(pepid1ls.isEmpty())
  766. {
  767. setPowerandSpeedMonth(pewp);
  768. }else
  769. {
  770. ProEconPowerstationInfoDay1 pepid=pepid1ls.get(0);
  771. //如果昨日大于今日最大功率
  772. if(pepid.getYzdgl()> pewp.getRzdgl())
  773. {
  774. pewp.setYzdgl(pepid.getYzdgl());
  775. }else {
  776. pewp.setYzdgl(pewp.getRzdgl());
  777. }
  778. //如果昨日大于今日最大风速
  779. if(pepid.getYzdfs()> pewp.getRzdfs())
  780. {
  781. pewp.setYzdfs(pepid.getYzdfs());
  782. }else
  783. {
  784. pewp.setYzdfs(pewp.getRzdfs());
  785. }
  786. //如果昨日小于今日最小功率
  787. if(pepid.getYzxgl()< pewp.getRzxgl())
  788. {
  789. pewp.setYzxgl(pepid.getYzxgl());
  790. }else
  791. {
  792. pewp.setYzxgl(pewp.getRzxgl());
  793. }
  794. //如果昨日小于今日最小风速
  795. if(pepid.getYzxfs()< pewp.getRzxfs())
  796. {
  797. pewp.setYzxfs(pepid.getYzxfs());
  798. }else
  799. {
  800. pewp.setYzxfs(pewp.getRzxfs());
  801. }
  802. double pjfs = BigDecimal.valueOf(pewp.getYpjfs() + pepid.getRpjfs()).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
  803. pewp.setYzxfs(pjfs);
  804. double pjgl = BigDecimal.valueOf(pewp.getYpjgl() + pepid.getRpjgl()).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
  805. pewp.setYzxgl(pjgl);
  806. }
  807. if(pointmap.containsKey(ContantXk.YFDL))
  808. {
  809. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YFDL);
  810. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  811. if(StringUtils.notEmp(pointValue))
  812. {
  813. //月发电量
  814. pewp.setYfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  815. }
  816. }
  817. if(pointmap.containsKey(ContantXk.YKYDL))
  818. {
  819. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YKYDL);
  820. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  821. if(StringUtils.notEmp(pointValue))
  822. {
  823. //月可用电量
  824. pewp.setYkydl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  825. }
  826. }
  827. if(pointmap.containsKey(ContantXk.YLLFDL))
  828. {
  829. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YLLFDL);
  830. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  831. if(StringUtils.notEmp(pointValue))
  832. {
  833. //月理论发电量
  834. pewp.setYllfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  835. }
  836. }
  837. if(pointmap.containsKey(ContantXk.YGZSSDL))
  838. {
  839. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YGZSSDL);
  840. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  841. if(StringUtils.notEmp(pointValue))
  842. {
  843. //月故障损失电量
  844. pewp.setYgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  845. }
  846. }
  847. if(pointmap.containsKey(ContantXk.YCNSLGZSSDL))
  848. {
  849. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YCNSLGZSSDL);
  850. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  851. if(StringUtils.notEmp(pointValue))
  852. {
  853. //月场内受累故障损失电量
  854. pewp.setYcnslgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  855. }
  856. }
  857. if(pointmap.containsKey(ContantXk.YJXSSDL))
  858. {
  859. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YJXSSDL);
  860. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  861. if(StringUtils.notEmp(pointValue))
  862. {
  863. //月检修损失电量
  864. pewp.setYjxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  865. }
  866. }
  867. if(pointmap.containsKey(ContantXk.YCNSLJXSSDL))
  868. {
  869. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YCNSLJXSSDL);
  870. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  871. if(StringUtils.notEmp(pointValue))
  872. {
  873. //月场内受累检修损失电量
  874. pewp.setYcnsljxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  875. }
  876. }
  877. if(pointmap.containsKey(ContantXk.YDJSSDL))
  878. {
  879. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YDJSSDL);
  880. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  881. if(StringUtils.notEmp(pointValue))
  882. {
  883. //月待机损失电量
  884. pewp.setYdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  885. }
  886. }
  887. if(pointmap.containsKey(ContantXk.YQXJCLSSDL))
  888. {
  889. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YQXJCLSSDL);
  890. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  891. if(StringUtils.notEmp(pointValue))
  892. {
  893. //月缺陷降出力损失电量
  894. pewp.setYqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  895. }
  896. }
  897. if(pointmap.containsKey(ContantXk.YSDTJSSDL))
  898. {
  899. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YSDTJSSDL);
  900. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  901. if(StringUtils.notEmp(pointValue))
  902. {
  903. //月手动停机损失电量
  904. pewp.setYsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  905. }
  906. }
  907. if(pointmap.containsKey(ContantXk.YXNSSDL))
  908. {
  909. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YXNSSDL);
  910. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  911. if(StringUtils.notEmp(pointValue))
  912. {
  913. //月性能损失电量
  914. pewp.setYxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  915. }
  916. }
  917. if(pointmap.containsKey(ContantXk.YXDTJSSDL))
  918. {
  919. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YXDTJSSDL);
  920. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  921. if(StringUtils.notEmp(pointValue))
  922. {
  923. //月限电停机损失电量
  924. pewp.setYxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  925. }
  926. }
  927. if(pointmap.containsKey(ContantXk.YXDJCLSSDL))
  928. {
  929. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YXDJCLSSDL);
  930. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  931. if(StringUtils.notEmp(pointValue))
  932. {
  933. //月限电降出力损失电量
  934. pewp.setYxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  935. }
  936. }
  937. if(pointmap.containsKey(ContantXk.YCWSLDWSSDL))
  938. {
  939. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YCWSLDWSSDL);
  940. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  941. if(StringUtils.notEmp(pointValue))
  942. {
  943. //月场外受累电网损失电量
  944. pewp.setYcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  945. }
  946. }
  947. if(pointmap.containsKey(ContantXk.YCWSLTQSSDL))
  948. {
  949. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YCWSLTQSSDL);
  950. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  951. if(StringUtils.notEmp(pointValue))
  952. {
  953. //月场外受累天气损失电量
  954. pewp.setYcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  955. }
  956. }
  957. if(pointmap.containsKey(ContantXk.YZFDL))
  958. {
  959. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YZFDL);
  960. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  961. if(StringUtils.notEmp(pointValue))
  962. {
  963. //月增发电量
  964. pewp.setYzfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  965. }
  966. }
  967. if(pointmap.containsKey(ContantXk.YQFDL))
  968. {
  969. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YQFDL);
  970. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  971. if(StringUtils.notEmp(pointValue))
  972. {
  973. //月欠发电量
  974. pewp.setYqfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  975. }
  976. }
  977. if(pointmap.containsKey(ContantXk.YZHD))
  978. {
  979. ProBasicPowerstationPoint point= pointmap.get(ContantXk.YZHD);
  980. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  981. if(StringUtils.notEmp(pointValue))
  982. {
  983. //月自耗电
  984. pewp.setYzhd(StringUtils.round(pointValue.getPointValueInDouble(),2));
  985. }
  986. }
  987. ///*******************************************月信息统计*********************************************************/
  988. //*******************************************年信息统计*********************************************************/
  989. if(pepid1ls.isEmpty())
  990. {
  991. setPowerandSpeedYear(pewp);
  992. }else
  993. {
  994. ProEconPowerstationInfoDay1 pepid=pepid1ls.get(0);
  995. //如果昨日大于今日最大功率
  996. if(pepid.getNzdgl()> pewp.getRzdgl())
  997. {
  998. pewp.setNzdgl(pepid.getNzdgl());
  999. }else {
  1000. pewp.setNzdgl(pewp.getRzdgl());
  1001. }
  1002. //如果昨日大于今日最大风速
  1003. if(pepid.getNzdfs()> pewp.getRzdfs())
  1004. {
  1005. pewp.setNzdfs(pepid.getNzdfs());
  1006. }else
  1007. {
  1008. pewp.setNzdfs(pewp.getRzdfs());
  1009. }
  1010. //如果昨日小于今日最小功率
  1011. if(pepid.getNzxgl()< pewp.getRzxgl())
  1012. {
  1013. pewp.setNzxgl(pepid.getNzxgl());
  1014. }else
  1015. {
  1016. pewp.setNzxgl(pewp.getRzxgl());
  1017. }
  1018. //如果昨日小于今日最小风速
  1019. if(pepid.getNzxfs()< pewp.getRzxfs())
  1020. {
  1021. pewp.setNzxfs(pepid.getNzxfs());
  1022. }else
  1023. {
  1024. pewp.setNzxfs(pewp.getRzxfs());
  1025. }
  1026. double pjfs = BigDecimal.valueOf(pewp.getNpjfs() + pepid.getRpjfs()).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
  1027. pewp.setNzxfs(pjfs);
  1028. double pjgl = BigDecimal.valueOf(pewp.getNpjgl() + pepid.getRpjgl()).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
  1029. pewp.setNzxgl(pjgl);
  1030. }
  1031. if(pointmap.containsKey(ContantXk.NFDL))
  1032. {
  1033. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NFDL);
  1034. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1035. if(StringUtils.notEmp(pointValue))
  1036. {
  1037. //年发电量
  1038. pewp.setNfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1039. }
  1040. }
  1041. if(pointmap.containsKey(ContantXk.NKYDL))
  1042. {
  1043. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NKYDL);
  1044. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1045. if(StringUtils.notEmp(pointValue))
  1046. {
  1047. //年可用电量
  1048. pewp.setNkydl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1049. }
  1050. }
  1051. if(pointmap.containsKey(ContantXk.NLLFDL))
  1052. {
  1053. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NLLFDL);
  1054. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1055. if(StringUtils.notEmp(pointValue))
  1056. {
  1057. //年理论发电量
  1058. pewp.setNllfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1059. }
  1060. }
  1061. if(pointmap.containsKey(ContantXk.NGZSSDL))
  1062. {
  1063. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NGZSSDL);
  1064. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1065. if(StringUtils.notEmp(pointValue))
  1066. {
  1067. //年故障损失电量
  1068. pewp.setNgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1069. }
  1070. }
  1071. if(pointmap.containsKey(ContantXk.NCNSLGZSSDL))
  1072. {
  1073. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NCNSLGZSSDL);
  1074. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1075. if(StringUtils.notEmp(pointValue))
  1076. {
  1077. //年场内受累故障损失电量
  1078. pewp.setNcnslgzssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1079. }
  1080. }
  1081. if(pointmap.containsKey(ContantXk.NJXSSDL))
  1082. {
  1083. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NJXSSDL);
  1084. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1085. if(StringUtils.notEmp(pointValue))
  1086. {
  1087. //年检修损失电量
  1088. pewp.setNjxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1089. }
  1090. }
  1091. if(pointmap.containsKey(ContantXk.NCNSLJXSSDL))
  1092. {
  1093. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NCNSLJXSSDL);
  1094. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1095. if(StringUtils.notEmp(pointValue))
  1096. {
  1097. //年场内受累检修损失电量
  1098. pewp.setNcnsljxssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1099. }
  1100. }
  1101. if(pointmap.containsKey(ContantXk.NDJSSDL))
  1102. {
  1103. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NDJSSDL);
  1104. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1105. if(StringUtils.notEmp(pointValue))
  1106. {
  1107. //年待机损失电量
  1108. pewp.setNdjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1109. }
  1110. }
  1111. if(pointmap.containsKey(ContantXk.NQXJCLSSDL))
  1112. {
  1113. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NQXJCLSSDL);
  1114. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1115. if(StringUtils.notEmp(pointValue))
  1116. {
  1117. //年缺陷降出力损失电量
  1118. pewp.setNqxjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1119. }
  1120. }
  1121. if(pointmap.containsKey(ContantXk.NSDTJSSDL))
  1122. {
  1123. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NSDTJSSDL);
  1124. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1125. if(StringUtils.notEmp(pointValue))
  1126. {
  1127. //年手动停机损失电量
  1128. pewp.setNsdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1129. }
  1130. }
  1131. if(pointmap.containsKey(ContantXk.NXNSSDL))
  1132. {
  1133. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NXNSSDL);
  1134. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1135. if(StringUtils.notEmp(pointValue))
  1136. {
  1137. //年性能损失电量
  1138. pewp.setNxnssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1139. }
  1140. }
  1141. if(pointmap.containsKey(ContantXk.NXDTJSSDL))
  1142. {
  1143. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NXDTJSSDL);
  1144. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1145. if(StringUtils.notEmp(pointValue))
  1146. {
  1147. //年限电停机损失电量
  1148. pewp.setNxdtjssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1149. }
  1150. }
  1151. if(pointmap.containsKey(ContantXk.NXDJCLSSDL))
  1152. {
  1153. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NXDJCLSSDL);
  1154. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1155. if(StringUtils.notEmp(pointValue))
  1156. {
  1157. //年限电降出力损失电量
  1158. pewp.setNxdjclssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1159. }
  1160. }
  1161. if(pointmap.containsKey(ContantXk.NCWSLDWSSDL))
  1162. {
  1163. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NCWSLDWSSDL);
  1164. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1165. if(StringUtils.notEmp(pointValue))
  1166. {
  1167. //年场外受累电网损失电量
  1168. pewp.setNcwsldwssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1169. }
  1170. }
  1171. if(pointmap.containsKey(ContantXk.NCWSLTQSSDL))
  1172. {
  1173. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NCWSLTQSSDL);
  1174. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1175. if(StringUtils.notEmp(pointValue))
  1176. {
  1177. //年场外受累天气损失电量
  1178. pewp.setNcwsltqssdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1179. }
  1180. }
  1181. if(pointmap.containsKey(ContantXk.NZFDL))
  1182. {
  1183. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NZFDL);
  1184. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1185. if(StringUtils.notEmp(pointValue))
  1186. {
  1187. //年增发电量
  1188. pewp.setNzfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1189. }
  1190. }
  1191. if(pointmap.containsKey(ContantXk.NQFDL))
  1192. {
  1193. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NQFDL);
  1194. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1195. if(StringUtils.notEmp(pointValue))
  1196. {
  1197. //年欠发电量
  1198. pewp.setNqfdl(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1199. }
  1200. }
  1201. if(pointmap.containsKey(ContantXk.NZHD))
  1202. {
  1203. ProBasicPowerstationPoint point= pointmap.get(ContantXk.NZHD);
  1204. PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime()/1000);
  1205. if(StringUtils.notEmp(pointValue))
  1206. {
  1207. //年自耗电
  1208. pewp.setNzhd(StringUtils.round(pointValue.getPointValueInDouble(),2));
  1209. }
  1210. }
  1211. }
  1212. private void setPowerandSpeedYear( ProEconPowerstationInfoDay1 pewp) {
  1213. //年最大风速
  1214. pewp.setNzdfs(pewp.getRzdfs());
  1215. //年最小风速
  1216. pewp.setNzxfs(pewp.getRzxfs());
  1217. //年平均风速
  1218. pewp.setNpjfs(pewp.getRpjfs());
  1219. //年最大功率
  1220. pewp.setNzdgl(pewp.getRzdgl());
  1221. //年最小功率
  1222. pewp.setNzxgl(pewp.getRzxgl());
  1223. //年平均功率
  1224. pewp.setNpjgl(pewp.getRpjgl());
  1225. }
  1226. private void setPowerandSpeedMonth( ProEconPowerstationInfoDay1 pewp) {
  1227. //月最大风速
  1228. pewp.setYzdfs(pewp.getRzdfs());
  1229. //月最小风速
  1230. pewp.setYzxfs(pewp.getRzxfs());
  1231. //月平均风速
  1232. pewp.setYpjfs(pewp.getRpjfs());
  1233. //月最大功率
  1234. pewp.setYzdgl(pewp.getRzdgl());
  1235. //月最小功率
  1236. pewp.setYzxgl(pewp.getRzxgl());
  1237. //月平均功率
  1238. pewp.setYpjgl(pewp.getRpjgl());
  1239. }
  1240. }