|
@@ -0,0 +1,923 @@
|
|
|
|
+package com.gyee.generation.service.realtimelibrary;
|
|
|
|
+
|
|
|
|
+import com.gyee.common.contant.ContantXk;
|
|
|
|
+import com.gyee.common.model.PointData;
|
|
|
|
+import com.gyee.common.util.DateUtils;
|
|
|
|
+import com.gyee.generation.init.CacheContext;
|
|
|
|
+import com.gyee.generation.model.auto.ProBasicCompany;
|
|
|
|
+import com.gyee.generation.model.auto.ProBasicPowerstation;
|
|
|
|
+import com.gyee.generation.model.auto.ProBasicPowerstationPoint;
|
|
|
|
+import com.gyee.generation.model.auto.ProBasicRegion;
|
|
|
|
+import com.gyee.generation.util.PointUtil;
|
|
|
|
+import com.gyee.generation.util.realtimesource.IEdosUtil;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
+
|
|
|
|
+import javax.annotation.Resource;
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.Date;
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
+import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
+import java.util.concurrent.atomic.AtomicReference;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+@author 谢生杰
|
|
|
|
+@date 2022/11/22-9:29
|
|
|
|
+
|
|
|
|
+实时值
|
|
|
|
+*/
|
|
|
|
+
|
|
|
|
+@Service
|
|
|
|
+public class RegionCalreService {
|
|
|
|
+
|
|
|
|
+ @Resource
|
|
|
|
+ private IEdosUtil edosUtil;
|
|
|
|
+ /**
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+ public void companyCal() throws Exception {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Date currentDate = DateUtils.getCurrentDate();
|
|
|
|
+ List<ProBasicCompany> cpls = CacheContext.cpls;
|
|
|
|
+ List<ProBasicPowerstation> zwpls = CacheContext.zwpls;
|
|
|
|
+ Map<String, Map<String, ProBasicPowerstationPoint>> companypointmap = CacheContext.companypointmap;
|
|
|
|
+ Map<String, Map<String, ProBasicPowerstationPoint>> wppointmap = CacheContext.wppointmap;
|
|
|
|
+ List<PointData> resultList = new ArrayList<>();
|
|
|
|
+ cpls.stream().forEach(company->{
|
|
|
|
+ List<ProBasicPowerstation> wps0 = zwpls.stream().filter(wp -> wp.getCompanyId().equals(company.getId())).collect(Collectors.toList());
|
|
|
|
+ List<ProBasicPowerstation> wps1 = wps0.stream().filter(wp -> wp.getId().contains("_FDC_")).collect(Collectors.toList());
|
|
|
|
+ List<ProBasicPowerstation> wps2 = wps0.stream().filter(wp -> wp.getId().contains("_GDC_")).collect(Collectors.toList());
|
|
|
|
+ if (wps1.size()>0)
|
|
|
|
+ weightingCompany(currentDate, companypointmap, wppointmap, resultList, company, wps1, "-1");
|
|
|
|
+ if (wps2.size()>0)
|
|
|
|
+ weightingCompany(currentDate, companypointmap, wppointmap, resultList, company, wps2, "-2");
|
|
|
|
+ weightingCompany(currentDate, companypointmap, wppointmap, resultList, company, wps0, "0");
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ edosUtil.sendMultiPoint(resultList);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void RegionCal() throws Exception {
|
|
|
|
+ Date currentDate = DateUtils.getCurrentDate();
|
|
|
|
+ List<ProBasicRegion> rgls = CacheContext.rgls;
|
|
|
|
+ List<ProBasicCompany> cpls = CacheContext.cpls;
|
|
|
|
+ Map<String, Map<String, ProBasicPowerstationPoint>> companypointmap = CacheContext.companypointmap;
|
|
|
|
+ Map<String, Map<String, ProBasicPowerstationPoint>> regionpointmap = CacheContext.regionpointmap;
|
|
|
|
+ List<PointData> resultList = new ArrayList<>();
|
|
|
|
+ rgls.stream().forEach(region->{
|
|
|
|
+ List<ProBasicCompany> companys = cpls.stream().filter(company -> company.getRegionId().equals(region.getId())).collect(Collectors.toList());
|
|
|
|
+ weightingRegion(currentDate, companypointmap, regionpointmap, resultList,region, companys, "-1");
|
|
|
|
+ weightingRegion(currentDate, companypointmap, regionpointmap, resultList,region,companys, "-2");
|
|
|
|
+ weightingRegion(currentDate, companypointmap, regionpointmap, resultList,region, companys, "0");
|
|
|
|
+ });
|
|
|
|
+ edosUtil.sendMultiPoint(resultList);
|
|
|
|
+ }
|
|
|
|
+ private void weightingRegion(Date currentDate, Map<String, Map<String, ProBasicPowerstationPoint>> companypointmap, Map<String, Map<String, ProBasicPowerstationPoint>> regionpointmap, List<PointData> resultList,ProBasicRegion region, List<ProBasicCompany> companys,String type) {
|
|
|
|
+ Map<String, ProBasicPowerstationPoint> powerstationPointMap = regionpointmap.get(region.getId()+type);
|
|
|
|
+ ProBasicPowerstationPoint zsspjfsPoint = null;
|
|
|
|
+ ProBasicPowerstationPoint zsspjgzdPoint = null;
|
|
|
|
+
|
|
|
|
+ if (type.equals("-1")){
|
|
|
|
+ zsspjfsPoint = powerstationPointMap.get(ContantXk.SSPJFS);
|
|
|
|
+
|
|
|
|
+ }else if(type.equals("-2")){
|
|
|
|
+ zsspjgzdPoint = powerstationPointMap.get(ContantXk.SSPJGZD);
|
|
|
|
+
|
|
|
|
+ }else {
|
|
|
|
+ zsspjfsPoint = powerstationPointMap.get(ContantXk.SSPJFS);
|
|
|
|
+ zsspjgzdPoint = powerstationPointMap.get(ContantXk.SSPJGZD);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ProBasicPowerstationPoint zsszglPoint = powerstationPointMap.get(ContantXk.SSZGL);
|
|
|
|
+ ProBasicPowerstationPoint zsszllglPoint = powerstationPointMap.get(ContantXk.SSZLLGL);
|
|
|
|
+ ProBasicPowerstationPoint zsszbzglPoint = powerstationPointMap.get(ContantXk.SSZBZGL);
|
|
|
|
+ ProBasicPowerstationPoint zssznhglzsPoint = powerstationPointMap.get(ContantXk.SSZNHGLZS);
|
|
|
|
+ ProBasicPowerstationPoint zsszzyglPoint = powerstationPointMap.get(ContantXk.SSZZYGL);
|
|
|
|
+ ProBasicPowerstationPoint zsszkyglPoint = powerstationPointMap.get(ContantXk.SSZKYGL);
|
|
|
|
+
|
|
|
|
+ ProBasicPowerstationPoint zgztsmxPoint = powerstationPointMap.get(ContantXk.GZTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zcnslmxPoint = powerstationPointMap.get(ContantXk.CNSLGZTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zjxtsmxPoint = powerstationPointMap.get(ContantXk.JXTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zcnjxmxPoint = powerstationPointMap.get(ContantXk.CNSLJXTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zdjtsmxPoint = powerstationPointMap.get(ContantXk.DJTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zqxjclmxPoint = powerstationPointMap.get(ContantXk.QXJCLTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zsdtjmxPoint = powerstationPointMap.get(ContantXk.SDTJTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zxntsmxPoint = powerstationPointMap.get(ContantXk.XNTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zxdtjmxPoint = powerstationPointMap.get(ContantXk.XDTJTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zxdjclmxPoint = powerstationPointMap.get(ContantXk.XDJCLTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zcwsldwmxPoint = powerstationPointMap.get(ContantXk.CWSLDWTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zcwsltqmxPoint = powerstationPointMap.get(ContantXk.CWSLTQTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zlxtsmxPoint = powerstationPointMap.get(ContantXk.LXTSMX);
|
|
|
|
+ ProBasicPowerstationPoint ztxzdmxPoint = powerstationPointMap.get(ContantXk.TXZDTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zdjtsPoint = powerstationPointMap.get(ContantXk.DJTS);
|
|
|
|
+ ProBasicPowerstationPoint zyxtsPoint = powerstationPointMap.get(ContantXk.YXTS);
|
|
|
|
+ ProBasicPowerstationPoint zgztsPoint = powerstationPointMap.get(ContantXk.GZTJTS);
|
|
|
|
+ ProBasicPowerstationPoint zwhtsPoint = powerstationPointMap.get(ContantXk.JXTJTS);
|
|
|
|
+ ProBasicPowerstationPoint zxdtsPoint = powerstationPointMap.get(ContantXk.XDTS);
|
|
|
|
+ ProBasicPowerstationPoint zsltsPoint = powerstationPointMap.get(ContantXk.SLTS);
|
|
|
|
+ ProBasicPowerstationPoint zlxtsPoint = powerstationPointMap.get(ContantXk.TXZDTS);
|
|
|
|
+
|
|
|
|
+ AtomicReference<Double> sspjfs = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> sspjgzd = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> sszgl = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> zllgl = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> zbzgl = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> znhglzs = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> zzygl = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> zkygl = new AtomicReference<>((double) 0);
|
|
|
|
+
|
|
|
|
+ AtomicReference<Double> gztsmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> cngzmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> jxtsmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> cnjxmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> djtsmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> qxjclmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> sdtjmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> xntsmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> xdtjmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> xdjclmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> cwsldwmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> cwsltqmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> lxtsmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> txzdmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> yxts = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> gzts = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> lxts = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> whts = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> xdts = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> slts = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> djts = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicInteger fcComCount = new AtomicInteger();
|
|
|
|
+ AtomicInteger gcComCount = new AtomicInteger();
|
|
|
|
+ AtomicInteger finalGcComCount = gcComCount;
|
|
|
|
+ AtomicInteger finalFcComCount = fcComCount;
|
|
|
|
+ companys.stream().forEach(company->{
|
|
|
|
+ if (company.getJrCapacity()>0){
|
|
|
|
+ finalGcComCount.getAndIncrement();
|
|
|
|
+ }
|
|
|
|
+ if (company.getJrwindCapacity()>0){
|
|
|
|
+ finalFcComCount.getAndIncrement();
|
|
|
|
+ }
|
|
|
|
+ Map<String, ProBasicPowerstationPoint> powerstationPointMap1 = companypointmap.get(company.getId()+type);
|
|
|
|
+ ProBasicPowerstationPoint sspjfsPoint = null;
|
|
|
|
+ ProBasicPowerstationPoint sspjgzdPoint = null;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (type.equals("-1")){
|
|
|
|
+ sspjfsPoint = powerstationPointMap1.get(ContantXk.SSPJFS);
|
|
|
|
+
|
|
|
|
+ }else if(type.equals("-2")){
|
|
|
|
+ sspjgzdPoint = powerstationPointMap1.get(ContantXk.SSPJGZD);
|
|
|
|
+
|
|
|
|
+ }else {
|
|
|
|
+ sspjfsPoint = powerstationPointMap1.get(ContantXk.SSPJFS);
|
|
|
|
+ sspjgzdPoint = powerstationPointMap1.get(ContantXk.SSPJGZD);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ ProBasicPowerstationPoint sszglPoint = powerstationPointMap1.get(ContantXk.SSZGL);
|
|
|
|
+ ProBasicPowerstationPoint sszllglPoint = powerstationPointMap1.get(ContantXk.SSZLLGL);
|
|
|
|
+ ProBasicPowerstationPoint sszbzglPoint = powerstationPointMap1.get(ContantXk.SSZBZGL);
|
|
|
|
+ ProBasicPowerstationPoint ssznhglzsPoint = powerstationPointMap1.get(ContantXk.SSZNHGLZS);
|
|
|
|
+ ProBasicPowerstationPoint sszzyglPoint = powerstationPointMap1.get(ContantXk.SSZZYGL);
|
|
|
|
+ ProBasicPowerstationPoint sszkyglPoint = powerstationPointMap1.get(ContantXk.SSZKYGL);
|
|
|
|
+
|
|
|
|
+ ProBasicPowerstationPoint gztsmxPoint = powerstationPointMap1.get(ContantXk.GZTSMX);
|
|
|
|
+ ProBasicPowerstationPoint cnslmxPoint = powerstationPointMap1.get(ContantXk.CNSLGZTSMX);
|
|
|
|
+ ProBasicPowerstationPoint jxtsmxPoint = powerstationPointMap1.get(ContantXk.JXTSMX);
|
|
|
|
+ ProBasicPowerstationPoint cnjxmxPoint = powerstationPointMap1.get(ContantXk.CNSLJXTSMX);
|
|
|
|
+ ProBasicPowerstationPoint djtsmxPoint = powerstationPointMap1.get(ContantXk.DJTSMX);
|
|
|
|
+ ProBasicPowerstationPoint qxjclmxPoint = powerstationPointMap1.get(ContantXk.QXJCLTSMX);
|
|
|
|
+ ProBasicPowerstationPoint sdtjmxPoint = powerstationPointMap1.get(ContantXk.SDTJTSMX);
|
|
|
|
+ ProBasicPowerstationPoint xntsmxPoint = powerstationPointMap1.get(ContantXk.XNTSMX);
|
|
|
|
+ ProBasicPowerstationPoint xdtjmxPoint = powerstationPointMap1.get(ContantXk.XDTJTSMX);
|
|
|
|
+ ProBasicPowerstationPoint xdjclmxPoint = powerstationPointMap1.get(ContantXk.XDJCLTSMX);
|
|
|
|
+ ProBasicPowerstationPoint cwsldwmxPoint = powerstationPointMap1.get(ContantXk.CWSLDWTSMX);
|
|
|
|
+ ProBasicPowerstationPoint cwsltqmxPoint = powerstationPointMap1.get(ContantXk.CWSLTQTSMX);
|
|
|
|
+ ProBasicPowerstationPoint lxtsmxPoint = powerstationPointMap1.get(ContantXk.LXTSMX);
|
|
|
|
+ ProBasicPowerstationPoint txzdmxPoint = powerstationPointMap1.get(ContantXk.TXZDTSMX);
|
|
|
|
+ ProBasicPowerstationPoint djtsPoint = powerstationPointMap1.get(ContantXk.DJTS);
|
|
|
|
+ ProBasicPowerstationPoint yxtsPoint = powerstationPointMap1.get(ContantXk.YXTS);
|
|
|
|
+ ProBasicPowerstationPoint gztsPoint = powerstationPointMap1.get(ContantXk.GZTJTS);
|
|
|
|
+ ProBasicPowerstationPoint whtsPoint = powerstationPointMap1.get(ContantXk.JXTJTS);
|
|
|
|
+ ProBasicPowerstationPoint xdtsPoint = powerstationPointMap1.get(ContantXk.XDTS);
|
|
|
|
+ ProBasicPowerstationPoint sltsPoint = powerstationPointMap1.get(ContantXk.SLTS);
|
|
|
|
+ ProBasicPowerstationPoint lxtsPoint = powerstationPointMap1.get(ContantXk.TXZDTS);
|
|
|
|
+
|
|
|
|
+ if (type.equals("-1")){
|
|
|
|
+ ProBasicPowerstationPoint finalSspjfsfsPoint = sspjfsPoint;
|
|
|
|
+ sspjfs.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(finalSspjfsfsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }else if (type.equals("-2")){
|
|
|
|
+ ProBasicPowerstationPoint finalSspjgzdPoint = sspjgzdPoint;
|
|
|
|
+ sspjgzd.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(finalSspjgzdPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ }else {
|
|
|
|
+ ProBasicPowerstationPoint finalSspjfsfsPoint = sspjfsPoint;
|
|
|
|
+ sspjfs.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(finalSspjfsfsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ ProBasicPowerstationPoint finalSspjgzdPoint = sspjgzdPoint;
|
|
|
|
+ sspjgzd.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(finalSspjgzdPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ sszgl.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sszglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ zllgl.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sszllglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ zbzgl.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sszbzglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ znhglzs.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(ssznhglzsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ zzygl.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sszzyglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ zkygl.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sszkyglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ gztsmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(gztsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ cngzmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(cnslmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ jxtsmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(jxtsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ cnjxmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(cnjxmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ djtsmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(djtsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ qxjclmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(qxjclmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ sdtjmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sdtjmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ xntsmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(xntsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ xdtjmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(xdtjmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ xdjclmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(xdjclmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ cwsldwmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(cwsldwmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ cwsltqmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(cwsltqmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ lxtsmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(lxtsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ txzdmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(txzdmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ djts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(djtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ yxts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(yxtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ gzts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(gztsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ whts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(whtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ xdts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(xdtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ slts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sltsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ lxts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(lxtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ if (fcComCount.get()==0){
|
|
|
|
+ fcComCount.getAndIncrement();
|
|
|
|
+ }
|
|
|
|
+ if (gcComCount.get()==0){
|
|
|
|
+ gcComCount.getAndIncrement();
|
|
|
|
+ }
|
|
|
|
+ if (type.equals("-1")){
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,sspjfs.get()/fcComCount.doubleValue(),zsspjfsPoint.getNemCode(),zsspjfsPoint.getName()));
|
|
|
|
+
|
|
|
|
+ }else if(type.equals("-2")){
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,sspjgzd.get()/gcComCount.doubleValue(),zsspjgzdPoint.getNemCode(),zsspjgzdPoint.getName()));
|
|
|
|
+
|
|
|
|
+ }else {
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,sspjfs.get()/fcComCount.doubleValue(),zsspjfsPoint.getNemCode(),zsspjfsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,sspjgzd.get()/gcComCount.doubleValue(),zsspjgzdPoint.getNemCode(),zsspjgzdPoint.getName()));
|
|
|
|
+ }
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,sszgl.get(),zsszglPoint.getNemCode(),zsszglPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,zllgl.get(),zsszllglPoint.getNemCode(),zsszllglPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,zbzgl.get(),zsszbzglPoint.getNemCode(),zsszbzglPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,znhglzs.get(),zssznhglzsPoint.getNemCode(),zssznhglzsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,zzygl.get(),zsszzyglPoint.getNemCode(),zsszzyglPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,zkygl.get(),zsszkyglPoint.getNemCode(),zsszkyglPoint.getName()));
|
|
|
|
+
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,gztsmx.get(),zgztsmxPoint.getNemCode(),zgztsmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,cngzmx.get(),zcnslmxPoint.getNemCode(),zcnslmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,jxtsmx.get(),zjxtsmxPoint.getNemCode(),zjxtsmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,cnjxmx.get(),zcnjxmxPoint.getNemCode(),zcnjxmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,djtsmx.get(),zdjtsmxPoint.getNemCode(),zdjtsmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,qxjclmx.get(),zqxjclmxPoint.getNemCode(),zqxjclmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,sdtjmx.get(),zsdtjmxPoint.getNemCode(),zsdtjmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,xntsmx.get(),zxntsmxPoint.getNemCode(),zxntsmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,xdtjmx.get(),zxdtjmxPoint.getNemCode(),zxdtjmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,xdjclmx.get(),zxdjclmxPoint.getNemCode(),zxdjclmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,cwsldwmx.get(),zcwsldwmxPoint.getNemCode(),zcwsldwmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,cwsltqmx.get(),zcwsltqmxPoint.getNemCode(),zcwsltqmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,lxtsmx.get(),zlxtsmxPoint.getNemCode(),zlxtsmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,txzdmx.get(),ztxzdmxPoint.getNemCode(),ztxzdmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,djts.get(),zdjtsPoint.getNemCode(),zdjtsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,yxts.get(),zyxtsPoint.getNemCode(),zyxtsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,gzts.get(),zgztsPoint.getNemCode(),zgztsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,whts.get(),zwhtsPoint.getNemCode(),zwhtsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,xdts.get(),zxdtsPoint.getNemCode(),zxdtsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,slts.get(),zsltsPoint.getNemCode(),zsltsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,lxts.get(),zlxtsPoint.getNemCode(),zlxtsPoint.getName()));
|
|
|
|
+ }
|
|
|
|
+ private void weightingCompany(Date currentDate, Map<String, Map<String, ProBasicPowerstationPoint>> companypointmap, Map<String, Map<String, ProBasicPowerstationPoint>> wppointmap, List<PointData> resultList, ProBasicCompany company, List<ProBasicPowerstation> wps,String type) {
|
|
|
|
+ Map<String, ProBasicPowerstationPoint> powerstationPointMap = companypointmap.get(company.getId()+type);
|
|
|
|
+ int fdcsize = wps.stream().filter(wp -> wp.getId().contains("_FDC_")).collect(Collectors.toList()).size();
|
|
|
|
+ int gdcsize = wps.stream().filter(wp -> wp.getId().contains("_GDC_")).collect(Collectors.toList()).size();
|
|
|
|
+ if (fdcsize==0)
|
|
|
|
+ fdcsize = 1;
|
|
|
|
+ if (gdcsize==0)
|
|
|
|
+ gdcsize=1;
|
|
|
|
+ ProBasicPowerstationPoint zsspjfsPoint = null;
|
|
|
|
+ ProBasicPowerstationPoint zsspjgzdPoint = null;
|
|
|
|
+ if (type.equals("-1")){
|
|
|
|
+ zsspjfsPoint = powerstationPointMap.get(ContantXk.SSPJFS);
|
|
|
|
+
|
|
|
|
+ }else if(type.equals("-2")){
|
|
|
|
+ zsspjgzdPoint = powerstationPointMap.get(ContantXk.SSPJGZD);
|
|
|
|
+
|
|
|
|
+ }else {
|
|
|
|
+ zsspjfsPoint = powerstationPointMap.get(ContantXk.SSPJFS);
|
|
|
|
+ zsspjgzdPoint = powerstationPointMap.get(ContantXk.SSPJGZD);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ProBasicPowerstationPoint zsszglPoint = powerstationPointMap.get(ContantXk.SSZGL);
|
|
|
|
+ ProBasicPowerstationPoint zsszllglPoint = powerstationPointMap.get(ContantXk.SSZLLGL);
|
|
|
|
+ ProBasicPowerstationPoint zsszbzglPoint = powerstationPointMap.get(ContantXk.SSZBZGL);
|
|
|
|
+ ProBasicPowerstationPoint zssznhglzsPoint = powerstationPointMap.get(ContantXk.SSZNHGLZS);
|
|
|
|
+ ProBasicPowerstationPoint zsszzyglPoint = powerstationPointMap.get(ContantXk.SSZZYGL);
|
|
|
|
+ ProBasicPowerstationPoint zsszkyglPoint = powerstationPointMap.get(ContantXk.SSZKYGL);
|
|
|
|
+
|
|
|
|
+ ProBasicPowerstationPoint zgztsmxPoint = powerstationPointMap.get(ContantXk.GZTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zcnslmxPoint = powerstationPointMap.get(ContantXk.CNSLGZTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zjxtsmxPoint = powerstationPointMap.get(ContantXk.JXTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zcnjxmxPoint = powerstationPointMap.get(ContantXk.CNSLJXTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zdjtsmxPoint = powerstationPointMap.get(ContantXk.DJTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zqxjclmxPoint = powerstationPointMap.get(ContantXk.QXJCLTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zsdtjmxPoint = powerstationPointMap.get(ContantXk.SDTJTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zxntsmxPoint = powerstationPointMap.get(ContantXk.XNTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zxdtjmxPoint = powerstationPointMap.get(ContantXk.XDTJTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zxdjclmxPoint = powerstationPointMap.get(ContantXk.XDJCLTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zcwsldwmxPoint = powerstationPointMap.get(ContantXk.CWSLDWTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zcwsltqmxPoint = powerstationPointMap.get(ContantXk.CWSLTQTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zlxtsmxPoint = powerstationPointMap.get(ContantXk.LXTSMX);
|
|
|
|
+ ProBasicPowerstationPoint ztxzdmxPoint = powerstationPointMap.get(ContantXk.TXZDTSMX);
|
|
|
|
+ ProBasicPowerstationPoint zdjtsPoint = powerstationPointMap.get(ContantXk.DJTS);
|
|
|
|
+ ProBasicPowerstationPoint zyxtsPoint = powerstationPointMap.get(ContantXk.YXTS);
|
|
|
|
+ ProBasicPowerstationPoint zgztsPoint = powerstationPointMap.get(ContantXk.GZTJTS);
|
|
|
|
+ ProBasicPowerstationPoint zwhtsPoint = powerstationPointMap.get(ContantXk.JXTJTS);
|
|
|
|
+ ProBasicPowerstationPoint zxdtsPoint = powerstationPointMap.get(ContantXk.XDTS);
|
|
|
|
+ ProBasicPowerstationPoint zsltsPoint = powerstationPointMap.get(ContantXk.SLTS);
|
|
|
|
+ ProBasicPowerstationPoint zlxtsPoint = powerstationPointMap.get(ContantXk.TXZDTS);
|
|
|
|
+ AtomicReference<Double> sspjfs = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> sspjgzd = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> sszgl = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> zllgl = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> zbzgl = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> znhglzs = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> zzygl = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> zkygl = new AtomicReference<>((double) 0);
|
|
|
|
+
|
|
|
|
+ AtomicReference<Double> gztsmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> cngzmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> jxtsmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> cnjxmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> djtsmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> qxjclmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> sdtjmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> xntsmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> xdtjmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> xdjclmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> cwsldwmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> cwsltqmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> lxtsmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> txzdmx = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> yxts = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> gzts = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> lxts = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> whts = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> xdts = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> slts = new AtomicReference<>((double) 0);
|
|
|
|
+ AtomicReference<Double> djts = new AtomicReference<>((double) 0);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ wps.stream().forEach(wp->{
|
|
|
|
+ Map<String, ProBasicPowerstationPoint> powerstationPointMap1 = wppointmap.get(wp.getId());
|
|
|
|
+
|
|
|
|
+ ProBasicPowerstationPoint sspjfsPoint = null;
|
|
|
|
+ ProBasicPowerstationPoint sspjgzdPoint = null;
|
|
|
|
+
|
|
|
|
+ if (wp.getId().contains("_FDC_")){
|
|
|
|
+ sspjfsPoint = powerstationPointMap1.get(ContantXk.SSPJFS);
|
|
|
|
+
|
|
|
|
+ }else if(wp.getId().contains("_GDC_")){
|
|
|
|
+ sspjgzdPoint = powerstationPointMap1.get(ContantXk.SSPJGZD);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ProBasicPowerstationPoint sszglPoint = powerstationPointMap1.get(ContantXk.SSZGL);
|
|
|
|
+ ProBasicPowerstationPoint sszllglPoint = powerstationPointMap1.get(ContantXk.SSZLLGL);
|
|
|
|
+ ProBasicPowerstationPoint sszbzglPoint = powerstationPointMap1.get(ContantXk.SSZBZGL);
|
|
|
|
+ ProBasicPowerstationPoint ssznhglzsPoint = powerstationPointMap1.get(ContantXk.SSZNHGLZS);
|
|
|
|
+ ProBasicPowerstationPoint sszzyglPoint = powerstationPointMap1.get(ContantXk.SSZZYGL);
|
|
|
|
+ ProBasicPowerstationPoint sszkyglPoint = powerstationPointMap1.get(ContantXk.SSZKYGL);
|
|
|
|
+
|
|
|
|
+ ProBasicPowerstationPoint gztsmxPoint = powerstationPointMap1.get(ContantXk.GZTSMX);
|
|
|
|
+ ProBasicPowerstationPoint cnslmxPoint = powerstationPointMap1.get(ContantXk.CNSLGZTSMX);
|
|
|
|
+ ProBasicPowerstationPoint jxtsmxPoint = powerstationPointMap1.get(ContantXk.JXTSMX);
|
|
|
|
+ ProBasicPowerstationPoint cnjxmxPoint = powerstationPointMap1.get(ContantXk.CNSLJXTSMX);
|
|
|
|
+ ProBasicPowerstationPoint djtsmxPoint = powerstationPointMap1.get(ContantXk.DJTSMX);
|
|
|
|
+ ProBasicPowerstationPoint qxjclmxPoint = powerstationPointMap1.get(ContantXk.QXJCLTSMX);
|
|
|
|
+ ProBasicPowerstationPoint sdtjmxPoint = powerstationPointMap1.get(ContantXk.SDTJTSMX);
|
|
|
|
+ ProBasicPowerstationPoint xntsmxPoint = powerstationPointMap1.get(ContantXk.XNTSMX);
|
|
|
|
+ ProBasicPowerstationPoint xdtjmxPoint = powerstationPointMap1.get(ContantXk.XDTJTSMX);
|
|
|
|
+ ProBasicPowerstationPoint xdjclmxPoint = powerstationPointMap1.get(ContantXk.XDJCLTSMX);
|
|
|
|
+ ProBasicPowerstationPoint cwsldwmxPoint = powerstationPointMap1.get(ContantXk.CWSLDWTSMX);
|
|
|
|
+ ProBasicPowerstationPoint cwsltqmxPoint = powerstationPointMap1.get(ContantXk.CWSLTQTSMX);
|
|
|
|
+ ProBasicPowerstationPoint lxtsmxPoint = powerstationPointMap1.get(ContantXk.LXTSMX);
|
|
|
|
+ ProBasicPowerstationPoint txzdmxPoint = powerstationPointMap1.get(ContantXk.TXZDTSMX);
|
|
|
|
+ ProBasicPowerstationPoint djtsPoint = powerstationPointMap1.get(ContantXk.DJTS);
|
|
|
|
+ ProBasicPowerstationPoint yxtsPoint = powerstationPointMap1.get(ContantXk.YXTS);
|
|
|
|
+ ProBasicPowerstationPoint gztsPoint = powerstationPointMap1.get(ContantXk.GZTJTS);
|
|
|
|
+ ProBasicPowerstationPoint whtsPoint = powerstationPointMap1.get(ContantXk.JXTJTS);
|
|
|
|
+ ProBasicPowerstationPoint xdtsPoint = powerstationPointMap1.get(ContantXk.XDTS);
|
|
|
|
+ ProBasicPowerstationPoint sltsPoint = powerstationPointMap1.get(ContantXk.SLTS);
|
|
|
|
+ ProBasicPowerstationPoint lxtsPoint = powerstationPointMap1.get(ContantXk.TXZDTS);
|
|
|
|
+
|
|
|
|
+ if (wp.getId().contains("_FDC_")){
|
|
|
|
+ ProBasicPowerstationPoint finalSspjfsPoint = sspjfsPoint;
|
|
|
|
+ sspjfs.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(finalSspjfsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ }else if (wp.getId().contains("_GDC_")){
|
|
|
|
+ ProBasicPowerstationPoint finalSspjgzdPoint = sspjgzdPoint;
|
|
|
|
+ sspjgzd.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(finalSspjgzdPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ sszgl.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sszglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ zllgl.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sszllglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ zbzgl.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sszbzglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ znhglzs.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(ssznhglzsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ zzygl.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sszzyglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ zkygl.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sszkyglPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ gztsmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(gztsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ cngzmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(cnslmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ jxtsmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(jxtsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ cnjxmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(cnjxmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ djtsmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(djtsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ qxjclmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(qxjclmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ sdtjmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sdtjmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ xntsmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(xntsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ xdtjmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(xdtjmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ xdjclmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(xdjclmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ cwsldwmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(cwsldwmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ cwsltqmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(cwsltqmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ lxtsmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(lxtsmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ txzdmx.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(txzdmxPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ djts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(djtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ yxts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(yxtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ gzts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(gztsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ whts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(whtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ xdts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(xdtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ slts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(sltsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ lxts.updateAndGet(v -> {
|
|
|
|
+ try {
|
|
|
|
+ return new Double((double) (v + edosUtil.getSectionData(lxtsPoint, currentDate.getTime() / 1000).getPointValueInDouble()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return v;
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ if (type.equals("-1")){
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,sspjfs.get()/fdcsize,zsspjfsPoint.getNemCode(),zsspjfsPoint.getName()));
|
|
|
|
+
|
|
|
|
+ }else if(type.equals("-2")){
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,sspjgzd.get()/gdcsize,zsspjgzdPoint.getNemCode(),zsspjgzdPoint.getName()));
|
|
|
|
+
|
|
|
|
+ }else {
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,sspjfs.get()/fdcsize,zsspjfsPoint.getNemCode(),zsspjfsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,sspjgzd.get()/gdcsize,zsspjgzdPoint.getNemCode(),zsspjgzdPoint.getName()));
|
|
|
|
+ }
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,sszgl.get(),zsszglPoint.getNemCode(),zsszglPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,zllgl.get(),zsszllglPoint.getNemCode(),zsszllglPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,zbzgl.get(),zsszbzglPoint.getNemCode(),zsszbzglPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,znhglzs.get(),zssznhglzsPoint.getNemCode(),zssznhglzsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,zzygl.get(),zsszzyglPoint.getNemCode(),zsszzyglPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,zkygl.get(),zsszkyglPoint.getNemCode(),zsszkyglPoint.getName()));
|
|
|
|
+
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,gztsmx.get(),zgztsmxPoint.getNemCode(),zgztsmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,cngzmx.get(),zcnslmxPoint.getNemCode(),zcnslmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,jxtsmx.get(),zjxtsmxPoint.getNemCode(),zjxtsmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,cnjxmx.get(),zcnjxmxPoint.getNemCode(),zcnjxmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,djtsmx.get(),zdjtsmxPoint.getNemCode(),zdjtsmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,qxjclmx.get(),zqxjclmxPoint.getNemCode(),zqxjclmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,sdtjmx.get(),zsdtjmxPoint.getNemCode(),zsdtjmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,xntsmx.get(),zxntsmxPoint.getNemCode(),zxntsmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,xdtjmx.get(),zxdtjmxPoint.getNemCode(),zxdtjmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,xdjclmx.get(),zxdjclmxPoint.getNemCode(),zxdjclmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,cwsldwmx.get(),zcwsldwmxPoint.getNemCode(),zcwsldwmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,cwsltqmx.get(),zcwsltqmxPoint.getNemCode(),zcwsltqmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,lxtsmx.get(),zlxtsmxPoint.getNemCode(),zlxtsmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,txzdmx.get(),ztxzdmxPoint.getNemCode(),ztxzdmxPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,djts.get(),zdjtsPoint.getNemCode(),zdjtsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,yxts.get(),zyxtsPoint.getNemCode(),zyxtsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,gzts.get(),zgztsPoint.getNemCode(),zgztsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,whts.get(),zwhtsPoint.getNemCode(),zwhtsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,xdts.get(),zxdtsPoint.getNemCode(),zxdtsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,slts.get(),zsltsPoint.getNemCode(),zsltsPoint.getName()));
|
|
|
|
+ resultList.add(PointUtil.createPointData(currentDate,lxts.get(),zlxtsPoint.getNemCode(),zlxtsPoint.getName()));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|