打印修改

This commit is contained in:
张松
2025-03-26 14:42:17 +08:00
parent 23262dca48
commit 72dbd37ad5

View File

@@ -287,7 +287,7 @@ public abstract class PrinterHandler {
protected List<OrderDetail> getCanPrintOrderDetails(boolean partPrint, Long orderId, List<OrderDetail> tbOrderDetailList, List<?> categoryIds) {
List<Long> productIds = tbOrderDetailList.stream().map(OrderDetail::getProductId).collect(Collectors.toList());
Map<Long, Boolean> canPrintProMap = partPrint || categoryIds.isEmpty() ? new HashMap<>() :
Map<Long, Boolean> canPrintProMap = categoryIds.isEmpty() ? new HashMap<>() :
productService.list(new QueryWrapper().in(Product::getCategoryId, categoryIds).in(Product::getId, productIds))
.stream().collect(Collectors.toMap(Product::getId, i -> true));