parent
4a88b43f4b
commit
6af54dd884
|
|
@ -66,14 +66,16 @@ public class SysOrgServiceImpl implements SysOrgService {
|
|||
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||
List<String> roleId = sysUser.getRoleList();
|
||||
//管理员与人资角色可以看到所有
|
||||
if (Collections.frequency(roleId, 1L)==0 && Collections.frequency(roleId, 16L)==0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
ids.add(String.valueOf(mapVo.getId()));
|
||||
if( roleId !=null && !roleId.isEmpty()){
|
||||
if (Collections.frequency(roleId, 1L)==0 && Collections.frequency(roleId, 16L)==0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
ids.add(String.valueOf(mapVo.getId()));
|
||||
}
|
||||
sysOrg.setOrgList(ids);
|
||||
}
|
||||
sysOrg.setOrgList(ids);
|
||||
}
|
||||
}
|
||||
return orgDao.selectOrgList(sysOrg);
|
||||
|
|
|
|||
|
|
@ -64,14 +64,16 @@ public class HolidayServiceImpl implements HolidayService {
|
|||
//只能查自己部门的人
|
||||
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||
List<String> roleId = sysUser.getRoleList();
|
||||
if (Collections.frequency(roleId, 1L)==0) {
|
||||
List<MapVo> orgList = SecurityUtils.getLoginUser().getSysUser().getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
ids.add(String.valueOf(mapVo.getId()));
|
||||
if(roleId !=null && !roleId.isEmpty() ){
|
||||
if (Collections.frequency(roleId, 1L)==0) {
|
||||
List<MapVo> orgList = SecurityUtils.getLoginUser().getSysUser().getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
ids.add(String.valueOf(mapVo.getId()));
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
}
|
||||
return holidayDao.getHolidayList(bean);
|
||||
|
|
|
|||
Loading…
Reference in New Issue