|
@ -8,18 +8,19 @@ import cn.hutool.core.util.StrUtil; |
|
|
* @Date: 2023/3/9 |
|
|
* @Date: 2023/3/9 |
|
|
*/ |
|
|
*/ |
|
|
public enum DeviceEnum { |
|
|
public enum DeviceEnum { |
|
|
HLJ("1", "混料机", "HLJ", "HLJ"), |
|
|
HLJ_S("1", "高速混料机", "HLJ", "HLJ_S"), |
|
|
HLJ_S("2", "高速混料机", "HLJ_S", "HLJ_S"), |
|
|
HLJ("2", "混料机", "HLJ", "HLJ"), |
|
|
YZJ("3", "压机", "YZJ", "YZJ"), |
|
|
YZJ_S("3", "液压机", "YZJ", "YZJ_S"), //
|
|
|
YZJ_S("4", "液压机", "YZJ_S", "YZJ_S"), //
|
|
|
YZJ("4", "压机", "YZJ", "YZJ"), |
|
|
FJJXS("5", "分拣机械手", "FJJXS", "FJJXS"), |
|
|
MDJXS("5", "码垛机械手", "MDJXS", "MDJXS"), |
|
|
CPX("6", "拆盘线", "CPX", "CPX"), |
|
|
RYHJ("6", "入窑桁架", "YAO", "RYHJ"), |
|
|
BZX("6", "包装线", "BZX", "BZX"), |
|
|
YAO("7", "窑", "YAO", "YAO"), |
|
|
YAO("7", "窑设备", "YAO", "YAO"), |
|
|
CYHJ("8", "出窑桁架", "YAO", "CYHJ"), |
|
|
DPJ("8", "叠盘架", "DPJ", "DPJ"), |
|
|
FJCDJXS("9", "分拣拆垛机械手", "FJJXS", "FJCDJXS"), |
|
|
CPJ("9", "拆盘架", "CPJ", "CPJ"), |
|
|
FJMDJXS("10", "分拣码垛机械手", "FJJXS", "FJMDJXS"), |
|
|
MDJXS("10", "码垛机械手", "MDJXS", "MDJXS"), |
|
|
RGV("11", "RGV", "BZX", "RGV"), |
|
|
RGV("11", "RGV", "RGV", "RGV"); |
|
|
BZJ("12", "包装机", "BZX", "BZJ"), |
|
|
|
|
|
DTJ("13", "叠托机", "BZX", "DTJ"); |
|
|
|
|
|
|
|
|
private final String model; |
|
|
private final String model; |
|
|
private final String name; |
|
|
private final String name; |
|
@ -35,7 +36,16 @@ public enum DeviceEnum { |
|
|
|
|
|
|
|
|
public static DeviceEnum get(String model, String code) { |
|
|
public static DeviceEnum get(String model, String code) { |
|
|
for (DeviceEnum deviceEnum : DeviceEnum.values()) { |
|
|
for (DeviceEnum deviceEnum : DeviceEnum.values()) { |
|
|
if (code.equals(BZX.pictureName)) return BZX; |
|
|
if (code.equals(BZJ.pictureName)) return BZJ; |
|
|
|
|
|
if (StrUtil.equals(deviceEnum.model, model)) { |
|
|
|
|
|
return deviceEnum; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static DeviceEnum getByModel(String model) { |
|
|
|
|
|
for (DeviceEnum deviceEnum : DeviceEnum.values()) { |
|
|
if (StrUtil.equals(deviceEnum.model, model)) { |
|
|
if (StrUtil.equals(deviceEnum.model, model)) { |
|
|
return deviceEnum; |
|
|
return deviceEnum; |
|
|
} |
|
|
} |
|
|