权限阅览事业部名称数据截取逻辑修改
This commit is contained in:
parent
7729306a11
commit
0db1332a24
@ -805,10 +805,20 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
||||
if(isclosed==false){
|
||||
String allpath = SDK.getORGAPI().getDepartmentById(applydepid).getPathNameOfCache();
|
||||
if(allpath.contains("事业部")){
|
||||
String depname=allpath.substring(allpath.indexOf("/")+2,allpath.indexOf("事业部")+3);
|
||||
if(depname!=null){
|
||||
bo.set("BUSINESS_DIVISION",depname);
|
||||
//String depname=allpath.substring(allpath.indexOf("/")+2,allpath.indexOf("事业部")+3);
|
||||
// 原始字符串
|
||||
String input = allpath;
|
||||
if(input.contains("/")){
|
||||
// 使用split方法按"/"分割字符串
|
||||
String[] parts = input.split("/");
|
||||
// 检查是否分割成功且有数据
|
||||
if (parts.length > 0) {
|
||||
String department = parts[0];
|
||||
bo.set("BUSINESS_DIVISION",department);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else if(allpath.contains("伊利集团总部")){
|
||||
bo.set("BUSINESS_DIVISION","伊利集团总部");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user