|
@@ -28,6 +28,10 @@ public class KprBaseInitFun {
|
|
public Map<String,List<String>> jiangjinDeviceList = new HashMap<>();
|
|
public Map<String,List<String>> jiangjinDeviceList = new HashMap<>();
|
|
public List<String> closeTag = new ArrayList<>();//忽略的标签
|
|
public List<String> closeTag = new ArrayList<>();//忽略的标签
|
|
|
|
|
|
|
|
+ //TODO 自来水相关
|
|
|
|
+ public Map<String,List<String>> zilaishuiDeviceList = new HashMap<>();
|
|
|
|
+ public Map<String,List<String>> zilaishuiParams = new HashMap<>();
|
|
|
|
+
|
|
public Map<String,String> jiangjinMeasurementMap = new HashMap<>();
|
|
public Map<String,String> jiangjinMeasurementMap = new HashMap<>();
|
|
|
|
|
|
private static volatile KprBaseInitFun msInstance = null;
|
|
private static volatile KprBaseInitFun msInstance = null;
|
|
@@ -50,6 +54,7 @@ public class KprBaseInitFun {
|
|
initDangyang();
|
|
initDangyang();
|
|
// initJiangjin();
|
|
// initJiangjin();
|
|
initJiangjinDb();
|
|
initJiangjinDb();
|
|
|
|
+ initZilaishuiDb();
|
|
}catch(Exception ex){
|
|
}catch(Exception ex){
|
|
ex.printStackTrace();
|
|
ex.printStackTrace();
|
|
}
|
|
}
|
|
@@ -84,96 +89,96 @@ public class KprBaseInitFun {
|
|
measurementMap.put("ELEC_CTRL_VALVE",properties.getProperty("ELEC_CTRL_VALVE"));
|
|
measurementMap.put("ELEC_CTRL_VALVE",properties.getProperty("ELEC_CTRL_VALVE"));
|
|
measurementMap.put("LIQUID_LEVEL_METER",properties.getProperty("LIQUID_LEVEL_METER"));
|
|
measurementMap.put("LIQUID_LEVEL_METER",properties.getProperty("LIQUID_LEVEL_METER"));
|
|
}
|
|
}
|
|
- public void initJiangjin()throws Exception{
|
|
|
|
- InputStream inputStream = getConfigStream("application-config.yml");
|
|
|
|
- Properties properties = new Properties();
|
|
|
|
- properties.load(inputStream);
|
|
|
|
-
|
|
|
|
- List<String> VoltageSwitchgear=Arrays.asList(properties.getProperty("VoltageSwitchgear").split(","));
|
|
|
|
- List<String> WaterValve=Arrays.asList(properties.getProperty("WaterValve").split(","));
|
|
|
|
- List<String> VariableFrequencyDrive=Arrays.asList(properties.getProperty("VariableFrequencyDrive").split(","));
|
|
|
|
- List<String> WaterQuality=Arrays.asList(properties.getProperty("WaterQuality").split(","));
|
|
|
|
- List<String> DifferentialPressure=Arrays.asList(properties.getProperty("DifferentialPressure").split(","));
|
|
|
|
- List<String> ElectricMotor=Arrays.asList(properties.getProperty("ElectricMotor").split(","));
|
|
|
|
- List<String> WaterPump=Arrays.asList(properties.getProperty("WaterPump").split(","));
|
|
|
|
- List<String> AirCompressor=Arrays.asList(properties.getProperty("AirCompressor").split(","));
|
|
|
|
- List<String> RootsBlower=Arrays.asList(properties.getProperty("RootsBlower").split(","));
|
|
|
|
- List<String> ThMeter=Arrays.asList(properties.getProperty("ThMeter").split(","));
|
|
|
|
- List<String> SludgeIntfMeter=Arrays.asList(properties.getProperty("SludgeIntfMeter").split(","));
|
|
|
|
- List<String> InformationSoftware=Arrays.asList(properties.getProperty("InformationSoftware").split(","));
|
|
|
|
- List<String> WaterMeter=Arrays.asList(properties.getProperty("WaterMeter").split(","));
|
|
|
|
- List<String> SmokeDetector=Arrays.asList(properties.getProperty("SmokeDetector").split(","));
|
|
|
|
- List<String> LiquidLevelDiffer=Arrays.asList(properties.getProperty("LiquidLevelDiffer").split(","));
|
|
|
|
- List<String> LiquidLevel=Arrays.asList(properties.getProperty("LiquidLevel").split(","));
|
|
|
|
-
|
|
|
|
- jiangjinParams.put("VoltageSwitchgear",VoltageSwitchgear);
|
|
|
|
- jiangjinParams.put("WaterValve",WaterValve);
|
|
|
|
- jiangjinParams.put("VariableFrequencyDrive",VariableFrequencyDrive);
|
|
|
|
- jiangjinParams.put("WaterQuality",WaterQuality);
|
|
|
|
- jiangjinParams.put("DifferentialPressure",DifferentialPressure);
|
|
|
|
- jiangjinParams.put("ElectricMotor",ElectricMotor);
|
|
|
|
- jiangjinParams.put("WaterPump",WaterPump);
|
|
|
|
- jiangjinParams.put("AirCompressor",AirCompressor);
|
|
|
|
- jiangjinParams.put("RootsBlower",RootsBlower);
|
|
|
|
- jiangjinParams.put("ThMeter",ThMeter);
|
|
|
|
- jiangjinParams.put("SludgeIntfMeter",SludgeIntfMeter);
|
|
|
|
- jiangjinParams.put("InformationSoftware",InformationSoftware);
|
|
|
|
- jiangjinParams.put("WaterMeter",WaterMeter);
|
|
|
|
- jiangjinParams.put("SmokeDetector",SmokeDetector);
|
|
|
|
- jiangjinParams.put("LiquidLevelDiffer",LiquidLevelDiffer);
|
|
|
|
- jiangjinParams.put("LiquidLevel",LiquidLevel);
|
|
|
|
-
|
|
|
|
- List<String> DeviceVoltageSwitchgear=Arrays.asList(properties.getProperty("VoltageSwitchgear_device").split(","));
|
|
|
|
- List<String> DeviceWaterValve=Arrays.asList(properties.getProperty("WaterValve_device").split(","));
|
|
|
|
- List<String> DeviceVariableFrequencyDrive=Arrays.asList(properties.getProperty("VariableFrequencyDrive_device").split(","));
|
|
|
|
- List<String> DeviceWaterQuality=Arrays.asList(properties.getProperty("WaterQuality_device").split(","));
|
|
|
|
- List<String> DeviceDifferentialPressure=Arrays.asList(properties.getProperty("DifferentialPressure_device").split(","));
|
|
|
|
- List<String> DeviceElectricMotor=Arrays.asList(properties.getProperty("ElectricMotor_device").split(","));
|
|
|
|
- List<String> DeviceWaterPump=Arrays.asList(properties.getProperty("WaterPump_device").split(","));
|
|
|
|
- List<String> DeviceAirCompressor=Arrays.asList(properties.getProperty("AirCompressor_device").split(","));
|
|
|
|
- List<String> DeviceRootsBlower=Arrays.asList(properties.getProperty("RootsBlower_device").split(","));
|
|
|
|
- List<String> DeviceThMeter=Arrays.asList(properties.getProperty("ThMeter_device").split(","));
|
|
|
|
- List<String> DeviceSludgeIntfMeter=Arrays.asList(properties.getProperty("SludgeIntfMeter_device").split(","));
|
|
|
|
- List<String> DeviceInformationSoftware=Arrays.asList(properties.getProperty("InformationSoftware_device").split(","));
|
|
|
|
- List<String> DeviceWaterMeter=Arrays.asList(properties.getProperty("WaterMeter_device").split(","));
|
|
|
|
- List<String> DeviceSmokeDetector=Arrays.asList(properties.getProperty("SmokeDetector_device").split(","));
|
|
|
|
- List<String> DeviceLiquidLevelDiffer=Arrays.asList(properties.getProperty("LiquidLevelDiffer_device").split(","));
|
|
|
|
- List<String> DeviceLiquidLevel=Arrays.asList(properties.getProperty("LiquidLevel_device").split(","));
|
|
|
|
-
|
|
|
|
- jiangjinDeviceList.put("Device_VoltageSwitchgear",DeviceVoltageSwitchgear);
|
|
|
|
- jiangjinDeviceList.put("Device_WaterValve",DeviceWaterValve);
|
|
|
|
- jiangjinDeviceList.put("Device_VariableFrequencyDrive",DeviceVariableFrequencyDrive);
|
|
|
|
- jiangjinDeviceList.put("Device_WaterQuality",DeviceWaterQuality);
|
|
|
|
- jiangjinDeviceList.put("Device_DifferentialPressure",DeviceDifferentialPressure);
|
|
|
|
- jiangjinDeviceList.put("Device_ElectricMotor",DeviceElectricMotor);
|
|
|
|
- jiangjinDeviceList.put("Device_WaterPump",DeviceWaterPump);
|
|
|
|
- jiangjinDeviceList.put("Device_AirCompressor",DeviceAirCompressor);
|
|
|
|
- jiangjinDeviceList.put("Device_RootsBlower",DeviceRootsBlower);
|
|
|
|
- jiangjinDeviceList.put("Device_ThMeter",DeviceThMeter);
|
|
|
|
- jiangjinDeviceList.put("Device_SludgeIntfMeter",DeviceSludgeIntfMeter);
|
|
|
|
- jiangjinDeviceList.put("Device_InformationSoftware",DeviceInformationSoftware);
|
|
|
|
- jiangjinDeviceList.put("Device_WaterMeter",DeviceWaterMeter);
|
|
|
|
- jiangjinDeviceList.put("Device_SmokeDetector",DeviceSmokeDetector);
|
|
|
|
- jiangjinDeviceList.put("Device_LiquidLevelDiffer",DeviceLiquidLevelDiffer);
|
|
|
|
- jiangjinDeviceList.put("Device_LiquidLevel",DeviceLiquidLevel);
|
|
|
|
-
|
|
|
|
- jiangjinMeasurementMap.put("VoltageSwitchgear","VoltageSwitchgear");
|
|
|
|
- jiangjinMeasurementMap.put("WaterValve","WaterValve");
|
|
|
|
- jiangjinMeasurementMap.put("VariableFrequencyDrive","VariableFrequencyDrive");
|
|
|
|
- jiangjinMeasurementMap.put("WaterQuality","WaterQuality");
|
|
|
|
- jiangjinMeasurementMap.put("DifferentialPressure","DifferentialPressure");
|
|
|
|
- jiangjinMeasurementMap.put("ElectricMotor","ElectricMotor");
|
|
|
|
- jiangjinMeasurementMap.put("WaterPump","WaterPump");
|
|
|
|
- jiangjinMeasurementMap.put("AirCompressor","AirCompressor");
|
|
|
|
- jiangjinMeasurementMap.put("RootsBlower","RootsBlower");
|
|
|
|
- jiangjinMeasurementMap.put("ThMeter","ThMeter");
|
|
|
|
- jiangjinMeasurementMap.put("SludgeIntfMeter","SludgeIntfMeter");
|
|
|
|
- jiangjinMeasurementMap.put("InformationSoftware","InformationSoftware");
|
|
|
|
- jiangjinMeasurementMap.put("WaterMeter","WaterMeter");
|
|
|
|
- jiangjinMeasurementMap.put("SmokeDetector","SmokeDetector");
|
|
|
|
- jiangjinMeasurementMap.put("LiquidLevelDiffer","LiquidLevelDiffer");
|
|
|
|
- jiangjinMeasurementMap.put("LiquidLevel","LiquidLevel");
|
|
|
|
- }
|
|
|
|
|
|
+// public void initJiangjin()throws Exception{
|
|
|
|
+// InputStream inputStream = getConfigStream("application-config.yml");
|
|
|
|
+// Properties properties = new Properties();
|
|
|
|
+// properties.load(inputStream);
|
|
|
|
+//
|
|
|
|
+// List<String> VoltageSwitchgear=Arrays.asList(properties.getProperty("VoltageSwitchgear").split(","));
|
|
|
|
+// List<String> WaterValve=Arrays.asList(properties.getProperty("WaterValve").split(","));
|
|
|
|
+// List<String> VariableFrequencyDrive=Arrays.asList(properties.getProperty("VariableFrequencyDrive").split(","));
|
|
|
|
+// List<String> WaterQuality=Arrays.asList(properties.getProperty("WaterQuality").split(","));
|
|
|
|
+// List<String> DifferentialPressure=Arrays.asList(properties.getProperty("DifferentialPressure").split(","));
|
|
|
|
+// List<String> ElectricMotor=Arrays.asList(properties.getProperty("ElectricMotor").split(","));
|
|
|
|
+// List<String> WaterPump=Arrays.asList(properties.getProperty("WaterPump").split(","));
|
|
|
|
+// List<String> AirCompressor=Arrays.asList(properties.getProperty("AirCompressor").split(","));
|
|
|
|
+// List<String> RootsBlower=Arrays.asList(properties.getProperty("RootsBlower").split(","));
|
|
|
|
+// List<String> ThMeter=Arrays.asList(properties.getProperty("ThMeter").split(","));
|
|
|
|
+// List<String> SludgeIntfMeter=Arrays.asList(properties.getProperty("SludgeIntfMeter").split(","));
|
|
|
|
+// List<String> InformationSoftware=Arrays.asList(properties.getProperty("InformationSoftware").split(","));
|
|
|
|
+// List<String> WaterMeter=Arrays.asList(properties.getProperty("WaterMeter").split(","));
|
|
|
|
+// List<String> SmokeDetector=Arrays.asList(properties.getProperty("SmokeDetector").split(","));
|
|
|
|
+// List<String> LiquidLevelDiffer=Arrays.asList(properties.getProperty("LiquidLevelDiffer").split(","));
|
|
|
|
+// List<String> LiquidLevel=Arrays.asList(properties.getProperty("LiquidLevel").split(","));
|
|
|
|
+//
|
|
|
|
+// jiangjinParams.put("VoltageSwitchgear",VoltageSwitchgear);
|
|
|
|
+// jiangjinParams.put("WaterValve",WaterValve);
|
|
|
|
+// jiangjinParams.put("VariableFrequencyDrive",VariableFrequencyDrive);
|
|
|
|
+// jiangjinParams.put("WaterQuality",WaterQuality);
|
|
|
|
+// jiangjinParams.put("DifferentialPressure",DifferentialPressure);
|
|
|
|
+// jiangjinParams.put("ElectricMotor",ElectricMotor);
|
|
|
|
+// jiangjinParams.put("WaterPump",WaterPump);
|
|
|
|
+// jiangjinParams.put("AirCompressor",AirCompressor);
|
|
|
|
+// jiangjinParams.put("RootsBlower",RootsBlower);
|
|
|
|
+// jiangjinParams.put("ThMeter",ThMeter);
|
|
|
|
+// jiangjinParams.put("SludgeIntfMeter",SludgeIntfMeter);
|
|
|
|
+// jiangjinParams.put("InformationSoftware",InformationSoftware);
|
|
|
|
+// jiangjinParams.put("WaterMeter",WaterMeter);
|
|
|
|
+// jiangjinParams.put("SmokeDetector",SmokeDetector);
|
|
|
|
+// jiangjinParams.put("LiquidLevelDiffer",LiquidLevelDiffer);
|
|
|
|
+// jiangjinParams.put("LiquidLevel",LiquidLevel);
|
|
|
|
+//
|
|
|
|
+// List<String> DeviceVoltageSwitchgear=Arrays.asList(properties.getProperty("VoltageSwitchgear_device").split(","));
|
|
|
|
+// List<String> DeviceWaterValve=Arrays.asList(properties.getProperty("WaterValve_device").split(","));
|
|
|
|
+// List<String> DeviceVariableFrequencyDrive=Arrays.asList(properties.getProperty("VariableFrequencyDrive_device").split(","));
|
|
|
|
+// List<String> DeviceWaterQuality=Arrays.asList(properties.getProperty("WaterQuality_device").split(","));
|
|
|
|
+// List<String> DeviceDifferentialPressure=Arrays.asList(properties.getProperty("DifferentialPressure_device").split(","));
|
|
|
|
+// List<String> DeviceElectricMotor=Arrays.asList(properties.getProperty("ElectricMotor_device").split(","));
|
|
|
|
+// List<String> DeviceWaterPump=Arrays.asList(properties.getProperty("WaterPump_device").split(","));
|
|
|
|
+// List<String> DeviceAirCompressor=Arrays.asList(properties.getProperty("AirCompressor_device").split(","));
|
|
|
|
+// List<String> DeviceRootsBlower=Arrays.asList(properties.getProperty("RootsBlower_device").split(","));
|
|
|
|
+// List<String> DeviceThMeter=Arrays.asList(properties.getProperty("ThMeter_device").split(","));
|
|
|
|
+// List<String> DeviceSludgeIntfMeter=Arrays.asList(properties.getProperty("SludgeIntfMeter_device").split(","));
|
|
|
|
+// List<String> DeviceInformationSoftware=Arrays.asList(properties.getProperty("InformationSoftware_device").split(","));
|
|
|
|
+// List<String> DeviceWaterMeter=Arrays.asList(properties.getProperty("WaterMeter_device").split(","));
|
|
|
|
+// List<String> DeviceSmokeDetector=Arrays.asList(properties.getProperty("SmokeDetector_device").split(","));
|
|
|
|
+// List<String> DeviceLiquidLevelDiffer=Arrays.asList(properties.getProperty("LiquidLevelDiffer_device").split(","));
|
|
|
|
+// List<String> DeviceLiquidLevel=Arrays.asList(properties.getProperty("LiquidLevel_device").split(","));
|
|
|
|
+//
|
|
|
|
+// jiangjinDeviceList.put("Device_VoltageSwitchgear",DeviceVoltageSwitchgear);
|
|
|
|
+// jiangjinDeviceList.put("Device_WaterValve",DeviceWaterValve);
|
|
|
|
+// jiangjinDeviceList.put("Device_VariableFrequencyDrive",DeviceVariableFrequencyDrive);
|
|
|
|
+// jiangjinDeviceList.put("Device_WaterQuality",DeviceWaterQuality);
|
|
|
|
+// jiangjinDeviceList.put("Device_DifferentialPressure",DeviceDifferentialPressure);
|
|
|
|
+// jiangjinDeviceList.put("Device_ElectricMotor",DeviceElectricMotor);
|
|
|
|
+// jiangjinDeviceList.put("Device_WaterPump",DeviceWaterPump);
|
|
|
|
+// jiangjinDeviceList.put("Device_AirCompressor",DeviceAirCompressor);
|
|
|
|
+// jiangjinDeviceList.put("Device_RootsBlower",DeviceRootsBlower);
|
|
|
|
+// jiangjinDeviceList.put("Device_ThMeter",DeviceThMeter);
|
|
|
|
+// jiangjinDeviceList.put("Device_SludgeIntfMeter",DeviceSludgeIntfMeter);
|
|
|
|
+// jiangjinDeviceList.put("Device_InformationSoftware",DeviceInformationSoftware);
|
|
|
|
+// jiangjinDeviceList.put("Device_WaterMeter",DeviceWaterMeter);
|
|
|
|
+// jiangjinDeviceList.put("Device_SmokeDetector",DeviceSmokeDetector);
|
|
|
|
+// jiangjinDeviceList.put("Device_LiquidLevelDiffer",DeviceLiquidLevelDiffer);
|
|
|
|
+// jiangjinDeviceList.put("Device_LiquidLevel",DeviceLiquidLevel);
|
|
|
|
+//
|
|
|
|
+// jiangjinMeasurementMap.put("VoltageSwitchgear","VoltageSwitchgear");
|
|
|
|
+// jiangjinMeasurementMap.put("WaterValve","WaterValve");
|
|
|
|
+// jiangjinMeasurementMap.put("VariableFrequencyDrive","VariableFrequencyDrive");
|
|
|
|
+// jiangjinMeasurementMap.put("WaterQuality","WaterQuality");
|
|
|
|
+// jiangjinMeasurementMap.put("DifferentialPressure","DifferentialPressure");
|
|
|
|
+// jiangjinMeasurementMap.put("ElectricMotor","ElectricMotor");
|
|
|
|
+// jiangjinMeasurementMap.put("WaterPump","WaterPump");
|
|
|
|
+// jiangjinMeasurementMap.put("AirCompressor","AirCompressor");
|
|
|
|
+// jiangjinMeasurementMap.put("RootsBlower","RootsBlower");
|
|
|
|
+// jiangjinMeasurementMap.put("ThMeter","ThMeter");
|
|
|
|
+// jiangjinMeasurementMap.put("SludgeIntfMeter","SludgeIntfMeter");
|
|
|
|
+// jiangjinMeasurementMap.put("InformationSoftware","InformationSoftware");
|
|
|
|
+// jiangjinMeasurementMap.put("WaterMeter","WaterMeter");
|
|
|
|
+// jiangjinMeasurementMap.put("SmokeDetector","SmokeDetector");
|
|
|
|
+// jiangjinMeasurementMap.put("LiquidLevelDiffer","LiquidLevelDiffer");
|
|
|
|
+// jiangjinMeasurementMap.put("LiquidLevel","LiquidLevel");
|
|
|
|
+// }
|
|
|
|
|
|
public void initJiangjinDb()throws Exception{
|
|
public void initJiangjinDb()throws Exception{
|
|
InputStream inputStream = getConfigStream("application-jiangjin.yml");
|
|
InputStream inputStream = getConfigStream("application-jiangjin.yml");
|
|
@@ -268,6 +273,27 @@ public class KprBaseInitFun {
|
|
jiangjinMeasurementMap.put("LiquidLevel","LiquidLevel");
|
|
jiangjinMeasurementMap.put("LiquidLevel","LiquidLevel");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public void initZilaishuiDb()throws Exception{
|
|
|
|
+ InputStream inputStream = getConfigStream("application-zilaishui.yml");
|
|
|
|
+ Properties properties = new Properties();
|
|
|
|
+ properties.load(inputStream);
|
|
|
|
+ List<String> WaterMeterDevice =Arrays.asList(properties.getProperty("Device_WaterMeter").split(","));
|
|
|
|
+ List<String> WaterQualityDevice =Arrays.asList(properties.getProperty("Device_WaterQuality").split(","));
|
|
|
|
+ List<String> LiquidLevelDevice =Arrays.asList(properties.getProperty("Device_LiquidLevel").split(","));
|
|
|
|
+
|
|
|
|
+ zilaishuiDeviceList.put("Device_WaterMeter",WaterMeterDevice);
|
|
|
|
+ zilaishuiDeviceList.put("Device_WaterQuality",WaterQualityDevice);
|
|
|
|
+ zilaishuiDeviceList.put("Device_LiquidLevel",LiquidLevelDevice);
|
|
|
|
+
|
|
|
|
+ List<String> WaterMeter =Arrays.asList(properties.getProperty("Entity_WaterMeter").split(","));
|
|
|
|
+ List<String> WaterQuality =Arrays.asList(properties.getProperty("Entity_WaterQuality").split(","));
|
|
|
|
+ List<String> LiquidLevel =Arrays.asList(properties.getProperty("Entity_LiquidLevel").split(","));
|
|
|
|
+
|
|
|
|
+ zilaishuiParams.put("Entity_WaterMeter",WaterMeter);
|
|
|
|
+ zilaishuiParams.put("Entity_WaterQuality",WaterQuality);
|
|
|
|
+ zilaishuiParams.put("Entity_LiquidLevel",LiquidLevel);
|
|
|
|
+ }
|
|
|
|
+
|
|
public InputStream getConfigStream(String configFileName) {
|
|
public InputStream getConfigStream(String configFileName) {
|
|
InputStream inputStream = null;
|
|
InputStream inputStream = null;
|
|
try {
|
|
try {
|