|
@@ -31,22 +31,10 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
|
|
|
@Resource
|
|
|
GyeeConfig config;
|
|
|
- @Resource
|
|
|
- private WindturbineService windturbineService;
|
|
|
|
|
|
- @Resource
|
|
|
- private WindpowerstationService windpowerstationService;
|
|
|
- @Resource
|
|
|
- private Windturbinetestingpointai2Service pointService;
|
|
|
|
|
|
@Resource
|
|
|
private ProBasicEquipmentPointService pointService1;
|
|
|
- @Resource
|
|
|
- private EquipmentmodelService equipmentmodelService;
|
|
|
- @Resource
|
|
|
- private ModelpowerdetailsService modelpowerdetailsService;
|
|
|
- @Resource
|
|
|
- private PowermodelService powermodelService;
|
|
|
|
|
|
@Resource
|
|
|
private ProEconPowerModelService proEconPowerModelService;
|
|
@@ -54,75 +42,9 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
@Resource
|
|
|
private NewIvPvCurveFittingService ipcfService;
|
|
|
|
|
|
-
|
|
|
- /**
|
|
|
- * 场站所有信息
|
|
|
- **/
|
|
|
- public static List<Windpowerstation> wpList = new ArrayList<>();
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * <MHS_FDC, 麻黄山风电场>
|
|
|
- **/
|
|
|
- public static Map<String, String> stationMap = new HashMap<>();
|
|
|
-
|
|
|
- /**
|
|
|
- * 所有的风机
|
|
|
- **/
|
|
|
- public static List<Windturbine> wtList = new ArrayList<>();
|
|
|
- /**
|
|
|
- * key:wtId NG01_01
|
|
|
- **/
|
|
|
- public static Map<String, Windturbine> wtMap = new HashMap<>();
|
|
|
-
|
|
|
-
|
|
|
- /**场站的风机 key:NSS_FDC**/
|
|
|
- public static Map<String, List<Windturbine>> wpMap = new HashMap<>();
|
|
|
-
|
|
|
- /**
|
|
|
- * 光伏
|
|
|
- */
|
|
|
- public static List<Windpowerstation> gfwpList = new ArrayList<>();
|
|
|
- public static Map<String, String> gfstationMap = new HashMap<>();
|
|
|
- public static List<Windturbine> gfwtList = new ArrayList<>();
|
|
|
- public static Map<String, Windturbine> gfwtMap = new HashMap<>();
|
|
|
- public static Map<String, List<Windturbine>> gfwpMap = new HashMap<>();
|
|
|
- /**
|
|
|
- * 光照强度-场站
|
|
|
- */
|
|
|
- public static Map<String, Windpowerstationtestingpoint2> zfsMap = new HashMap<>();
|
|
|
- /**
|
|
|
- * 组件温度-场站
|
|
|
- */
|
|
|
- public static Map<String, Windpowerstationtestingpoint2> zjwdMap = new HashMap<>();
|
|
|
- /**
|
|
|
- * 功率-场站
|
|
|
- */
|
|
|
- public static Map<String, List<Windturbinetestingpointai2>> zglMap = new HashMap<>();
|
|
|
- /**
|
|
|
- * 所有设备型号
|
|
|
- **/
|
|
|
- public static List<Equipmentmodel> equipmentList = new ArrayList<>();
|
|
|
-
|
|
|
- /**
|
|
|
- * key: NG01_01
|
|
|
- **/
|
|
|
- public static Map<String, List<Windturbinetestingpointai2>> pointMap = new HashMap<>();
|
|
|
- @Resource
|
|
|
- private IWindpowerstationtestingpoint2Service windpowerstationtestingpoint2Service;
|
|
|
- public static Map<String, Equipmentmodel> equipmentMap = new HashMap<>();
|
|
|
- /**
|
|
|
- * key: model UP82
|
|
|
- **/
|
|
|
- public static Map<String, List<Modelpowerdetails>> modelPowerDetailMap = new HashMap<>();
|
|
|
- /** key: NG01_01, speed, power**/
|
|
|
- public static Map<String, Map<Double, Double>> zsllglMap = new HashMap<>();
|
|
|
-
|
|
|
public static Map<String, AgcDeviateConfig> powerPreMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
//--------------------------------------new-------------------------------------------
|
|
|
|
|
|
|
|
@@ -176,18 +98,6 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
public static Map<String, ProBasicEquipment> gfwtNewMap = new HashMap<>();
|
|
|
public static Map<String, List<ProBasicEquipment>> gfwpNewMap = new HashMap<>();
|
|
|
/**
|
|
|
- * 光照强度-场站
|
|
|
- */
|
|
|
- public static Map<String, ProBasicPowerstationPoint> zfsNewMap = new HashMap<>();
|
|
|
- /**
|
|
|
- * 组件温度-场站
|
|
|
- */
|
|
|
- public static Map<String, ProBasicPowerstationPoint> zjwdNewMap = new HashMap<>();
|
|
|
- /**
|
|
|
- * 功率-场站
|
|
|
- */
|
|
|
- public static Map<String, List<ProBasicEquipmentPoint>> zglNewMap = new HashMap<>();
|
|
|
- /**
|
|
|
* 所有设备型号
|
|
|
**/
|
|
|
public static List<ProEconEquipmentmodel> equipmentNewList = new ArrayList<>();
|
|
@@ -304,29 +214,6 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
log.info("场站数据缓存完成");
|
|
|
}
|
|
|
|
|
|
- public void cacheStation() {
|
|
|
- List<Windpowerstation> stations = windpowerstationService.selectList();
|
|
|
- wpList = stations.stream().filter(f -> f.getId().contains("FDC")).collect(Collectors.toList());
|
|
|
- gfwpList = stations.stream().filter(f -> f.getId().contains("GDC")).collect(Collectors.toList());
|
|
|
- wpList.forEach(obj -> {
|
|
|
- List<Windturbine> wts = windturbineService.selectList(obj.getId());
|
|
|
- stationMap.put(obj.getId(), obj.getName());
|
|
|
- wpMap.put(obj.getId(), wts);
|
|
|
- wtList.addAll(wts);
|
|
|
-
|
|
|
- wts.forEach(u -> wtMap.put(u.getId(), u));
|
|
|
- });
|
|
|
- gfwpList.stream().forEach(obj -> {
|
|
|
- List<Windturbine> wts = windturbineService.selectList(obj.getId());
|
|
|
- gfstationMap.put(obj.getId(), obj.getName());
|
|
|
- gfwpMap.put(obj.getId(), wts);
|
|
|
- gfwtList.addAll(wts);
|
|
|
-
|
|
|
- wts.stream().forEach(u -> gfwtMap.put(u.getId(), u));
|
|
|
- });
|
|
|
- log.info("场站数据缓存完成");
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* 缓存场站、风机数据
|
|
@@ -371,19 +258,6 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
newllglMap = llglPoints.stream().collect(Collectors.groupingBy(ProBasicEquipmentPoint::getWindpowerstationId));
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 缓存测点数据
|
|
|
- */
|
|
|
- private void cachePoints() {
|
|
|
- List<Windturbinetestingpointai2> list = new ArrayList<>();
|
|
|
- wpList.stream().forEach(d -> list.addAll(pointService.selectList(d.getId(), config.getPoints())));
|
|
|
- pointMap.putAll(list.stream().collect(Collectors.groupingBy(u -> u.getWindturbineid())));
|
|
|
- log.info("cachePoints: " + pointMap.size());
|
|
|
- if (pointMap.size() == 0)
|
|
|
- log.error("cachePoints", "测点数据缓存失败");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* 缓存测点数据
|
|
@@ -397,15 +271,6 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
log.error("cachePoints", "测点数据缓存失败");
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 缓存设备型号
|
|
|
- */
|
|
|
- private void cacheEquipment() {
|
|
|
- equipmentList.addAll(equipmentmodelService.selectList());
|
|
|
- for (Equipmentmodel eq : equipmentList)
|
|
|
- equipmentMap.put(eq.getId(), eq);
|
|
|
- log.info("设备型号数据缓存完成");
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 缓存设备型号
|
|
@@ -418,12 +283,6 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
}
|
|
|
|
|
|
|
|
|
- private void cacheModelPower() {
|
|
|
- List<Modelpowerdetails> lsMPD = modelpowerdetailsService.selectList();
|
|
|
- modelPowerDetailMap.putAll(lsMPD.stream().collect(Collectors.groupingBy(u -> u.getModelid())));
|
|
|
- log.info("保证功率数据缓存完成");
|
|
|
- }
|
|
|
-
|
|
|
private void cacheNewModelPower() {
|
|
|
List<ProBasicModelPower> lsMPD = proBasicModelPowerService.list();
|
|
|
modelPowerDetailNewMap.putAll(lsMPD.stream().collect(Collectors.groupingBy(u -> u.getModelId())));
|