|
|
|
@@ -520,9 +520,10 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
|
|
|
.filter(f -> f.getDesignType().equals(DesignTypeEnum.COLLECTION.getRealName()))
|
|
|
|
.filter(f -> f.getDesignType().equals(DesignTypeEnum.COLLECTION.getRealName()))
|
|
|
|
.map(DesignCollectionPrintElementDTO::getId)
|
|
|
|
.map(DesignCollectionPrintElementDTO::getId)
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
|
|
List<CollectionElement> printBoardElements = new ArrayList<>();
|
|
|
|
if (!CollectionUtils.isEmpty(printBoardIds)) {
|
|
|
|
if (!CollectionUtils.isEmpty(printBoardIds)) {
|
|
|
|
// 从数据库批量查询printBoard元素
|
|
|
|
// 从数据库批量查询printBoard元素
|
|
|
|
List<CollectionElement> printBoardElements = collectionElementMapper.selectBatchIds(printBoardIds);
|
|
|
|
printBoardElements = collectionElementMapper.selectBatchIds(printBoardIds);
|
|
|
|
// 验证查询结果的完整性
|
|
|
|
// 验证查询结果的完整性
|
|
|
|
if (CollectionUtil.isEmpty(printBoardElements) || printBoardElements.size() != printBoardIds.size()) {
|
|
|
|
if (CollectionUtil.isEmpty(printBoardElements) || printBoardElements.size() != printBoardIds.size()) {
|
|
|
|
throw new BusinessException("get.printBoards.data.is.mismatch");
|
|
|
|
throw new BusinessException("get.printBoards.data.is.mismatch");
|
|
|
|
@@ -543,7 +544,8 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
|
|
|
Map<Long, DesignCollectionPrintElementDTO> idToMap = designDTO.getPrintBoards()
|
|
|
|
Map<Long, DesignCollectionPrintElementDTO> idToMap = designDTO.getPrintBoards()
|
|
|
|
.stream()
|
|
|
|
.stream()
|
|
|
|
.collect(Collectors.toMap(DesignCollectionPrintElementDTO::getId, v -> v));
|
|
|
|
.collect(Collectors.toMap(DesignCollectionPrintElementDTO::getId, v -> v));
|
|
|
|
libraryCollectionElements.addAll(covertLibrarysToPrintCollections(librarys, idToMap));
|
|
|
|
printBoardElements.addAll(covertLibrarysToPrintCollections(librarys, idToMap));
|
|
|
|
|
|
|
|
// libraryCollectionElements.addAll(covertLibrarysToPrintCollections(librarys, idToMap));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -559,7 +561,8 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
|
|
|
Map<Long, DesignCollectionPrintElementDTO> idToMap = designDTO.getPrintBoards()
|
|
|
|
Map<Long, DesignCollectionPrintElementDTO> idToMap = designDTO.getPrintBoards()
|
|
|
|
.stream()
|
|
|
|
.stream()
|
|
|
|
.collect(Collectors.toMap(DesignCollectionPrintElementDTO::getId, v -> v));
|
|
|
|
.collect(Collectors.toMap(DesignCollectionPrintElementDTO::getId, v -> v));
|
|
|
|
generateCollectionElements.addAll(covertGeneratesToPrintCollections(generateDetailList, idToMap));
|
|
|
|
printBoardElements.addAll(covertGeneratesToPrintCollections(generateDetailList, idToMap));
|
|
|
|
|
|
|
|
// generateCollectionElements.addAll(covertGeneratesToPrintCollections(generateDetailList, idToMap));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|