瀏覽代碼

IvPvCurveFittingService

xushili 1 年之前
父節點
當前提交
cafc6d176f

+ 4 - 0
power-fitting-JN/src/main/java/com.gyee.power.fitting/common/config/GyeeConfig.java

@@ -101,4 +101,8 @@ public class GyeeConfig {
     public void setFilePathPower(String filePathPower) {
         this.filePathPower = filePathPower;
     }
+
+    public String getGfDataPath() {
+        return getFilePathPrepare() + "gf" + File.separator;
+    }
 }

+ 121 - 234
power-fitting-JN/src/main/java/com.gyee.power.fitting/service/impl/IvPvCurveFittingService.java

@@ -5,12 +5,13 @@ import com.gyee.power.fitting.common.alg.PolynomialCurveFitting;
 import com.gyee.power.fitting.common.config.GyeeConfig;
 import com.gyee.power.fitting.common.constants.Constants;
 import com.gyee.power.fitting.common.feign.IAdapterService;
-import com.gyee.power.fitting.common.feign.RemoteServiceBuilder;
 import com.gyee.power.fitting.common.spring.InitialRunner;
 import com.gyee.power.fitting.common.util.DateUtils;
 import com.gyee.power.fitting.common.util.FileUtil;
 import com.gyee.power.fitting.common.util.PowerFittingUtil;
-import com.gyee.power.fitting.model.*;
+import com.gyee.power.fitting.model.ProEconPowerFittingAnalySis;
+import com.gyee.power.fitting.model.Windpowerstationtestingpoint2;
+import com.gyee.power.fitting.model.Windturbinetestingpointai2;
 import com.gyee.power.fitting.model.anno.AnnotationTool;
 import com.gyee.power.fitting.model.anno.FixedVo;
 import com.gyee.power.fitting.model.custom.FjjxbVo;
@@ -18,13 +19,10 @@ import com.gyee.power.fitting.model.custom.PhotovoltaicInfo;
 import com.gyee.power.fitting.model.custom.TableTitle;
 import com.gyee.power.fitting.model.custom.TsDoubleData;
 import com.gyee.power.fitting.service.IWindpowerstationtestingpoint2Service;
-import com.gyee.power.fitting.service.ProBasicEquipmentPointService;
-import com.gyee.power.fitting.service.ProBasicPowerstationPointService;
 import com.gyee.power.fitting.service.Windturbinetestingpointai2Service;
