|
@@ -5,10 +5,10 @@ package com.ruoyi.base.domain.enums;
|
|
|
*/
|
|
*/
|
|
|
public enum DeviceTypeEnum {
|
|
public enum DeviceTypeEnum {
|
|
|
|
|
|
|
|
- SENSOR("1", "采集设备", "sensor"),
|
|
|
|
|
|
|
+ SENSOR("1,4", "采集设备", "sensor"),
|
|
|
MONITOR("2", "监控设备", "monitor"),
|
|
MONITOR("2", "监控设备", "monitor"),
|
|
|
CONTROL("3", "控制设备", "control"),
|
|
CONTROL("3", "控制设备", "control"),
|
|
|
- WEATHER("4", "灌溉设备", "irrigation"), // 在前端被展示为"灌溉设备"
|
|
|
|
|
|
|
+ WEATHER("6", "灌溉设备", "irrigation"), // 在前端被展示为"灌溉设备"
|
|
|
TRACTOR("5", "农机设备", "tractor");
|
|
TRACTOR("5", "农机设备", "tractor");
|
|
|
|
|
|
|
|
private final String code;
|
|
private final String code;
|
|
@@ -50,7 +50,7 @@ public enum DeviceTypeEnum {
|
|
|
*/
|
|
*/
|
|
|
public static DeviceTypeEnum getByCode(String code) {
|
|
public static DeviceTypeEnum getByCode(String code) {
|
|
|
for (DeviceTypeEnum type : DeviceTypeEnum.values()) {
|
|
for (DeviceTypeEnum type : DeviceTypeEnum.values()) {
|
|
|
- if (type.getCode().equals(code)) {
|
|
|
|
|
|
|
+ if (type.getCode().equals(code) || type.getCode().contains(code)) {
|
|
|
return type;
|
|
return type;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|