添加枚举:

操作日志(操作类型,操作终端)
  	消息(消息状态,消息类型)
  	-硬件(连接方式,数据类型,状态)
  	系统参数(参数类型)
yun-zuoyi
yunhao.wang 7 years ago
parent b53b6e47be
commit 1c9295769c

@ -14,6 +14,7 @@ public class CommonEnumUtil {
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SOFT_TYPE {
IMPP(1, "IMPP", "IMPP平台"), CORE(2, "CORE", "i3业务平台"), WMS(3, "WMS", "仓库管理软件"), MES(4, "MES", "生产管理软件");

@ -149,4 +149,555 @@ public class ImppEnumUtil {
}
}
/**
*
* 1.DEBUG
* 2.INFO
* 3.WARN
* 4.ERROR
* 5.FATAL
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum LOG_LEVEL{
DEBUG(1,"DEBUG","调试程序信息"),
INFO(2,"INFO","程序运行信息"),
WARN(3,"WARN","具有潜在危害的信息"),
ERROR(4,"ERROR","错误信息但允许程序继续运行"),
FATAL(5,"FATAL","非常严重的错误,可能导致程序中止");
private int value;
private String name;
private String description;
LOG_LEVEL() {
}
LOG_LEVEL(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;
}
}
/**
*
* 1.INSERT
* 2.DELETE
* 3.UPDATE
* 4.SELECT
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum LOG_TYPE{
INSERT(1,"新增","新增"),
DELETE(2,"修改","修改"),
UPDATE(3,"删除","删除"),
SELECT(4,"查询","查询");
private int value;
private String name;
private String description;
LOG_TYPE() {
}
LOG_TYPE(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;
}
}
/**
*
* 1.PC
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum OPERATE_TERMINAL{
PC(1,"个人计算机","个人计算机");
private int value;
private String name;
private String description;
OPERATE_TERMINAL() {
}
OPERATE_TERMINAL(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;
}
}
/**
*
* 1.READ
* 2.UNREAD
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum USER_MESSAGE_STATUS{
READ(1,"已读","已读"),
UNREAD(2,"未读","未读");
private int value;
private String name;
private String description;
USER_MESSAGE_STATUS() {
}
USER_MESSAGE_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;
}
}
/**
*
* 1.NOTICE
* 2.STATION_LETTER
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum USER_MESSAGE_TYPE{
NOTICE(1,"已读","已读"),
STATION_LETTER(2,"未读","未读");
private int value;
private String name;
private String description;
USER_MESSAGE_TYPE() {
}
USER_MESSAGE_TYPE(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;
}
}
/**
*
* 1.SERIAL_PORT
* 2.NETWORK_PORT
* 3.OPCOPC
* 4.USBUSB
* 5.MIDDLE_TABLE
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum TOOL_CONN_TYPE{
SERIAL_PORT(1,"串口","串口"),
NETWORK_PORT(2,"网口","网口"),
OPC(3,"OPC","OPC"),
USB(4,"USB","USB"),
MIDDLE_TABLE(5,"中间表","中间表");
private int value;
private String name;
private String description;
TOOL_CONN_TYPE() {
}
TOOL_CONN_TYPE(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;
}
}
/**
*
* 1.STRING
* 2.TABLE
* 3.BINARY_PACKET
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum TOOL_DATA_TYPE{
STRING(1,"字符串","字符串"),
TABLE(2,"数据表","数据表"),
BINARY_PACKET(3,"二进制数据包","二进制数据包");
private int value;
private String name;
private String description;
TOOL_DATA_TYPE() {
}
TOOL_DATA_TYPE(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;
}
}
/**
*
* 1.SYSTEM
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SYS_PARAM_TYPE{
SYSTEM(1,"系统参数","系统参数");
private int value;
private String name;
private String description;
SYS_PARAM_TYPE() {
}
SYS_PARAM_TYPE(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;
}
}
}

@ -29,7 +29,6 @@ import java.util.List;
@Api(value="部门",description = "部门")
public class Department extends BaseBean {
@Column(name="DEPARTMENT_NAME")
@ApiParam(value ="名称")
private String departmentName;
@ -48,6 +47,14 @@ public class Department extends BaseBean {
// 根节点-1
private Long parentId;
public Long getParentId() {
if(parentId != null) {
return parentId.longValue();
}else{
return parentId;
}
}
@ApiParam(value ="子部门列表")
private transient List<Department> childList;

@ -28,13 +28,13 @@ import java.text.DecimalFormat;
public class LogOperate extends BaseBean {
@Column(name="OPERATE_MODULE_NAME")
@ApiParam(value ="模块名称" , access ="模块名称")
private String operateModuleName;
@Column(name="OPERATE_MODULE")
@ApiParam(value ="操作模块" , access ="操作模块")
private String operateModule;
@Column(name="OPERATE_TYPE_ID")
@Column(name="OPERATE_TYPE")
@ApiParam(value ="操作类型" , access ="操作类型")
private String operateTypeId;
private String operateType;
@Column(name="OPERATE_OBJECT")
@ApiParam(value ="操作对象" , access ="操作对象")

@ -28,9 +28,9 @@ import java.text.DecimalFormat;
public class LogSystem extends BaseBean {
@Column(name="LOG_MOULE_NAME")
@ApiParam(value ="服务名称" , access ="服务名称")
private String logMouleName;
@Column(name="LOG_MODULE")
@ApiParam(value ="系统模块" , access ="系统模块")
private String logModule;
@Column(name="LOG_IP")
@ApiParam(value ="服务器IP" , access ="服务器IP")

Loading…
Cancel
Save