客户账单,物料限制客户登录只能查看本人

master
erzhongxmu 2020-10-24 12:44:21 +08:00
parent e53f9fc3b2
commit 0f3ab149b5
1 changed files with 9 additions and 1 deletions

View File

@ -288,6 +288,14 @@ public class wmUtil {
public static String getCusCode(){
SystemService systemService =ApplicationContextUtil.getContext().getBean(SystemService.class);
String cusCode = "";
String cusrole = "";
try{
cusrole = ResourceUtil.getConfigByName("cus.role");
}catch (Exception e){
cusrole = "CUS";
}
try{
TSUser user = ResourceUtil.getSessionUserName();
String roles = "";
@ -300,7 +308,7 @@ public class wmUtil {
if (roles.length() > 0) {
roles = roles.substring(0, roles.length() - 1);
}
if(roles.equals("CUS")){
if(roles.equals(cusrole)){
cusCode = user.getUserName();
}