| | |
| | | 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)); |