diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockFormEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockFormEnumUtil.java new file mode 100644 index 0000000..87a3261 --- /dev/null +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockFormEnumUtil.java @@ -0,0 +1,1431 @@ +package cn.estsh.i3plus.pojo.base.enumutil; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * @Description : 模块表单枚举类 + * @Reference : + * @Author : alwaysfrin + * @CreateDate : 2018-12-25 21:08 + * @Modify: + **/ +public class BlockFormEnumUtil { + + /** + * 原数据类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum FORM_TABLE_TYPE { + TABLE(1, "table", "表"), + VIEW(2, "view", "视图"); + + private int value; + private String code; + private String description; + + private FORM_TABLE_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 FORM_TABLE_TYPE valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 行信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum TABLE_ROW_PICK { + SINGLE(1, "single", "单选"), + MULTI(2, "multi", "多选"); + + private int value; + private String code; + private String description; + + private TABLE_ROW_PICK(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 TABLE_ROW_PICK valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 显示行号信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum TABLE_ROW_NUMBER { + SHOW(1, "show", "显示"), + HIDE(2, "hide", "隐藏"); + + private int value; + private String code; + private String description; + + private TABLE_ROW_NUMBER(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 TABLE_ROW_NUMBER valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 元素新增信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum ELEMENT_ADD_STATUS { + ON(1, "ON", "开启"), + OFF(2, "OFF", "关闭"); + + private int value; + private String code; + private String description; + + private ELEMENT_ADD_STATUS(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 ELEMENT_ADD_STATUS valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 元素编辑信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum ELEMENT_EDIT_STATUS { + ON(1, "ON", "开启"), + OFF(2, "OFF", "关闭"); + + private int value; + private String code; + private String description; + + private ELEMENT_EDIT_STATUS(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 ELEMENT_EDIT_STATUS valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 元素编辑信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum ELEMENT_DEL_STATUS { + ON(1, "ON", "开启"), + OFF(2, "OFF", "关闭"); + + private int value; + private String code; + private String description; + + private ELEMENT_DEL_STATUS(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 ELEMENT_DEL_STATUS valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 元素查询信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum ELEMENT_FIND_STATUS { + ON(1, "ON", "开启"), + OFF(2, "OFF", "关闭"); + + private int value; + private String code; + private String description; + + private ELEMENT_FIND_STATUS(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 ELEMENT_FIND_STATUS valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 元素控件类型信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PROPERTY_CONTROL_TYPE { + RADIO(100, "RADIO", "单选"), + CHECKBOX(110, "CHECKBOX", "复选"), + TEXT(200, "TEXT", "文本"), + NUMBER(210, "NUMBER", "数字"), + PASSWORD(230, "PASSWORD", "密码"), + DATE(300, "DATE", "日期(yyyy-MM-dd)"), + DATE_TIME(310, "DATE_TIME", "时间(yyyy-MM-dd hh:mm:ss)"), + DICTIONARY(800, "DICT_SELECT", "字典"), + CASCADE(900, "CASCADE", "级联"); + //FILE(400, "file", "文件"), + //IMAGE(410, "image", "image"), + //OFF(500, "color", "颜色"), + + private int value; + private String code; + private String description; + + private PROPERTY_CONTROL_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 PROPERTY_CONTROL_TYPE valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 属性字段排序规则 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PROPERTY_ORDER_BY { + ASC(1, "ASC", "升序"), + DESC(2, "DESC", "降序"); + + private int value; + private String name; + private String description; + + PROPERTY_ORDER_BY(int value, String name, String description) { + this.value = value; + this.name = name; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public String getName() { + return name; + } + + public static String valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].getName(); + } + } + return tmp; + } + + public static int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].name.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + + /** + * 虚拟类型信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PROPERTY_VIRTUAL_TYPE { + STRING_SPLICE(10, "SPLICE", "字符串拼接"), + NUM_ADD(20, "ADD", "加法计算"), + NUM_LESS(30, "MIN", "减法计算"), + NUM_MAKE(40, "MUL", "乘法计算"), + NUM_DIVISION(50, "DIVISION", "除法计算"); + + private int value; + private String code; + private String description; + + private PROPERTY_VIRTUAL_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 PROPERTY_VIRTUAL_TYPE valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 属性类型信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PROPERTY_TYPE { + STRING(10, "String", "字符串"), + CHAR(11, "Character", "单字符"), + INTEGER(20, "Integer", "短整型"), + LONG(21, "Long", "长整型"), + DOUBLE(30, "Double", "大浮点型"), + FLOAT(31, "Float", "小浮点型"), + BOOLEAN(40, "Boolean", "布尔值"), + BYTE(50, "Byte", "字节"), + DATE(60, "Date", "日期"); + + private int value; + private String code; + private String description; + + private PROPERTY_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 PROPERTY_TYPE valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 执行类型信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum EXECUTION_TYPE { + SQL(10, "SQL", "SQL脚本"), + CLASS_METHOD(20, "ClassMethod", "类方法"); + + private int value; + private String code; + private String description; + + private EXECUTION_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 EXECUTION_TYPE valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 拦截器类型信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum INTERCEPT_TYPE { + ELEMENT_ADD(10, "ELEMENT_ADD", "元素新增"), + ELEMENT_EDIT(20, "ELEMENT_EDIT", "元素修改"), + ELEMENT_DEL(30, "ELEMENT_DEL", "元素删除"), + ELEMENT_FIND(40, "ELEMENT_FIND", "元素查询"), + CUSTOM_BUTTON(50, "CUSTOM_BUTTON", "自定义按钮"); + + private int value; + private String code; + private String description; + + private INTERCEPT_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 INTERCEPT_TYPE valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 拦截器位置信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum INTERCEPT_POSITION { + BEFORE_EXECUTION(10, "BEFORE", "执行前"), + AFTER_SUCCESS(20, "AFTER_SUCCESS", "执行成功后"), + AFTER_FAIL(30, "AFTER_FAIL", "执行失败后"); + + private int value; + private String code; + private String description; + + private INTERCEPT_POSITION(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 INTERCEPT_POSITION valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 拦截器业务结果处理信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum INTERCEPT_PROCESS_RESULT { + CONTINUE_AFTER_SUCCESS(10, "CONTINUE_AFTER_SUCCESS", "成功后继续"), + STOP_AFTER_SUCCESS(20, "STOP_AFTER_SUCCESS", "成功后停止"), + CONTINUE_AFTER_FAIL(30, "CONTINUE_AFTER_FAIL", "失败后继续"), + CONTINUE_AFTER_STOP(40, "CONTINUE_AFTER_STOP", "失败后停止"); + + private int value; + private String code; + private String description; + + private INTERCEPT_PROCESS_RESULT(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 INTERCEPT_PROCESS_RESULT valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 表单功能明细 触发信息 + * + * onclick script 元素上发生鼠标点击时触发。 + * ondblclick script 元素上发生鼠标双击时触发。 + * ondrag script 元素被拖动时运行的脚本。 + * ondragend script 在拖动操作末端运行的脚本。 + * ondragenter script 当元素元素已被拖动到有效拖放区域时运行的脚本。 + * ondragleave script 当元素离开有效拖放目标时运行的脚本。 + * ondragover script 当元素在有效拖放目标上正在被拖动时运行的脚本。 + * ondragstart script 在拖动操作开端运行的脚本。 + * ondrop script 当被拖元素正在被拖放时运行的脚本。 + * onmousedown script 当元素上按下鼠标按钮时触发。 + * onmousemove script 当鼠标指针移动到元素上时触发。 + * onmouseout script 当鼠标指针移出元素时触发。 + * onmouseover script 当鼠标指针移动到元素上时触发。 + * onmouseup script 当在元素上释放鼠标按钮时触发。 + * onmousewheel script 当鼠标滚轮正在被滚动时运行的脚本。 + * onscroll script 当元素滚动条被滚动时运行的脚本。 + * + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum TRIGGER_EVENT { + CLICK(10, "CLICK", "单击"), + DB_LCLICK(20, "DB_LCLICK", "双击"), + MOUSE_OUT(30, "MOUSE_OUT", "鼠标指针移出"), + MOUSE_OVER(40, "MOUSE_OVER", "鼠标指针移动入"); + + private int value; + private String code; + private String description; + + private TRIGGER_EVENT(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + 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 TRIGGER_EVENT valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 表单功能明细 触发效果信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum TRIGGER_EFFECT { + DIALOG(10, "DIALOG", "弹出窗口"), + WINDOW_NEW(20, "NEW_WINDOW", "新开窗口"), + SQL(30, "SQL", "执行SQL"), + CLASS_METHOD(40, "CLASS_METHOD", "执行类方法"); + + private int value; + private String name; + private String description; + + TRIGGER_EFFECT(int value, String name, String description) { + this.value = value; + this.name = name; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public String getName() { + return name; + } + + public static TRIGGER_EFFECT valueOf(int val) { + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].name.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + + /** + * SQL 连接关系信息 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SQL_REF_TYPE { + GT(1, ">", "大于"), + GT_EQUAL(2, ">=", "大于等于"), + LT(3, "<", "小于等于"), + LT_EQUAL(4, "<=", "小于等于"), + EQUAL(5, "=", "等于"), + EQUAL_NOT(6, "<>", "不等于"); + + private int value; + private String name; + private String description; + + SQL_REF_TYPE(int value, String name, String description) { + this.value = value; + this.name = name; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public String getName() { + return name; + } + + public static SQL_REF_TYPE valueOf(int val) { + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].name.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } +} diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockReportEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockReportEnumUtil.java index e8a2dbd..5e56bd1 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockReportEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockReportEnumUtil.java @@ -6,7 +6,7 @@ import java.util.ArrayList; import java.util.List; /** - * @Description : 模块枚举类 + * @Description : 模块报表枚举类 * @Reference : * @Author : alwaysfrin * @CreateDate : 2018-12-25 21:08 diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java index 4aff7bf..5baff68 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java @@ -1584,6 +1584,42 @@ public class WmsEnumUtil { } /** + * 打印单号数据类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PRINT_ORDER_TYPE { + PO(10, "PO"), + MOVEMENT(20, "MOVEMENT"), + ASN(30, "ASN"); + + private int value; + private String description; + + PRINT_ORDER_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** * 组件统一返回提示 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -1852,7 +1888,7 @@ public class WmsEnumUtil { STEP_SEQ("STEP_SEQ", "步骤调用序号"), MOVE_ORDER_NO("MOVE_ORDER_NO", "移库单单号"), QC_ORDER_NO("QC_ORDER_NO", "质检单单号"), - ORDER_NO("ORDER_NO", "盘点主表序号"); + CHECK_ORDER_NO("CHECK_ORDER_NO", "盘点主表序号"); private String code; private String description; @@ -1877,6 +1913,35 @@ public class WmsEnumUtil { } /** + * 通用条码枚举 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum COMMON_SN { + PO_SN("PO_SN", "PO条码"); + + private String code; + private String description; + int value; + + COMMON_SN(String code, String description) { + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + public String getDescription() { + return description; + } + } + + /** * 可选项类型枚举 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -1998,7 +2063,7 @@ public class WmsEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum TRANS_QUAN_GENERAL_TAG { - MINUS(-1, "MINUS", "一条:负"), ZERO(0, "ZERO", "一条:0"), PLUS(1, "PLUS", "一条:正"), TWO(2, "TWO", "两条:一正一负"); + SRC(-1, "SRC", "一条:负"), ZERO(0, "ZERO", "一条:0"), DEST(1, "DEST", "一条:正"), TWO(2, "TWO", "两条:一正一负"); private String code; private String description; @@ -2032,4 +2097,160 @@ public class WmsEnumUtil { return null; } } + + /** + * 数据状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum DATA_STATUS { + YES(1, "是", "fa fa-success cell-fa fa-check"), + NO(2, "否", "fa fa-disabled cell-fa fa-times-circle"); + + private int value; + private String description; + private String code; + + DATA_STATUS(int value, String code, String description){ + this.value = value; + this.description = description; + this.code = code; + } + + public int getValue () { + return value; + } + + public String getDescription () { + return description; + } + + public String getCode() { + return code; + } + + public static String valueOf (int val){ + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].getDescription(); + } + } + return tmp; + } + } + + /** + * 打印模板 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PRINT_TEMPLATE { + SN_PRINT_TEMPLATE(10, "SN_PRINT_TEMPLATE", "条码打印模板"), + ORDER_PRINT_TEMPLATE(20, "ORDER_PRINT_TEMPLATE", "订单打印模板"), + RC_BACK_PRINT_TEMPLATE(30, "RC_BACK_PRINT_TEMPLATE", "收货回执打印模板"); + + private int value; + private String code; + private String description; + + PRINT_TEMPLATE(int value, String code, String description){ + this.value = value; + this.description = description; + this.code = code; + } + + public int getValue () { + return value; + } + + public String getDescription () { + return description; + } + + public String getCode() { + return code; + } + + public static String valueOf (int val){ + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].getDescription(); + } + } + return tmp; + } + } + + /** + * 版本号 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum VERSION { + PO_VERSION(10, "VERSION", "PO版本号"); + + private int value; + private String code; + private String description; + + VERSION(int value, String code, String description){ + this.value = value; + this.description = description; + this.code = code; + } + + public int getValue () { + return value; + } + + public String getDescription () { + return description; + } + + public String getCode() { + return code; + } + + public static String valueOf (int val){ + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].getDescription(); + } + } + return tmp; + } + } + + /** + * 包装类型枚举 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PACKAGE_TYPE { + BOX(10 , "BOX", "BOX(盒)"), + CARTON(20 , "CARTON", "CARTON(箱)"), + PALLET(30 , "PALLET", "PALLET(栈板)"), + CONTAINER(40 , "PALLET", "PALLET(集装箱)"); + + private String code; + private String description; + int value; + + PACKAGE_TYPE(int value , String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + public String getDescription() { + return description; + } + } } diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/platform/UserRolePagerModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/platform/UserRolePagerModel.java new file mode 100644 index 0000000..4ca730e --- /dev/null +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/platform/UserRolePagerModel.java @@ -0,0 +1,20 @@ +package cn.estsh.i3plus.pojo.model.platform; + +import cn.estsh.i3plus.pojo.base.common.Pager; +import cn.estsh.i3plus.pojo.platform.bean.SysRole; +import lombok.Data; + +/** + * @Description : + * @Reference : + * @Author : siliter + * @CreateDate : 2019-03-19 13:52 + * @Modify: + **/ +@Data +public class UserRolePagerModel { + + private SysRole sysRole; + + private Pager pager; +} diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/PrintOrderDataModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/PrintOrderDataModel.java new file mode 100644 index 0000000..7389c5e --- /dev/null +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/PrintOrderDataModel.java @@ -0,0 +1,45 @@ +package cn.estsh.i3plus.pojo.model.wms; + +import io.swagger.annotations.ApiParam; +import lombok.Data; + +/** + * @Description : 订单打印数据封装model + * @Reference : + * @Author : siliter + * @CreateDate : 2019-03-18 11:50 + * @Modify: + **/ +@Data +public class PrintOrderDataModel { + + @ApiParam(value = "工厂代码") + public String organizeCode; + + @ApiParam(value = "单号") + public String orderNo; + + @ApiParam(value = "业务类型", example = "-1") + public Integer busiType; + + @ApiParam(value = "状态", example = "-1") + public Integer status; + + @ApiParam(value = "打印标志", example = "-1") + public Integer printFlag; + + @ApiParam(value = "供应商编号") + public String vendorNo; + + @ApiParam(value = "客户编号") + public String custNo; + + @ApiParam(value = "版本") + public String version; + + @ApiParam(value = "ERP单号") + public String erpSrcNo; + + @ApiParam(value = "业务数据类型", example = "-1") + public Integer busiDataType; +} diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysDictionary.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysDictionary.java index faa65b3..e7222a2 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysDictionary.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysDictionary.java @@ -1,6 +1,7 @@ package cn.estsh.i3plus.pojo.platform.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; @@ -38,6 +39,11 @@ public class SysDictionary extends BaseBean { @ApiParam(value ="字典代码") private String dictionaryCode; + //枚举 CommonEnumUtil.SOFT_TYPE + @Column(name="SOFT_TYPE") + @ApiParam(value ="微服务软件类型") + private Integer softType; + // 根节点-1 @Column(name="PARENT_ID") @ApiParam(value ="父节点" , example = "-1") diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysLabelTemplate.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysLabelTemplate.java index 8a8428d..7759328 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysLabelTemplate.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysLabelTemplate.java @@ -25,19 +25,19 @@ import javax.persistence.Transient; @DynamicInsert @DynamicUpdate @EqualsAndHashCode(callSuper = true) -@Table(name="SYS_LABELTEMPLATE") +@Table(name="SYS_LABEL_TEMPLATE") @Api(value="打印模板",description = "打印模板") public class SysLabelTemplate extends BaseBean { - @Column(name="TEMPLATECODE") + @Column(name="TEMPLATE_CODE") @ApiParam(value ="模板代码") private String templateCode; - @Column(name="TEMPLATENAME") + @Column(name="TEMPLATE_NAME") @ApiParam(value ="模板名称") private String templateName; - @Column(name="TEMPLATECONTENT", columnDefinition = "TEXT") + @Column(name="TEMPLATE_CONTENT", columnDefinition = "TEXT") @ApiParam(value ="模板内容") private String templateContent; diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysLabelTemplateParam.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysLabelTemplateParam.java index 505b65d..6b39045 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysLabelTemplateParam.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysLabelTemplateParam.java @@ -27,24 +27,24 @@ import javax.persistence.Transient; @DynamicInsert @DynamicUpdate @EqualsAndHashCode(callSuper = true) -@Table(name="SYS_LABELTEMPLATEPARAM") +@Table(name="SYS_LABEL_TEMPLATE_PARAM") @Api(value="打印模板参数",description = "打印模板参数") public class SysLabelTemplateParam extends BaseBean { - @Column(name="TEMPLATEID") + @Column(name="TEMPLATE_ID") @ApiParam(value ="模板ID" , access ="模板ID" ,example = "-1") @JsonSerialize(using = ToStringSerializer.class) private Long templateId; - @Column(name="TEMPLATECODE") + @Column(name="TEMPLATE_CODE") @ApiParam(value ="模板代码") private String templateCode; - @Column(name="TEMPLATEPARAM") + @Column(name="TEMPLATE_PARAM") @ApiParam(value ="模板参数") private String templateParam; - @Column(name="TEMPLATEPARAMTEXT", columnDefinition = "TEXT") + @Column(name="TEMPLATE_PARAM_TEXT", columnDefinition = "TEXT") @ApiParam(value ="模板参数描述") private String templateParamText; diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/sqlpack/CoreHqlPack.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/sqlpack/CoreHqlPack.java index 1cb1348..c7f9c85 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/sqlpack/CoreHqlPack.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/sqlpack/CoreHqlPack.java @@ -406,9 +406,10 @@ public class CoreHqlPack { // and HqlPack.getStringEqualPack(dictionary.getDictionaryCode(),"dictionaryCode",result); + HqlPack.getNumEqualPack(dictionary.getParentId(),"parentId",result); + HqlPack.getNumEqualPack(dictionary.getSoftType(),"softType",result); // not HqlPack.getNumNOEqualPack(dictionary.getId(),"id",result); - HqlPack.getNumNOEqualPack(dictionary.getParentId(),"parentId",result); // 添加默认排序 HqlPack.getOrderDefault(dictionary); @@ -426,9 +427,10 @@ public class CoreHqlPack { // and HqlPack.getStringEqualPack(dictionary.getDictionaryValue(),"dictionaryValue",result); + HqlPack.getNumEqualPack(dictionary.getParentId(),"parentId",result); + HqlPack.getNumEqualPack(dictionary.getSoftType(),"softType",result); // not HqlPack.getNumNOEqualPack(dictionary.getId(),"id",result); - HqlPack.getNumNOEqualPack(dictionary.getParentId(),"parentId",result); // 添加默认排序 HqlPack.getOrderDefault(dictionary); diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayoutRow.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayoutRow.java index a7a82de..24db11e 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayoutRow.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayoutRow.java @@ -49,8 +49,6 @@ public class BrLayoutRow extends BaseBean { @ApiParam(value ="排序") private Integer rowSort; - private Integer rowSeq; - @Column(name="ROW_STYLE",columnDefinition = "TEXT") @ApiParam(value ="行样式") private String rowStyle; diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsActionResponseBean.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsActionResponseBean.java index 1730e20..b99f4ec 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsActionResponseBean.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsActionResponseBean.java @@ -75,6 +75,12 @@ public class WmsActionResponseBean { public Boolean isDetailsBtnDisabled = true; /** + * 默认为true,如果这个值为true就禁用按钮否则可用, + */ + @ApiParam(value = "输入框是否禁用") + public Boolean isInputBtnDisabled = false; + + /** * 与 toSelected 属性配合使用, * 选择数据后把选中行的 keyColumn 字段的值写入界面输入框并触发回车事件 */ diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCSOrderDetails.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCSOrderDetails.java index c4a8117..a9391f9 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCSOrderDetails.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCSOrderDetails.java @@ -86,8 +86,7 @@ public class WmsCSOrderDetails extends BaseBean { public Integer snStatus; /** - * 处理状态:1=已创建,5=已盘,10=已冻结 - * ,20=已解冻,30=取消冻结 + * 处理状态:10=已创建,20=已盘,30=已冻结,40=已解冻,50=取消冻结 */ @Column(name = "TRANS_STATUS") @ApiParam(value = "处理状态", example = "1") diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCSOrderMaster.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCSOrderMaster.java index 9ab2ff2..05c572c 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCSOrderMaster.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCSOrderMaster.java @@ -65,4 +65,16 @@ public class WmsCSOrderMaster extends BaseBean { @Column(name = "IS_TASK") @ApiParam(value = "是否生产任务", example = "1") public Integer isTask; + + @Transient + @ApiParam(value = "盘点物料清单") + public String[] wmsCSParts; + + @Transient + @ApiParam(value = "盘点存储区清单") + public String[] wmsCSZones; + + @Transient + @ApiParam(value = "盘点库位清单") + public String[] wmsCSLocates; } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCSZone.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCSZone.java index ab4f8e7..72049d0 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCSZone.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsCSZone.java @@ -11,6 +11,7 @@ import org.hibernate.annotations.DynamicUpdate; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; +import javax.persistence.Transient; /** * @Description : 盘点存储区信息 @@ -35,4 +36,8 @@ public class WmsCSZone extends BaseBean { @Column(name="ZONE_NO") @ApiParam("存储区代码") public String zoneNo; + + @Transient + @ApiParam("库位代码") + public String locateNo; } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementMaster.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementMaster.java index f11f782..a2ddf74 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementMaster.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementMaster.java @@ -97,4 +97,15 @@ public class WmsDocMovementMaster extends BaseBean { @Column(name = "CUST_ORDER_NO") @ApiParam(value = "客户单号") private String custOrderNo; + + @Transient + private List movementDetailsList; + + @Transient + @ApiParam(value = "源库存地代码") + private String srcAreaNo; + + @Transient + @ApiParam(value = "目的库存地代码") + private String desrAreaNo; } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsOpType.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsOpType.java index 8707b77..c889b78 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsOpType.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsOpType.java @@ -91,18 +91,9 @@ public class WmsOpType extends BaseBean { @Column(name = "USE_TIME") @ApiParam(value = "标准工时(每箱)", example = "0") - private Integer userTime; + private Integer useTime; @Column(name = "IS_MULITI") @ApiParam(value = "是否允许多人操作", example = "0") private Integer isMuliti; - - @Column(name = "TM_ID") - @ApiParam(value = "处理组件编号") - @JsonSerialize(using = ToStringSerializer.class) - private Long tmId; - - @Column(name = "DATA_SRC") - @ApiParam("数据来源") - private String dataSrc; } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsQCDetails.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsQCDetails.java index 1583f39..779e705 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsQCDetails.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsQCDetails.java @@ -75,14 +75,4 @@ public class WmsQCDetails extends BaseBean { @Column(name = "REJECT_QTY") @ApiParam(value = "不合格数量", example = "0") public Double rejectQty; - - @Column(name = "QC_USER") - @ApiParam("检验员") - public String qcUser; - - @Column(name = "QC_TIME") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - @ApiParam(value = "检验时间", example = "2000-01-01 01:00:00") - public String qcTime; - } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsQCTrans.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsQCTrans.java index 0246ac2..e7610a3 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsQCTrans.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsQCTrans.java @@ -1,6 +1,7 @@ package cn.estsh.i3plus.pojo.wms.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -45,7 +46,7 @@ public class WmsQCTrans extends BaseBean { @Column(name="REMARK") @ApiParam("备注") - public String reMark; + public String remark; @Column(name="PASS_QTY") @ApiParam("合格数量") @@ -70,4 +71,13 @@ public class WmsQCTrans extends BaseBean { @Column(name="SN") @ApiParam("条码") public String sn; + + @Column(name = "QC_USER") + @ApiParam("检验员") + public String qcUser; + + @Column(name = "QC_TIME") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @ApiParam(value = "检验时间", example = "2000-01-01 01:00:00") + public String qcTime; } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTransQuan.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTransQuan.java index f858769..893a13b 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTransQuan.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTransQuan.java @@ -56,14 +56,6 @@ public class WmsTransQuan extends BaseBean { @ApiParam(value = "单位") private String unit; - @Column(name = "QTY") - @ApiParam(value = "交易数量", example = "1") - private Double qty; - - @Column(name = "REJECT_QTY") - @ApiParam(value = "不合格交易数量", example = "1") - private Double rejectQty; - @Column(name = "TRANS_STATUS") @ApiParam(value = "状态", example = "10") private Integer transStatus; @@ -99,4 +91,36 @@ public class WmsTransQuan extends BaseBean { @Column(name = "ERROR_MESSAGE") @ApiParam(value = "错误信息") private String errorMessage; + + @Column(name = "QTY") + @ApiParam(value = "可用数量", example = "0") + public Double qty; + + @Column(name = "FAIL_QTY") + @ApiParam(value = "不合格数量", example = "0") + private Double failQty; + + @Column(name = "HOLD_QTY") + @ApiParam(value = "隔离数量", example = "0") + private Double holdQty; + + @Column(name = "QC_QTY") + @ApiParam(value = "质检中数量", example = "0") + private Double qcQty; + + @Column(name = "RIN_QTY") + @ApiParam(value = "待入库数量", example = "0") + private Double rinQty; + + @Column(name = "FREEZE_QTY") + @ApiParam(value = "冻结数量", example = "0") + private Double freezeQty; + + @Column(name = "CONSIGN_QTY") + @ApiParam(value = "寄售数量", example = "0") + private Double consignQty; + + @Column(name = "LOCK_QTY") + @ApiParam(value = "锁定数量", example = "0") + private Double lockQty; } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/sqlpack/WmsHqlPack.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/sqlpack/WmsHqlPack.java index c725160..b474e3b 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/sqlpack/WmsHqlPack.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/sqlpack/WmsHqlPack.java @@ -24,9 +24,15 @@ import java.util.stream.Collectors; **/ public class WmsHqlPack { + public static String packInParams(String colnumName, String[] params) { + StringBuffer sb = new StringBuffer(); + HqlPack.getInPackString(String.join(",", params), colnumName, sb); + return sb.toString(); + } + /** * 封装公用查询参数 - * @param bean 实体对象 + * @param bean 实体对象 * @param hqlStr 查询语句 * @return 封装完成的查询语句 */ @@ -82,27 +88,27 @@ public class WmsHqlPack { return result.toString(); } + /** * 查询任务合并的移库单明细 查询条件封装 * + * @param colName * @param orderNos * @return */ - public static String packWmsOrderDetailsByOrderNos(List orderNos) { + public static String packWmsOrderDetailsByOrderNos(String colName, List orderNos) { StringBuffer result = new StringBuffer(); StringBuffer orderNoStr = new StringBuffer(); for (int i = 0; i < orderNos.size(); i++) { - if (i == orderNos.size()) { - orderNoStr.append("'" + orderNos.get(i) + "'"); - } else { - orderNoStr.append("'" + orderNos.get(i) + "',"); - } + orderNoStr.append("'" + orderNos.get(i) + "',"); } + orderNoStr.deleteCharAt(orderNoStr.length() - 1); result.append(" and model.isDeleted=" + CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue() + - "and model.isValid=" + CommonEnumUtil.IS_VAILD.VAILD.getValue() + - "and model.orderNo in (" + orderNos + ")" + " order by model.partNo,model.orderNo"); + " and model.isValid=" + CommonEnumUtil.IS_VAILD.VAILD.getValue() + + " and model.orderNo in (" + orderNoStr + ")" + " order by model." + colName + ",model.orderNo"); return result.toString(); } + /** * 库存移动单查询封装 * @@ -188,7 +194,7 @@ public class WmsHqlPack { StringBuffer result = new StringBuffer(); HqlPack.getStringLikerPack(wmsPart.getPartNo(), "partNo", result); - HqlPack.getStringLikerPack(wmsPart.getPartName(), "partNameRdd", result); + HqlPack.getStringLikerPack(wmsPart.getPartName(), "partName", result); HqlPack.getStringLikerPack(wmsPart.getPartSpec(), "partSpec", result); HqlPack.getStringLikerPack(wmsPart.getPartType(), "partType", result); @@ -211,10 +217,10 @@ public class WmsHqlPack { HqlPack.getStringLikerPack(wmsIbCheckPlan.getPartNameRdd(), "partNameRdd", result); getStringBuilderPack(wmsIbCheckPlan, result); - if(wmsIbCheckPlan.getStartDateStart() != null || wmsIbCheckPlan.getStartDateEnd() != null) { + if (wmsIbCheckPlan.getStartDateStart() != null || wmsIbCheckPlan.getStartDateEnd() != null) { HqlPack.timeBuilder(wmsIbCheckPlan.getStartDateStart(), wmsIbCheckPlan.getStartDateEnd(), "startDate", result, false); } - if(wmsIbCheckPlan.getEndDateStart() != null || wmsIbCheckPlan.getEndDateEnd() != null) { + if (wmsIbCheckPlan.getEndDateStart() != null || wmsIbCheckPlan.getEndDateEnd() != null) { HqlPack.timeBuilder(wmsIbCheckPlan.getEndDateStart(), wmsIbCheckPlan.getEndDateEnd(), "endDate", result, false); } @@ -351,7 +357,6 @@ public class WmsHqlPack { HqlPack.getStringEqualPack(wmsOpType.getOpTypeCode(), "opTypeCode", result); HqlPack.getStringLikerPack(wmsOpType.getOpTypeName(), "opTypeName", result); - HqlPack.getNumEqualPack(wmsOpType.getTmId(), "tmId", result); HqlPack.getNumEqualPack(wmsOpType.getSeq(), "seq", result); getStringBuilderPack(wmsOpType, result); @@ -406,6 +411,7 @@ public class WmsHqlPack { return result.toString(); } + /** * 查询满足处理周期的作业类型 查询条件封装 * @@ -436,6 +442,7 @@ public class WmsHqlPack { return result.toString(); } + /** * 存储区信息 查询条件封装 * @@ -452,7 +459,7 @@ public class WmsHqlPack { //存储区代码 HqlPack.getStringLikerPack(wmsZones.getZoneNo(), "zoneNo", result); //存储区名称 - HqlPack.getStringLikerPack(wmsZones.getZoneName(),"zoneName", result); + HqlPack.getStringLikerPack(wmsZones.getZoneName(), "zoneName", result); getStringBuilderPack(wmsZones, result); @@ -518,7 +525,7 @@ public class WmsHqlPack { HqlPack.getStringLikerPack(wmsASNMaster.getSrc(), "src", result); HqlPack.getStringEqualPack(wmsASNMaster.getPoNo(), "poNo", result); - getStringBuilderPack(wmsASNMaster,result); + getStringBuilderPack(wmsASNMaster, result); return result.toString(); } @@ -597,7 +604,7 @@ public class WmsHqlPack { HqlPack.getStringEqualPack(wmsASNMasterDetails.getErpWhNo(), "erpWhNo", result); HqlPack.getStringEqualPack(wmsASNMasterDetails.getVendorLotNo(), "vendorLotNo", result); - getStringBuilderPack(wmsASNMasterDetails,result); + getStringBuilderPack(wmsASNMasterDetails, result); return result.toString(); } @@ -643,6 +650,7 @@ public class WmsHqlPack { StringBuffer result = new StringBuffer(); HqlPack.getStringLikerPack(wmsTaskInfo.getMoveNo(), "moveNo", result); + HqlPack.getStringLikerPack(wmsTaskInfo.getOrderNo(), "orderNo", result); HqlPack.getStringLikerPack(wmsTaskInfo.getUserNo(), "userNo", result); HqlPack.getStringLikerPack(wmsTaskInfo.getOpTypeCode(), "opTypeCode", result); HqlPack.getStringLikerPack(wmsTaskInfo.getRemark(), "remark", result); @@ -680,7 +688,7 @@ public class WmsHqlPack { * @param wmsCSLocate * @return */ - public static String packHqlWmsCSLocate(WmsCSLocate wmsCSLocate){ + public static String packHqlWmsCSLocate(WmsCSLocate wmsCSLocate) { StringBuffer result = new StringBuffer(); HqlPack.getStringEqualPack(wmsCSLocate.getOrderNo(), "orderNo", result); @@ -696,12 +704,12 @@ public class WmsHqlPack { * @param wmsCSPart * @return */ - public static String packHqlWmsCSPart(WmsCSPart wmsCSPart){ + public static String packHqlWmsCSPart(WmsCSPart wmsCSPart) { StringBuffer result = new StringBuffer(); - HqlPack.getStringEqualPack(wmsCSPart.getOrderNo(),"orderNo", result); - HqlPack.getStringEqualPack(wmsCSPart.getPartNo(),"partNo", result); - HqlPack.getStringLikerPack(wmsCSPart.getPartNameRdd(),"partNameRdd", result); + HqlPack.getStringEqualPack(wmsCSPart.getOrderNo(), "orderNo", result); + HqlPack.getStringEqualPack(wmsCSPart.getPartNo(), "partNo", result); + HqlPack.getStringLikerPack(wmsCSPart.getPartNameRdd(), "partNameRdd", result); getStringBuilderPack(wmsCSPart, result); @@ -713,7 +721,7 @@ public class WmsHqlPack { * @param wmsCSZone * @return */ - public static String packHqlWmsCSZone(WmsCSZone wmsCSZone){ + public static String packHqlWmsCSZone(WmsCSZone wmsCSZone) { StringBuffer result = new StringBuffer(); HqlPack.getStringEqualPack(wmsCSZone.getOrderNo(), "orderNo", result); @@ -782,7 +790,11 @@ public class WmsHqlPack { //查询参数封装 HqlPack.getStringEqualPack(wmsStockSn.getLocateNo(), "locateNo", result); HqlPack.getStringEqualPack(wmsStockSn.getPartNo(), "partNo", result); - + HqlPack.getStringEqualPack(wmsStockSn.getWhNo(), "whNo", result); + HqlPack.getStringEqualPack(wmsStockSn.getZoneNo(), "zoneNo", result); + HqlPack.getStringEqualPack(wmsStockSn.getSn(), "sn", result); + HqlPack.getStringEqualPack(wmsStockSn.getRefSrc(), "refSrc", result); + HqlPack.getNumEqualPack(wmsStockSn.getPrinted(), "printed", result); getStringBuilderPack(wmsStockSn, result); return result.toString(); @@ -863,17 +875,18 @@ public class WmsHqlPack { return result.toString(); } + /** - *内部单据:库存移动单主表唯一性查询 + * 内部单据:库存移动单主表唯一性查询 * @param wmsMoveMaster * @return */ - public static String packWmsMoveMasterUnique(WmsMoveMaster wmsMoveMaster){ + public static String packWmsMoveMasterUnique(WmsMoveMaster wmsMoveMaster) { StringBuffer result = new StringBuffer(); HqlPack.getStringEqualPack(wmsMoveMaster.getOrderNo(), "orderNo", result); - HqlPack.getNumNOEqualPack(wmsMoveMaster.getId(),"id",result); - HqlPack.getNumEqualPack(wmsMoveMaster.getOrderStatus(),"orderStatus",result); + HqlPack.getNumNOEqualPack(wmsMoveMaster.getId(), "id", result); + HqlPack.getNumEqualPack(wmsMoveMaster.getOrderStatus(), "orderStatus", result); getStringBuilderPack(wmsMoveMaster, result); @@ -885,11 +898,11 @@ public class WmsHqlPack { * @param wmsMoveMaster * @return */ - public static String packHqlWmsMoveMaster(WmsMoveMaster wmsMoveMaster){ + public static String packHqlWmsMoveMaster(WmsMoveMaster wmsMoveMaster) { StringBuffer result = new StringBuffer(); HqlPack.getStringEqualPack(wmsMoveMaster.getOrderNo(), "orderNo", result); - HqlPack.getNumEqualPack(wmsMoveMaster.getOrderStatus(),"orderStatus",result); + HqlPack.getNumEqualPack(wmsMoveMaster.getOrderStatus(), "orderStatus", result); HqlPack.getStringEqualPack(wmsMoveMaster.getTransTypeCode(), "transTypeCode", result); getStringBuilderPack(wmsMoveMaster, result); @@ -901,7 +914,7 @@ public class WmsHqlPack { * @param wmsMoveDetails * @return */ - public static String packHqlWmsMoveDetails(WmsMoveDetails wmsMoveDetails){ + public static String packHqlWmsMoveDetails(WmsMoveDetails wmsMoveDetails) { StringBuffer result = new StringBuffer(); HqlPack.getStringEqualPack(wmsMoveDetails.getOrderNo(), "orderNo", result); @@ -911,15 +924,15 @@ public class WmsHqlPack { HqlPack.getStringEqualPack(wmsMoveDetails.getVendorNo(), "vendorNo", result); HqlPack.getStringEqualPack(wmsMoveDetails.getCustNo(), "custNo", result); HqlPack.getStringEqualPack(wmsMoveDetails.getUnit(), "unit", result); - HqlPack.getStringEqualPack(wmsMoveDetails.getSrcWhNo(),"srcWhNo",result); - HqlPack.getStringEqualPack(wmsMoveDetails.getDestWhNo(),"destWhNo",result); - HqlPack.getStringEqualPack(wmsMoveDetails.getSrcZoneNo(),"srcZoneNo",result); - HqlPack.getStringEqualPack(wmsMoveDetails.getDestZoneNo(),"destZoneNo",result); - HqlPack.getStringEqualPack(wmsMoveDetails.getSrcLocateNo(),"srcLocateNo",result); - HqlPack.getStringEqualPack(wmsMoveDetails.getDestLocateNo(),"destLocateNo",result); - HqlPack.getNumEqualPack(wmsMoveDetails.getItemStatus(),"itemStatus",result); - HqlPack.getNumEqualPack(wmsMoveDetails.getRefType(),"refType",result); - HqlPack.getStringLikerPack(wmsMoveDetails.getRefSrc(),"refSrc",result); + HqlPack.getStringEqualPack(wmsMoveDetails.getSrcWhNo(), "srcWhNo", result); + HqlPack.getStringEqualPack(wmsMoveDetails.getDestWhNo(), "destWhNo", result); + HqlPack.getStringEqualPack(wmsMoveDetails.getSrcZoneNo(), "srcZoneNo", result); + HqlPack.getStringEqualPack(wmsMoveDetails.getDestZoneNo(), "destZoneNo", result); + HqlPack.getStringEqualPack(wmsMoveDetails.getSrcLocateNo(), "srcLocateNo", result); + HqlPack.getStringEqualPack(wmsMoveDetails.getDestLocateNo(), "destLocateNo", result); + HqlPack.getNumEqualPack(wmsMoveDetails.getItemStatus(), "itemStatus", result); + HqlPack.getNumEqualPack(wmsMoveDetails.getRefType(), "refType", result); + HqlPack.getStringLikerPack(wmsMoveDetails.getRefSrc(), "refSrc", result); getStringBuilderPack(wmsMoveDetails, result); @@ -931,7 +944,7 @@ public class WmsHqlPack { * @param wmsMoveSn * @return */ - public static String packHqlWmsMoveSn(WmsMoveSn wmsMoveSn){ + public static String packHqlWmsMoveSn(WmsMoveSn wmsMoveSn) { StringBuffer result = new StringBuffer(); HqlPack.getStringEqualPack(wmsMoveSn.getOrderNo(), "orderNo", result); @@ -1153,7 +1166,7 @@ public class WmsHqlPack { * 作业流程分页查询 * @return */ - public static String packHqlWmsActionGroup(WmsActionGroup wmsActionGroup){ + public static String packHqlWmsActionGroup(WmsActionGroup wmsActionGroup) { StringBuffer result = new StringBuffer(); //查询参数封装 agDescC;agNameC @@ -1168,7 +1181,7 @@ public class WmsHqlPack { * 作业流程明细分页查询 * @return */ - public static String packHqlWmsActionGroupDetails(WmsActionGroupDetails wmsActionGroupDetails){ + public static String packHqlWmsActionGroupDetails(WmsActionGroupDetails wmsActionGroupDetails) { StringBuffer result = new StringBuffer(); //查询参数封装 @@ -1222,19 +1235,19 @@ public class WmsHqlPack { StringBuffer result = new StringBuffer(); if (wmsActionLog.getStartTimeStart() != null || wmsActionLog.getStartTimeEnd() != null) { - HqlPack.timeBuilder(wmsActionLog.getStartTimeStart(),wmsActionLog.getStartTimeEnd(), + HqlPack.timeBuilder(wmsActionLog.getStartTimeStart(), wmsActionLog.getStartTimeEnd(), "startTime", result, true); } else if (wmsActionLog.getEndTimeStart() != null || wmsActionLog.getEndTimeEnd() != null) { - HqlPack.timeBuilder(wmsActionLog.getEndTimeStart(),wmsActionLog.getEndTimeEnd(), + HqlPack.timeBuilder(wmsActionLog.getEndTimeStart(), wmsActionLog.getEndTimeEnd(), "endTime", result, true); } // 作业流程编号 - HqlPack.getNumEqualPack(wmsActionLog.getAgId(),"agId",result); + HqlPack.getNumEqualPack(wmsActionLog.getAgId(), "agId", result); // 作业流程名称 - HqlPack.getStringLikerPack(wmsActionLog.getAgNameC(),"agNameC",result); + HqlPack.getStringLikerPack(wmsActionLog.getAgNameC(), "agNameC", result); // 单据编号 - HqlPack.getStringLikerPack(wmsActionLog.getOrderNo(),"orderNo",result); + HqlPack.getStringLikerPack(wmsActionLog.getOrderNo(), "orderNo", result); getStringBuilderPack(wmsActionLog, result); @@ -1246,12 +1259,12 @@ public class WmsHqlPack { * @param wmsActionLogDetails * @return */ - public static String packHqlWmsActionLogDetails(WmsActionLogDetails wmsActionLogDetails){ + public static String packHqlWmsActionLogDetails(WmsActionLogDetails wmsActionLogDetails) { StringBuffer result = new StringBuffer(); //作业流程id(对应作业记录明细里自增的id) - HqlPack.getNumEqualPack(wmsActionLogDetails.getAlId(),"alId",result); - HqlPack.getNumEqualPack(wmsActionLogDetails.getSeq(),"seq",result); + HqlPack.getNumEqualPack(wmsActionLogDetails.getAlId(), "alId", result); + HqlPack.getNumEqualPack(wmsActionLogDetails.getSeq(), "seq", result); HqlPack.getNumEqualPack(wmsActionLogDetails.getOkSeq(), "okSeq", result); HqlPack.getNumEqualPack(wmsActionLogDetails.getNgSeq(), "ngSeq", result); HqlPack.getNumEqualPack(wmsActionLogDetails.getValueType(), "valueType", result); @@ -1283,14 +1296,15 @@ public class WmsHqlPack { } /** - * 按moveNo 取最后一笔插入的数据 + * 按moveNo 取最后一笔插入的数据 + * * @param wmsMoveSn * @return */ public static String packHqlLastWmsMoveSn(WmsMoveSn wmsMoveSn) { StringBuffer result = new StringBuffer(); - HqlPack.getStringEqualPack(wmsMoveSn.getOrderNo(),"orderNo", result); + HqlPack.getStringEqualPack(wmsMoveSn.getOrderNo(), "orderNo", result); getStringBuilderPack(wmsMoveSn, result); HqlPack.getOrderByPack(new Object[]{2}, new String[]{"createDatetime"}, result); @@ -1298,53 +1312,57 @@ public class WmsHqlPack { } /** - * 根据条件查询库存条码信息 + * 根据条件查询库存条码信息 + * * @param wmsStockSn * @return */ public static String packHqlWmsStockSn(WmsStockSn wmsStockSn) { StringBuffer result = new StringBuffer(); - HqlPack.getStringEqualPack(wmsStockSn.getSn(),"sn", result); - HqlPack.getStringEqualPack(wmsStockSn.getLocateNo(),"locateNo", result); - HqlPack.getNumEqualPack(wmsStockSn.getSnStatus(),"snStatus", result); - HqlPack.getNumEqualPack(wmsStockSn.getQcStatus(),"qcStatus", result); + HqlPack.getStringEqualPack(wmsStockSn.getSn(), "sn", result); + HqlPack.getStringEqualPack(wmsStockSn.getLocateNo(), "locateNo", result); + HqlPack.getNumEqualPack(wmsStockSn.getSnStatus(), "snStatus", result); + HqlPack.getNumEqualPack(wmsStockSn.getQcStatus(), "qcStatus", result); getStringBuilderPack(wmsStockSn, result); return result.toString(); } /** - * 根据条件模糊查询库存条码信息 + * 根据条件模糊查询库存条码信息 + * * @param wmsStockSn * @return */ public static String packHqlWmsStockSnLike(WmsStockSn wmsStockSn) { StringBuffer result = new StringBuffer(); - HqlPack.getStringLikerPack(wmsStockSn.getSn(),"sn", result); + HqlPack.getStringLikerPack(wmsStockSn.getSn(), "sn", result); getStringBuilderPack(wmsStockSn, result); HqlPack.getOrderByPack(new Object[]{2}, new String[]{"createDatetime"}, result); return result.toString(); } /** - * 根据条件查询库存信息 + * 根据条件查询库存信息 + * * @param wmsStockQuan * @return */ public static String packHqlWmsStockQuan(WmsStockQuan wmsStockQuan) { StringBuffer result = new StringBuffer(); - HqlPack.getStringEqualPack(wmsStockQuan.getPartNo(),"partNo", result); - HqlPack.getStringEqualPack(wmsStockQuan.getLocateNo(),"locateNo", result); + HqlPack.getStringEqualPack(wmsStockQuan.getPartNo(), "partNo", result); + HqlPack.getStringEqualPack(wmsStockQuan.getLocateNo(), "locateNo", result); getStringBuilderPack(wmsStockQuan, result); return result.toString(); } /** - * 根据用户角色id列表查询数据权限信息 + * 根据用户角色id列表查询数据权限信息 + * * @return */ public static String packHqlWmsDataAuth(WmsDataAuth dataAuth, List roleIds) { StringBuffer result = new StringBuffer(); - HqlPack.getStringEqualPack(dataAuth.getDataObj() ,"dataObj", result); + HqlPack.getStringEqualPack(dataAuth.getDataObj(), "dataObj", result); String data = String.join(",", roleIds); HqlPack.getInPackString(data, "roleCode", result); getStringBuilderPack(new WmsDataAuth(), result); @@ -1356,11 +1374,11 @@ public class WmsHqlPack { * @param groupDataAuth * @return */ - public static String packHqlWmsTaskDetail(Map> groupDataAuth) { + public static String packHqlWmsTaskDetail(Map> groupDataAuth) { StringBuffer result = new StringBuffer(); Set>> entries = groupDataAuth.entrySet(); //拼sql - entries.stream().filter(o->!Strings.isNullOrEmpty(o.getKey())).forEach(o->{ + entries.stream().filter(o -> !Strings.isNullOrEmpty(o.getKey())).forEach(o -> { List value = o.getValue(); List vList = value.stream().map(x -> x.getDataObjValue()).collect(Collectors.toList()); String data = String.join(",", vList); @@ -1395,10 +1413,10 @@ public class WmsHqlPack { * @param vals * @return */ - public static String packHqlAndIn(BaseBean bean,String columnName,List vals) { + public static String packHqlAndIn(BaseBean bean, String columnName, List vals) { StringBuffer result = new StringBuffer(); String data = String.join(",", vals); - HqlPack.getInPackString(data,columnName,result); + HqlPack.getInPackString(data, columnName, result); getStringBuilderPack(bean, result); return result.toString(); } @@ -1410,14 +1428,14 @@ public class WmsHqlPack { */ public static String packHqlWmsDataAuthFind(WmsDataAuth wmsDataAuth) { StringBuffer result = new StringBuffer(); - if (!Strings.isNullOrEmpty(wmsDataAuth.getRoleCode())){ - HqlPack.getStringEqualPack(wmsDataAuth.getRoleCode(),"roleCode",result); + if (!Strings.isNullOrEmpty(wmsDataAuth.getRoleCode())) { + HqlPack.getStringEqualPack(wmsDataAuth.getRoleCode(), "roleCode", result); } - if (!Strings.isNullOrEmpty(wmsDataAuth.getDataObj())){ - HqlPack.getStringEqualPack(wmsDataAuth.getDataObj(),"dataObj",result); + if (!Strings.isNullOrEmpty(wmsDataAuth.getDataObj())) { + HqlPack.getStringEqualPack(wmsDataAuth.getDataObj(), "dataObj", result); } - if (!Strings.isNullOrEmpty(wmsDataAuth.getDataObjValue())){ - HqlPack.getStringLikerPack(wmsDataAuth.getDataObjValue(),"dataObjValue",result); + if (!Strings.isNullOrEmpty(wmsDataAuth.getDataObjValue())) { + HqlPack.getStringLikerPack(wmsDataAuth.getDataObjValue(), "dataObjValue", result); } getStringBuilderPack(wmsDataAuth, result); return result.toString(); @@ -1437,6 +1455,7 @@ public class WmsHqlPack { /** * 根据条件查询任务生成日志 + * * @param wmsTaskCreateLog * @return */ @@ -1450,21 +1469,35 @@ public class WmsHqlPack { /** * 根据条件查询作业处理组件 + * * @param wmsTransModule * @return */ public static String packHqlWmsTransModule(WmsTransModule wmsTransModule) { StringBuffer result = new StringBuffer(); - if(!Strings.isNullOrEmpty(wmsTransModule.getTmName())){ + if (!Strings.isNullOrEmpty(wmsTransModule.getTmName())) { HqlPack.getStringEqualPack(wmsTransModule.getTmName(), "tmName", result); } - if(!Strings.isNullOrEmpty(wmsTransModule.getCallClass())){ + if (!Strings.isNullOrEmpty(wmsTransModule.getCallClass())) { HqlPack.getStringEqualPack(wmsTransModule.getCallClass(), "callClass", result); } - if(!Strings.isNullOrEmpty(wmsTransModule.getTmDesc())){ + if (!Strings.isNullOrEmpty(wmsTransModule.getTmDesc())) { HqlPack.getStringLikerPack(wmsTransModule.getTmDesc(), "tmDesc", result); } getStringBuilderPack(wmsTransModule, result); return result.toString(); } + + /** + * 根据条件查询系统配置信息 + * @param wmsConfig + * @return + */ + public static String packHqlWmsConfig(WmsConfig wmsConfig) { + StringBuffer result = new StringBuffer(); + HqlPack.getStringEqualPack(wmsConfig.getConfigCode(), "configCode", result); + getStringBuilderPack(wmsConfig, result); + return result.toString(); + } + }