| | |
| | | * @param paramId 产品树节点id |
| | | * @param relativeFlag 1 是 2 否 |
| | | * @param userIds 添加用户ids |
| | | * todo优化结构,采用mix表进行父子递归查询,分类进行权限分配(单表查询) |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | * @param paramId 产品树节点id |
| | | * @param relativeFlag 1 是 2 否 |
| | | * @param departmentIds 添加部门ids |
| | | * todo优化结构,采用mix表进行父子递归查询,分类进行权限分配(单表查询) |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | * @param paramId 产品树节点id |
| | | * @param relativeFlag 1 是 2 否 |
| | | * @param userIds 移除用户ids |
| | | * todo优化结构,采用mix表进行父子递归查询,分类进行权限分配(单表查询) |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | * @param paramId 产品树节点id |
| | | * @param relativeFlag 1 是 2 否 |
| | | * @param departmentIds 移除部门ids |
| | | * todo优化结构,采用mix表进行父子递归查询,分类进行权限分配(单表查询) |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | if (treeInfoRequest.getAttributionType() == 1 && StrUtil.isNotBlank(treeInfoRequest.getAttributionId())) { |
| | | queryWrapper.eq(ProductInfo::getProductId, treeInfoRequest.getAttributionId()); |
| | | } |
| | | // 简化条件判断 |
| | | queryWrapper.like(StrUtil.isNotBlank(treeInfoRequest.getTreeCode()), ProductInfo::getProductNo, treeInfoRequest.getTreeCode()) |
| | | .like(StrUtil.isNotBlank(treeInfoRequest.getTreeName()), ProductInfo::getProductName, treeInfoRequest.getTreeName()); |
| | | List<ProductInfo> productInfoList = super.list(queryWrapper); |
| | |
| | | productInfoList=new ArrayList<>(); |
| | | } |
| | | if (CollectionUtil.isNotEmpty(productInfoList)) { |
| | | // 使用ID列表而非拼接字符串 |
| | | List<String> productIds = productInfoList.stream() |
| | | .map(ProductInfo::getProductId) |
| | | .collect(Collectors.toList()); |
| | | String ids=productInfoList.stream().map(ProductInfo::getProductId).collect(Collectors.joining(",")); |
| | | DocInfoQueryRequest docQuery = new DocInfoQueryRequest(); |
| | | BeanUtil.copyProperties(treeInfoRequest, docQuery); |
| | | docQuery.setAttributionIds(productIds.toString()); // 假设setAttributionIds接受List<String> |
| | | docQuery.setAttributionIds(ids); |
| | | docQuery.setDocClassCode("OTHER"); |
| | | docQuery.setAttributionType(1); |
| | | docQuery.setAttributionType(DocAttributionTypeEnum.PRODUCT.getCode()); |
| | | docInfos = docInfoService.findListByDocQuery(docQuery); |
| | | } |
| | | // 创建新请求对象避免污染原参数 |
| | |
| | | docInfos.addAll(componentInfoService.getByComponentInfo(componentRequest)); |
| | | docInfos.addAll(partsInfoService.getByPartsInfo(componentRequest)); |
| | | docInfos.addAll(processSpecVersionService.getByProcessSpecVersion(componentRequest)); |
| | | docInfos.addAll(processStreamService.getByProcessStreamOtherFile(componentRequest)); |
| | | docInfos.addAll(workStepService.getByWorkStepOtherFile(componentRequest)); |
| | | return getByTreeOtherFileInfo(docInfos); |
| | | case 2: |
| | | return getByTreeOtherFileInfo(componentInfoService.getByComponentInfo(treeInfoRequest)); |
| | |
| | | ProductInfo productInfo=this.getById(docInfo.getAttributionId()); |
| | | docInfo.setNodeName(productInfo.getProductName()); |
| | | docInfo.setNodeCode(productInfo.getProductNo()); |
| | | docInfo.setNodeId(productInfo.getProductId()); |
| | | break; |
| | | case 2: |
| | | ComponentInfo componentInfo=componentInfoService.getById(docInfo.getAttributionId()); |
| | | docInfo.setNodeName(componentInfo.getComponentName()); |
| | | docInfo.setNodeCode(componentInfo.getComponentCode()); |
| | | docInfo.setNodeId(componentInfo.getComponentId()); |
| | | break; |
| | | case 3: |
| | | PartsInfo partsInfo=partsInfoService.getById(docInfo.getAttributionId()); |
| | | docInfo.setNodeCode(partsInfo.getPartsCode()); |
| | | docInfo.setNodeName(partsInfo.getPartsName()); |
| | | docInfo.setNodeId(partsInfo.getPartsId()); |
| | | break; |
| | | case 4: |
| | | ProcessSpecVersion processSpecVersion=processSpecVersionService.getById(docInfo.getAttributionId()); |
| | | docInfo.setNodeName(processSpecVersion.getProcessSpecVersionName()); |
| | | docInfo.setNodeCode(processSpecVersion.getProcessSpecVersionCode()); |
| | | docInfo.setNodeId(processSpecVersion.getId()); |
| | | break; |
| | | case 5: |
| | | ProcessStream processStream=processStreamService.getById(docInfo.getAttributionId()); |
| | | docInfo.setNodeName(processStream.getProcessName()); |
| | | docInfo.setNodeCode(processStream.getProcessCode()); |
| | | docInfo.setNodeId(processStream.getProcessId()); |
| | | break; |
| | | case 6: |
| | | WorkStep workStep=workStepService.getById(docInfo.getAttributionId()); |
| | | docInfo.setNodeName(workStep.getStepName()); |
| | | docInfo.setNodeCode(workStep.getStepName()); |
| | | docInfo.setNodeId(workStep.getId()); |
| | | break; |
| | | } |
| | | }); |
| | |
| | | ProcessStream processStream=processStreamService.getById(deviceType.getAttributionId()); |
| | | docInfo.setNodeName(processStream.getProcessName()); |
| | | docInfo.setNodeCode(processStream.getProcessCode()); |
| | | docInfo.setNodeId(processStream.getProcessId()); |
| | | }else { |
| | | //工步下的设备类 |
| | | WorkStep workStep=workStepService.getById(deviceType.getAttributionId()); |
| | | docInfo.setNodeName(workStep.getStepName()); |
| | | docInfo.setNodeCode(workStep.getStepName()); |
| | | docInfo.setNodeId(workStep.getId()); |
| | | } |
| | | }); |
| | | } |