硬件管理 完成

硬件类型管理 完成
yun-zuoyi
yunhao.wang 7 years ago
parent 11c12f32c3
commit 834d40d55e

@ -493,7 +493,6 @@ public class ImppEnumUtil {
}
}
/**
*
* 1.SERIAL_PORT
@ -700,4 +699,71 @@ public class ImppEnumUtil {
return tmp;
}
}
/**
*
* 1.ENABLE
* 2.DISABLE
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum COMM_STATUS{
ENABLE(1,"启用","fa fa-success cell-fa fa-check"),
DISABLE(2,"禁用","fa fa-disabled cell-fa fa-times-circle");
private int value;
private String name;
private String description;
COMM_STATUS() {
}
COMM_STATUS(int value, String name, String description) {
this.value = value;
this.name = name;
this.description = description;
}
public int getValue() {
return value;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].name;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].name.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
}

@ -33,12 +33,12 @@ public class Tool extends BaseBean {
@Column(name="NAME")
@ApiParam(value ="名称" , access ="名称")
private String name;
@Column(name="TOOL_TYPE_ID")
@ApiParam(value ="类型ID" , example = "0")
@JsonSerialize(using = ToStringSerializer.class)
private Long toolTypeId;
@Column(name="RED_TOOL_TYPE_NAME")
@ApiParam(value ="类型名称" , access ="类型名称")
private String redToolTypeName;
@ -47,9 +47,9 @@ public class Tool extends BaseBean {
@ApiParam(value ="设备状态1.正常2.禁用)" , example ="1" , access ="设备状态1.正常2.禁用)")
private Integer toolStatus;
@Column(name="TOOL_HOST")
@Column(name="TOOL_IP")
@ApiParam(value ="IP地址" , access ="IP地址")
private String toolHost;
private String toolIp;
@Column(name="TOOL_PORT")
@ApiParam(value ="端口" , example ="80" , access ="端口")

Loading…
Cancel
Save