|
@@ -68,6 +68,9 @@ public class CacheContext implements CommandLineRunner {
|
|
|
@Autowired
|
|
|
private IProBasicLogicalUnitService proBasicLogicalUnitService;//部件
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IProBasicBranchService proBasicBranchService ;//支路
|
|
|
+
|
|
|
//集团
|
|
|
public static Map<String, ProBasicEnergyGroup> energymap = new HashMap<>();
|
|
|
public static List<ProBasicEnergyGroup> groups = new ArrayList<>();
|
|
@@ -105,6 +108,7 @@ public class CacheContext implements CommandLineRunner {
|
|
|
public static Map<String, ProBasicEquipment> equipmentmap = new HashMap<>();
|
|
|
public static List<ProBasicEquipment> equipments = new ArrayList<>();
|
|
|
public static Map<String,List<ProBasicEquipment>> poequipmentmap = new HashMap<>();
|
|
|
+ public static Map<String,List<ProBasicBranch>> branchmap = new HashMap<>();
|
|
|
public static Map<String,List<ProBasicEquipment>> pjequipmentmap = new HashMap<>();
|
|
|
public static Map<String,List<ProBasicEquipment>> liequipmentmap = new HashMap<>();
|
|
|
|
|
@@ -129,7 +133,9 @@ public class CacheContext implements CommandLineRunner {
|
|
|
|
|
|
//设备型号
|
|
|
public static List<ProEconEquipmentmodel> Equipments = new ArrayList<>();
|
|
|
+ public static List<ProBasicBranch> Branchts = new ArrayList<>();
|
|
|
public static Map<String, ProEconEquipmentmodel> EquipmentMap = new HashMap<>();
|
|
|
+ public static Map<String, ProBasicBranch> BranchMap = new HashMap<>();
|
|
|
public static Map<String, List<ProEconEquipmentmodel>> poEquipmentMap = new HashMap<>();
|
|
|
|
|
|
//设备类型
|
|
@@ -169,6 +175,9 @@ public class CacheContext implements CommandLineRunner {
|
|
|
//发电设备
|
|
|
initEquipmentList();
|
|
|
|
|
|
+ //支路
|
|
|
+ initBranchList();
|
|
|
+
|
|
|
//变电所
|
|
|
initSubStationList();
|
|
|
|
|
@@ -319,6 +328,22 @@ public class CacheContext implements CommandLineRunner {
|
|
|
pjequipmentmap = equipments.stream().collect(Collectors.groupingBy(ProBasicEquipment::getProjectId));
|
|
|
liequipmentmap = equipments.stream().collect(Collectors.groupingBy(ProBasicEquipment::getLineId));
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 支路数据
|
|
|
+ */
|
|
|
+
|
|
|
+ public void initBranchList(){
|
|
|
+ Branchts.clear();
|
|
|
+ BranchMap.clear();
|
|
|
+ branchmap.clear();
|
|
|
+
|
|
|
+ Branchts = proBasicBranchService.list();
|
|
|
+ Branchts.stream().forEach(branch -> {
|
|
|
+ BranchMap.put(branch.getId(), branch);
|
|
|
+ });
|
|
|
+ branchmap = Branchts.stream().collect(Collectors.groupingBy(ProBasicBranch::getWindpowerstationId));
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 初始化变电所数据
|