|
@@ -48,6 +48,7 @@ import org.jeecg.modules.billet.rollOutShipp.service.IRollOutShippService;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingAndLoadingVehicles;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingUpLog;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.service.IStackingUpLogService;
|
|
|
+import org.jeecg.modules.billet.storageBill.dto.StorageCenterQueryDTO;
|
|
|
import org.jeecg.modules.billet.storageBill.entity.*;
|
|
|
import org.jeecg.modules.billet.storageBill.mapper.StorageBillMapper;
|
|
|
import org.jeecg.modules.billet.storageBill.service.IStorageBillService;
|
|
@@ -3396,6 +3397,380 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
+ public StorageCenterCarVO storageCenterCarInfo(StorageCenterQueryDTO queryDTO) {
|
|
|
+
|
|
|
+ StorageCenterCarVO storageCenterCarVO = new StorageCenterCarVO();
|
|
|
+ LambdaQueryWrapper<StorageBill> billQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+
|
|
|
+ billQueryWrapper.gt(StorageBill::getAmountTotal, 0)
|
|
|
+ .between(StorageBill::getCreateTime, DateUtils.getStartOfDay(queryDTO.getCurrentDate()), DateUtils.getEndOfDay(queryDTO.getCurrentDate()))
|
|
|
+ .isNotNull(StorageBill::getDestination) // 过滤 null
|
|
|
+ .ne(StorageBill::getDestination, ""); // 过滤空字符串
|
|
|
+
|
|
|
+ List<StorageBill> storageBillList = storageBillMapper.selectList(billQueryWrapper);
|
|
|
+
|
|
|
+ if (oConvertUtils.listIsEmpty(storageBillList)) {
|
|
|
+ return storageCenterCarVO;
|
|
|
+ }
|
|
|
+ int allCarNum = storageBillList.size();
|
|
|
+
|
|
|
+ Map<String, List<StorageBill>> groupedByDestination = storageBillList.stream()
|
|
|
+ .filter(bill -> bill.getDestination() != null && !bill.getDestination().trim().isEmpty()) // 过滤 null 和空字符串
|
|
|
+ .collect(Collectors.groupingBy(StorageBill::getDestination));
|
|
|
+
|
|
|
+ List<StorageCenterCarVO.SizeDetail> sizeList = new ArrayList<>();
|
|
|
+
|
|
|
+
|
|
|
+ if (groupedByDestination.containsKey("棒二")) {
|
|
|
+
|
|
|
+ List<StorageCenterCarVO.RollDetail> twoDetailList = new ArrayList<>();
|
|
|
+
|
|
|
+ List<StorageBill> twoList = groupedByDestination.get("棒二");
|
|
|
+
|
|
|
+ twoDetailList = convertToRollDetailList(twoList);
|
|
|
+
|
|
|
+ storageCenterCarVO.setRollClubTwoDetails(twoDetailList);
|
|
|
+
|
|
|
+ List<StorageCenterCarVO.SizeDetail> twoSizeList = new ArrayList<>();
|
|
|
+ List<String> billIds = twoList.stream().map(StorageBill::getId).collect(Collectors.toList());
|
|
|
+ List<RollClubTwoDetails> rollClubTwoDetailsList = Collections.emptyList();
|
|
|
+
|
|
|
+ if (!billIds.isEmpty()) {
|
|
|
+ LambdaQueryWrapper<RollClubTwoDetails> rollClubQuery = new LambdaQueryWrapper<>();
|
|
|
+ rollClubQuery.in(RollClubTwoDetails::getStorageBillId, billIds);
|
|
|
+ rollClubTwoDetailsList = rollClubTwoDetailsService.list(rollClubQuery);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!CollectionUtils.isEmpty(rollClubTwoDetailsList)) {
|
|
|
+ twoSizeList = rollClubTwoDetailsList.stream()
|
|
|
+ .map(rollClubTwoDetails -> {
|
|
|
+ StorageCenterCarVO.SizeDetail sizeDetail = new StorageCenterCarVO.SizeDetail();
|
|
|
+ sizeDetail.setSize(rollClubTwoDetails.getSize());
|
|
|
+ sizeDetail.setSizeAmount((rollClubTwoDetails.getStackAddr() != null && !rollClubTwoDetails.getStackAddr().isEmpty()) ? 4 : 1);
|
|
|
+ sizeDetail.setSizeWeight(BigDecimal.valueOf(rollClubTwoDetails.getBlankOutput()).setScale(4, RoundingMode.HALF_UP));
|
|
|
+ return sizeDetail;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ sizeList.addAll(twoSizeList);
|
|
|
+
|
|
|
+ storageCenterCarVO.setRollClubTwoDetails(twoDetailList);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if (groupedByDestination.containsKey("棒三")) {
|
|
|
+
|
|
|
+ List<StorageCenterCarVO.RollDetail> threeDetailList = new ArrayList<>();
|
|
|
+
|
|
|
+ List<StorageBill> threeList = groupedByDestination.get("棒三");
|
|
|
+
|
|
|
+ threeDetailList = convertToRollDetailList(threeList);
|
|
|
+
|
|
|
+
|
|
|
+ List<StorageCenterCarVO.SizeDetail> threeSizeList = new ArrayList<>();
|
|
|
+ List<String> billIds = threeList.stream().map(StorageBill::getId).collect(Collectors.toList());
|
|
|
+ List<RollClubThreeDetails> rollClubThreeDetailsList = Collections.emptyList();
|
|
|
+
|
|
|
+ if (!billIds.isEmpty()) {
|
|
|
+ LambdaQueryWrapper<RollClubThreeDetails> rollClubQuery = new LambdaQueryWrapper<>();
|
|
|
+ rollClubQuery.in(RollClubThreeDetails::getStorageBillId, billIds);
|
|
|
+ rollClubThreeDetailsList = rollClubThreeDetailsService.list(rollClubQuery);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!CollectionUtils.isEmpty(rollClubThreeDetailsList)) {
|
|
|
+ threeSizeList = rollClubThreeDetailsList.stream()
|
|
|
+ .map(rollClubThreeDetails -> {
|
|
|
+ StorageCenterCarVO.SizeDetail sizeDetail = new StorageCenterCarVO.SizeDetail();
|
|
|
+ sizeDetail.setSize(rollClubThreeDetails.getSize());
|
|
|
+ sizeDetail.setSizeAmount((rollClubThreeDetails.getStackAddr() != null && !rollClubThreeDetails.getStackAddr().isEmpty()) ? 4 : 1);
|
|
|
+ sizeDetail.setSizeWeight(BigDecimal.valueOf(rollClubThreeDetails.getBlankOutput()).setScale(4, RoundingMode.HALF_UP));
|
|
|
+ return sizeDetail;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ sizeList.addAll(threeSizeList);
|
|
|
+
|
|
|
+ storageCenterCarVO.setRollClubThreeDetails(threeDetailList);
|
|
|
+
|
|
|
+ }
|
|
|
+ if (groupedByDestination.containsKey("上若")) {
|
|
|
+
|
|
|
+ List<StorageCenterCarVO.RollDetail> outDetailList = new ArrayList<>();
|
|
|
+
|
|
|
+ List<StorageBill> outList = groupedByDestination.get("上若");
|
|
|
+
|
|
|
+ outDetailList = convertToRollDetailList(outList);
|
|
|
+
|
|
|
+ List<StorageCenterCarVO.SizeDetail> outSizeList = new ArrayList<>();
|
|
|
+ List<String> billIds = outList.stream().map(StorageBill::getId).collect(Collectors.toList());
|
|
|
+ List<RollOutShippDetails> rollOutShippDetailsList = Collections.emptyList();
|
|
|
+
|
|
|
+ if (!billIds.isEmpty()) {
|
|
|
+ LambdaQueryWrapper<RollOutShippDetails> rollClubQuery = new LambdaQueryWrapper<>();
|
|
|
+ rollClubQuery.in(RollOutShippDetails::getStorageBillId, billIds);
|
|
|
+ rollOutShippDetailsList = rollOutShippDetailsService.list(rollClubQuery);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!CollectionUtils.isEmpty(rollOutShippDetailsList)) {
|
|
|
+ outSizeList = rollOutShippDetailsList.stream()
|
|
|
+ .map(rollOutShippDetails -> {
|
|
|
+ StorageCenterCarVO.SizeDetail sizeDetail = new StorageCenterCarVO.SizeDetail();
|
|
|
+ sizeDetail.setSize(rollOutShippDetails.getSize());
|
|
|
+ sizeDetail.setSizeAmount((rollOutShippDetails.getStackAddr() != null && !rollOutShippDetails.getStackAddr().isEmpty()) ? 4 : 1);
|
|
|
+ sizeDetail.setSizeWeight(BigDecimal.valueOf(rollOutShippDetails.getBlankOutput()).setScale(4, RoundingMode.HALF_UP));
|
|
|
+ return sizeDetail;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ sizeList.addAll(outSizeList);
|
|
|
+
|
|
|
+ storageCenterCarVO.setRollOutShippDetails(outDetailList);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ // 计算总支数(所有 sizeAmount 之和)
|
|
|
+ int totalSizeAmount = sizeList.stream()
|
|
|
+ .mapToInt(StorageCenterCarVO.SizeDetail::getSizeAmount)
|
|
|
+ .sum();
|
|
|
+
|
|
|
+ // 计算总重量(所有 sizeWeight 之和)
|
|
|
+ BigDecimal totalSizeWeight = sizeList.stream()
|
|
|
+ .map(StorageCenterCarVO.SizeDetail::getSizeWeight)
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+
|
|
|
+ storageCenterCarVO.setAmountTotal(totalSizeAmount);
|
|
|
+ storageCenterCarVO.setTotalWeight(totalSizeWeight);
|
|
|
+
|
|
|
+ // 按 size 分组并累加 sizeAmount 和 sizeWeight
|
|
|
+ Map<String, StorageCenterCarVO.SizeDetail> groupedSizeMap = sizeList.stream()
|
|
|
+ .collect(Collectors.toMap(
|
|
|
+ StorageCenterCarVO.SizeDetail::getSize,
|
|
|
+ sizeDetail -> sizeDetail,
|
|
|
+ (existing, incoming) -> {
|
|
|
+ existing.setSizeAmount(existing.getSizeAmount() + incoming.getSizeAmount());
|
|
|
+ existing.setSizeWeight(existing.getSizeWeight().add(incoming.getSizeWeight()));
|
|
|
+ return existing;
|
|
|
+ }
|
|
|
+ ));
|
|
|
+
|
|
|
+ // 将合并后的结果转换回 List
|
|
|
+ List<StorageCenterCarVO.SizeDetail> mergedSizeList = new ArrayList<>(groupedSizeMap.values());
|
|
|
+
|
|
|
+ // 设置到 storageCenterCarVO
|
|
|
+ storageCenterCarVO.setSizeDetails(mergedSizeList);
|
|
|
+
|
|
|
+
|
|
|
+ storageCenterCarVO.setTotalCarNum(allCarNum);
|
|
|
+
|
|
|
+
|
|
|
+ return storageCenterCarVO;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public StorageCenterCarDetailVO storageCenterCarById(String storageBillId) {
|
|
|
+ StorageCenterCarDetailVO storageCenterCarDetailVO = new StorageCenterCarDetailVO();
|
|
|
+
|
|
|
+ LambdaQueryWrapper<StorageBill> billQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ billQueryWrapper.eq(StorageBill::getId, storageBillId);
|
|
|
+ StorageBill bill = storageBillMapper.selectOne(billQueryWrapper);
|
|
|
+
|
|
|
+ BeanUtils.copyProperties(bill, storageCenterCarDetailVO);
|
|
|
+
|
|
|
+ if (bill.getHeatNo() == null || bill.getHeatNo().isEmpty()) {
|
|
|
+ return storageCenterCarDetailVO;
|
|
|
+ }
|
|
|
+
|
|
|
+ List<String> heatNoList = Arrays.asList(bill.getHeatNo().split(","));
|
|
|
+
|
|
|
+ List<StorageCenterCarDetailVO.heatNoInfo> heatNoInfos = new ArrayList<>();
|
|
|
+ List<StorageCenterCarDetailVO.heatNoDetail> heatNoDetails = new ArrayList<>();
|
|
|
+
|
|
|
+ // **提前查询所有数据,存入 Map**
|
|
|
+ Map<String, List<RollClubTwoDetails>> rollClubTwoMap = new HashMap<>();
|
|
|
+ Map<String, List<RollClubThreeDetails>> rollClubThreeMap = new HashMap<>();
|
|
|
+ Map<String, List<RollOutShippDetails>> rollOutShippMap = new HashMap<>();
|
|
|
+
|
|
|
+ if ("棒二".equals(bill.getDestination())) {
|
|
|
+ rollClubTwoMap = rollClubTwoDetailsService.list(
|
|
|
+ new LambdaQueryWrapper<RollClubTwoDetails>().eq(RollClubTwoDetails::getStorageBillId, bill.getId()))
|
|
|
+ .stream().collect(Collectors.groupingBy(RollClubTwoDetails::getHeatNo));
|
|
|
+ } else if ("棒三".equals(bill.getDestination())) {
|
|
|
+ rollClubThreeMap = rollClubThreeDetailsService.list(
|
|
|
+ new LambdaQueryWrapper<RollClubThreeDetails>().eq(RollClubThreeDetails::getStorageBillId, bill.getId()))
|
|
|
+ .stream().collect(Collectors.groupingBy(RollClubThreeDetails::getHeatNo));
|
|
|
+ } else if ("上若".equals(bill.getDestination())) {
|
|
|
+ rollOutShippMap = rollOutShippDetailsService.list(
|
|
|
+ new LambdaQueryWrapper<RollOutShippDetails>().eq(RollOutShippDetails::getStorageBillId, bill.getId()))
|
|
|
+ .stream().collect(Collectors.groupingBy(RollOutShippDetails::getHeatNo));
|
|
|
+ }
|
|
|
+
|
|
|
+ // **遍历 heatNoList 进行处理**
|
|
|
+ for (String s : heatNoList) {
|
|
|
+ StorageCenterCarDetailVO.heatNoDetail heatNoDetail = new StorageCenterCarDetailVO.heatNoDetail();
|
|
|
+ heatNoDetail.setHeatNo(s);
|
|
|
+ List<StorageCenterCarDetailVO.assemblyNumberDetail> assemblyNumberDetails = new ArrayList<>();
|
|
|
+ List<StorageCenterCarDetailVO.assemblyNumberDetail> handleSizeList = new ArrayList<>();
|
|
|
+
|
|
|
+ List<RollClubTwoDetails> rollClubTwoDetailsList = rollClubTwoMap.get(s);
|
|
|
+ List<RollClubThreeDetails> rollClubThreeDetailsList = rollClubThreeMap.get(s);
|
|
|
+ List<RollOutShippDetails> rollOutShippDetailsList = rollOutShippMap.get(s);
|
|
|
+
|
|
|
+ if (rollClubTwoDetailsList != null) {
|
|
|
+ // 处理 "棒二" 的逻辑
|
|
|
+ rollClubTwoDetailsList.stream()
|
|
|
+ .filter(item -> item.getAssemblyNumber() != null)
|
|
|
+ .collect(Collectors.groupingBy(RollClubTwoDetails::getAssemblyNumber))
|
|
|
+ .forEach((assemblyNumber, list) -> {
|
|
|
+ String billetNoStr = list.stream()
|
|
|
+ .map(RollClubTwoDetails::getBilletNo)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.joining("、"));
|
|
|
+
|
|
|
+ BigDecimal totalBlankOutput = list.stream()
|
|
|
+ .map(RollClubTwoDetails::getBlankOutput)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .map(BigDecimal::valueOf)
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+
|
|
|
+ String size = list.get(0).getSize();
|
|
|
+
|
|
|
+ int sum = list.stream()
|
|
|
+ .mapToInt(item -> (item.getStackAddr() != null && !item.getStackAddr().isEmpty()) ? 4 : 1)
|
|
|
+ .sum();
|
|
|
+
|
|
|
+ StorageCenterCarDetailVO.assemblyNumberDetail assemblyNumberDetail = new StorageCenterCarDetailVO.assemblyNumberDetail();
|
|
|
+ assemblyNumberDetail.setAssemblyNumber(assemblyNumber);
|
|
|
+ assemblyNumberDetail.setSize(size);
|
|
|
+ assemblyNumberDetail.setBilletNo(billetNoStr);
|
|
|
+ assemblyNumberDetail.setSizeAmount(sum);
|
|
|
+ assemblyNumberDetail.setSizeWeight(totalBlankOutput);
|
|
|
+
|
|
|
+ assemblyNumberDetails.add(assemblyNumberDetail);
|
|
|
+ handleSizeList.add(assemblyNumberDetail);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ if (rollClubThreeDetailsList != null) {
|
|
|
+ // 处理 "棒三" 的逻辑
|
|
|
+ rollClubThreeDetailsList.stream()
|
|
|
+ .filter(item -> item.getAssemblyNumber() != null)
|
|
|
+ .collect(Collectors.groupingBy(RollClubThreeDetails::getAssemblyNumber))
|
|
|
+ .forEach((assemblyNumber, list) -> {
|
|
|
+ String billetNoStr = list.stream()
|
|
|
+ .map(RollClubThreeDetails::getBilletNo)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.joining("、"));
|
|
|
+
|
|
|
+ BigDecimal totalBlankOutput = list.stream()
|
|
|
+ .map(RollClubThreeDetails::getBlankOutput)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .map(BigDecimal::valueOf)
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+
|
|
|
+ String size = list.get(0).getSize();
|
|
|
+
|
|
|
+ int sum = list.stream()
|
|
|
+ .mapToInt(item -> (item.getStackAddr() != null && !item.getStackAddr().isEmpty()) ? 4 : 1)
|
|
|
+ .sum();
|
|
|
+
|
|
|
+ StorageCenterCarDetailVO.assemblyNumberDetail assemblyNumberDetail = new StorageCenterCarDetailVO.assemblyNumberDetail();
|
|
|
+ assemblyNumberDetail.setAssemblyNumber(assemblyNumber);
|
|
|
+ assemblyNumberDetail.setSize(size);
|
|
|
+ assemblyNumberDetail.setBilletNo(billetNoStr);
|
|
|
+ assemblyNumberDetail.setSizeAmount(sum);
|
|
|
+ assemblyNumberDetail.setSizeWeight(totalBlankOutput);
|
|
|
+
|
|
|
+ assemblyNumberDetails.add(assemblyNumberDetail);
|
|
|
+ handleSizeList.add(assemblyNumberDetail);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ if (rollOutShippDetailsList != null) {
|
|
|
+ // 处理 "上若" 的逻辑
|
|
|
+ rollOutShippDetailsList.stream()
|
|
|
+ .filter(item -> item.getAssemblyNumber() != null)
|
|
|
+ .collect(Collectors.groupingBy(RollOutShippDetails::getAssemblyNumber))
|
|
|
+ .forEach((assemblyNumber, list) -> {
|
|
|
+ String billetNoStr = list.stream()
|
|
|
+ .map(RollOutShippDetails::getBilletNo)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.joining("、"));
|
|
|
+
|
|
|
+ BigDecimal totalBlankOutput = list.stream()
|
|
|
+ .map(RollOutShippDetails::getBlankOutput)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .map(BigDecimal::valueOf)
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+
|
|
|
+ String size = list.get(0).getSize();
|
|
|
+
|
|
|
+ int sum = list.stream()
|
|
|
+ .mapToInt(item -> (item.getStackAddr() != null && !item.getStackAddr().isEmpty()) ? 4 : 1)
|
|
|
+ .sum();
|
|
|
+
|
|
|
+ StorageCenterCarDetailVO.assemblyNumberDetail assemblyNumberDetail = new StorageCenterCarDetailVO.assemblyNumberDetail();
|
|
|
+ assemblyNumberDetail.setAssemblyNumber(assemblyNumber);
|
|
|
+ assemblyNumberDetail.setSize(size);
|
|
|
+ assemblyNumberDetail.setBilletNo(billetNoStr);
|
|
|
+ assemblyNumberDetail.setSizeAmount(sum);
|
|
|
+ assemblyNumberDetail.setSizeWeight(totalBlankOutput);
|
|
|
+
|
|
|
+ assemblyNumberDetails.add(assemblyNumberDetail);
|
|
|
+ handleSizeList.add(assemblyNumberDetail);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ heatNoDetail.setAssemblyNumberDetails(assemblyNumberDetails);
|
|
|
+
|
|
|
+ handleSizeList.stream()
|
|
|
+ .collect(Collectors.groupingBy(StorageCenterCarDetailVO.assemblyNumberDetail::getSize))
|
|
|
+ .forEach((size, list) -> {
|
|
|
+ StorageCenterCarDetailVO.heatNoInfo heatNoInfo = new StorageCenterCarDetailVO.heatNoInfo();
|
|
|
+ heatNoInfo.setHeatNo(s);
|
|
|
+
|
|
|
+ BigDecimal totalBlankOutput = list.stream()
|
|
|
+ .map(StorageCenterCarDetailVO.assemblyNumberDetail::getSizeWeight)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+
|
|
|
+ int totalSizeAmount = list.stream()
|
|
|
+ .map(StorageCenterCarDetailVO.assemblyNumberDetail::getSizeAmount)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .reduce(0, Integer::sum);
|
|
|
+
|
|
|
+ heatNoInfo.setSize(size);
|
|
|
+ heatNoInfo.setSizeAmount(totalSizeAmount);
|
|
|
+ heatNoInfo.setSizeWeight(totalBlankOutput);
|
|
|
+ heatNoInfos.add(heatNoInfo);
|
|
|
+ });
|
|
|
+
|
|
|
+ BigDecimal totalBlankOutput = handleSizeList.stream()
|
|
|
+ .map(StorageCenterCarDetailVO.assemblyNumberDetail::getSizeWeight)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+
|
|
|
+ int totalSizeAmount = handleSizeList.stream()
|
|
|
+ .map(StorageCenterCarDetailVO.assemblyNumberDetail::getSizeAmount)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .reduce(0, Integer::sum);
|
|
|
+
|
|
|
+ heatNoDetail.setSizeWeight(totalBlankOutput);
|
|
|
+ heatNoDetail.setSizeAmount(totalSizeAmount);
|
|
|
+
|
|
|
+ heatNoDetails.add(heatNoDetail);
|
|
|
+ }
|
|
|
+
|
|
|
+ storageCenterCarDetailVO.setHeatNoInfos(heatNoInfos);
|
|
|
+ storageCenterCarDetailVO.setHeatNoDetails(heatNoDetails);
|
|
|
+
|
|
|
+ return storageCenterCarDetailVO;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// 计算整数总和的方法
|
|
|
private int calculateIntSum(List<DestinationStatisticsDetails> list) {
|
|
|
if (list == null) {
|
|
@@ -5126,4 +5501,20 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 将 StorageBill 列表转换为 RollDetail 列表
|
|
|
+ */
|
|
|
+ private List<StorageCenterCarVO.RollDetail> convertToRollDetailList(List<StorageBill> billList) {
|
|
|
+ return billList.stream()
|
|
|
+ .map(bill -> {
|
|
|
+ StorageCenterCarVO.RollDetail rollDetail = new StorageCenterCarVO.RollDetail();
|
|
|
+ rollDetail.setStorageBillId(bill.getId());
|
|
|
+ rollDetail.setRollAmount(bill.getAmountTotal());
|
|
|
+ rollDetail.setLicensePlate(bill.getLicensePlate());
|
|
|
+ rollDetail.setType("热装");
|
|
|
+ return rollDetail;
|
|
|
+ })
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ }
|
|
|
}
|