2024-04-11 10:50:00 窑炉制造模型调用优化。

master
魔神煜修罗皇 12 months ago
parent d515b1f804
commit 4c98df7616
  1. 13
      dntd-model-materialkiln/src/main/java/com/dky/calculate/MaterialKilnScheme.java

@ -12,6 +12,10 @@ import java.util.stream.Collectors;
public class MaterialKilnScheme {
// 建筑行业编码
static final String[] PROPERTY_1 = new String[]{"3100","31B0","3140","3150","31C0"};
// 黑色金属矿采选业 行业编码
static final String[] PROPERTY_2 = new String[]{"3200","32A0","3250"};
public static List<MatchedDevice> calSchemeByTechType(Double workArea, List<SysDeviceHeatScene> sysDeviceHeatSceneList) {
// 对技术类型下的设备list按照单台设备工作容积进行排序
@ -43,10 +47,7 @@ public class MaterialKilnScheme {
}
public static List<SysDeviceHeatScene> getSchemeList(String userIndustry, Double needTemp, List<SysDeviceHeatScene> sysDeviceHeatSceneList) {
// 建筑行业编码
String[] property1 = ConfigReader.getPropertyByFile("industry_codes1", "IndustryCode.properties").split(",");
// 黑色金属矿采选业 行业编码
String[] property2 = ConfigReader.getPropertyByFile("industry_codes2", "IndustryCode.properties").split(",");
Map<String, Object> map = new HashMap<>();
List<SysDeviceHeatScene> sceneDevicesList = new ArrayList<>();
@ -75,11 +76,11 @@ public class MaterialKilnScheme {
});
// 判断用户行业是否属于建筑
if (new HashSet<>(Arrays.asList(property1)).contains(userIndustry)){
if (new HashSet<>(Arrays.asList(PROPERTY_1)).contains(userIndustry)){
sceneDevicesList = (List<SysDeviceHeatScene>) map.get(DeviceSubType.Material_Kiln.getDesc());
} else {
// 判断用户行业是否属于黑色金属矿采选业
if (new HashSet<>(Arrays.asList(property2)).contains(userIndustry)) {
if (new HashSet<>(Arrays.asList(PROPERTY_2)).contains(userIndustry)) {
sceneDevicesList = (List<SysDeviceHeatScene>) map.get(DeviceSubType.Metal_Kiln_Electric_Arc.getDesc());
} else {
if (needTemp >= MetalKinTemps.Metal_Kiln_Direct_Heat_Min_Temp.getTemp() && needTemp <= MetalKinTemps.Metal_Kiln_Direct_Heat_Max_Temp.getTemp()){

Loading…
Cancel
Save