| | |
| | | List<DeviceType> deviceTypeList = deviceTypeService.getDeviceTypeByAttribution(processIds, |
| | | DocAttributionTypeEnum.PROCESS.getCode(),treeInfoRequest.getDeviceManagementName(),treeInfoRequest.getDeviceManagementCode()); |
| | | if (deviceTypeList != null && !deviceTypeList.isEmpty()) { |
| | | List<String> deviceManagementIds=deviceTypeList.stream().map(DeviceType::getId).collect(Collectors.toList()); |
| | | List<String> deviceTypeIds=deviceTypeList.stream().map(DeviceType::getId).collect(Collectors.toList()); |
| | | DocInfoQueryRequest docQuery = new DocInfoQueryRequest(); |
| | | BeanUtil.copyProperties(treeInfoRequest,docQuery); |
| | | docQuery.setAttributionIds(String.join(",",deviceManagementIds)); |
| | | docQuery.setAttributionIds(String.join(",",deviceTypeIds)); |
| | | docQuery.setDocClassCode("NC"); |
| | | docQuery.setAttributionType(DocAttributionTypeEnum.PROCESS.getCode()); |
| | | docInfos=docInfoService.findListByDocQuery(docQuery); |
| | |
| | | treeInfoRequest.setProcessIds(id); |
| | | List<DocInfo> docInfoList = workStepService.getByWorkStepNCFile(treeInfoRequest); |
| | | docInfos.addAll(docInfoList); |
| | | }else { |
| | | treeInfoRequest.setProcessIds(processIds); |
| | | List<DocInfo> docInfoList = workStepService.getByWorkStepNCFile(treeInfoRequest); |
| | | docInfos.addAll(docInfoList); |
| | | } |
| | | return docInfos; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public boolean assignPermission(Object entity, Collection<SysUser> userList, boolean isAdd){ |
| | | if (isAdd) { |
| | | return assignAddUser((ProcessStream) entity, userList); |
| | | } else { |
| | | return assignRemoveUser((ProcessStream) entity, userList); |
| | | } |
| | | } |
| | | @Override |
| | | public boolean assignDepartPermission(Object entity, Collection<MdcProduction> departments, boolean isAdd) { |
| | | if (isAdd) { |
| | | return assignAddDepart((ProcessStream) entity, departments); |
| | | } else { |
| | | return assignRemoveDepart((ProcessStream) entity, departments); |
| | | } |
| | | } |
| | | |
| | | } |