Browse Source

计算服务开发

xieshengjie 2 years ago
parent
commit
5f9286b28a

+ 3 - 0
common/src/main/java/com/gyee/common/contant/ContantXk.java

@@ -192,6 +192,9 @@ public class ContantXk {
     public static final String INTERRUPTIONGF ="AIG013,AIG017,AIG009,AIG006";
 
 
+    public static final String QCZT = "QCZT";
+
+
 
 
 

+ 142 - 7
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/AccessStatusService.java

@@ -2,28 +2,163 @@ package com.gyee.generation.service.realtimelibrary;
 /*
 @author   谢生杰
 @date   2022/11/29-9:56
+秒刷新
 */
 
+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.ProBasicMeterPoint;
-import com.gyee.generation.model.auto.ProBasicPowerstation;
+import com.gyee.generation.model.auto.*;
+import com.gyee.generation.util.PointUtil;
+import com.gyee.generation.util.realtimesource.IEdosUtil;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
-import java.util.Map;
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.stream.Collectors;
 
 @Service
 public class AccessStatusService {
+    @Resource
+    private IEdosUtil edosUtil;
+    @Value("${second}")
+    private String second;
 
-    public void accessStatus(){
+    /**
+     * 场站接入状态
+     * @throws Exception
+     */
+    public void accessStatus() throws Exception {
 
-
-        Map<String, ProBasicMeterPoint> meterpointMap = CacheContext.meterpointMap;
+        List<PointData> resultList = new ArrayList<>();
+        List<ProBasicMeterPoint> meterpoints = CacheContext.meterpoints;
         List<ProBasicPowerstation> wpls = CacheContext.wpls;
+        List<ProBasicSubStation> subwpls = CacheContext.subwpls;
+        List<ProBasicWeatherStation> wswpls = CacheContext.wswpls;
+        Map<String, Map<String, ProBasicPowerstationPoint>> subwppointmap = CacheContext.subwppointmap;
+        Map<String, Map<String, ProBasicPowerstationPoint>> wswppointmap = CacheContext.wswppointmap;
+        Map<String, Map<String, ProBasicPowerstationPoint>> wppointmap = CacheContext.wppointmap;
+        Date currentDate = DateUtils.getCurrentDate();
 
         wpls.stream().forEach(wp->{
+            Map<String, ProBasicPowerstationPoint> powerstationPointMap = wppointmap.get(wp.getId());
+            ProBasicPowerstationPoint djlpoint = powerstationPointMap.get(ContantXk.DQJRZT);
+            ProBasicPowerstationPoint agcpoint = powerstationPointMap.get(ContantXk.AGCJRZT);
+            ProBasicPowerstationPoint glycpoint = powerstationPointMap.get(ContantXk.GLYCJRZT);
+            ProBasicPowerstationPoint cftpoint = powerstationPointMap.get(ContantXk.QXZJRZT);
+            ProBasicPowerstationPoint sbjrpoint = powerstationPointMap.get(ContantXk.SBJRZT);
+
+            ProBasicPowerstationPoint qcztPoint = powerstationPointMap.get(ContantXk.QCZT);
+            double djlzt = 0;
+            double fjzt = 0;
+            double agczt = 0;
+            double glyczt = 0;
+            double cftzt = 0;
+            Optional<ProBasicMeterPoint> swdlOptional = meterpoints.stream().filter(me -> me.getUniformCode().equals("ZXYG") && me.getMeterType().equals("出线") && me.getMeterSort().equals("主")).findFirst();
+            Optional<ProBasicSubStation> subStationOptional = subwpls.stream().filter(sub -> sub.getWindpowerstationId().equals(wp.getId())).findFirst();
+            Optional<ProBasicWeatherStation> wsOptional = wswpls.stream().filter(ws -> ws.getWindpowerstationId().equals(wp.getId())).findFirst();
+            try {
+                double qczt = edosUtil.getSectionData(qcztPoint, currentDate.getTime()).getPointValueInDouble();
+                if (qczt == 6){
+                    fjzt = 1;
+                }
 
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            if (swdlOptional.isPresent()){
+                ProBasicMeterPoint proBasicMeterPoint = swdlOptional.get();
+                try {
+                    Long pointTime = edosUtil.getRealData(proBasicMeterPoint.getNemCode()).getPointTime();
+                    if ((currentDate.getTime() - pointTime) / 1000 > Integer.parseInt(second)){
+                        djlzt = 1;
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+            if (wsOptional.isPresent()){
+                Map<String, ProBasicPowerstationPoint> basicPowerstationPointMap = wswppointmap.get(wsOptional.get().getId());
+                ProBasicPowerstationPoint proBasicPowerstationPoint = basicPowerstationPointMap.get(ContantXk.FCCFTWD);
+                try {
+                    Long pointTime = edosUtil.getRealData(proBasicPowerstationPoint.getNemCode()).getPointTime();
+                    if ((currentDate.getTime() - pointTime) / 1000 > Integer.parseInt(second)){
+                        cftzt = 1;
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+            if (subStationOptional.isPresent()){
+                Map<String, ProBasicPowerstationPoint> basicPowerstationPointMap = subwppointmap.get(subStationOptional.get().getId());
+                ProBasicPowerstationPoint agcpowerstationPoint = basicPowerstationPointMap.get(ContantXk.TPOINT_WP_CXGL);
+                try {
+                    Long pointTime = edosUtil.getRealData(agcpowerstationPoint.getNemCode()).getPointTime();
+                    if ((currentDate.getTime() - pointTime) / 1000 > Integer.parseInt(second)){
+                        agczt = 1;
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                ProBasicPowerstationPoint glycpowerstationPoint = basicPowerstationPointMap.get(ContantXk.TPOINT_WP_YCGL);
+                try {
+                    Long pointTime = edosUtil.getRealData(glycpowerstationPoint.getNemCode()).getPointTime();
+                    if ((currentDate.getTime() - pointTime) / 1000 > Integer.parseInt(second)){
+                        glyczt = 1;
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+            resultList.add(PointUtil.createPointData(currentDate,djlzt,djlpoint.getNemCode(),djlpoint.getName()));
+            resultList.add(PointUtil.createPointData(currentDate,agczt,agcpoint.getNemCode(),agcpoint.getName()));
+            resultList.add(PointUtil.createPointData(currentDate,glyczt,glycpoint.getNemCode(),glycpoint.getName()));
+            resultList.add(PointUtil.createPointData(currentDate,cftzt,cftpoint.getNemCode(),cftpoint.getName()));
+            resultList.add(PointUtil.createPointData(currentDate,fjzt,sbjrpoint.getNemCode(),sbjrpoint.getName()));
         });
+        edosUtil.sendMultiPoint(resultList);
 
     }
+
+    /**
+     * 全场状态
+     */
+    public void fullFieldState() throws Exception {
+        List<PointData> resultList = new ArrayList<>();
+        Date currentDate = DateUtils.getCurrentDate();
+        List<ProBasicPowerstation> wpls = CacheContext.wpls;
+        Map<String, Map<String, ProBasicPowerstationPoint>> wppointmap = CacheContext.wppointmap;
+        Map<String, Map<String, ProBasicEquipmentPoint>> wtpAimap = CacheContext.wtpAimap;
+        Map<String, List<ProBasicEquipment>> wpwtmap = CacheContext.wpwtmap;
+        wpls.stream().forEach(wp->{
+            Map<String, ProBasicPowerstationPoint> powerstationPointMap = wppointmap.get(wp.getId());
+            ProBasicPowerstationPoint powerstationPoint = powerstationPointMap.get(ContantXk.QCZT);
+            List<ProBasicEquipment> proBasicEquipments = wpwtmap.get(wp.getId());
+            List<String> pointIds = new ArrayList<>();
+            proBasicEquipments.stream().forEach(wt->{
+                ProBasicEquipmentPoint equipmentPoint = wtpAimap.get(wt.getId()).get(ContantXk.SBZT);
+                pointIds.add(equipmentPoint.getNemCode());
+            });
+            double zt = 0;
+            try {
+                List<PointData> realData = edosUtil.getRealData(pointIds);
+                List<Double> doubles = realData.stream().map(real -> real.getPointValueInDouble()).collect(Collectors.toList());
+                if (Collections.max(doubles).equals(Collections.min(doubles))){
+                    zt = Collections.max(doubles);
+                }else if(doubles.stream().filter(i->i.equals(1)).collect(Collectors.toList()).size()>0){
+                    zt = 1;
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            resultList.add(PointUtil.createPointData(currentDate,zt,powerstationPoint.getNemCode(),powerstationPoint.getName()));
+        });
+        edosUtil.sendMultiPoint(resultList);
+    }
+
+
+
+
 }

+ 1 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/CycleCalculationService.java

@@ -20,6 +20,7 @@ import java.util.stream.Collectors;
 @author   谢生杰
 @date   2022/11/9-9:29
 计算日月年
+15分钟
 */
 @Service
 public class CycleCalculationService {

+ 49 - 48
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/ElectricityMeteringService.java

@@ -51,6 +51,7 @@ public class ElectricityMeteringService {
         Date yearFirstZero = DateUtils.getYearFirstZero();
         Date currentDate = DateUtils.getCurrentDate();
         Date tomorrow = DateUtils.addDays(samedayZero,1);
+        Date date = DateUtils.addSeconds(currentDate, -1);
 
         List<PointData> lineResultList = new ArrayList<>();
         lnls.stream().forEach(line->{
@@ -58,30 +59,30 @@ public class ElectricityMeteringService {
             //线路发电量
             log.info(line.getName()+"电计量电量计算开始!");
             Optional<ProBasicMeterPoint> fdlOptional = meterpoints.stream().filter(me -> me.getLineId().equals(line.getId()) &&   me.getUniformCode().equals("ZXYG") && me.getMeterType().equals("进线") && me.getMeterSort().equals("主")).findFirst();
-            getLineFdl(samedayZero, monthFirstZero, yearFirstZero, currentDate, lineResultList, proBasicWppointMap, fdlOptional);
+            getLineFdl(samedayZero, monthFirstZero, yearFirstZero, date,currentDate, lineResultList, proBasicWppointMap, fdlOptional);
             log.info(line.getName()+"电计量电量计算完毕!");
 
             //线路上网电量
             log.info(line.getName()+"电计量上网电量计算开始!");
             List<PointData> fdlList = new ArrayList<>();
             Optional<ProBasicMeterPoint> swdlOptional = meterpoints.stream().filter(me ->   me.getUniformCode().equals("ZXYG") && me.getMeterType().equals("出线") && me.getMeterSort().equals("主") && me.getLineId().contains(line.getId())).findFirst();
-            getLineOtherFdl(linepointmap, samedayZero, monthFirstZero, yearFirstZero, currentDate, lineResultList, line, proBasicWppointMap, fdlOptional, fdlList, swdlOptional);
+            getLineOtherFdl(linepointmap, samedayZero, monthFirstZero, yearFirstZero, date,currentDate, lineResultList, line, proBasicWppointMap, fdlOptional, fdlList, swdlOptional);
             log.info(line.getName()+"电计量上网电量计算完毕!");
             //线路购网电量
             log.info(line.getName()+"电计量购网电量计算开始!");
             Optional<ProBasicMeterPoint> gwdlOptional = meterpoints.stream().filter(me ->  me.getUniformCode().equals("FXYG") && me.getMeterType().equals("出线") && me.getMeterSort().equals("主") && me.getLineId().contains(line.getId())).findFirst();
-            getLineOtherFdl(linepointmap, samedayZero, monthFirstZero, yearFirstZero, currentDate, lineResultList, line, proBasicWppointMap, fdlOptional, fdlList, gwdlOptional);
+            getLineOtherFdl(linepointmap, samedayZero, monthFirstZero, yearFirstZero, date,currentDate, lineResultList, line, proBasicWppointMap, fdlOptional, fdlList, gwdlOptional);
             log.info(line.getName()+"电计量购网电量计算完毕!");
 
             //线路厂用电量
             log.info(line.getName()+"电计量厂用电量计算开始!");
             Optional<ProBasicMeterPoint> zybOptional = meterpoints.stream().filter(me->   me.getUniformCode().equals("ZXYG") && me.getMeterType().equals("站用变") && me.getMeterSort().equals("主") && me.getLineId().contains(line.getId())).findFirst();
-            getLineOtherFdl(linepointmap, samedayZero, monthFirstZero, yearFirstZero, currentDate, lineResultList, line, proBasicWppointMap, fdlOptional, fdlList, zybOptional);
+            getLineOtherFdl(linepointmap, samedayZero, monthFirstZero, yearFirstZero,date, currentDate, lineResultList, line, proBasicWppointMap, fdlOptional, fdlList, zybOptional);
             log.info(line.getName()+"电计量厂用电量计算完毕!");
 
             //农网购网电量
             log.info(line.getName()+"农网购网电量计算开始!");
-            setZero(lineResultList,currentDate,proBasicWppointMap,ContantXk.RNWGWDL,ContantXk.YNWGWDL,ContantXk.NNWGWDL);
+            setZero(lineResultList,date,currentDate,proBasicWppointMap,ContantXk.RNWGWDL,ContantXk.YNWGWDL,ContantXk.NNWGWDL);
             log.info(line.getName()+"农网购网电量计算完毕!");
         });
         //线路存储
@@ -143,39 +144,39 @@ public class ElectricityMeteringService {
                 }
             });
             ProBasicPowerstationPoint rfdlpoint = proBasicWppointMap.get(ContantXk.RFDLSYZ);
-            proResultList.add(PointUtil.createPointData(currentDate,rfdl.get(),rfdlpoint.getNemCode(),rfdlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,rfdl.get(),rfdlpoint.getNemCode(),rfdlpoint.getName()));
             ProBasicPowerstationPoint yfdlpoint = proBasicWppointMap.get(ContantXk.YFDLSYZ);
-            proResultList.add(PointUtil.createPointData(currentDate,yfdl.get(),yfdlpoint.getNemCode(),yfdlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,yfdl.get(),yfdlpoint.getNemCode(),yfdlpoint.getName()));
             ProBasicPowerstationPoint nfdlpoint = proBasicWppointMap.get(ContantXk.YFDLSYZ);
-            proResultList.add(PointUtil.createPointData(currentDate,nfdl.get(),yfdlpoint.getNemCode(),nfdlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,nfdl.get(),yfdlpoint.getNemCode(),nfdlpoint.getName()));
 
             ProBasicPowerstationPoint rswdlpoint = proBasicWppointMap.get(ContantXk.RSWDL);
-            proResultList.add(PointUtil.createPointData(currentDate,rswdl.get(),rswdlpoint.getNemCode(),rswdlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,rswdl.get(),rswdlpoint.getNemCode(),rswdlpoint.getName()));
             ProBasicPowerstationPoint yswdlpoint = proBasicWppointMap.get(ContantXk.YSWDL);
-            proResultList.add(PointUtil.createPointData(currentDate,yswdl.get(),yswdlpoint.getNemCode(),yswdlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,yswdl.get(),yswdlpoint.getNemCode(),yswdlpoint.getName()));
             ProBasicPowerstationPoint nswdlpoint = proBasicWppointMap.get(ContantXk.NSWDL);
-            proResultList.add(PointUtil.createPointData(currentDate,nswdl.get(),nswdlpoint.getNemCode(),nswdlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,nswdl.get(),nswdlpoint.getNemCode(),nswdlpoint.getName()));
 
             ProBasicPowerstationPoint rgwgwdlpoint = proBasicWppointMap.get(ContantXk.RGWGWDL);
-            proResultList.add(PointUtil.createPointData(currentDate,rgwgwdl.get(),rgwgwdlpoint.getNemCode(),rgwgwdlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,rgwgwdl.get(),rgwgwdlpoint.getNemCode(),rgwgwdlpoint.getName()));
             ProBasicPowerstationPoint ygwgwdlpoint = proBasicWppointMap.get(ContantXk.YGWGWDL);
-            proResultList.add(PointUtil.createPointData(currentDate,ygwgwdl.get(),ygwgwdlpoint.getNemCode(),ygwgwdlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,ygwgwdl.get(),ygwgwdlpoint.getNemCode(),ygwgwdlpoint.getName()));
             ProBasicPowerstationPoint ngwgwdlpoint = proBasicWppointMap.get(ContantXk.NGWGWDL);
-            proResultList.add(PointUtil.createPointData(currentDate,ngwgwdl.get(),ngwgwdlpoint.getNemCode(),ngwgwdlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,ngwgwdl.get(),ngwgwdlpoint.getNemCode(),ngwgwdlpoint.getName()));
 
             ProBasicPowerstationPoint rnwgwdlpoint = proBasicWppointMap.get(ContantXk.RNWGWDL);
-            proResultList.add(PointUtil.createPointData(currentDate,rnwgwdl.get(),rnwgwdlpoint.getNemCode(),rnwgwdlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,rnwgwdl.get(),rnwgwdlpoint.getNemCode(),rnwgwdlpoint.getName()));
             ProBasicPowerstationPoint ynwgwdlpoint = proBasicWppointMap.get(ContantXk.YNWGWDL);
-            proResultList.add(PointUtil.createPointData(currentDate,ynwgwdl.get(),ynwgwdlpoint.getNemCode(),ynwgwdlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,ynwgwdl.get(),ynwgwdlpoint.getNemCode(),ynwgwdlpoint.getName()));
             ProBasicPowerstationPoint nnwgwdlpoint = proBasicWppointMap.get(ContantXk.NNWGWDL);
-            proResultList.add(PointUtil.createPointData(currentDate,nnwgwdl.get(),nnwgwdlpoint.getNemCode(),nnwgwdlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,nnwgwdl.get(),nnwgwdlpoint.getNemCode(),nnwgwdlpoint.getName()));
 
             ProBasicPowerstationPoint rcydlpoint = proBasicWppointMap.get(ContantXk.RCYDL);
-            proResultList.add(PointUtil.createPointData(currentDate,rcydl.get(),rcydlpoint.getNemCode(),rcydlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,rcydl.get(),rcydlpoint.getNemCode(),rcydlpoint.getName()));
             ProBasicPowerstationPoint ycydlpoint = proBasicWppointMap.get(ContantXk.YCYDL);
-            proResultList.add(PointUtil.createPointData(currentDate,ycydl.get(),ycydlpoint.getNemCode(),ycydlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,ycydl.get(),ycydlpoint.getNemCode(),ycydlpoint.getName()));
             ProBasicPowerstationPoint ncydlpoint = proBasicWppointMap.get(ContantXk.NCYDL);
-            proResultList.add(PointUtil.createPointData(currentDate,ncydl.get(),ncydlpoint.getNemCode(),ncydlpoint.getName()));
+            proResultList.add(PointUtil.createPointData(date,ncydl.get(),ncydlpoint.getNemCode(),ncydlpoint.getName()));
 
         });
         //期次存储
@@ -237,39 +238,39 @@ public class ElectricityMeteringService {
                 }
             });
             ProBasicPowerstationPoint rfdlpoint = wpBasicWppointMap.get(ContantXk.RFDLSYZ);
-            wpResultList.add(PointUtil.createPointData(currentDate,rfdl.get(),rfdlpoint.getNemCode(),rfdlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,rfdl.get(),rfdlpoint.getNemCode(),rfdlpoint.getName()));
             ProBasicPowerstationPoint yfdlpoint = wpBasicWppointMap.get(ContantXk.YFDLSYZ);
-            wpResultList.add(PointUtil.createPointData(currentDate,yfdl.get(),yfdlpoint.getNemCode(),yfdlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,yfdl.get(),yfdlpoint.getNemCode(),yfdlpoint.getName()));
             ProBasicPowerstationPoint nfdlpoint = wpBasicWppointMap.get(ContantXk.YFDLSYZ);
-            wpResultList.add(PointUtil.createPointData(currentDate,nfdl.get(),yfdlpoint.getNemCode(),nfdlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,nfdl.get(),yfdlpoint.getNemCode(),nfdlpoint.getName()));
 
             ProBasicPowerstationPoint rswdlpoint = wpBasicWppointMap.get(ContantXk.RSWDL);
-            wpResultList.add(PointUtil.createPointData(currentDate,rswdl.get(),rswdlpoint.getNemCode(),rswdlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,rswdl.get(),rswdlpoint.getNemCode(),rswdlpoint.getName()));
             ProBasicPowerstationPoint yswdlpoint = wpBasicWppointMap.get(ContantXk.YSWDL);
-            wpResultList.add(PointUtil.createPointData(currentDate,yswdl.get(),yswdlpoint.getNemCode(),yswdlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,yswdl.get(),yswdlpoint.getNemCode(),yswdlpoint.getName()));
             ProBasicPowerstationPoint nswdlpoint = wpBasicWppointMap.get(ContantXk.NSWDL);
-            wpResultList.add(PointUtil.createPointData(currentDate,nswdl.get(),nswdlpoint.getNemCode(),nswdlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,nswdl.get(),nswdlpoint.getNemCode(),nswdlpoint.getName()));
 
             ProBasicPowerstationPoint rgwgwdlpoint = wpBasicWppointMap.get(ContantXk.RGWGWDL);
-            wpResultList.add(PointUtil.createPointData(currentDate,rgwgwdl.get(),rgwgwdlpoint.getNemCode(),rgwgwdlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,rgwgwdl.get(),rgwgwdlpoint.getNemCode(),rgwgwdlpoint.getName()));
             ProBasicPowerstationPoint ygwgwdlpoint = wpBasicWppointMap.get(ContantXk.YGWGWDL);
-            wpResultList.add(PointUtil.createPointData(currentDate,ygwgwdl.get(),ygwgwdlpoint.getNemCode(),ygwgwdlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,ygwgwdl.get(),ygwgwdlpoint.getNemCode(),ygwgwdlpoint.getName()));
             ProBasicPowerstationPoint ngwgwdlpoint = wpBasicWppointMap.get(ContantXk.NGWGWDL);
-            wpResultList.add(PointUtil.createPointData(currentDate,ngwgwdl.get(),ngwgwdlpoint.getNemCode(),ngwgwdlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,ngwgwdl.get(),ngwgwdlpoint.getNemCode(),ngwgwdlpoint.getName()));
 
             ProBasicPowerstationPoint rnwgwdlpoint = wpBasicWppointMap.get(ContantXk.RNWGWDL);
-            wpResultList.add(PointUtil.createPointData(currentDate,rnwgwdl.get(),rnwgwdlpoint.getNemCode(),rnwgwdlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,rnwgwdl.get(),rnwgwdlpoint.getNemCode(),rnwgwdlpoint.getName()));
             ProBasicPowerstationPoint ynwgwdlpoint = wpBasicWppointMap.get(ContantXk.YNWGWDL);
-            wpResultList.add(PointUtil.createPointData(currentDate,ynwgwdl.get(),ynwgwdlpoint.getNemCode(),ynwgwdlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,ynwgwdl.get(),ynwgwdlpoint.getNemCode(),ynwgwdlpoint.getName()));
             ProBasicPowerstationPoint nnwgwdlpoint = wpBasicWppointMap.get(ContantXk.NNWGWDL);
-            wpResultList.add(PointUtil.createPointData(currentDate,nnwgwdl.get(),nnwgwdlpoint.getNemCode(),nnwgwdlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,nnwgwdl.get(),nnwgwdlpoint.getNemCode(),nnwgwdlpoint.getName()));
 
             ProBasicPowerstationPoint rcydlpoint = wpBasicWppointMap.get(ContantXk.RCYDL);
-            wpResultList.add(PointUtil.createPointData(currentDate,rcydl.get(),rcydlpoint.getNemCode(),rcydlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,rcydl.get(),rcydlpoint.getNemCode(),rcydlpoint.getName()));
             ProBasicPowerstationPoint ycydlpoint = wpBasicWppointMap.get(ContantXk.YCYDL);
-            wpResultList.add(PointUtil.createPointData(currentDate,ycydl.get(),ycydlpoint.getNemCode(),ycydlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,ycydl.get(),ycydlpoint.getNemCode(),ycydlpoint.getName()));
             ProBasicPowerstationPoint ncydlpoint = wpBasicWppointMap.get(ContantXk.NCYDL);
-            wpResultList.add(PointUtil.createPointData(currentDate,ncydl.get(),ncydlpoint.getNemCode(),ncydlpoint.getName()));
+            wpResultList.add(PointUtil.createPointData(date,ncydl.get(),ncydlpoint.getNemCode(),ncydlpoint.getName()));
 
         });
         //场站存储
@@ -282,10 +283,10 @@ public class ElectricityMeteringService {
     }
 
 
-    private void setZero(List<PointData> resultList, Date currentDate, Map<String, ProBasicPowerstationPoint> linemap, String rcode, String ycode, String ncode) {
+    private void setZero(List<PointData> resultList,Date date, Date currentDate, Map<String, ProBasicPowerstationPoint> linemap, String rcode, String ycode, String ncode) {
         //线路日发电量
         PointData r = new PointData();
-        r.setPointTime(currentDate.getTime());
+        r.setPointTime(date.getTime());
         r.setPointValue("0");
         r.setPointValueInDouble(0);
         r.setEdnaId(linemap.get(rcode).getNemCode());
@@ -293,7 +294,7 @@ public class ElectricityMeteringService {
         resultList.add(r);
         //线路月发电量
         PointData y = new PointData();
-        y.setPointTime(currentDate.getTime());
+        y.setPointTime(date.getTime());
         y.setPointValue("0");
         y.setPointValueInDouble(0);
         y.setEdnaId(linemap.get(ycode).getNemCode());
@@ -301,7 +302,7 @@ public class ElectricityMeteringService {
         resultList.add(y);
         //线路年发电量
         PointData n = new PointData();
-        n.setPointTime(currentDate.getTime());
+        n.setPointTime(date.getTime());
         n.setPointValue("0");
         n.setPointValueInDouble(0);
         n.setEdnaId(linemap.get(ncode).getNemCode());
@@ -309,13 +310,13 @@ public class ElectricityMeteringService {
         resultList.add(n);
     }
 
-    private void getLineOtherFdl(Map<String, Map<String, ProBasicPowerstationPoint>> linepointmap, Date samedayZero, Date monthFirstZero, Date yearFirstZero, Date currentDate, List<PointData> lineResultList, ProBasicLine line, Map<String, ProBasicPowerstationPoint> proBasicWppointMap, Optional<ProBasicMeterPoint> fdlOptional, List<PointData> fdlList, Optional<ProBasicMeterPoint> swdlOptional) {
+    private void getLineOtherFdl(Map<String, Map<String, ProBasicPowerstationPoint>> linepointmap, Date samedayZero, Date monthFirstZero, Date yearFirstZero, Date date,Date currentDate, List<PointData> lineResultList, ProBasicLine line, Map<String, ProBasicPowerstationPoint> proBasicWppointMap, Optional<ProBasicMeterPoint> fdlOptional, List<PointData> fdlList, Optional<ProBasicMeterPoint> swdlOptional) {
         if (swdlOptional.isPresent()){
             ProBasicMeterPoint swdlMeterpoint = swdlOptional.get();
             if (StringUtils.isEmpty(fdlList)){
                 String[] lines = swdlMeterpoint.getLineId().split("\\|");
                 Arrays.stream(lines).forEach(l->{
-                    getLineFdl(samedayZero, monthFirstZero, yearFirstZero, currentDate, fdlList, proBasicWppointMap, fdlOptional);
+                    getLineFdl(samedayZero, monthFirstZero, yearFirstZero, date,currentDate, fdlList, proBasicWppointMap, fdlOptional);
                 });
             }
             //获取电量百分比,算其他电量
@@ -339,17 +340,17 @@ public class ElectricityMeteringService {
                 //线路上网电量
                 double xlswdl = (real - sameday) * magnification / xs * percentageMap.get("percentage");
                 ProBasicPowerstationPoint rpoint = proBasicWppointMap.get(ContantXk.RSWDL);
-                PointData rpointData = PointUtil.createPointData(currentDate, xlswdl, rpoint.getNemCode(), rpoint.getName());
+                PointData rpointData = PointUtil.createPointData(date, xlswdl, rpoint.getNemCode(), rpoint.getName());
                 lineResultList.add(rpointData);
                 //线路月上网发电量
                 double xlyswdl = (real - month) * magnification / xs * percentageMap.get("ypercentage");
                 ProBasicPowerstationPoint ypoint = proBasicWppointMap.get(ContantXk.YSWDL);
-                PointData ypointData = PointUtil.createPointData(currentDate, xlyswdl, ypoint.getNemCode(), ypoint.getName());
+                PointData ypointData = PointUtil.createPointData(date, xlyswdl, ypoint.getNemCode(), ypoint.getName());
                 lineResultList.add(ypointData);
                 //线路年上网发电量
                 double xlnswfdl = (real - year) * magnification / xs * percentageMap.get("npercentage");
                 ProBasicPowerstationPoint npoint = proBasicWppointMap.get(ContantXk.NSWDL);
-                PointData npointData = PointUtil.createPointData(currentDate, xlnswfdl, npoint.getNemCode(), npoint.getName());
+                PointData npointData = PointUtil.createPointData(date, xlnswfdl, npoint.getNemCode(), npoint.getName());
                 lineResultList.add(npointData);
 
             } catch (Exception e) {
@@ -358,7 +359,7 @@ public class ElectricityMeteringService {
         }
     }
 
-    private void getLineFdl(Date samedayZero, Date monthFirstZero, Date yearFirstZero, Date currentDate, List<PointData> lineResultList, Map<String, ProBasicPowerstationPoint> proBasicWppointMap, Optional<ProBasicMeterPoint> fdlOptional) {
+    private void getLineFdl(Date samedayZero, Date monthFirstZero, Date yearFirstZero, Date date,Date currentDate, List<PointData> lineResultList, Map<String, ProBasicPowerstationPoint> proBasicWppointMap, Optional<ProBasicMeterPoint> fdlOptional) {
         if (fdlOptional.isPresent()){
             ProBasicMeterPoint proBasicMeterPoint = fdlOptional.get();
             String pointid = proBasicMeterPoint.getId();
@@ -377,17 +378,17 @@ public class ElectricityMeteringService {
                 //线路日发电量
                 double xlrfdl = (real - sameday) * magnification / xs;
                 ProBasicPowerstationPoint rpoint = proBasicWppointMap.get(ContantXk.RFDLSYZ);
-                PointData r = PointUtil.createPointData(currentDate, xlrfdl, rpoint.getNemCode(),rpoint.getName());
+                PointData r = PointUtil.createPointData(date, xlrfdl, rpoint.getNemCode(),rpoint.getName());
                 lineResultList.add(r);
                 //线路月发电量
                 double xlyfdl = (real - month) * magnification / xs;
                 ProBasicPowerstationPoint ypoint = proBasicWppointMap.get(ContantXk.YFDLSYZ);
-                PointData y = PointUtil.createPointData(currentDate, xlyfdl,ypoint.getNemCode(),ypoint.getName());
+                PointData y = PointUtil.createPointData(date, xlyfdl,ypoint.getNemCode(),ypoint.getName());
                 lineResultList.add(y);
                 //线路年发电量
                 double xlnfdl = (real - year) * magnification / xs;
                 ProBasicPowerstationPoint npoint = proBasicWppointMap.get(ContantXk.NFDLSYZ);
-                PointData n = PointUtil.createPointData(currentDate, xlnfdl,npoint.getNemCode(),npoint.getName());
+                PointData n = PointUtil.createPointData(date, xlnfdl,npoint.getNemCode(),npoint.getName());
                 lineResultList.add(n);
             } catch (Exception e) {
                 e.printStackTrace();