Merge remote-tracking branch 'i3plus-pojo/dev' into dev

yun-zuoyi
王杰 4 years ago
commit 0183ca2a05

@ -107,6 +107,10 @@ public class BaseThreadLocal {
public static final String EMP_NAME = "USER_NAME"; //用户名 public static final String EMP_NAME = "USER_NAME"; //用户名
public static final String ORGANIZE_CODE = "ORGANIZE_CODE"; //组织代码 public static final String ORGANIZE_CODE = "ORGANIZE_CODE"; //组织代码
public static final String LANGUAGE_CODE = "LANGUAGE_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); Object data = getData(INIT_INFO);
@ -133,6 +137,7 @@ public class BaseThreadLocal {
} }
return empName; return empName;
} }
//获取线程中的组织代码 //获取线程中的组织代码
public static String getThreadOrganizeCode() { public static String getThreadOrganizeCode() {
String organizeCode = getDataStr(ORGANIZE_CODE); String organizeCode = getDataStr(ORGANIZE_CODE);
@ -141,6 +146,7 @@ public class BaseThreadLocal {
} }
return organizeCode; return organizeCode;
} }
//获取线程中的语言代码 //获取线程中的语言代码
public static String getThreadLanguageCode() { public static String getThreadLanguageCode() {
String organizeCode = getDataStr(LANGUAGE_CODE); String organizeCode = getDataStr(LANGUAGE_CODE);

@ -20,20 +20,28 @@ public class CommonEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SOFT_TYPE { public enum SOFT_TYPE {
/** WMS 服务 */ /**
* WMS
*/
WMS(3, 8200, 10, 102000000L, "i3wms", "仓库管理软件"), WMS(3, 8200, 10, 102000000L, "i3wms", "仓库管理软件"),
SWEB(7, 8800, 19, 108000000L, "i3sweb", "供应商服务"), SWEB(7, 8800, 19, 108000000L, "i3sweb", "供应商服务"),
QMS(5, 0, 0, 0, "i3qms", "质量管理软件"), QMS(5, 0, 0, 0, "i3qms", "质量管理软件"),
/** Mes 服务 */ /**
* Mes
*/
MES(4, 8300, 11, 103000000L, "i3mes", "生产管理软件"), MES(4, 8300, 11, 103000000L, "i3mes", "生产管理软件"),
MES_PCN(6, 8350, 12, 107000000L, "i3mes-pcn", "生产管理软件-节点中心"), MES_PCN(6, 8350, 12, 107000000L, "i3mes-pcn", "生产管理软件-节点中心"),
/** PTL 服务 */ /**
* PTL
*/
PTL(8, 8700, 20, 111000000L, "i3ptl", "亮灯自动拣选"), PTL(8, 8700, 20, 111000000L, "i3ptl", "亮灯自动拣选"),
PTL_PCN(9, 8750, 21, 109000000L, "i3ptl-pcn", "亮灯自动拣选-节点中心"), PTL_PCN(9, 8750, 21, 109000000L, "i3ptl-pcn", "亮灯自动拣选-节点中心"),
/** Block 服务 */ /**
* Block
*/
FORM(20, 8900, 16, 104000000L, "block-form", "智能表单"), FORM(20, 8900, 16, 104000000L, "block-form", "智能表单"),
REPORT(21, 8910, 17, 105000000L, "block-report", "智能报表"), REPORT(21, 8910, 17, 105000000L, "block-report", "智能报表"),
WORKFLOW(22, 0, 0, 0, "block-workflow", "智能工作流"), WORKFLOW(22, 0, 0, 0, "block-workflow", "智能工作流"),
@ -41,42 +49,66 @@ public class CommonEnumUtil {
SOFTSWITCH(24, 8920, 18, 130000000L, "block-softswitch", "软件适配器"), SOFTSWITCH(24, 8920, 18, 130000000L, "block-softswitch", "软件适配器"),
HARDSWITCH(25, 0, 0, 0, "block-hardswitch", "硬件适配器"), HARDSWITCH(25, 0, 0, 0, "block-hardswitch", "硬件适配器"),
/** LAC 服务 */ /**
* LAC
*/
LAC(26, 8600, 13, 150000000L, "lac", "连接适配器"), LAC(26, 8600, 13, 150000000L, "lac", "连接适配器"),
/** 安灯服务 */ /**
*
*/
ANDON(27, 8500, 14, 110000000L, "andon", "安灯"), ANDON(27, 8500, 14, 110000000L, "andon", "安灯"),
/** 计划排产服务 */ /**
*
*/
APS(28, 8400, 15, 140000000L, "i3aps", "高级计划与排产"), APS(28, 8400, 15, 140000000L, "i3aps", "高级计划与排产"),
SURFACE(98, 0, 0, 0, "i3surface", "对外服务"), SURFACE(98, 0, 0, 0, "i3surface", "对外服务"),
/** 基础服务 */ /**
*
*/
IMPP(1, 0, 0, 100000000L, "impp-platform", "IMPP平台"), IMPP(1, 0, 0, 100000000L, "impp-platform", "IMPP平台"),
CONSOLE(95, 8010, 0, 0, "impp-console", "服务监控台"), CONSOLE(95, 8010, 0, 0, "impp-console", "服务监控台"),
GATEWAY(96, 9000, 0, 0, "impp-gateway", "服务网关"), GATEWAY(96, 9000, 0, 0, "impp-gateway", "服务网关"),
CLOUD(97, 0, 0, 0, "i3cloud", "微服务"), CLOUD(97, 0, 0, 0, "i3cloud", "微服务"),
CENTER(99, 8000, 1, 0, "icloud-server", "注册中心"), CENTER(99, 8000, 1, 0, "icloud-server", "注册中心"),
/** 平台服务 */ /**
*
*/
CORE(2, 8100, 4, 101000000L, "i3core", "i3业务平台"), CORE(2, 8100, 4, 101000000L, "i3core", "i3业务平台"),
MDM(29, 8150, 22, 0, "i3mdm", "数据中心MDM"), MDM(29, 8150, 22, 0, "i3mdm", "数据中心MDM"),
/** 调试服务 */ /**
*
*/
DEV(9999, 0000, 0, 120000000L, "Development", "系统调试"); DEV(9999, 0000, 0, 120000000L, "Development", "系统调试");
/** 产品ID */ /**
* ID
*/
private int value; private int value;
/** 应用默认端口 */ /**
*
*/
private int port; private int port;
/** 应用默认雪花DataBaseId(0-31)共32 个存储区 */ /**
* DataBaseId(0-31)32
*/
private int snowflakeId; private int snowflakeId;
/** 产品代码 */ /**
*
*/
private String code; private String code;
/** 顶级菜单代码 */ /**
*
*/
private long menuRootId; private long menuRootId;
/** 产品描述 */ /**
*
*/
private String description; private String description;
SOFT_TYPE(int value, int port, int snowflakeId, long menuRootCode, String code, 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; return null;
} }
public synchronized static int descriptionOfValue(String desc) { public synchronized static int descriptionOfValue(String desc) {
int tmp = IMPP.value; int tmp = IMPP.value;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
@ -187,6 +220,7 @@ public class CommonEnumUtil {
} }
return tmp; return tmp;
} }
public static int descOf(String desc) { public static int descOf(String desc) {
int tmp = IMPP.value; int tmp = IMPP.value;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
@ -262,8 +296,13 @@ public class CommonEnumUtil {
return null; return null;
} }
public static String valueOfDescription(int val) {return valueOf(val);} public static String valueOfDescription(int val) {
public static int descriptionOfValue(String desc) {return descOf(desc);} return valueOf(val);
}
public static int descriptionOfValue(String desc) {
return descOf(desc);
}
public static boolean valueOfBoolean(int val) { public static boolean valueOfBoolean(int val) {
if (val == TRUE.value) { if (val == TRUE.value) {
@ -348,6 +387,7 @@ public class CommonEnumUtil {
} }
return tmp; return tmp;
} }
public static int descOf(String desc) { public static int descOf(String desc) {
int tmp = COMMON.value; int tmp = COMMON.value;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
@ -357,9 +397,11 @@ public class CommonEnumUtil {
} }
return tmp; return tmp;
} }
public static String valueOfDescription(int val) { public static String valueOfDescription(int val) {
return valueOf(val); return valueOf(val);
} }
public static int descriptionOfValue(String val) { public static int descriptionOfValue(String val) {
return descOf(val); return descOf(val);
} }
@ -508,6 +550,7 @@ public class CommonEnumUtil {
return tmp; return tmp;
} }
} }
/** /**
* *
* 1 * 1
@ -569,6 +612,7 @@ public class CommonEnumUtil {
return tmp; return tmp;
} }
} }
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum USER_INFO_STATUS { public enum USER_INFO_STATUS {
INCUMBENT(1, "正常", "正常_NORMAL"), INCUMBENT(1, "正常", "正常_NORMAL"),
@ -991,6 +1035,7 @@ public class CommonEnumUtil {
/** /**
* -1 * -1
*
* @param desc * @param desc
* @return * @return
*/ */
@ -1051,6 +1096,7 @@ public class CommonEnumUtil {
} }
return tmp; return tmp;
} }
public static String valueOfDescription(int val) { public static String valueOfDescription(int val) {
return valueOf(val); return valueOf(val);
} }
@ -1092,6 +1138,7 @@ public class CommonEnumUtil {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
public static CONTENT_TYPE valueOfContenType(String val) { public static CONTENT_TYPE valueOfContenType(String val) {
CONTENT_TYPE tmp = null; CONTENT_TYPE tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
@ -2216,6 +2263,7 @@ public class CommonEnumUtil {
public String getPath() { public String getPath() {
return path; return path;
} }
public String getTag() { public String getTag() {
return tag; return tag;
} }
@ -2295,7 +2343,6 @@ public class CommonEnumUtil {
} }
public static String valueOfCode(int val) { public static String valueOfCode(int val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
@ -2466,7 +2513,6 @@ public class CommonEnumUtil {
} }
/** /**
* *
*/ */
@ -2687,5 +2733,4 @@ public class CommonEnumUtil {
} }
} }

@ -1032,10 +1032,10 @@ public class ImppEnumUtil {
REF_OBJECT(3, "对象"), REF_OBJECT(3, "对象"),
REF_DICT(4, "字典"); REF_DICT(4, "字典");
private int value; private final int value;
private String description; private final String description;
private COL_REF_TYPE(int value, String description) { COL_REF_TYPE(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -1084,8 +1084,8 @@ public class ImppEnumUtil {
WORK_WECHAT(8, "企业微信配置"), WORK_WECHAT(8, "企业微信配置"),
SMS(9, "短信配置"); SMS(9, "短信配置");
private int value; private final int value;
private String description; private final String description;
public int getValue() { public int getValue() {
return value; return value;
@ -1095,7 +1095,7 @@ public class ImppEnumUtil {
return description; return description;
} }
private SYS_CONFIG_GROUP(int value, String description) { SYS_CONFIG_GROUP(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -1118,8 +1118,8 @@ public class ImppEnumUtil {
EXTERNAL(2, "外部人员"), EXTERNAL(2, "外部人员"),
URGENT(3, "紧急联系人"), URGENT(3, "紧急联系人"),
SUPPLIER(4, "供应商"); SUPPLIER(4, "供应商");
private int value; private final int value;
private String description; private final String description;
public int getValue() { public int getValue() {
return value; return value;
@ -1129,7 +1129,7 @@ public class ImppEnumUtil {
return description; return description;
} }
private MESSAGE_RECEIVER_TYPE(int value, String description) { MESSAGE_RECEIVER_TYPE(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -1222,8 +1222,8 @@ public class ImppEnumUtil {
public enum DICTIONARY_GROUP { public enum DICTIONARY_GROUP {
SYSTEM(1, "系统字典"), SYSTEM(1, "系统字典"),
EXTERNAL(2, "业务字典"); EXTERNAL(2, "业务字典");
private int value; private final int value;
private String description; private final String description;
public int getValue() { public int getValue() {
return value; return value;
@ -1233,7 +1233,7 @@ public class ImppEnumUtil {
return description; return description;
} }
private DICTIONARY_GROUP(int value, String description) { DICTIONARY_GROUP(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -1256,8 +1256,8 @@ public class ImppEnumUtil {
public enum LOG_STORAGE { public enum LOG_STORAGE {
// MONGO(1, "MongoDB"), // MONGO(1, "MongoDB"),
ELASTICSEARCH(2, "Elasticsearch"); ELASTICSEARCH(2, "Elasticsearch");
private int value; private final int value;
private String description; private final String description;
public int getValue() { public int getValue() {
return value; return value;
@ -1267,7 +1267,7 @@ public class ImppEnumUtil {
return description; return description;
} }
private LOG_STORAGE(int value, String description) { LOG_STORAGE(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -1299,8 +1299,8 @@ public class ImppEnumUtil {
public enum CHECK_TEXT { public enum CHECK_TEXT {
PASSWORD_VERIFY(1, "保存策略"), PASSWORD_VERIFY(1, "保存策略"),
PASSWORD_LOGIN(2, "登录策略"); PASSWORD_LOGIN(2, "登录策略");
private int value; private final int value;
private String description; private final String description;
public int getValue() { public int getValue() {
return value; return value;
@ -1310,7 +1310,7 @@ public class ImppEnumUtil {
return description; return description;
} }
private CHECK_TEXT(int value, String description) { CHECK_TEXT(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -1342,8 +1342,8 @@ public class ImppEnumUtil {
public enum USER_CUSTOMIZE_CONFIG_TYPE { public enum USER_CUSTOMIZE_CONFIG_TYPE {
WEB_TABLE_SHOW_COL(10, "前端表格显示列"); WEB_TABLE_SHOW_COL(10, "前端表格显示列");
private int value; private final int value;
private String description; private final String description;
USER_CUSTOMIZE_CONFIG_TYPE(int value, String description) { USER_CUSTOMIZE_CONFIG_TYPE(int value, String description) {
this.value = value; this.value = value;
@ -1387,8 +1387,8 @@ public class ImppEnumUtil {
public enum USER_EXTERNAL_REF { public enum USER_EXTERNAL_REF {
WORK_WECHAT(10, "企业微信"); WORK_WECHAT(10, "企业微信");
private int value; private final int value;
private String description; private final String description;
USER_EXTERNAL_REF(int value, String description) { USER_EXTERNAL_REF(int value, String description) {
this.value = value; this.value = value;
@ -1437,10 +1437,10 @@ public class ImppEnumUtil {
USER_EMP_NO("empNo", "工号"), USER_EMP_NO("empNo", "工号"),
USER_WECHAT_NO("userWeChatNo", "微信号"); USER_WECHAT_NO("userWeChatNo", "微信号");
private String value; private final String value;
private String description; private final String description;
private USER_BIND_PROPERTY(String value, String description) { USER_BIND_PROPERTY(String value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -1638,4 +1638,36 @@ public class ImppEnumUtil {
return tmp; 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;
}
}
} }

@ -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;
}

@ -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;
}
Loading…
Cancel
Save