terminalInfo添加接口获取模糊类型的端标识
This commit is contained in:
parent
c5cd32decb
commit
859d6225fe
@ -8,6 +8,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import jdk.nashorn.internal.ir.Terminal;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
|
||||
@ -607,6 +609,44 @@ public class TerminalInfo {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//只要端的标识,不需要分的更加的细
|
||||
public String getSimpleTerminal() {
|
||||
String terminalKey = "";
|
||||
//产业工人app
|
||||
if (this.isCM()) {
|
||||
terminalKey = TerminalInfo.NT_CM_APP_GENERAL;
|
||||
}
|
||||
//从业人员app
|
||||
else if (this.isCMP()) {
|
||||
terminalKey = TerminalInfo.NT_CMP_APP_GENERAL;
|
||||
}
|
||||
//cms
|
||||
else if (this.isCMS()) {
|
||||
terminalKey = TerminalInfo.NT_CMS_WEB_GENERAL;
|
||||
}
|
||||
//oms
|
||||
else if (this.isOMS_WEB()) {
|
||||
terminalKey = TerminalInfo.NT_OMS_WEB;
|
||||
}
|
||||
//大屏
|
||||
else if (this.isSCREEN()) {
|
||||
terminalKey = TerminalInfo.NT_SCREEN;
|
||||
}
|
||||
//智能面板
|
||||
else if (this.isPANEL()) {
|
||||
terminalKey = TerminalInfo.NT_PANEL;
|
||||
} //招标
|
||||
else if (this.isBID_WEB_ENT()) {
|
||||
terminalKey = TerminalInfo.NT_BID_WEB_ENT;
|
||||
}
|
||||
//投标
|
||||
else if (this.isBID_WEB_LEADER()) {
|
||||
terminalKey = TerminalInfo.NT_BID_WEB_LEADER;
|
||||
} else {
|
||||
terminalKey = this.NT();
|
||||
}
|
||||
return terminalKey;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
TerminalInfo tm = new TerminalInfo("proj");
|
||||
|
||||
@ -295,6 +295,7 @@ public class ContextInfoBuilderAspect {
|
||||
BeanUtil.fillBeanWithMap(userinfoMap, userInfo, false);
|
||||
|
||||
contextInfo.setUserInfo(userInfo);
|
||||
contextInfo.getSystemAndDeviceInfo().setLoginDevice(contextInfo.getTerminalInfo().getSimpleTerminal());
|
||||
try {
|
||||
if(userinfoMap.containsKey("ouType"))
|
||||
contextInfo.setOuType(Integer.parseInt(userinfoMap.get("ouType").toString()));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user