parent
5090ce5bb2
commit
42f81f9c7b
|
|
@ -54,9 +54,24 @@ public class HolidayController extends BaseController {
|
|||
@Log(title = "流程管理->假期管理->列表查询", businessType = BusinessType.QUERY)
|
||||
public TableDataInfo list(HolidayBean bean) {
|
||||
try{
|
||||
//不是管理员,只能查自己
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
List<SysRole> sysRoleList = dao.getRoleListByUserId(userId);
|
||||
int roleCount = 0;
|
||||
if(!sysRoleList.isEmpty()){
|
||||
for (SysRole sysRole : sysRoleList) {
|
||||
if(sysRole.getRoleName().contains("管理员")){
|
||||
roleCount = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(roleCount==1){
|
||||
|
||||
}else{
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
startPage();
|
||||
//只能查询自己的或自己导入的
|
||||
bean.setUserId(SecurityUtils.getLoginUser().getSysUser().getUserId());
|
||||
return getDataTable(holidayService.getHolidayList(bean));
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
|
|
|
|||
Loading…
Reference in New Issue