【fix sonar】SysDepartServiceImpl文件
This commit is contained in:
+4
-4
@@ -246,7 +246,7 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
|
||||
//根据部门id获取所负责部门
|
||||
String[] codeArr = this.getMyDeptParentOrgCode(departIds);
|
||||
if(codeArr == null || codeArr.length == 0){
|
||||
return null;
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return this.baseMapper.getSubDepIdsByOrgCodes(codeArr);
|
||||
}
|
||||
@@ -292,7 +292,7 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
|
||||
}
|
||||
return newList;
|
||||
}
|
||||
return null;
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -397,7 +397,7 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
|
||||
List<SysDepart> list = this.list(query);
|
||||
//查找根部门
|
||||
if(list == null || list.isEmpty()){
|
||||
return null;
|
||||
return new String[0];
|
||||
}
|
||||
String orgCode = this.getMyDeptParentNode(list);
|
||||
// String[] codeArr = orgCode.split(",");
|
||||
@@ -421,7 +421,7 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
|
||||
map.put(code,dept.getOrgCode());
|
||||
}
|
||||
}
|
||||
StringBuffer parentOrgCode = new StringBuffer();
|
||||
StringBuilder parentOrgCode = new StringBuilder();
|
||||
//2.获取同一公司的根节点
|
||||
for(String str : map.values()){
|
||||
String[] arrStr = str.split(",");
|
||||
|
||||
Reference in New Issue
Block a user