diff --git a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/Material.java b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/Material.java index 0b1ec28..dcdd0ba 100644 --- a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/Material.java +++ b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/bean/Material.java @@ -5,6 +5,7 @@ import cn.estsh.i3plus.pojo.aps.annotation.MainKey; import cn.estsh.i3plus.pojo.aps.annotation.RippleAnnotation; import cn.estsh.i3plus.pojo.aps.common.BaseAPS; import cn.estsh.i3plus.pojo.aps.common.BeanRelation; +import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder; import cn.estsh.i3plus.pojo.aps.holders.EMaterial; import cn.estsh.i3plus.pojo.aps.validator.InsertGroup; import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup; @@ -60,6 +61,11 @@ public class Material extends BaseAPS { @FieldAnnotation(defaultValue = "ONEBYONE") private ApsEnumUtil.REPLENISHMENT_TYPE replType; + @Column(name="GROUP_ID") + @ApiParam(value ="物料组") + @FieldAnnotation(relation = "Material") + private Long groupId; + @Column(name="PURCHASE_LEAD_TIME") @ApiParam(value ="采购提前期") @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION) @@ -151,6 +157,18 @@ public class Material extends BaseAPS { @ApiParam(value ="标签颜色") private String labelColor; + public Material getGroup() { + return BeanRelation.get(this, EMaterial.Group); + } + + public void setGroup(Material material) { + this.groupId = material != null ? material.getId() : 0l; + BeanRelation.set(this, EMaterial.Group, material); + } + + @JsonBackReference + public List getChilds() { return BeanRelation.list(this, EMaterial.Childs); } + @JsonBackReference public List getProductRoutings() { return BeanRelation.list(this, EMaterial.ProductRoutings); diff --git a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/holders/EMaterial.java b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/holders/EMaterial.java index 65cc748..eaa363a 100644 --- a/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/holders/EMaterial.java +++ b/modules/i3plus-pojo-aps/src/main/java/cn/estsh/i3plus/pojo/aps/holders/EMaterial.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.aps.holders; public enum EMaterial { + Group, + Childs, ProductRoutings, OperInputs, OperOutputs, diff --git a/modules/i3plus-pojo-aps/src/main/resources/relations/Material.xml b/modules/i3plus-pojo-aps/src/main/resources/relations/Material.xml index 51da8ba..33c5974 100644 --- a/modules/i3plus-pojo-aps/src/main/resources/relations/Material.xml +++ b/modules/i3plus-pojo-aps/src/main/resources/relations/Material.xml @@ -2,4 +2,6 @@ + + \ No newline at end of file diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseThreadLocal.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseThreadLocal.java index 8420e4b..55c6e7a 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseThreadLocal.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseThreadLocal.java @@ -23,48 +23,48 @@ public class BaseThreadLocal { return new HashMap(); } };*/ - private static final ThreadLocal> DATA_THREAD_LOCAL = ThreadLocal.withInitial(() -> new HashMap<>()); + private static final ThreadLocal> DATA_THREAD_LOCAL = ThreadLocal.withInitial(() -> new HashMap<>()); public static Object getData(String key) { - if(DATA_THREAD_LOCAL.get() != null) { + if (DATA_THREAD_LOCAL.get() != null) { return DATA_THREAD_LOCAL.get().get(key); - }else{ + } else { return null; } } public static String getDataStr(String key) { Object data = getData(key); - if(data != null){ + if (data != null) { return data.toString(); - }else{ + } else { return null; } } public static int getDataInt(String key) { Object data = getData(key); - if(data != null){ + if (data != null) { return Integer.parseInt(data.toString()); - }else{ + } else { return 0; } } public static long getDataLong(String key) { Object data = getData(key); - if(data != null){ + if (data != null) { return Long.parseLong(data.toString()); - }else{ + } else { return 0L; } } public static double getDataDouble(String key) { Object data = getData(key); - if(data != null){ + if (data != null) { return Double.parseDouble(data.toString()); - }else{ + } else { return 0.0; } } @@ -78,8 +78,8 @@ public class BaseThreadLocal { * 手动再次清除线程变量 * 需要在方法后调用,或者通过ascept拦截后进行清空 */ - public static void removeThreadLocal(){ - if(DATA_THREAD_LOCAL != null) { + public static void removeThreadLocal() { + if (DATA_THREAD_LOCAL != null) { if (DATA_THREAD_LOCAL.get() != null) { //清空数据 DATA_THREAD_LOCAL.get().clear(); @@ -89,16 +89,16 @@ public class BaseThreadLocal { } } - public static String getInfo(){ + public static String getInfo() { Thread thread = Thread.currentThread(); return "thead-id:" + thread.getId() + ",thread:" + thread; } - public static void printDetail(){ + public static void printDetail() { LOGGER.info("========本地线程临时数据======="); LOGGER.info("数据数量:{}", DATA_THREAD_LOCAL.get().size()); - for(String key : DATA_THREAD_LOCAL.get().keySet()){ - LOGGER.info("key:{},value:{}",key, DATA_THREAD_LOCAL.get().get(key)); + for (String key : DATA_THREAD_LOCAL.get().keySet()) { + LOGGER.info("key:{},value:{}", key, DATA_THREAD_LOCAL.get().get(key)); } } @@ -107,18 +107,22 @@ public class BaseThreadLocal { public static final String EMP_NAME = "USER_NAME"; //用户名 public static final String ORGANIZE_CODE = "ORGANIZE_CODE"; //组织代码 public static final String LANGUAGE_CODE = "LANGUAGE_CODE"; //语言代码 + /** + * 单点登录标志 + */ + public static final String OSS_LOGIN = "OSS_LOGIN"; - public static boolean isInit(){ + public static boolean isInit() { Object data = getData(INIT_INFO); - if(data != null){ + if (data != null) { return Boolean.parseBoolean(data.toString()); - }else{ + } else { return false; } } //初始化用户数据 - public static void initSessionUserThreadLocal(String empName, String organizeCode,String languageCode){ + public static void initSessionUserThreadLocal(String empName, String organizeCode, String languageCode) { setData(BaseThreadLocal.EMP_NAME, empName); setData(BaseThreadLocal.ORGANIZE_CODE, organizeCode); setData(BaseThreadLocal.LANGUAGE_CODE, languageCode); @@ -126,25 +130,27 @@ public class BaseThreadLocal { } //获取线程中的人员姓名 - public static String getThreadEmpName(){ + public static String getThreadEmpName() { String empName = getDataStr(EMP_NAME); - if(empName == null){ + if (empName == null) { empName = "系统"; } return empName; } + //获取线程中的组织代码 - public static String getThreadOrganizeCode(){ + public static String getThreadOrganizeCode() { String organizeCode = getDataStr(ORGANIZE_CODE); - if(organizeCode == null){ + if (organizeCode == null) { organizeCode = "-1"; } return organizeCode; } + //获取线程中的语言代码 - public static String getThreadLanguageCode(){ + public static String getThreadLanguageCode() { String organizeCode = getDataStr(LANGUAGE_CODE); - if(organizeCode == null){ + if (organizeCode == null) { organizeCode = "CN/zh"; } return organizeCode; diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/ApsEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/ApsEnumUtil.java index 2573b1e..279c6b0 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/ApsEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/ApsEnumUtil.java @@ -471,32 +471,6 @@ public class ApsEnumUtil { } /** - * 锁定时间计算方式 - */ - @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum RES_COMB_LOCK_TYPE { - KEEP_ORIGIN("KEEP_ORIGIN", "各自锁定"), - MAIN_LOCK("MAIN_LOCK", "主资源锁定"), - MAX_ALL_RESOURCE("MAX_ALL_RESOURCE", "最大锁定时间"); - - private String value; - private String description; - - RES_COMB_LOCK_TYPE(String value, String description) { - this.value = value; - this.description = description; - } - - public String getValue() { - return value; - } - - public String getDescription() { - return description; - } - } - - /** * 生产时间计算方法 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -958,8 +932,7 @@ public class ApsEnumUtil { public enum PLAN_TYPE { PREV_SET("", "前设置"), PRODUCE("", "生产"), - POST_SET("", "后设置"), - LOCK("", "锁定"); + POST_SET("", "后设置"); private String value; private String description; 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 70ebd4e..aeaa624 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 @@ -20,20 +20,28 @@ public class CommonEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum SOFT_TYPE { - /** WMS 服务 */ + /** + * WMS 服务 + */ WMS(3, 8200, 10, 102000000L, "i3wms", "仓库管理软件"), SWEB(7, 8800, 19, 108000000L, "i3sweb", "供应商服务"), QMS(5, 0, 0, 0, "i3qms", "质量管理软件"), - /** Mes 服务 */ + /** + * Mes 服务 + */ MES(4, 8300, 11, 103000000L, "i3mes", "生产管理软件"), MES_PCN(6, 8350, 12, 107000000L, "i3mes-pcn", "生产管理软件-节点中心"), - /** PTL 服务 */ + /** + * PTL 服务 + */ PTL(8, 8700, 20, 111000000L, "i3ptl", "亮灯自动拣选"), PTL_PCN(9, 8750, 21, 109000000L, "i3ptl-pcn", "亮灯自动拣选-节点中心"), - /** Block 服务 */ + /** + * Block 服务 + */ FORM(20, 8900, 16, 104000000L, "block-form", "智能表单"), REPORT(21, 8910, 17, 105000000L, "block-report", "智能报表"), WORKFLOW(22, 0, 0, 0, "block-workflow", "智能工作流"), @@ -41,42 +49,66 @@ public class CommonEnumUtil { SOFTSWITCH(24, 8920, 18, 130000000L, "block-softswitch", "软件适配器"), HARDSWITCH(25, 0, 0, 0, "block-hardswitch", "硬件适配器"), - /** LAC 服务 */ + /** + * LAC 服务 + */ LAC(26, 8600, 13, 150000000L, "lac", "连接适配器"), - /** 安灯服务 */ + /** + * 安灯服务 + */ ANDON(27, 8500, 14, 110000000L, "andon", "安灯"), - /** 计划排产服务 */ + /** + * 计划排产服务 + */ APS(28, 8400, 15, 140000000L, "i3aps", "高级计划与排产"), SURFACE(98, 0, 0, 0, "i3surface", "对外服务"), - /** 基础服务 */ + /** + * 基础服务 + */ IMPP(1, 0, 0, 100000000L, "impp-platform", "IMPP平台"), CONSOLE(95, 8010, 0, 0, "impp-console", "服务监控台"), GATEWAY(96, 9000, 0, 0, "impp-gateway", "服务网关"), CLOUD(97, 0, 0, 0, "i3cloud", "微服务"), CENTER(99, 8000, 1, 0, "icloud-server", "注册中心"), - /** 平台服务 */ + /** + * 平台服务 + */ CORE(2, 8100, 4, 101000000L, "i3core", "i3业务平台"), MDM(29, 8150, 22, 0, "i3mdm", "数据中心MDM"), - /** 调试服务 */ + /** + * 调试服务 + */ DEV(9999, 0000, 0, 120000000L, "Development", "系统调试"); - /** 产品ID */ + /** + * 产品ID + */ private int value; - /** 应用默认端口 */ + /** + * 应用默认端口 + */ private int port; - /** 应用默认雪花DataBaseId(0-31)共32 个存储区 */ + /** + * 应用默认雪花DataBaseId(0-31)共32 个存储区 + */ private int snowflakeId; - /** 产品代码 */ + /** + * 产品代码 + */ private String code; - /** 顶级菜单代码 */ + /** + * 顶级菜单代码 + */ private long menuRootId; - /** 产品描述 */ + /** + * 产品描述 + */ private String description; SOFT_TYPE(int value, int port, int snowflakeId, long menuRootCode, String code, String description) { @@ -177,6 +209,7 @@ public class CommonEnumUtil { } return null; } + public synchronized static int descriptionOfValue(String desc) { int tmp = IMPP.value; for (int i = 0; i < values().length; i++) { @@ -187,6 +220,7 @@ public class CommonEnumUtil { } return tmp; } + public static int descOf(String desc) { int tmp = IMPP.value; for (int i = 0; i < values().length; i++) { @@ -253,7 +287,7 @@ public class CommonEnumUtil { return boolIntVal == 1 ? TRUE_OR_FALSE.TRUE.getValue() : TRUE_OR_FALSE.FALSE.getValue(); } - public static TRUE_OR_FALSE valueOfEnum(int value){ + public static TRUE_OR_FALSE valueOfEnum(int value) { for (int i = 0; i < values().length; i++) { if (values()[i].value == value) { return values()[i]; @@ -262,13 +296,18 @@ public class CommonEnumUtil { return null; } - public static String valueOfDescription(int val) {return valueOf(val);} - public static int descriptionOfValue(String desc) {return descOf(desc);} + public static String valueOfDescription(int val) { + return valueOf(val); + } + + public static int descriptionOfValue(String desc) { + return descOf(desc); + } public static boolean valueOfBoolean(int val) { - if(val == TRUE.value){ + if (val == TRUE.value) { return true; - }else { + } else { return false; } } @@ -348,6 +387,7 @@ public class CommonEnumUtil { } return tmp; } + public static int descOf(String desc) { int tmp = COMMON.value; for (int i = 0; i < values().length; i++) { @@ -357,9 +397,11 @@ public class CommonEnumUtil { } return tmp; } + public static String valueOfDescription(int val) { return valueOf(val); } + public static int descriptionOfValue(String val) { return descOf(val); } @@ -453,7 +495,7 @@ public class CommonEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum USER_STATUS { -// EMPTY(1, "fa fa-success cell-fa fa-check", "正常"), + // EMPTY(1, "fa fa-success cell-fa fa-check", "正常"), // FREEZE(2, "冻结", "冻结_FREEZE"), // ABERRANT(3, "异常", "异常_ABERRANT"), // RESIGNATION(4, "离职", "离职_RESIGNATION"), @@ -508,6 +550,7 @@ public class CommonEnumUtil { return tmp; } } + /** * 数据类型 * 1库存移动数据 @@ -569,6 +612,7 @@ public class CommonEnumUtil { return tmp; } } + @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum USER_INFO_STATUS { INCUMBENT(1, "正常", "正常_NORMAL"), @@ -619,9 +663,9 @@ public class CommonEnumUtil { /** * 数据状态 - * 1 启用 - * 2 禁用 - * 3 锁定 + * 1 启用 + * 2 禁用 + * 3 锁定 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum DATA_STATUS { @@ -711,7 +755,7 @@ public class CommonEnumUtil { return tmp; } - public static METHOD_LEVEL get(int id){ + public static METHOD_LEVEL get(int id) { for (int i = 0; i < values().length; i++) { if (values()[i].value == id) { return values()[i]; @@ -805,9 +849,9 @@ public class CommonEnumUtil { /** * 父节点配置 */ - public enum PARENT{ + public enum PARENT { - DEFAULT(-1L,"根节点"); + DEFAULT(-1L, "根节点"); private Long value = -1L; private String description = null; @@ -876,9 +920,9 @@ public class CommonEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum CLOUD_APP_STATUS { - UP(1,"UP" ,"在线"), - DOWN(2, "DOWN","断线"), - RESTRICTED(3,"RESTRICTED" ,"受限"); + UP(1, "UP", "在线"), + DOWN(2, "DOWN", "断线"), + RESTRICTED(3, "RESTRICTED", "受限"); private int value; private String code; @@ -991,6 +1035,7 @@ public class CommonEnumUtil { /** * -1 未识别操作系统 + * * @param desc * @return */ @@ -1051,6 +1096,7 @@ public class CommonEnumUtil { } return tmp; } + public static String valueOfDescription(int val) { return valueOf(val); } @@ -1092,6 +1138,7 @@ public class CommonEnumUtil { this.value = value; this.description = description; } + public static CONTENT_TYPE valueOfContenType(String val) { CONTENT_TYPE tmp = null; for (int i = 0; i < values().length; i++) { @@ -1128,10 +1175,10 @@ public class CommonEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum HTTP_METHOD_TYPE { - GET(1,"GET" ,"GET"), - POST(2, "POST","POST"), - DELETE(3, "DELETE","DELETE"), - PUT(4, "PUT","PUT"); + GET(1, "GET", "GET"), + POST(2, "POST", "POST"), + DELETE(3, "DELETE", "DELETE"), + PUT(4, "PUT", "PUT"); private int value; private String code; @@ -1210,13 +1257,13 @@ public class CommonEnumUtil { * 变量类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum BASIS_TYPE { + public enum BASIS_TYPE { INT(1, "int"), DOUBLE(2, "double"), LONG(3, "long"), FLOAT(4, "float"), CHAR(5, "char"), - BOOLEAN(6,"boolean"), + BOOLEAN(6, "boolean"), BYTE(7, "byte"), SHORT(8, "short"); @@ -1329,14 +1376,14 @@ public class CommonEnumUtil { TEXT(200, "TEXT", "文本"), NUMBER(210, "NUMBER", "数字"), PASSWORD(230, "PASSWORD", "密码"), - DATE_TIME(300, "DATE", "日期",SQL_WHERE.BETWEEN), + DATE_TIME(300, "DATE", "日期", SQL_WHERE.BETWEEN), // DATE(300, "DATE", "日期(yyyy-MM-dd)"), // DATE_TIME(310, "DATE_TIME", "时间(yyyy-MM-dd hh:mm:ss)"), // ELEMENT(700, "DICT_SELECT", "元素"), DICTIONARY(800, "DICT_SELECT", "字典"), CASCADE(900, "CASCADE", "级联"), PICK_UP(1000, "PICK_UP", "拾取"), - INTERVAL(1100, "INTERVAL", "区间",SQL_WHERE.INTERVAL); + INTERVAL(1100, "INTERVAL", "区间", SQL_WHERE.INTERVAL); //FILE(400, "file", "文件"), //IMAGE(410, "image", "image"), //OFF(500, "color", "颜色"), @@ -1440,7 +1487,7 @@ public class CommonEnumUtil { MORE(20, " > ", "大于"), LESS(30, " < ", "小于"), MORE_OR_EQUAL(21, " >= ", "大于等于"), - LESS_OR_EQUAL (31, " <= ", "小于等于"), + LESS_OR_EQUAL(31, " <= ", "小于等于"), LIKE(40, " LIKE ", "全模糊"), START_LIKE(41, " LIKE ", "前模糊"), END_LIKE(52, " LIKE ", "后模糊"), @@ -1531,7 +1578,7 @@ public class CommonEnumUtil { private int value; private String description; - private MiSS_RESOURCE_SOURCE(int value, String description) { + private MiSS_RESOURCE_SOURCE(int value, String description) { this.value = value; this.description = description; } @@ -1606,7 +1653,7 @@ public class CommonEnumUtil { */ private Class clzFullName; /** - * 属性类型 对应的 控件类型 + * 属性类型 对应的 控件类型 */ private PROPERTY_CONTROL_TYPE controlType; /** @@ -1622,8 +1669,8 @@ public class CommonEnumUtil { */ private String defaultValue; - private PROPERTY_TYPE(int value, String code, String description,String classPath,Class clzFullName, - PROPERTY_CONTROL_TYPE controlType,SQL_WHERE defaultWhere) { + private PROPERTY_TYPE(int value, String code, String description, String classPath, Class clzFullName, + PROPERTY_CONTROL_TYPE controlType, SQL_WHERE defaultWhere) { this.value = value; this.code = code; this.description = description; @@ -1633,8 +1680,8 @@ public class CommonEnumUtil { this.defaultWhere = defaultWhere; } - private PROPERTY_TYPE(int value, String code, String description,String classPath,Class clzFullName, - PROPERTY_CONTROL_TYPE controlType,SQL_WHERE defaultWhere,String defaultValue) { + private PROPERTY_TYPE(int value, String code, String description, String classPath, Class clzFullName, + PROPERTY_CONTROL_TYPE controlType, SQL_WHERE defaultWhere, String defaultValue) { this.value = value; this.code = code; this.description = description; @@ -1646,8 +1693,8 @@ public class CommonEnumUtil { this.defaultFormat = defaultFormat; } - private PROPERTY_TYPE(int value, String code, String description,String classPath,Class clzFullName, - PROPERTY_CONTROL_TYPE controlType,SQL_WHERE defaultWhere,String defaultValue,String defaultFormat) { + private PROPERTY_TYPE(int value, String code, String description, String classPath, Class clzFullName, + PROPERTY_CONTROL_TYPE controlType, SQL_WHERE defaultWhere, String defaultValue, String defaultFormat) { this.value = value; this.code = code; this.description = description; @@ -1813,11 +1860,11 @@ public class CommonEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum DATA_SOURCE_TYPE { - SOURCE_MARIA_DB(100, "MariaDB", "MariaDB 10.1","com.mysql.jdbc.Driver",3306,null), - SOURCE_SQL_SERVER(200, "SQL Server", "SQL Server 2017","com.microsoft.sqlserver.jdbc.SQLServerDriver",1433,"dbo"), - SOURCE_ORACLE(300, "Oracle", "Oralce 12C","oracle.jdbc.driver.OracleDriver",1521,null), - SOURCE_POSTGRE_SQL(400, "PostgreSql", "PostgreSql 10.5","org.postgresql.Driver",5432,"public"), - SOURCE_SAP_HANA(500, "SapHana", "SapHana","com.sap.db.jdbc.Driver",39015,null); + SOURCE_MARIA_DB(100, "MariaDB", "MariaDB 10.1", "com.mysql.jdbc.Driver", 3306, null), + SOURCE_SQL_SERVER(200, "SQL Server", "SQL Server 2017", "com.microsoft.sqlserver.jdbc.SQLServerDriver", 1433, "dbo"), + SOURCE_ORACLE(300, "Oracle", "Oralce 12C", "oracle.jdbc.driver.OracleDriver", 1521, null), + SOURCE_POSTGRE_SQL(400, "PostgreSql", "PostgreSql 10.5", "org.postgresql.Driver", 5432, "public"), + SOURCE_SAP_HANA(500, "SapHana", "SapHana", "com.sap.db.jdbc.Driver", 39015, null); private int value; private String code; @@ -1826,7 +1873,7 @@ public class CommonEnumUtil { private int defaultPort; private String defaultSchemaPattern; - private DATA_SOURCE_TYPE (int value, String code, String description,String driverClassName,int port,String defaultSchemaPattern) { + private DATA_SOURCE_TYPE(int value, String code, String description, String driverClassName, int port, String defaultSchemaPattern) { this.value = value; this.code = code; this.description = description; @@ -1910,51 +1957,51 @@ public class CommonEnumUtil { } public String getSchemaPattern(String schema) { - if(this.equals(SOURCE_SAP_HANA)){ + if (this.equals(SOURCE_SAP_HANA)) { return schema; } return defaultSchemaPattern; } - public String getJDBCUrl(String database,String host,Integer port){ - if(this.getValue() == SOURCE_MARIA_DB.getValue()){ - return getJDBCUrlMySQL(database,host,port); - }else if(this.getValue() == SOURCE_ORACLE.getValue()){ - return getJDBCUrlOracle(database,host,port); - }else if(this.getValue() == SOURCE_POSTGRE_SQL.getValue()){ - return getJDBCUrlPostgreSQL(database,host,port); - }else if(this.getValue() == SOURCE_SQL_SERVER.getValue()){ - return getJDBCUrlSQLServer(database,host,port); - }else if(this.getValue() == SOURCE_SAP_HANA.getValue()){ - return getJDBCUrlSapHana(database,host,port); + public String getJDBCUrl(String database, String host, Integer port) { + if (this.getValue() == SOURCE_MARIA_DB.getValue()) { + return getJDBCUrlMySQL(database, host, port); + } else if (this.getValue() == SOURCE_ORACLE.getValue()) { + return getJDBCUrlOracle(database, host, port); + } else if (this.getValue() == SOURCE_POSTGRE_SQL.getValue()) { + return getJDBCUrlPostgreSQL(database, host, port); + } else if (this.getValue() == SOURCE_SQL_SERVER.getValue()) { + return getJDBCUrlSQLServer(database, host, port); + } else if (this.getValue() == SOURCE_SAP_HANA.getValue()) { + return getJDBCUrlSapHana(database, host, port); } return null; } - public String getJDBCUrl(String database,String host,Integer port,String instanceName){ - if(this.getValue() == SOURCE_MARIA_DB.getValue()){ - return getJDBCUrlMySQL(database,host,port); - }else if(this.getValue() == SOURCE_ORACLE.getValue()){ - return getJDBCUrlOracle(database,host,port); - }else if(this.getValue() == SOURCE_POSTGRE_SQL.getValue()){ - return getJDBCUrlPostgreSQL(database,host,port); - }else if(this.getValue() == SOURCE_SQL_SERVER.getValue()){ - return getJDBCUrlSQLServer(database,host,port,instanceName); + public String getJDBCUrl(String database, String host, Integer port, String instanceName) { + if (this.getValue() == SOURCE_MARIA_DB.getValue()) { + return getJDBCUrlMySQL(database, host, port); + } else if (this.getValue() == SOURCE_ORACLE.getValue()) { + return getJDBCUrlOracle(database, host, port); + } else if (this.getValue() == SOURCE_POSTGRE_SQL.getValue()) { + return getJDBCUrlPostgreSQL(database, host, port); + } else if (this.getValue() == SOURCE_SQL_SERVER.getValue()) { + return getJDBCUrlSQLServer(database, host, port, instanceName); } return null; } - public static DATA_SOURCE_TYPE getDataSourceURL(String databaseProductName){ - if(StringUtils.isNotBlank(databaseProductName)){ - if(databaseProductName.indexOf(":mysql:") != -1){ + public static DATA_SOURCE_TYPE getDataSourceURL(String databaseProductName) { + if (StringUtils.isNotBlank(databaseProductName)) { + if (databaseProductName.indexOf(":mysql:") != -1) { return SOURCE_MARIA_DB; - }else if(databaseProductName.indexOf(":oracle:") != -1){ + } else if (databaseProductName.indexOf(":oracle:") != -1) { return SOURCE_ORACLE; - }else if(databaseProductName.indexOf(":postgresql:") != -1){ + } else if (databaseProductName.indexOf(":postgresql:") != -1) { return SOURCE_POSTGRE_SQL; - }else if(databaseProductName.indexOf(":sqlserver:") != -1){ + } else if (databaseProductName.indexOf(":sqlserver:") != -1) { return SOURCE_SQL_SERVER; - }else if(databaseProductName.indexOf(":sap:") != -1){ + } else if (databaseProductName.indexOf(":sap:") != -1) { return SOURCE_SAP_HANA; } } @@ -1963,9 +2010,9 @@ public class CommonEnumUtil { // cn.estsh.i3plus.mes.pcn.util.BsJdbcTemplateConfigTest - private String getJDBCUrlMySQL(String database,String host,Integer port){ + private String getJDBCUrlMySQL(String database, String host, Integer port) { // 针对mysql 8.0 先加上allowPublicKeyRetrieval 赋予默认时区CST - return "jdbc:mysql://"+host+":"+port+"/"+database+ + return "jdbc:mysql://" + host + ":" + port + "/" + database + "?autoReconnect=true" + "&useSSL=false" + "&characterEncoding=utf-8" + @@ -1973,23 +2020,23 @@ public class CommonEnumUtil { "&serverTimezone=CST"; } - private String getJDBCUrlOracle(String database,String host,Integer port){ - return "jdbc:oracle:thin:@"+host+":"+port+":"+database; + private String getJDBCUrlOracle(String database, String host, Integer port) { + return "jdbc:oracle:thin:@" + host + ":" + port + ":" + database; } - private String getJDBCUrlPostgreSQL(String database,String host,Integer port){ - return "jdbc:postgresql://"+host+":"+port+"/"+database; + private String getJDBCUrlPostgreSQL(String database, String host, Integer port) { + return "jdbc:postgresql://" + host + ":" + port + "/" + database; } - private String getJDBCUrlSQLServer(String database,String host,Integer port){ - return "jdbc:sqlserver://" + host + ":" + port + ";database=" + database+";autoReconnect=true"; + private String getJDBCUrlSQLServer(String database, String host, Integer port) { + return "jdbc:sqlserver://" + host + ":" + port + ";database=" + database + ";autoReconnect=true"; } - private String getJDBCUrlSapHana(String database,String host,Integer port){ + private String getJDBCUrlSapHana(String database, String host, Integer port) { return "jdbc:sap://" + host + ":" + port + "?reconnect=true"; } - private String getJDBCUrlSQLServer(String database,String host,Integer port,String instanceName){ + private String getJDBCUrlSQLServer(String database, String host, Integer port, String instanceName) { StringBuffer sb = new StringBuffer(); sb.append("jdbc:sqlserver://").append(host); // 实例 @@ -2010,7 +2057,7 @@ public class CommonEnumUtil { * 变量类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum LICENSE_SOURCE { + public enum LICENSE_SOURCE { LOCAL_SYSTEM_FILE(1, "本地文件"), NETWORK_ESTSH(2, "网络-官方授权"), SENSE_HARDWARE_USB_LOCK(3, "硬件锁"), @@ -2102,8 +2149,8 @@ public class CommonEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum ACTUATOR_ENV_PATH { - PID(1,"/PID" ,"PID"), - JAVA_VERSION(2, "/java.version","jdk版本"); + PID(1, "/PID", "PID"), + JAVA_VERSION(2, "/java.version", "jdk版本"); private int value; private String path; @@ -2202,7 +2249,7 @@ public class CommonEnumUtil { this.description = description; } - private ACTUATOR_METRICS_INFO(int value, String path, String tag, String description) { + private ACTUATOR_METRICS_INFO(int value, String path, String tag, String description) { this.value = value; this.path = path; this.tag = tag; @@ -2216,6 +2263,7 @@ public class CommonEnumUtil { public String getPath() { return path; } + public String getTag() { return tag; } @@ -2276,7 +2324,7 @@ public class CommonEnumUtil { private String code; private String description; - private DATA_SOURCE_STATUS (int value, String code, String description) { + private DATA_SOURCE_STATUS(int value, String code, String description) { this.value = value; this.code = code; this.description = description; @@ -2295,7 +2343,6 @@ public class CommonEnumUtil { } - public static String valueOfCode(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { @@ -2466,7 +2513,6 @@ public class CommonEnumUtil { } - /** * 业务表:库存条码质检状态 */ @@ -2589,7 +2635,7 @@ public class CommonEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum DYNAMIC_DATA_SOURCE_TYPE { - MASTER,NODE + MASTER, NODE } /** @@ -2687,5 +2733,4 @@ public class CommonEnumUtil { } - } 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 1892d1e..bc39e95 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 @@ -445,7 +445,7 @@ public class ImppEnumUtil { MESSAGE_SEND_STATUS() { } - MESSAGE_SEND_STATUS(int value, String description) { + MESSAGE_SEND_STATUS(int value, String description) { this.value = value; this.description = description; } @@ -1032,10 +1032,10 @@ public class ImppEnumUtil { REF_OBJECT(3, "对象"), REF_DICT(4, "字典"); - private int value; - private String description; + private final int value; + private final String description; - private COL_REF_TYPE(int value, String description) { + COL_REF_TYPE(int value, String description) { this.value = value; this.description = description; } @@ -1084,8 +1084,8 @@ public class ImppEnumUtil { WORK_WECHAT(8, "企业微信配置"), SMS(9, "短信配置"); - private int value; - private String description; + private final int value; + private final String description; public int getValue() { return value; @@ -1095,7 +1095,7 @@ public class ImppEnumUtil { return description; } - private SYS_CONFIG_GROUP(int value, String description) { + SYS_CONFIG_GROUP(int value, String description) { this.value = value; this.description = description; } @@ -1118,8 +1118,8 @@ public class ImppEnumUtil { EXTERNAL(2, "外部人员"), URGENT(3, "紧急联系人"), SUPPLIER(4, "供应商"); - private int value; - private String description; + private final int value; + private final String description; public int getValue() { return value; @@ -1129,7 +1129,7 @@ public class ImppEnumUtil { return description; } - private MESSAGE_RECEIVER_TYPE(int value, String description) { + MESSAGE_RECEIVER_TYPE(int value, String description) { this.value = value; this.description = description; } @@ -1222,8 +1222,8 @@ public class ImppEnumUtil { public enum DICTIONARY_GROUP { SYSTEM(1, "系统字典"), EXTERNAL(2, "业务字典"); - private int value; - private String description; + private final int value; + private final String description; public int getValue() { return value; @@ -1233,7 +1233,7 @@ public class ImppEnumUtil { return description; } - private DICTIONARY_GROUP(int value, String description) { + DICTIONARY_GROUP(int value, String description) { this.value = value; this.description = description; } @@ -1254,10 +1254,10 @@ public class ImppEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum LOG_STORAGE { -// MONGO(1, "MongoDB"), + // MONGO(1, "MongoDB"), ELASTICSEARCH(2, "Elasticsearch"); - private int value; - private String description; + private final int value; + private final String description; public int getValue() { return value; @@ -1267,7 +1267,7 @@ public class ImppEnumUtil { return description; } - private LOG_STORAGE(int value, String description) { + LOG_STORAGE(int value, String description) { this.value = value; this.description = description; } @@ -1299,8 +1299,8 @@ public class ImppEnumUtil { public enum CHECK_TEXT { PASSWORD_VERIFY(1, "保存策略"), PASSWORD_LOGIN(2, "登录策略"); - private int value; - private String description; + private final int value; + private final String description; public int getValue() { return value; @@ -1310,7 +1310,7 @@ public class ImppEnumUtil { return description; } - private CHECK_TEXT(int value, String description) { + CHECK_TEXT(int value, String description) { this.value = value; this.description = description; } @@ -1342,8 +1342,8 @@ public class ImppEnumUtil { public enum USER_CUSTOMIZE_CONFIG_TYPE { WEB_TABLE_SHOW_COL(10, "前端表格显示列"); - private int value; - private String description; + private final int value; + private final String description; USER_CUSTOMIZE_CONFIG_TYPE(int value, String description) { this.value = value; @@ -1387,8 +1387,8 @@ public class ImppEnumUtil { public enum USER_EXTERNAL_REF { WORK_WECHAT(10, "企业微信"); - private int value; - private String description; + private final int value; + private final String description; USER_EXTERNAL_REF(int value, String description) { this.value = value; @@ -1429,7 +1429,7 @@ public class ImppEnumUtil { * 用户绑定属性 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum USER_BIND_PROPERTY{ + public enum USER_BIND_PROPERTY { USER_LOGIN_NAME("userId", "登录名称"), USER_NAME("userName", "用户名称"), EMAIL("email", "邮箱"), @@ -1437,10 +1437,10 @@ public class ImppEnumUtil { USER_EMP_NO("empNo", "工号"), USER_WECHAT_NO("userWeChatNo", "微信号"); - private String value; - private String description; + private final String value; + private final String description; - private USER_BIND_PROPERTY(String value, String description) { + USER_BIND_PROPERTY(String value, String description) { this.value = value; this.description = description; } @@ -1638,4 +1638,36 @@ public class ImppEnumUtil { return tmp; } } + + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum AUTH_LOGIN_STRATEGY { + ACCOUNT(10, "Default", "defaultLoginStrategy", "账户密码登录"), + E9(20, "E9", "e9LoginStrategy", "泛微单点登录策略"); + + private final int value; + private final String code; + private final String strategyName; + private final String description; + + AUTH_LOGIN_STRATEGY(int value, String code, String strategyName, String description) { + this.value = value; + this.code = code; + this.strategyName = strategyName; + this.description = description; + } + + public String getCode() { + return code; + } + + public static String codeOfStrategyName(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].strategyName; + } + } + return tmp; + } + } } diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java index ea8bfa9..1cc226f 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java @@ -6524,41 +6524,6 @@ public class MesEnumUtil { } /** - * 扭矩采集 黄枪规则(10-继续采集扭矩,20-发送下一个组合码) - */ - @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum YELLOW_GUN_RULE { - COLLECT_TORQUE(10, "继续采集扭矩"), - SEND_NEXT_GROUP_CODE(20, "发送下一个组合码"); - - private int value; - private String description; - - YELLOW_GUN_RULE(int value, String description) { - this.value = value; - this.description = description; - } - - public int getValue() { - return value; - } - - public String getDescription() { - return description; - } - - 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; - } - } - - /** * 停机类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -8288,4 +8253,38 @@ public class MesEnumUtil { return description; } } + + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PRODUCT_PATTERN_PARAMS { + + MATCH_WORK_ORDER(10, "匹配工单"), + API_WORK_ORDER(20, "读取接口工单"), + SN_WORK_ORDER(30, "获取条码对应工单"); + + private int value; + private String description; + + PRODUCT_PATTERN_PARAMS(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + 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; + } + } } diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java index a19633d..6b19d80 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java @@ -1953,6 +1953,43 @@ public class MesPcnEnumUtil { } /** + * 工单启动池状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum WORK_START_CACHE_STATUS { + + PENDING(10, "待处理"), + PROCESSED(20, "已处理"); + + private int value; + private String description; + + WORK_START_CACHE_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + 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; + } + + } + + /** * MesPlanOrder实体对应的planType值 计划类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -2343,6 +2380,51 @@ public class MesPcnEnumUtil { } /** + * 工步参数类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum STEP_PARAM_TYPE { + + QUALIFIED(10, "number", "数字"), + DEFECTED(20, "text", "字符串"), + SCRAPED(30, "select", "可选值"), + BUTTON(40, "button", "按钮"), + WINDOW(50, "window", "开窗"); + + private int value; + private String code; + private String description; + + STEP_PARAM_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 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; + } + } + + /** * MesRoute 流程的类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -4166,7 +4248,8 @@ public class MesPcnEnumUtil { PRODUCTION_MATERIAS(10, "NO_SORT_CHECK", "无排序校验"), CUSTOMER_SHPING(20, "QUEUE_BAR_CODE", "按产品队列条码校验排序"), OUTWARD_SHIPMENT(30, "PRODUCT_MATERIAL_NUMBER", "按产品物料号校验排序"), - ALLOCATION(40, "SAME_MATERIAL_RACK", "按队列同料架单产品校验排序"); + ALLOCATION(40, "SAME_MATERIAL_RACK", "按队列同料架单产品校验排序"), + NO_CHECK_SN(50, "NO_CHECK_SN", "不校验条码"); private int value; private String code; @@ -6148,4 +6231,310 @@ public class MesPcnEnumUtil { return null; } } + + /** + * 产品位置 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PRODUCE_CATEGORY { + + FL("FL", "DOOR_FRONT_LEFT"), + FR("FR", "DOOR_FRONT_RIGHT"), + RL("RL", "DOOR_REAR_LEFT"), + RR("RR", "DOOR_REAR_RIGHT"); + + private String description; + private String value; + + PRODUCE_CATEGORY(String value, String description) { + this.value = value; + this.description = description; + } + + public String getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value.equals(val)) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static String descriptionOfValue(String description) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(description)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + + /** + * 看板类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum BOARD_TYPE { + BOARD_CAPACITY_JIT("BOARD_CAPACITY_JIT", "产能监控看板(JIT)"), + BOARD_EQU_STATUS("BOARD_EQU_STATUS", "设备状态监控看板(布局模式)"), + BOARD_ORG_HOUR_OEE("BOARD_ORG_HOUR_OEE", " 工厂小时OEE"), + BOARD_WORK_CELL_STATUS("BOARD_WORK_CELL_STATUS", " 工位状态监听看板"), + BOARD_HNC_WC_CAPACITY("BOARD_HNC_WC_CAPACITY", " 生产线产能看板"), + BOARD_MGN_CAPACITY("BOARD_MGN_CAPACITY", "产能看板"), + BOARD_MGN_STATISTICS("BOARD_MGN_STATISTICS", "天津系统看板"), + BOARD_MGN_BJ_MAIN_SCREEN("BOARD_MGN_BJ_MAIN_SCREEN", "北京麦格纳总屏幕看板"), + BOARD_MGN_BJ_EQU_REPAIR("BOARD_MGN_BJ_EQU_REPAIR", "北京麦格纳设备维修看板"); + + private String code; + private String description; + + BOARD_TYPE(String code, String description) { + this.code = code; + this.description = description; + } + + public String getCode() { + return code; + } + + public String getDescription() { + return description; + } + + public static BOARD_TYPE getByCode(String code) { + for (BOARD_TYPE boardType : values()) { + if (boardType.getCode().equals(code)) { + return boardType; + } + } + return null; + } + + public static String valueOfDescription(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; + } + } + + /** + * 运算对象代码 Period capacity + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum OPERATE_OBJECT_CODE { + ORGANIZE_OEE_HOUR("ORGANIZE_OEE_HOUR", "工厂OEE(小时)"), + ORGANIZE_OEE_DAY("ORGANIZE_OEE_DAY", "工厂OEE(天)"), + WORK_CENTER_OEE_DAY("WORK_CENTER_OEE_DAY", "产线OEE(天)"), + EQU_OEE_DAY("EQU_OEE_DAY", "设备OEE(天)"), + PERIOD_CAPACITY("PERIOD_CAPACITY", "时段产能"); + + private String value; + private String description; + + OPERATE_OBJECT_CODE(String value, String description) { + this.value = value; + this.description = description; + } + + public String getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static OPERATE_OBJECT_CODE getByValue(String value) { + for (OPERATE_OBJECT_CODE objectCode : values()) { + if (objectCode.getValue().equals(value)) { + return objectCode; + } + } + return null; + } + + public static String valueOfDescription(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value.equals(val)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum HQL_EXPRESSION { + GT(">", ">", "大于"), + LT("<", "<", "小于"), + EQ("=", "=", "等于"), + NEQ("!=", "!=", "不等于"), + GTE(">=", ">=", "大于等于"), + LTE("<=", "<=", "小于等于"), + LIKE("like", "like", "LIKE"), + IN("in", "in", "包含"); + + private String value; + private String code; + private String description; + + HQL_EXPRESSION(String value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public String getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public String getCode() { + return code; + } + + public static String valueOfDesc(String val) { + for (int i = 0; i < values().length; i++) { + if (values()[i].value.equals(val)) { + return values()[i].description; + } + } + return null; + } + + public static HQL_EXPRESSION codeOf(String value) { + for (int i = 0; i < values().length; i++) { + if (values()[i].value.equals(value)) { + return values()[i]; + } + } + return null; + } + } + + /** + * 排序校验模式 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum TOOLING_ACTION_RECORD_TYPE { + REPLACE(10, "REPLACE", "更换"), + WAREHOUSE(20, "WAREHOUSE", "入库"), + Use(30, "Use", "领用"), + ERROR(40, "ERROR", "异常操作"); + + private int value; + private String code; + private String description; + + TOOLING_ACTION_RECORD_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + 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].description; + } + } + return tmp; + } + + public static String codeOf(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 descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + + public static String valueOfDescription(int val) { + return valueOf(val); + } + } + + /** + * 看板-安灯监控状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum ANDON_QUEUE_STATUS { + CALL(10, "呼叫"), + RESPONSE(20, "响应"), + SOLVE(30, "解决"); + + private int value; + private String description; + + ANDON_QUEUE_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getValueStr() { + return value + ""; + } + + public String getDescription() { + return description; + } + + 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; + } + } + } 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 65c5ee9..278960b 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 @@ -9540,6 +9540,17 @@ public class WmsEnumUtil { public static String valueOfDescription(int val) { return valueOf(val); + + } + + public static int descriptionOfValue(String desc) { + int tmp = ISOLATED_SCRAP.value; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; } } diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesDataMigrationCfg.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesDataMigrationCfg.java new file mode 100644 index 0000000..14a5354 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesDataMigrationCfg.java @@ -0,0 +1,103 @@ +package cn.estsh.i3plus.pojo.mes.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.*; +import java.io.Serializable; + +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Inheritance(strategy = InheritanceType.JOINED) +@Table(name = "MES_DATA_MIGRATION_CFG") +@Api("MES数据迁移配置表") +public class MesDataMigrationCfg extends BaseBean implements Serializable { + + private static final long serialVersionUID = -6445732389643648643L; + + @Column(name = "PCN_CODE") + @ApiParam("PCN节点名称代码") + private String pcnCode; + + @Column(name = "MIG_NAME") + @ApiParam("名称") + private String migName; + + @Column(name = "REMARK") + @ApiParam("描述") + private String remark; + +// @Column(name = "MIGRATION_CYCLE") +// @ApiParam("迁移周期") +// private String migrationCycle; +// +// @Column(name = "NEXT_EXECUTION_TIME") +// @ApiParam("下次执行时间") +// private String nextExecutionTime; + + @Column(name = "SRC_TABLE_NAME") + @ApiParam("来源表名") + private String srcTableName; + + @Column(name = "SRC_QUERY_CONDITIONS") + @ApiParam("来源表查询条件") + private String srcQueryConditions; + + @Column(name = "PROCESS_QTY") + @ApiParam(value = "每次处理行数", example = "0") + private Integer processQty; + + @Column(name = "DEST_TABLE_NAME") + @ApiParam("目标表名") + private String destTableName; + + @Column(name = "IS_PHYSICAL_DELETE") + @ApiParam(value = "是否物理删除", example = "0") + private Integer isPhysicalDelete; + + @Column(name = "LAST_EXECUTION_TIME") + @ApiParam("末次迁移时间") + private String lastExecutionTime; + + @Column(name = "LAST_MIGRATION_QTY") + @ApiParam(value = "末次迁移记录数", example = "0") + private Integer lastMigrationQty; + + @Column(name = "ERROR_MESSAGE") + @ApiParam("执行错误日志") + private String errorMessage; + + + @Transient + @ApiParam(value = "开始时间") + private String mcStartTime; + + @Transient + @ApiParam(value = "结束时间") + private String mcEndTime; + + /*public MesDataMigrationCfg(String migName, String remark, String migrationCycle, String nextExecutionTime, String srcTableName, String srcQueryConditions, Integer processQty, String destTableName, Integer isPhysicalDelete, String lastExecutionTime, Integer lastMigrationQty, String errorMessage, String mcStartTime, String mcEndTime) { + this.migName = migName; + this.remark = remark; + this.migrationCycle = migrationCycle; + this.nextExecutionTime = nextExecutionTime; + this.srcTableName = srcTableName; + this.srcQueryConditions = srcQueryConditions; + this.processQty = processQty; + this.destTableName = destTableName; + this.isPhysicalDelete = isPhysicalDelete; + this.lastExecutionTime = lastExecutionTime; + this.lastMigrationQty = lastMigrationQty; + this.errorMessage = errorMessage; + this.mcStartTime = mcStartTime; + this.mcEndTime = mcEndTime; + }*/ +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEquTaskDetailStandard.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEquTaskDetailStandard.java new file mode 100644 index 0000000..97c9310 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEquTaskDetailStandard.java @@ -0,0 +1,50 @@ +package cn.estsh.i3plus.pojo.mes.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.*; +import java.io.Serializable; + +/** + * @Description: + * @Author: jokelin + * @Date: 2021/1/25 10:47 AM + * @Modify: + */ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Inheritance(strategy = InheritanceType.JOINED) +@Table(name = "MES_EQU_TASK_DETAIL_STANDARD") +@Api("设备作业任务要求") +public class MesEquTaskDetailStandard extends BaseBean implements Serializable { + private static final long serialVersionUID = 8033976649492744091L; + + @Column(name = "TASK_DETAIL_ID") + @ApiParam("任务明细ID") + private Long taskDetailId; + + @Column(name = "ACTION_ITEM") + @ApiParam("操作项") + private String actionItem; + + @Column(name = "ACTION_STANDARD") + @ApiParam("操作标准") + private String actionStandard; + + @Column(name = "ACTION_GUIDE") + @ApiParam("操作指导") + private String actionGuide; + + @Column(name = "ACTION_GUIDE_URL") + @ApiParam("指导文件路径") + private String actionGuideUrl; +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEquTaskPlan.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEquTaskPlan.java index 3454a65..b19137b 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEquTaskPlan.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEquTaskPlan.java @@ -5,17 +5,13 @@ import cn.estsh.i3plus.pojo.base.bean.BaseBean; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; import lombok.EqualsAndHashCode; import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Table; -import javax.persistence.Transient; +import javax.persistence.*; import java.io.Serializable; +import java.util.List; /** * @Description :设备周期作业计划 @@ -78,4 +74,8 @@ public class MesEquTaskPlan extends BaseBean implements Serializable { @ApiParam("作业任务编号") private String taskNo; + @Transient + @ApiParam("设备作业要求") + private List equTaskStandards; + } diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEquTaskPlanStandard.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEquTaskPlanStandard.java new file mode 100644 index 0000000..71b4157 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEquTaskPlanStandard.java @@ -0,0 +1,50 @@ +package cn.estsh.i3plus.pojo.mes.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.*; +import java.io.Serializable; + +/** + * @Description: 设备周期计划作业要求 + * @Author: jokelin + * @Date: 2021/1/25 10:43 AM + * @Modify: + */ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Inheritance(strategy = InheritanceType.JOINED) +@Table(name = "MES_EQU_TASK_PLAN_STANDARD") +@Api("设备周期计划作业要求") +public class MesEquTaskPlanStandard extends BaseBean implements Serializable { + private static final long serialVersionUID = 8284644034068953809L; + + @Column(name = "PLAN_ID") + @ApiParam("计划ID") + private Long planId; + + @Column(name = "ACTION_ITEM") + @ApiParam("操作项") + private String actionItem; + + @Column(name = "ACTION_STANDARD") + @ApiParam("操作标准") + private String actionStandard; + + @Column(name = "ACTION_GUIDE") + @ApiParam("操作指导") + private String actionGuide; + + @Column(name = "ACTION_GUIDE_URL") + @ApiParam("指导文件路径") + private String actionGuideUrl; +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesFurnaceLocation.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesFurnaceLocation.java index e5c4ae0..40df439 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesFurnaceLocation.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesFurnaceLocation.java @@ -42,6 +42,10 @@ public class MesFurnaceLocation extends BaseBean implements Serializable { @ApiParam("炉内位置代码") private String fnLocationNo; + @Column(name = "orientation") + @ApiParam("方向") + private String orientation; + @Column(name = "SEQ") @ApiParam("推荐顺序") private Integer seq; diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesPart.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesPart.java index b689250..9742449 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesPart.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesPart.java @@ -81,7 +81,7 @@ public class MesPart extends BaseBean implements Serializable { @ApiParam("默认工作中心") private String defaultWorkCenter; - @Column(name = "PRODUCE_CTGY_CODE",columnDefinition = "default ''") + @Column(name = "PRODUCE_CTGY_CODE",columnDefinition = "varchar(225) default ''") @ApiParam("产品类型代码") private String produceCategoryCode; diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesQueueOrderDetail.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesQueueOrderDetail.java index 97126f7..3816fc1 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesQueueOrderDetail.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesQueueOrderDetail.java @@ -265,4 +265,21 @@ public class MesQueueOrderDetail extends BaseBean implements Serializable { this.assyNo = assyNo; this.queueType = queueType; } + + public MesQueueOrderDetail(Long id, String orderNo, String vinCode, String produceCategoryCode, String productSn, String serialNumber, + String groupSeq, String queueGroupNo, Integer groupNo, String groupSide, String jisBackflushStatus, + String modifyUser) { + this.id = id; + this.orderNo = orderNo; + this.vinCode = vinCode; + this.produceCategoryCode = produceCategoryCode; + this.productSn = productSn; + this.serialNumber = serialNumber; + this.groupSeq = groupSeq; + this.queueGroupNo = queueGroupNo; + this.groupNo = groupNo; + this.groupSide = groupSide; + this.jisBackflushStatus = jisBackflushStatus; + this.modifyUser = modifyUser; + } } diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MaterialLotModel.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MaterialLotModel.java index bc8a783..6d0c829 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MaterialLotModel.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MaterialLotModel.java @@ -21,16 +21,16 @@ public class MaterialLotModel implements Serializable { private String modifyDateTime; - @ApiParam("生产日期") + @ApiParam("供应商批次") private String dateCode; - @ApiParam("批次") + @ApiParam("收货日期") private String lotNo; @ApiParam("特殊批次") private String fixLotNo; - @ApiParam("生产批次") + @ApiParam("生产日期") private String leftCode; @ApiParam("物料代码") diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MesEquTaskPlanModel.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MesEquTaskPlanModel.java index 0538b0f..0fdaca2 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MesEquTaskPlanModel.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MesEquTaskPlanModel.java @@ -1,12 +1,12 @@ package cn.estsh.i3plus.pojo.mes.model; import cn.estsh.i3plus.pojo.mes.bean.MesEquTaskPlanCfg; +import cn.estsh.i3plus.pojo.mes.bean.MesEquTaskPlanStandard; import io.swagger.annotations.ApiParam; import lombok.Data; -import lombok.Getter; -import lombok.Setter; import java.io.Serializable; +import java.util.List; @Data public class MesEquTaskPlanModel implements Serializable { @@ -73,6 +73,9 @@ public class MesEquTaskPlanModel implements Serializable { @ApiParam("设备周期计划配置") private MesEquTaskPlanCfg planCfg; + @ApiParam("设备作业要求") + private List equTaskStandards; + public MesEquTaskPlanModel() { } diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MesWorkCellStatusModel.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MesWorkCellStatusModel.java index 9507a38..e746bd3 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MesWorkCellStatusModel.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MesWorkCellStatusModel.java @@ -12,4 +12,10 @@ public class MesWorkCellStatusModel { @ApiParam("工作单元代码") private String workCellCode; + @ApiParam("故障类型") + private String alarmName; + + @ApiParam("故障原因") + private String acDesc; + } diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/QueueOrderModel.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/QueueOrderModel.java index cd14cd7..c0a7427 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/QueueOrderModel.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/QueueOrderModel.java @@ -118,6 +118,7 @@ public class QueueOrderModel implements Serializable { @ApiParam("箱条码") private String packageNo; + public String createDatetime; public QueueOrderModel() { } @@ -214,7 +215,8 @@ public class QueueOrderModel implements Serializable { // getPrintSnQueueOrderModel public QueueOrderModel(Long id, Double queDetailSeq, String pgCode, String queueGroupNo, Integer groupNo, String prodCfgCode, Integer isGroupPrinted, String jitActualNo, String prodCfgTypeCode, String produceCategoryCode, Double qty, String vinCode, Double queueSeq, - String groupSeq, String serialNumber, String custProdLineCode, Integer specialFlag, String workType) { + String groupSeq, String serialNumber, String custProdLineCode, Integer specialFlag, String workType, + String createDatetime) { this.id = id; this.queDetailSeq = queDetailSeq; this.pgCode = pgCode; @@ -233,6 +235,7 @@ public class QueueOrderModel implements Serializable { this.custProdLineCode = custProdLineCode; this.specialFlag = specialFlag; this.workType = workType; + this.createDatetime = createDatetime; } public QueueOrderModel(String orderNo, Long id, Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd, diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/TJMgnBoardModel.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/TJMgnBoardModel.java index 3be6af1..c8e1ea9 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/TJMgnBoardModel.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/TJMgnBoardModel.java @@ -87,9 +87,22 @@ public class TJMgnBoardModel extends BaseBean implements Serializable { @ApiParam("产线") private String workCenterCode; + @Transient + @ApiParam("创建时间") + private String createDatetime; + public TJMgnBoardModel() { } + public TJMgnBoardModel(String partNo, String partNameRdd, Integer qcStatus, String workOrderNo, Integer snQty, String createDatetime) { + this.partNo = partNo; + this.partNameRdd = partNameRdd; + this.qcStatus = qcStatus; + this.workOrderNo = workOrderNo; + this.snQty = snQty; + this.createDatetime = createDatetime; + } + public TJMgnBoardModel(String partNo, String partNameRdd, Integer qcStatus, String workOrderNo, Integer snQty) { this.partNo = partNo; this.partNameRdd = partNameRdd; diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/report/ProcessScrapRate.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/report/ProcessScrapRate.java index 5762969..0174515 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/report/ProcessScrapRate.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/report/ProcessScrapRate.java @@ -33,11 +33,15 @@ public class ProcessScrapRate { @ApiParam("报废率") private BigDecimal scrapRate; + @ApiParam("物料号") + private String partNo; - public ProcessScrapRate(String processCode,String processName, String prodCfgTypeCode, String workCellCode) { + + public ProcessScrapRate(String processCode,String processName, String prodCfgTypeCode, String workCellCode,String partNo) { this.processCode = processCode; this.processName = processName; this.prodCfgTypeCode = prodCfgTypeCode; this.workCellCode = workCellCode; + this.partNo = partNo; } } diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/report/ProductStatisticsQueryModel.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/report/ProductStatisticsQueryModel.java index 317587c..a99b138 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/report/ProductStatisticsQueryModel.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/report/ProductStatisticsQueryModel.java @@ -3,6 +3,8 @@ package cn.estsh.i3plus.pojo.mes.model.report; import io.swagger.annotations.ApiParam; import lombok.Data; +import java.util.List; + /** * 生产统计 * @author yumingxing @@ -13,6 +15,12 @@ import lombok.Data; public class ProductStatisticsQueryModel { @ApiParam("生产线") + private List workCenterCodeList; + @ApiParam("工序") + private List processCodeList; + @ApiParam("零件号") + private List partNoList; + @ApiParam("生产线") private String workCenterCode; @ApiParam("工序") private String processCode; diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesDataMigrationCfgRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesDataMigrationCfgRepository.java new file mode 100644 index 0000000..caa29bb --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesDataMigrationCfgRepository.java @@ -0,0 +1,9 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesDataMigrationCfg; +import org.springframework.stereotype.Repository; + +@Repository +public interface MesDataMigrationCfgRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEquTaskDetailStandardRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEquTaskDetailStandardRepository.java new file mode 100644 index 0000000..38c311a --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEquTaskDetailStandardRepository.java @@ -0,0 +1,13 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesEquTaskDetailStandard; + +/** + * @Description: + * @Author: jokelin + * @Date: 2021/1/25 10:49 AM + * @Modify: + */ +public interface MesEquTaskDetailStandardRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEquTaskPlanStandardRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEquTaskPlanStandardRepository.java new file mode 100644 index 0000000..03b79f7 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEquTaskPlanStandardRepository.java @@ -0,0 +1,13 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesEquTaskPlanStandard; + +/** + * @Description: + * @Author: jokelin + * @Date: 2021/1/25 10:46 AM + * @Modify: + */ +public interface MesEquTaskPlanStandardRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesHqlPack.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesHqlPack.java index 490fa74..e61c577 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesHqlPack.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesHqlPack.java @@ -2780,12 +2780,10 @@ public class MesHqlPack { * MES 工位技能 * * @param mesWorkCellSkill - * @param organizeCode * @return */ public static DdlPackBean getMesWorkCellSkill(MesWorkCellSkill mesWorkCellSkill) { DdlPackBean packBean = DdlPackBean.getDdlPackBean(mesWorkCellSkill.getOrganizeCode()); - ; if (!StringUtils.isEmpty(mesWorkCellSkill.getSkillCode())) { DdlPreparedPack.getStringLikerPack(mesWorkCellSkill.getSkillCode(), "skillCode", packBean); } @@ -3593,9 +3591,6 @@ public class MesHqlPack { */ public static DdlPackBean getMesPartContainerCapacity(MesPartContainerCapacity mesPartContainerCapacity) { DdlPackBean packBean = getAllBaseDataByNormalPro(mesPartContainerCapacity, mesPartContainerCapacity.getOrganizeCode()); - if (!StringUtils.isEmpty(mesPartContainerCapacity.getOrganizeCode())) { - DdlPreparedPack.getStringLikerPack(mesPartContainerCapacity.getOrganizeCode(), "organizeCode", packBean); - } if (!StringUtils.isEmpty(mesPartContainerCapacity.getPartNo())) { DdlPreparedPack.getStringLikerPack(mesPartContainerCapacity.getPartNo(), "partNo", packBean); } @@ -3611,23 +3606,32 @@ public class MesHqlPack { /** * MES客户条码规则查询条件封装 * - * @param mesCustomerSnRule - * @return + * @param customerSnRule 客户条码规则查询条件 + * @return 查询数据 */ - public static DdlPackBean getMesCustomerSnRule(MesCustomerSnRule mesCustomerSnRule) { - DdlPackBean packBean = getAllBaseDataByNormalPro(mesCustomerSnRule, mesCustomerSnRule.getOrganizeCode()); - if (!StringUtils.isEmpty(mesCustomerSnRule.getOrganizeCode())) { - DdlPreparedPack.getStringLikerPack(mesCustomerSnRule.getOrganizeCode(), "organizeCode", packBean); + public static DdlPackBean getMesCustomerSnRule(MesCustomerSnRule customerSnRule) { + DdlPackBean packBean = getAllBaseDataByNormalPro(customerSnRule, customerSnRule.getOrganizeCode()); + if (!StringUtils.isEmpty(customerSnRule.getCustomerCode())) { + DdlPreparedPack.getStringLikerPack(customerSnRule.getCustomerCode(), "customerCode", packBean); } - if (!StringUtils.isEmpty(mesCustomerSnRule.getCustomerCode())) { - DdlPreparedPack.getStringLikerPack(mesCustomerSnRule.getCustomerCode(), "customerCode", packBean); + if (!StringUtils.isEmpty(customerSnRule.getCustomerPartNo())) { + DdlPreparedPack.getStringLikerPack(customerSnRule.getCustomerPartNo(), "customerPartNo", packBean); } - if (!StringUtils.isEmpty(mesCustomerSnRule.getCustomerPartNo())) { - DdlPreparedPack.getStringLikerPack(mesCustomerSnRule.getCustomerPartNo(), "customerPartNo", packBean); + if (!StringUtils.isEmpty(customerSnRule.getPartNo())) { + DdlPreparedPack.getStringLikerPack(customerSnRule.getPartNo(), "partNo", packBean); + } + if (!StringUtils.isEmpty(customerSnRule.getLength())) { + DdlPreparedPack.getNumEqualPack(customerSnRule.getLength(), "length", packBean); } return packBean; } + /** + * MES物料上炉模式查询条件封装 + * + * @param partFurnace 物料上炉模式查询条件 + * @return 查询数据 + */ public static DdlPackBean getPartFurnace(MesPartFurnace partFurnace) { DdlPackBean packBean = getAllBaseData(partFurnace.getOrganizeCode()); DdlPreparedPack.getStringLikerPack(partFurnace.getPartNo(), "partNo", packBean); @@ -3717,4 +3721,30 @@ public class MesHqlPack { return packBean; } + /** + * 数据迁移表查询条件封装 + */ + public static DdlPackBean getDataMigrationCfg(MesDataMigrationCfg cfg) { + DdlPackBean packBean = getAllBaseData(cfg.getOrganizeCode()); + DdlPreparedPack.getNumEqualPack(cfg.getIsValid(), "isValid", packBean); + if (!StringUtils.isEmpty(cfg.getPcnCode())) { + DdlPreparedPack.getStringEqualPack(cfg.getPcnCode(), "pcnCode", packBean); + } + if (!StringUtils.isEmpty(cfg.getMigName())) { + DdlPreparedPack.getStringLikerPack(cfg.getMigName(), "migName", packBean); + } + if (!StringUtils.isEmpty(cfg.getRemark())) { + DdlPreparedPack.getStringLikerPack(cfg.getRemark(), "remark", packBean); + } + if (!StringUtils.isEmpty(cfg.getSrcTableName())) { + DdlPreparedPack.getStringEqualPack(cfg.getSrcTableName(), "srcTableName", packBean); + } + if (!StringUtils.isEmpty(cfg.getSrcQueryConditions())) { + DdlPreparedPack.getStringEqualPack(cfg.getSrcQueryConditions(), "srcQueryConditions", packBean); + } + if (!StringUtils.isEmpty(cfg.getDestTableName())) { + DdlPreparedPack.getStringEqualPack(cfg.getDestTableName(), "destTableName", packBean); + } + return packBean; + } } diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/platform/RoleRealmModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/platform/RoleRealmModel.java new file mode 100644 index 0000000..5aae99e --- /dev/null +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/platform/RoleRealmModel.java @@ -0,0 +1,25 @@ +package cn.estsh.i3plus.pojo.model.platform; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.apache.shiro.realm.Realm; + +/** + * @author Wynne.Lu + * @date 2021/1/19 下午1:29 + * @desc + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class RoleRealmModel { + + private Realm userRealm; + + private Realm saRealm; + + private Realm adminRealm; +} diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/platform/SystemLoginModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/platform/SystemLoginModel.java new file mode 100644 index 0000000..32c8d93 --- /dev/null +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/platform/SystemLoginModel.java @@ -0,0 +1,40 @@ +package cn.estsh.i3plus.pojo.model.platform; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author Wynne.Lu + * @date 2021/1/18 上午10:56 + * @desc 系统登录模型 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@Api("系统登录模型") +public class SystemLoginModel { + + @ApiParam(value = "登录名") + private String loginName; + + @ApiParam(value = "登录密码") + private String loginPwd; + + @ApiParam(value = "语言代码") + private String languageCode; + + @ApiParam(value = "设备id") + private String deviceId; + + @ApiParam(value = "单点登录策略") + private String loginStrategy; + + @ApiParam(value = "app Id") + private String appId; + +} diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/WmsActionResponseBean.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/WmsActionResponseBean.java index 50cbbdf..f105ce9 100644 --- a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/WmsActionResponseBean.java +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/WmsActionResponseBean.java @@ -125,6 +125,9 @@ public class WmsActionResponseBean implements Serializable { @ApiParam(value = "是否允许重置") private Integer isResetAble; + @ApiParam(value = "是否重置") + private Integer isReset; + public WmsActionResponseBean(Boolean codeStatus, String message) { this.codeStatus = codeStatus; this.message = message; @@ -155,4 +158,7 @@ public class WmsActionResponseBean implements Serializable { this.codeStatus = codeStatus; } + public int getIsResetVal() { + return this.isReset == null ? 0 : this.isReset; + } } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java index 0acd5ff..0f5b410 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java @@ -753,7 +753,7 @@ public class WmsDocMovementDetails extends BaseBean { public WmsDocMovementDetails(String organizeCode, String workOrderCode, String orderNo, Integer moveType, Integer busiType, String item, String partNo, String partNameRdd, String unit, Double qty, - Integer isSn, Integer orderMasterStatus, String createUser, String createDatetime, String seqNo) { + Integer isSn, Integer orderMasterStatus, String createUser, String createDatetime, String seqNo, String assignDateCode) { this.organizeCode = organizeCode; this.workOrderCode = workOrderCode; this.orderNo = orderNo; @@ -769,6 +769,7 @@ public class WmsDocMovementDetails extends BaseBean { this.createUser = createUser; this.createDatetime = createDatetime; this.seqNo = seqNo; + this.assignDateCode = assignDateCode; } public WmsDocMovementDetails(String orderNo, String partNo, String custPartNo, String srcZoneNo, String destZoneNo, String destLocateNo, Double qty, Double pickQty, String createDatetime, Integer orderStatus, String createUser) { diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPart.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPart.java index 6fc02ee..cbcbc49 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPart.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPart.java @@ -8,8 +8,6 @@ import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; import lombok.EqualsAndHashCode; import org.hibernate.annotations.ColumnDefault; import org.hibernate.annotations.DynamicInsert; @@ -18,6 +16,8 @@ import org.hibernate.annotations.DynamicUpdate; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Index; +import javax.persistence.Inheritance; +import javax.persistence.InheritanceType; import javax.persistence.Table; import javax.persistence.Transient; @@ -109,7 +109,7 @@ public class WmsPart extends BaseBean { @Column(name = "ABC") @ApiParam(value = "分类") - @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2) + @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.SELECT, isRequire = 2, dataSrc = "PART_ABC") private String abc; @Column(name = "BUY_UNIT") diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsStockSn.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsStockSn.java index bc9e9bd..b907deb 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsStockSn.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsStockSn.java @@ -397,6 +397,10 @@ public class WmsStockSn extends BaseBean { private Integer boxQty; @Transient + @ApiParam(value = "箱数") + private String boxQtyStr; + + @Transient @ApiParam(value = "是否报工") private String isReport;