WindPowerInfo1Service.java 64 KB

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