-import com.gyee.power.fitting.service.custom.curve.DataScangfService;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.math3.fitting.WeightedObservedPoints;
-import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -39,45 +37,37 @@ import java.util.stream.Collectors;
 public class IvPvCurveFittingService {
 
     @Resource
-    private IWindpowerstationtestingpoint2Service windpowerstationtestingpoint2Service;
+    private IWindpowerstationtestingpoint2Service stationPointService;
     @Resource
-    private Windturbinetestingpointai2Service windturbinetestingpointai2Service;
-
-    @Resource
-    private ProBasicWeatherStationServiceImpl weatherStationService;
-
-    @Resource
-    private ProBasicEquipmentPointService proBasicEquipmentPointService;
-
-    @Resource
-    private ProBasicPowerstationPointService proBasicPowerstationPointService;
+    private Windturbinetestingpointai2Service windPointService;
     @Resource
     private IAdapterService adpClient;
-
-    @Autowired
-    private RemoteServiceBuilder remoteService;
-
     @Resource
     private GyeeConfig config;
     @Resource
     private PolynomialCurveFitting pncf;
+    @Resource
+    private AnnotationTool annotationTool;
 
     private List<FixedVo> fixedVos;
     private Map<String, String> uniforcodes;
 
-    @Resource
-    private DataScangfService dataScangfService;
+    @Value("${gf3xjscz}")
+    private String gf3xjscz;
+
 
-    public void getDatas2File(String stationid, long start, long end, int interval) {
+    public void getDatas2File(String stationid, long start, long end) {
 
         int daym = 24 * 60 * 60 * 1000;
 
         //按天
         for (long i = start; i < end; i += daym) {
 
-            List<List<PhotovoltaicInfo>> datas = getDatas(stationid, i, i + daym, interval);
+            List<List<PhotovoltaicInfo>> datas = getDatas(stationid, i, i + daym, null);
             infos2File(datas);
+
         }
+
     }
 
     public Map<String, List<PhotovoltaicInfo>> getDatas2File1(String stationid, long start, long end, Integer interval) {
@@ -103,13 +93,12 @@ public class IvPvCurveFittingService {
     private void infos2File(List<List<PhotovoltaicInfo>> datas) {
 
         //文件第一行
-        List<FixedVo> fixedVos = AnnotationTool.getFixedVoList(PhotovoltaicInfo.class);
-        String columnName = fixedVos.stream().map(FixedVo::getDes).collect(Collectors.joining(","));
+        String columnName = getFixedVos().stream().map(FixedVo::getDes).collect(Collectors.joining(","));
         //遍历逆变器
         for (List<PhotovoltaicInfo> data : datas) {
             PhotovoltaicInfo info = data.get(0);
             String station = info.getStation();
-            String fileName = config.getFilePathPrepare() + "gf" + File.separator + "一秒" + File.separator + station + "-" + info.getInverter() + "-" + DateUtils.date2StringS(new Date(info.getTime())) + ".csv";
+            String fileName = config.getGfDataPath() + station + "-" + info.getInverter() + "-" + DateUtils.date2StringS(new Date(info.getTime())) + ".csv";
             File file = new File(fileName);
             if (file.exists()) continue;
             StringBuilder sb = new StringBuilder();
@@ -125,15 +114,10 @@ public class IvPvCurveFittingService {
         }
     }
 
-    public List<String> getFileList(String station, List<String> nbq, long startdate, int interval, long enddate, boolean isOffline) {
+    public List<String> getFileList(String station, List<String> nbq, long startdate, long enddate, boolean isOffline) {
         List<String> fileList = new ArrayList<>();
-        File file = null;
         //获取文件位置
-        if (interval == 1) {
-            file = new File(config.getFilePathPrepare() + "gf" + File.separator + "一秒" + File.separator);
-        } else if (interval == 1) {
-            file = new File(config.getFilePathPrepare() + "gf" + File.separator + "一秒" + File.separator);
-        }
+        File file = new File(config.getFilePathPrepare() + "gf");
         //获取文件列表
         File[] files = file.listFiles();
         //如果文件不够,返回null
@@ -157,10 +141,9 @@ public class IvPvCurveFittingService {
     }
 
     public Map<String, Object> getTable(String s) {
-        List<FixedVo> fixedVos = AnnotationTool.getFixedVoList(PhotovoltaicInfo.class);
-        List<TableTitle> collect = fixedVos.stream().map(d -> new TableTitle(d.getName(), d.getDes())).collect(Collectors.toList());
+        List<TableTitle> collect = getFixedVos().stream().map(d -> new TableTitle(d.getName(), d.getDes())).collect(Collectors.toList());
         Map<String, Object> tableMap = new HashMap<>();
-        String fs = config.getFilePathPrepare() + "gf" + File.separator + s;
+        String fs = config.getGfDataPath() + s;
         List<PhotovoltaicInfo> infos = file2Info(fs, false);
         tableMap.put("data", infos);
         tableMap.put("title", collect);
@@ -207,25 +190,31 @@ public class IvPvCurveFittingService {
      */
     public Map<String, List<PhotovoltaicInfo>> calculatAnalysis(List<String> fileList) {
 
-        String bzcldPath = config.getFilePathPrepare() + "bzd" + File.separator + "标准点.csv";
+        String bzcldPath = config.getFilePathPrepare() + "bzd标准点.csv";
         List<PhotovoltaicInfo> bzclds = file2Info(bzcldPath, true);
         Map<String, PhotovoltaicInfo> bzcldMap = bzclds.stream().collect(Collectors.toMap(PhotovoltaicInfo::getInverter, Function.identity()));
 
-        String fs = config.getFilePathPrepare() + "gf" + File.separator;
+        String fs = config.getGfDataPath();
         Map<String, List<PhotovoltaicInfo>> stringListMap = new HashMap<>();
         for (String s : fileList) {
             //读取一个文件
             List<PhotovoltaicInfo> infos = file2Info(fs + s, true);
             List<PhotovoltaicInfo> theoryInfos;
-            if (s.contains("HZJ_GDC") || s.contains("AK_GDC")) {
+
+            boolean b = false;
+            String[] split = gf3xjscz.split(",");
+            for (String s1 : split) {
+                if (s.contains(s1)) b = true;
+            }
+            if (b) {
                 theoryInfos = CurrentVoltageCalc.CalcTheoryPowerHZJ(infos, bzcldMap);
             } else {
                 theoryInfos = CurrentVoltageCalc.CalcTheoryPower(infos, bzcldMap);
             }
+
             //按逆变器聚合数据
             if (stringListMap.containsKey(theoryInfos.get(0).getInverter())) {
                 stringListMap.get(theoryInfos.get(0).getInverter()).addAll(theoryInfos);
-
             } else {
                 stringListMap.put(theoryInfos.get(0).getInverter(), theoryInfos);
             }
@@ -234,59 +223,6 @@ public class IvPvCurveFittingService {
     }
 
     /**
-     * 计算理论功率加入原列表
-     *
-     * @return
-     */
-    public Map<String, List<PhotovoltaicInfo>> calculatAnalysis1(List<PhotovoltaicInfo> bzdList, Map<String, List<PhotovoltaicInfo>> datasInfos) {
-
-        Map<String, PhotovoltaicInfo> bzcldMap = bzdList.stream().collect(Collectors.toMap(PhotovoltaicInfo::getInverter, Function.identity()));
-
-        Map<String, List<PhotovoltaicInfo>> stringListMap = new HashMap<>();
-
-        String s;
-        for (Map.Entry<String, List<PhotovoltaicInfo>> entry : datasInfos.entrySet()) {
-            s = entry.getKey();
-            List<PhotovoltaicInfo> theoryInfos;
-            if (s.contains("HZJ_GDC") || s.contains("AK_GDC")) {
-                theoryInfos = CurrentVoltageCalc.CalcTheoryPowerHZJ(entry.getValue(), bzcldMap);
-            } else {
-                theoryInfos = CurrentVoltageCalc.CalcTheoryPower(entry.getValue(), bzcldMap);
-            }
-            stringListMap.put(s, theoryInfos);
-        }
-        return stringListMap;
-    }
-
-    //    public Map<String, List<PhotovoltaicInfo>> calculatAnalysis1(List<List<List<PhotovoltaicInfo>>> feill) {
-    //
-    //        String bzcldPath = config.getFilePathPrepare() + "bzd"+File.separator + "标准点.csv";
-    //        List<PhotovoltaicInfo> bzclds = file2Info(bzcldPath, true);
-    //        Map<String, PhotovoltaicInfo> bzcldMap = bzclds.stream().collect(Collectors.toMap(PhotovoltaicInfo::getInverter, Function.identity()));
-    //
-    //        String fs = config.getFilePathPrepare() + "gf" +File.separator;
-    //        Map<String, List<PhotovoltaicInfo>> stringListMap = new HashMap<>();
-    //        for (String s : fileList) {
-    //            //读取一个文件
-    //            List<PhotovoltaicInfo> infos = file2Info(fs + s, true);
-    //            List<PhotovoltaicInfo> theoryInfos;
-    //            if (s.contains("HZJ_GDC") || s.contains("AK_GDC")) {
-    //                theoryInfos = CurrentVoltageCalc.CalcTheoryPowerHZJ(infos, bzcldMap);
-    //            } else {
-    //                theoryInfos = CurrentVoltageCalc.CalcTheoryPower(infos, bzcldMap);
-    //            }
-    //            //按逆变器聚合数据
-    //            if (stringListMap.containsKey(theoryInfos.get(0).getInverter())) {
-    //                stringListMap.get(theoryInfos.get(0).getInverter()).addAll(theoryInfos);
-    //
-    //            } else {
-    //                stringListMap.put(theoryInfos.get(0).getInverter(), theoryInfos);
-    //            }
-    //        }
-    //        return stringListMap;
-    //    }
-
-    /**
      * 合并同逆变器文件
      *
      * @param fileList
@@ -294,7 +230,7 @@ public class IvPvCurveFittingService {
      */
     public Map<String, List<PhotovoltaicInfo>> mergeCalculat(List<String> fileList) {
 
-        String fs = config.getFilePathPrepare() + "gf" + File.separator;
+        String fs = config.getGfDataPath();
         Map<String, List<PhotovoltaicInfo>> stringListMap = new HashMap<>();
         for (String s : fileList) {
             //读取一个文件
@@ -324,7 +260,7 @@ public class IvPvCurveFittingService {
             fl.setStation(split[0]);
             fl.setStationcn(split[1]);
             //fl.setWindturbine(split[1]);
-            fl.setTime(InitialRunner.newgfstationMap.get(split[0]));
+            fl.setTime(InitialRunner.gfstationMap.get(split[0]));
             fl.setInterval(split[2] + "年" + split[3] + "月");
             fileLists.add(fl);
         }
@@ -334,7 +270,7 @@ public class IvPvCurveFittingService {
 
     public List<String> getAllFileList() {
         //获取文件位置
-        File file = new File(config.getFilePathPrepare() + "gf" + "一秒");
+        File file = new File(config.getFilePathPrepare() + "gf");
         //获取文件列表
         File[] files = file.listFiles();
         List<String> fileList = Arrays.stream(files).map(f -> f.getName()).collect(Collectors.toList());
@@ -356,9 +292,8 @@ public class IvPvCurveFittingService {
         }
 
         //文件第一行
-        List<FixedVo> fixedVos = AnnotationTool.getFixedVoList(PhotovoltaicInfo.class);
         StringBuilder sb = new StringBuilder();
-        String columnName = fixedVos.stream().map(FixedVo::getDes).collect(Collectors.joining(","));
+        String columnName = getFixedVos().stream().map(FixedVo::getDes).collect(Collectors.joining(","));
         sb.append(columnName).append("\n");
         for (PhotovoltaicInfo ptInfo : ptInfos) {
             sb.append(ptInfo.getStation()).append(",").append(ptInfo.getInverter()).append(",")
@@ -378,28 +313,11 @@ public class IvPvCurveFittingService {
 
     }
 
-    /**
-     * 标准点计算
-     *
-     * @param stringListMap
-     */
-    public List<PhotovoltaicInfo> standardPointCalculate1(Map<String, List<PhotovoltaicInfo>> stringListMap) {
-
-        List<PhotovoltaicInfo> ptInfos = new ArrayList<>();
-        for (Map.Entry<String, List<PhotovoltaicInfo>> entry : stringListMap.entrySet()) {
-            List<PhotovoltaicInfo> value = entry.getValue();
-            Optional<PhotovoltaicInfo> first = value.stream().sorted(Comparator.comparing(PhotovoltaicInfo::getActualP).reversed()).findFirst();
-            ptInfos.add(first.get());
-        }
-        return ptInfos;
-    }
-
     public List<TableTitle> getTheoryTitel() {
 
-        List<FixedVo> fixedVos = AnnotationTool.getFixedVoList(PhotovoltaicInfo.class);
         String[] ss = {"station", "datetime", "T", "S", "actualP"};
         List<String> strings = Arrays.asList(ss);
-        List<TableTitle> collect = fixedVos.stream().map(d -> new TableTitle(d.getName(), d.getDes())).collect(Collectors.toList());
+        List<TableTitle> collect = getFixedVos().stream().map(d -> new TableTitle(d.getName(), d.getDes())).collect(Collectors.toList());
         collect = collect.stream().filter(c -> strings.contains(c.getKey())).collect(Collectors.toList());
         TableTitle title = new TableTitle();
         title.setKey("ideaP");
@@ -417,7 +335,7 @@ public class IvPvCurveFittingService {
      */
     public List<PhotovoltaicInfo> calculatFitting(List<String> fileList) {
 
-        String fs = config.getFilePathPrepare() + "gf" + File.separator;
+        String fs = config.getGfDataPath();
         List<PhotovoltaicInfo> infoList = new ArrayList<>();
         for (String s : fileList) {
             List<PhotovoltaicInfo> infos = file2Info(fs + s, true);
@@ -455,12 +373,53 @@ public class IvPvCurveFittingService {
     }
 
     /**
+     * 标准点计算
+     *
+     * @param stringListMap
+     */
+    public List<PhotovoltaicInfo> standardPointCalculate1(Map<String, List<PhotovoltaicInfo>> stringListMap) {
+
+        List<PhotovoltaicInfo> ptInfos = new ArrayList<>();
+        for (Map.Entry<String, List<PhotovoltaicInfo>> entry : stringListMap.entrySet()) {
+            List<PhotovoltaicInfo> value = entry.getValue();
+            Optional<PhotovoltaicInfo> first = value.stream().sorted(Comparator.comparing(PhotovoltaicInfo::getActualP).reversed()).findFirst();
+            ptInfos.add(first.get());
+        }
+        return ptInfos;
+    }
+
+    /**
+     * 计算理论功率加入原列表
+     *
+     * @return
+     */
+    public Map<String, List<PhotovoltaicInfo>> calculatAnalysis1(List<PhotovoltaicInfo> bzdList, Map<String, List<PhotovoltaicInfo>> datasInfos) {
+
+        Map<String, PhotovoltaicInfo> bzcldMap = bzdList.stream().collect(Collectors.toMap(PhotovoltaicInfo::getInverter, Function.identity()));
+
+        Map<String, List<PhotovoltaicInfo>> stringListMap = new HashMap<>();
+
+        String s;
+        for (Map.Entry<String, List<PhotovoltaicInfo>> entry : datasInfos.entrySet()) {
+            s = entry.getKey();
+            List<PhotovoltaicInfo> theoryInfos;
+            if (s.contains("HZJ_GDC") || s.contains("AK_GDC")) {
+                theoryInfos = CurrentVoltageCalc.CalcTheoryPowerHZJ(entry.getValue(), bzcldMap);
+            } else {
+                theoryInfos = CurrentVoltageCalc.CalcTheoryPower(entry.getValue(), bzcldMap);
+            }
+            stringListMap.put(s, theoryInfos);
+        }
+        return stringListMap;
+    }
+
+    /**
      * 光伏绩效榜
      *
      * @param startdate
      * @param enddate
      */
-    public List<FjjxbVo> getPhotovoltaicPerformanceList(long startdate, long enddate, int interval) {
+    public List<FjjxbVo> getPhotovoltaicPerformanceList(long startdate, long enddate) {
         int oneday = 24 * 60 * 60;
 
         String bzcldPath = config.getFilePathPrepare() + "bzd" + File.separator + "标准点.csv";
@@ -468,20 +427,20 @@ public class IvPvCurveFittingService {
         Map<String, PhotovoltaicInfo> bzcldMap = bzclds.stream().collect(Collectors.toMap(PhotovoltaicInfo::getInverter, Function.identity()));
 
         //获取实际发电量
-        List<ProBasicPowerstationPoint> rfdl = proBasicPowerstationPointService.getzfsPoints(null, "RFDL");
+        List<Windpowerstationtestingpoint2> rfdl = stationPointService.getPoints(null, "RFDL");
         List<FjjxbVo> infos = new ArrayList<>();
         //遍历逆变器
-        for (ProBasicPowerstationPoint wstp : rfdl) {
+        for (Windpowerstationtestingpoint2 wstp : rfdl) {
             //场站
-            String stationid = wstp.getWindpowerstationId();
+            String stationid = wstp.getWindpowerstationid();
 
-            List<TsDoubleData> history = remoteService.adapterfd().getHistorySnap(wstp.getNemCode(), startdate + oneday * 1000, enddate, oneday);
+            List<TsDoubleData> history = adpClient.getHistorySnap(wstp.getCode(), startdate + oneday * 1000, enddate, oneday);
             double d = 0;
             for (TsDoubleData data : history) {
                 d += data.getDoubleValue();
             }
             FjjxbVo vo = new FjjxbVo();
-            vo.setName(InitialRunner.newgfstationMap.get(stationid));
+            vo.setName(InitialRunner.gfstationMap.get(stationid));
             vo.setSjfdl(d);
 
             //理论发电量
@@ -491,11 +450,11 @@ public class IvPvCurveFittingService {
             int i = 0;
             double t = 5 / 60;
 
-            List<List<PhotovoltaicInfo>> datas = getDatas(stationid, startdate, enddate, interval);
+            List<List<PhotovoltaicInfo>> datas = getDatas(stationid, startdate, enddate, null);
             //遍历逆变器
             for (List<PhotovoltaicInfo> data : datas) {
 
-                if ("HZJ_GDC".equals(stationid) || "AK_GDC".equals(stationid)) {
+                if (gf3xjscz.contains(stationid)) {
                     CurrentVoltageCalc.CalcTheoryPowerHZJ(data, bzcldMap);
                 } else {
                     CurrentVoltageCalc.CalcTheoryPower(data, bzcldMap);
@@ -521,58 +480,43 @@ public class IvPvCurveFittingService {
      * @return 逆变器,列表
      */
     public List<List<PhotovoltaicInfo>> getDatas(String stationid, long start, long end, Integer interval) {
+
         //间隔
         if (interval == null)
             interval = 5 * 60; //5分钟-300
 
         //获得测点
         Map<String, String> zglpoints = getPoints(stationid, "zgl");
-        Map<String, String> llglpoints = getPoints(stationid, "llgl");
         Map<String, String> adypoints = getPoints(stationid, "ady");
         Map<String, String> bdypoints = getPoints(stationid, "bdy");
         Map<String, String> cdypoints = getPoints(stationid, "cdy");
         Map<String, String> adlpoints = getPoints(stationid, "adl");
         Map<String, String> bdlpoints = getPoints(stationid, "bdl");
         Map<String, String> cdlpoints = getPoints(stationid, "cdl");
-
-        List<ProBasicWeatherStation> weatherStations = weatherStationService.getBaseMapper().selectList(null);
-        List<ProBasicWeatherStation> collect = weatherStations.stream().filter(c -> stationid.equals(c.getWindpowerstationId())).collect(Collectors.toList());
-
-        String station = collect.get(0).getId();
-
-        ProBasicPowerstationPoint zfsPoint = InitialRunner.newzfsMap.get(stationid);
-        ProBasicPowerstationPoint zjwdPoint = InitialRunner.newzjwdMap.get(station);
+        Windpowerstationtestingpoint2 zfsPoint = InitialRunner.zfsMap.get(stationid);
+        Windpowerstationtestingpoint2 zjwdPoint = InitialRunner.zjwdMap.get(stationid);
 
         //总辐射
-        //        List<TsDoubleData> zfsDatas = adpClient.getHistorySnap(zfsPoint.getNemCode(), start, end, interval);
-
-        List<TsDoubleData> zfsDatas = remoteService.adapterfd().getHistorySnap(zfsPoint.getNemCode(), start, end, interval);
-
+        List<TsDoubleData> zfsDatas = adpClient.getHistorySnap(zfsPoint.getCode(), start, end, interval);
         //组件温度
-        //        List<TsDoubleData> zjwdDatas = adpClient.getHistorySnap(zjwdPoint.getNemCode(), start, end, interval);
-
-        List<TsDoubleData> zjwdDatas = remoteService.adaptergf().getHistorySnap(zjwdPoint.getNemCode(), start, end, interval);
+        List<TsDoubleData> zjwdDatas = adpClient.getHistorySnap(zjwdPoint.getCode(), start, end, interval);
 
         List<List<PhotovoltaicInfo>> infosLit = new ArrayList<>();
         //按逆变器
         for (String wtid : zglpoints.keySet()) {
 
             //总功率
-            //            List<TsDoubleData> zglDatas = adpClient.getHistorySnap(zglpoints.get(wtid), start, end, interval);
-            List<TsDoubleData> zglDatas = remoteService.adaptergf().getHistorySnap(zglpoints.get(wtid), start, end, interval);
-            List<TsDoubleData> llglDatas = remoteService.adapterfd().getHistorySnap(llglpoints.get(wtid), start, end, interval);
+            List<TsDoubleData> zglDatas = adpClient.getHistorySnap(zglpoints.get(wtid), start, end, interval);
 
             //电网A相电压
-            //            List<TsDoubleData> adyDatas = adpClient.getHistorySnap(adypoints.get(wtid), start, end, interval);
-            List<TsDoubleData> adyDatas = remoteService.adaptergf().getHistorySnap(adypoints.get(wtid), start, end, interval);
+            List<TsDoubleData> adyDatas = adpClient.getHistorySnap(adypoints.get(wtid), start, end, interval);
             //电网A相电流
-            //            List<TsDoubleData> adlDatas = adpClient.getHistorySnap(adlpoints.get(wtid), start, end, interval);
-            List<TsDoubleData> adlDatas = remoteService.adaptergf().getHistorySnap(adlpoints.get(wtid), start, end, interval);
+            List<TsDoubleData> adlDatas = adpClient.getHistorySnap(adlpoints.get(wtid), start, end, interval);
 
             List<PhotovoltaicInfo> infos = new ArrayList<>();
 
             List<TsDoubleData> bdyDatas = null, cdyDatas = null, bdlDatas = null, cdlDatas = null;
-            if ("HZJ_GDC".equals(stationid) || "AK_GDC".equals(stationid)) {
+            if (gf3xjscz.contains(stationid)) {
                 //电网B相电压
                 bdyDatas = adpClient.getHistorySnap(bdypoints.get(wtid), start, end, interval);
                 //电网C相电压
@@ -593,7 +537,7 @@ public class IvPvCurveFittingService {
 
                 info.setT(double3Decimal(zjwdDatas.get(j).getDoubleValue()));
                 info.setS(double3Decimal(zfsDatas.get(j).getDoubleValue(), false));
-                if ("HZJ_GDC".equals(stationid) || "AK_GDC".equals(stationid)) {
+                if (gf3xjscz.contains(stationid)) {
                     info.setAI(double3Decimal(adlDatas.get(j).getDoubleValue(), false));
                     info.setBI(double3Decimal(bdlDatas.get(j).getDoubleValue(), false));
                     info.setCI(double3Decimal(cdlDatas.get(j).getDoubleValue(), false));
@@ -601,27 +545,10 @@ public class IvPvCurveFittingService {
                     info.setBV(double3Decimal(bdyDatas.get(j).getDoubleValue(), true));
                     info.setCV(double3Decimal(cdyDatas.get(j).getDoubleValue(), true));
                 } else {
-                    if (adlDatas.size() >= 1) {
-                        info.setI(double3Decimal(adlDatas.get(j).getDoubleValue(), false));
-                    } else {
-                        info.setI(0);
-                    }
-                    if (adyDatas.size() >= 1) {
-                        info.setV(double3Decimal(adyDatas.get(j).getDoubleValue(), true));
-                    } else {
-                        info.setV(0);
-                    }
-                }
-                if (zglDatas.size() >= 1) {
-                    info.setActualP(double3Decimal(zglDatas.get(j).getDoubleValue(), false));
-                } else {
-                    info.setActualP(0);
-                }
-                if (llglDatas.size() >= 1) {
-                    info.setIdeaP(double3Decimal(llglDatas.get(j).getDoubleValue(), false));
-                } else {
-                    info.setIdeaP(0);
+                    info.setI(double3Decimal(adlDatas.get(j).getDoubleValue(), false));
+                    info.setV(double3Decimal(adyDatas.get(j).getDoubleValue(), true));
                 }
+                info.setActualP(double3Decimal(zglDatas.get(j).getDoubleValue(), false));
                 infos.add(info);
             }
             infosLit.add(infos);
@@ -648,47 +575,43 @@ public class IvPvCurveFittingService {
      * 逆变器,测点
      */
     private Map<String, String> getPoints(String stationid, String key) {
-
+        //获取unifromcode
+        getFixedVos();
         switch (key) {
             case "zgl":
                 //总功率
-                return InitialRunner.newzglMap.get(stationid).stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
-            case "llgl":
-                //总功率
-                return InitialRunner.newllglMap.get(stationid).stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
-
+                return InitialRunner.zglMap.get(stationid).stream().collect(Collectors.toMap(Windturbinetestingpointai2::getWindturbineid, Windturbinetestingpointai2::getCode));
             case "ady":
-                List<ProBasicEquipmentPoint> adyPoints = null;
+                List<Windturbinetestingpointai2> adyPoints = null;
                 if ("HZJ_GDC".equals(stationid)) {
                     //电网A相电压
-                    adyPoints = proBasicEquipmentPointService.getPoints(stationid, null, "AIG005");
+                    adyPoints = windPointService.getPoints(stationid, null, "AIG063");
                 } else {
                     //电网A相电压
-                    adyPoints = proBasicEquipmentPointService.getPoints(stationid, null, "AIG005");
+                    adyPoints = windPointService.getPoints(stationid, null, uniforcodes.get("A相电压"));
                 }
-
-                return adyPoints.stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
+                return adyPoints.stream().collect(Collectors.toMap(Windturbinetestingpointai2::getWindturbineid, Windturbinetestingpointai2::getCode));
             case "bdy":
-                List<ProBasicEquipmentPoint> bdyPoints = proBasicEquipmentPointService.getPoints(stationid, null, "AIG008");
-                return bdyPoints.stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
+                List<Windturbinetestingpointai2> bdyPoints = windPointService.getPoints(stationid, null, uniforcodes.get("B相电压"));
+                return bdyPoints.stream().collect(Collectors.toMap(Windturbinetestingpointai2::getWindturbineid, Windturbinetestingpointai2::getCode));
             case "cdy":
-                List<ProBasicEquipmentPoint> cdyPoints = proBasicEquipmentPointService.getPoints(stationid, null, "AIG011");
-                return cdyPoints.stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
+                List<Windturbinetestingpointai2> cdyPoints = windPointService.getPoints(stationid, null, uniforcodes.get("C相电压"));
+                return cdyPoints.stream().collect(Collectors.toMap(Windturbinetestingpointai2::getWindturbineid, Windturbinetestingpointai2::getCode));
             case "adl":
-                List<ProBasicEquipmentPoint> adlPoints = proBasicEquipmentPointService.getPoints(stationid, null, "AIG004");
-                return adlPoints.stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
+                List<Windturbinetestingpointai2> adlPoints = windPointService.getPoints(stationid, null, uniforcodes.get("A相电流"));
+                return adlPoints.stream().collect(Collectors.toMap(Windturbinetestingpointai2::getWindturbineid, Windturbinetestingpointai2::getCode));
             case "bdl":
-                List<ProBasicEquipmentPoint> bdlPoints = proBasicEquipmentPointService.getPoints(stationid, null, "AIG007");
-                return bdlPoints.stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
+                List<Windturbinetestingpointai2> bdlPoints = windPointService.getPoints(stationid, null, uniforcodes.get("B相电流"));
+                return bdlPoints.stream().collect(Collectors.toMap(Windturbinetestingpointai2::getWindturbineid, Windturbinetestingpointai2::getCode));
             case "cdl":
-                List<ProBasicEquipmentPoint> cdlPoints = proBasicEquipmentPointService.getPoints(stationid, null, "AIG010");
-                return cdlPoints.stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
+                List<Windturbinetestingpointai2> cdlPoints = windPointService.getPoints(stationid, null, uniforcodes.get("C相电流"));
+                return cdlPoints.stream().collect(Collectors.toMap(Windturbinetestingpointai2::getWindturbineid, Windturbinetestingpointai2::getCode));
         }
         return new HashMap<>();
     }
 
     public int deleteFiles(List<String> fileList) {
-        String fs = config.getFilePathPrepare() + "gf";
+        String fs = config.getGfDataPath();
         List<PhotovoltaicInfo> infoList = new ArrayList<>();
         int count = 0;
         for (String s : fileList) {
@@ -700,7 +623,7 @@ public class IvPvCurveFittingService {
 
     public void downFiles(List<String> strings, HttpServletResponse response) {
         List<File> files = path2File(strings);
-        String path = config.getFilePathPrepare() + "zip\\" + System.currentTimeMillis() + ".zip";
+        String path = config.getFilePathPrepare() + "zip" + File.separator + System.currentTimeMillis() + ".zip";
         String s = FileUtil.zipFiles(files, new File(path));
         FileUtil.download(s, response);
     }
@@ -708,14 +631,14 @@ public class IvPvCurveFittingService {
     private List<File> path2File(List<String> strings) {
         List<File> files = new ArrayList<>();
         for (String string : strings) {
-            files.add(new File(config.getFilePathPrepare() + "gf" + string));
+            files.add(new File(config.getGfDataPath() + string));
         }
         return files;
     }
 
     public List<FixedVo> getFixedVos() {
         if (fixedVos == null) {
-            fixedVos = AnnotationTool.getFixedVoList(PhotovoltaicInfo.class);
+            fixedVos = annotationTool.getFixedVoList(PhotovoltaicInfo.class);
             uniforcodes = fixedVos.stream().filter(fv -> fv.getUniformCode() != null).collect(Collectors.toMap(FixedVo::getDes, FixedVo::getUniformCode));
         }
         return fixedVos;
@@ -725,40 +648,4 @@ public class IvPvCurveFittingService {
         getFixedVos();
         return uniforcodes;
     }
-
-
-    public List<ProBasicEquipment> wtByWplist(String wpids) {
-        List<ProBasicEquipment> equipmentList = InitialRunner.newgfwtList.stream()
-                .filter(oe -> wpids.contains(oe.getWindpowerstationId()))
-                .sorted(Comparator.comparingInt(ProBasicEquipment::getOrderNum)) // 根据order_num字段排序
-                .collect(Collectors.toList());
-
-        return equipmentList;
-    }
-
-    /**
-     * 通过大点的key获取小散点
-     *
-     * @param yk
-     * @param wk
-     * @return
-     */
-    public List<PhotovoltaicInfo> dataOrigin(String yk, String wk) {
-        List<PhotovoltaicInfo> list = new ArrayList<>();
-
-        if (!StringUtils.isEmpty(yk)) {
-            String[] key = yk.split(",");
-            for (String k : key) {
-                list.addAll(dataScangfService.getMapYY().get(k));
-            }
-        }
-        if (!StringUtils.isEmpty(wk)) {
-            String[] kew = wk.split(",");
-            for (String k : kew) {
-                list.addAll(dataScangfService.getMapWY().get(k));
-            }
-        }
-
-        return list;
-    }
-}
+}