【fix sonar】SysBaseApiImpl文件
This commit is contained in:
+4
-4
@@ -758,7 +758,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private String getOrgCodes(List<SysUserDepart> userDepartList) {
|
private String getOrgCodes(List<SysUserDepart> userDepartList) {
|
||||||
String orgCodes = "";
|
StringBuilder orgCodes = new StringBuilder();
|
||||||
for(SysUserDepart userDepart : userDepartList){
|
for(SysUserDepart userDepart : userDepartList){
|
||||||
//查询所属公司编码
|
//查询所属公司编码
|
||||||
SysDepart depart = sysDepartService.getById(userDepart.getDepId());
|
SysDepart depart = sysDepartService.getById(userDepart.getDepId());
|
||||||
@@ -766,12 +766,12 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||||||
String compyOrgCode = "";
|
String compyOrgCode = "";
|
||||||
if(depart != null && depart.getOrgCode() != null){
|
if(depart != null && depart.getOrgCode() != null){
|
||||||
compyOrgCode = depart.getOrgCode().substring(0,length);
|
compyOrgCode = depart.getOrgCode().substring(0,length);
|
||||||
if(!orgCodes.contains(compyOrgCode)){
|
if(!orgCodes.toString().contains(compyOrgCode)){
|
||||||
orgCodes = orgCodes + "," + compyOrgCode;
|
orgCodes.append(",").append(compyOrgCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return orgCodes;
|
return orgCodes.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user