| | |
| | | NcProgramExportDncQueryVO query = new NcProgramExportDncQueryVO(); |
| | | query.setCurrent(1); |
| | | query.setSize(1); |
| | | |
| | | List<String> userRoleAliasList = Func.toStrList(",", AuthUtil.getUserRole());//角色别名,多个角色逗号分隔 |
| | | String managerRole = paramService.getProgramManagerRoleAlias(); |
| | | if(!userRoleAliasList.contains(managerRole) && !AuthUtil.isAdministrator() && !AuthUtil.isAdmin()){ |
| | | //非数控管理员角色、管理员,限制未只能导出自己的程序 |
| | | query.setUserId(AuthUtil.getUserId()); |
| | | } |
| | | query.setUserId(AuthUtil.getUserId()); |
| | | query.setQueryType(NcProgramExportDncQueryVO.TYPE_SELF); |
| | | |
| | | IPage<NcProgramExportDncPageVO> pages = ncProgramApprovedService.exportDncPageQuery(query); |
| | | return pages.getTotal(); |