From 91a453198edfc4450ecc91adfcccee6ccf25a3f0 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期四, 10 四月 2025 15:52:08 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/YiWuProject

---
 hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java |   47 ++++++++++++++++++++---------------------------
 1 files changed, 20 insertions(+), 27 deletions(-)

diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
index c174581..75754d3 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
@@ -16,6 +16,7 @@
 import com.mes.hollow.entity.dto.HollowBigStorageDTO;
 import com.mes.hollow.entity.dto.HollowGlassDetailsDTO;
 import com.mes.hollow.entity.dto.LackDetailsDTO;
+import com.mes.hollow.entity.vo.HollowAllFlowCardVO;
 import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO;
 import com.mes.hollow.mapper.HollowGlassRelationInfoMapper;
 import com.mes.hollow.service.HollowBigStorageCageDetailsService;
@@ -28,7 +29,10 @@
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
 /**
@@ -286,7 +290,7 @@
     }
 
     @Override
-    public Map<String, List<FlowCardGlassInfoDTO>> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query) {
+    public List<HollowAllFlowCardVO> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query) {
         List<HollowBigStorageCageDetails> detailsList = hollowBigStorageCageDetailsService.list(new LambdaQueryWrapper<HollowBigStorageCageDetails>()
                 .eq(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN)
                 .like(StringUtils.isNotBlank(query.getFilmsId()), HollowBigStorageCageDetails::getFilmsId, query.getFilmsId())
@@ -296,39 +300,28 @@
         );
         if (CollectionUtil.isEmpty(detailsList)) {
             log.info("绗煎唴鏃犵幓鐠�");
-            return new HashMap<>();
+            return new ArrayList<>();
         }
         Map<String, List<HollowBigStorageCageDetails>> listMap = detailsList.stream().collect(Collectors.groupingBy(HollowBigStorageCageDetails::getFlowCardId));
-        List<FlowCardGlassInfoDTO> dtos = new ArrayList<>();
+        List<HollowAllFlowCardVO> resultList = new ArrayList<>();
         listMap.forEach((e, v) -> {
+            HollowAllFlowCardVO hollowAllFlowCardVO = new HollowAllFlowCardVO();
             HollowBigStorageCageDetails cageDetails = v.get(0);
+            hollowAllFlowCardVO.setFlowCardId(e);
+            if (cageDetails.getHollowSequence() == 0) {
+                hollowAllFlowCardVO.setIsThroughSlot(Boolean.TRUE);
+            } else {
+                hollowAllFlowCardVO.setIsThroughSlot(Boolean.FALSE);
+            }
             //鎸夌収娴佺▼鍗¤幏鍙栧搴旂殑浜у搧鍚嶇О
             String productName = baseMapper.queryProductNameByFlowCardId(cageDetails.getFlowCardId());
+            hollowAllFlowCardVO.setProductName(productName);
             List<FlowCardGlassInfoDTO> flowCardInfoList = hollowBigStorageCageDetailsService.hollowIsAll(e, cageDetails.getTotalLayer(), Boolean.FALSE);
-            for (FlowCardGlassInfoDTO item : flowCardInfoList) {
-                item.setProductName(productName);
-                dtos.add(item);
-            }
+            hollowAllFlowCardVO.setFlowCardGlassInfoDTOList(flowCardInfoList);
+            resultList.add(hollowAllFlowCardVO);
         });
-        Map<String, FlowCardGlassInfoDTO> result = dtos.stream()
-                .collect(Collectors.toMap(
-                        FlowCardGlassInfoDTO::getFlowCardId,
-                        dto -> {
-                            FlowCardGlassInfoDTO newDto = new FlowCardGlassInfoDTO();
-                            newDto.setFlowCardId(dto.getFlowCardId());
-                            newDto.setSumCount(dto.getSumCount());
-                            newDto.setPairCount(dto.getPairCount());
-                            newDto.setRealCount(dto.getRealCount());
-                            newDto.setLayer(dto.getLayer());
-                            return newDto;
-                        },
-                        (dto1, dto2) -> {
-                            dto1.setRealCount(dto1.getRealCount() + dto2.getRealCount()); // 绱姞 realCount
-                            dto1.setLayer(Math.max(dto1.getLayer(), dto2.getLayer())); // 绱姞 鏈�澶у眰鏁�
-                            return dto1; // 杩斿洖鍚堝苟鍚庣殑瀵硅薄
-                        }
-                ));
-        return dtos.stream().collect(Collectors.groupingBy(e -> e.getFlowCardId() + ":" + e.getProductName()));
+        return resultList;
+//        return dtos.stream().collect(Collectors.groupingBy(e -> e.getFlowCardId() + ":" + e.getProductName()));
     }
 
     @Override

--
Gitblit v1.8.0