|
@@ -75,6 +75,11 @@ public class CacheContext implements CommandLineRunner {
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
private IProBasicEquipmentPointService proBasicEquipmentPointService;
|
|
private IProBasicEquipmentPointService proBasicEquipmentPointService;
|
|
|
|
+ @Resource
|
|
|
|
+ private IProBasicMeterPointService meterpoint2Service;
|
|
|
|
+
|
|
|
|
+ @Resource
|
|
|
|
+ private IProBasicPowerstationService windpowerstationService;
|
|
|
|
|
|
public static List<ProBasicBranch> bnls = new ArrayList<>();
|
|
public static List<ProBasicBranch> bnls = new ArrayList<>();
|
|
public static List<ProBasicEquipment> wtls = new ArrayList<>();
|
|
public static List<ProBasicEquipment> wtls = new ArrayList<>();
|
|
@@ -154,11 +159,18 @@ public class CacheContext implements CommandLineRunner {
|
|
public static Map<String, List<ProBasicStatusPoint>> statusMap = new HashMap<>();
|
|
public static Map<String, List<ProBasicStatusPoint>> statusMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
|
|
+ public static List<ProBasicPowerstation> stations = new ArrayList<>();
|
|
|
|
+ public static Map<String,List<ProBasicMeterPoint>> wpmeterMap = new HashMap<>();
|
|
|
|
+ public static Map<String, ProBasicMeterPoint> meterMap = new HashMap<>();
|
|
|
|
+ public static Map<String,ProBasicPowerstation> wpmaps = new HashMap<>();
|
|
|
|
+ public static Map<String,String> wppmap = new HashMap<>();
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public void run(String... args) throws Exception {
|
|
public void run(String... args) throws Exception {
|
|
logger.info("缓存开始------------------------------------------------------------");
|
|
logger.info("缓存开始------------------------------------------------------------");
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
// bnls = proBasicBranchService.list();
|
|
// bnls = proBasicBranchService.list();
|
|
// bnls.stream().forEach(bn->{
|
|
// bnls.stream().forEach(bn->{
|
|
// String bnString = redisService.get(bn.getId());
|
|
// String bnString = redisService.get(bn.getId());
|
|
@@ -589,6 +601,39 @@ public class CacheContext implements CommandLineRunner {
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
+ stations = windpowerstationService.list();
|
|
|
|
+ for (ProBasicPowerstation station : stations) {
|
|
|
|
+ wppmap.put(station.getId(),station.getName());
|
|
|
|
+ wpmaps.put(station.getId(),station);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (ProBasicMeterPoint meterpoint2 : meterpoint2Service.list()) {
|
|
|
|
+ if (wpmaps.containsKey(meterpoint2.getWindpowerstationId())){
|
|
|
|
+ meterMap.put(meterpoint2.getNemCode(),meterpoint2);
|
|
|
|
+ if (wpmeterMap.containsKey(meterpoint2.getWindpowerstationId())){
|
|
|
|
+ wpmeterMap.get(meterpoint2.getWindpowerstationId()).add(meterpoint2);
|
|
|
|
+ }else{
|
|
|
|
+ List<ProBasicMeterPoint> list = new ArrayList<>();
|
|
|
|
+ list.add(meterpoint2);
|
|
|
|
+ wpmeterMap.put(meterpoint2.getWindpowerstationId(),list);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (ProBasicMeterPoint meterpoint2 : meterpoint2Service.list()) {
|
|
|
|
+ if (wpmaps.containsKey(meterpoint2.getWindpowerstationId())){
|
|
|
|
+ meterMap.put(meterpoint2.getId(),meterpoint2);
|
|
|
|
+ if (wpmeterMap.containsKey(meterpoint2.getWindpowerstationId())){
|
|
|
|
+ wpmeterMap.get(meterpoint2.getWindpowerstationId()).add(meterpoint2);
|
|
|
|
+ }else{
|
|
|
|
+ List<ProBasicMeterPoint> list = new ArrayList<>();
|
|
|
|
+ list.add(meterpoint2);
|
|
|
|
+ wpmeterMap.put(meterpoint2.getWindpowerstationId(),list);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
String llglString = redisService.get("ZLLGL");
|
|
String llglString = redisService.get("ZLLGL");
|
|
theoreticalPowerMap = JSONObject.parseObject(llglString, new TypeReference<Map<String, Map<Double, ProBasicModelPowerRd>>>() {
|
|
theoreticalPowerMap = JSONObject.parseObject(llglString, new TypeReference<Map<String, Map<Double, ProBasicModelPowerRd>>>() {
|