diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java index a6e8712..6e880b0 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java @@ -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", "生产管理软件"); diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/ImppEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/ImppEnumUtil.java index 5addc69..3e6bdbe 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/ImppEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/ImppEnumUtil.java @@ -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.OPC:OPC + * 4.USB:USB + * 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; + } + } } diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/Department.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/Department.java index 3df1ceb..8422d54 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/Department.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/Department.java @@ -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 childList; diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/LogOperate.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/LogOperate.java index 9933950..6e1ee6d 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/LogOperate.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/LogOperate.java @@ -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 ="操作对象") diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/LogSystem.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/LogSystem.java index ae4c25a..959f785 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/LogSystem.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/LogSystem.java @@ -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")