From 75b98831417be414bc43e1832479d05d20cf6ac3 Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期四, 13 三月 2025 16:44:06 +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/HollowGlassOutRelationInfoServiceImpl.java | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java index 7341cb1..e237003 100644 --- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java +++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java @@ -281,6 +281,7 @@ glassAndFrame.setFrameList(frameList); glassAndFrameList.add(glassAndFrame); }); + Collections.sort(glassAndFrameList, (s1, s2) -> Integer.parseInt(s1.getItemNum()) - Integer.parseInt(s2.getItemNum())); details.setGlassAndFrameList(glassAndFrameList); @@ -362,6 +363,7 @@ if (930 == request.getCell()) { Map<Integer, List<HollowBigStorageCageDetails>> listMap = hollowBigStorageCageDetailsList.stream() .collect(Collectors.groupingBy(HollowBigStorageCageDetails::getHollowSequence)); + List<List<HollowGlassQueueInfo>> disorderList = new ArrayList<>(); for (Map.Entry<Integer, List<HollowBigStorageCageDetails>> entry : listMap.entrySet()) { //鍒涘缓闃熷垪鎺ユ敹涓嶆弧瓒虫垚瀵规儏鍐典笅锛氫竴瀵圭幓鐠冨垎鍑犳涓婅溅鐨勬搴忛棶棰� List<HollowGlassQueueInfo> tempList = new ArrayList<>(); @@ -371,7 +373,7 @@ for (HollowBigStorageCageDetails item : reverse) { remainWidth = remainWidth - (int) Math.max(item.getWidth(), item.getHeight()); if (remainWidth < 0) { - hollowQueues.addAll(CollectionUtil.reverse(tempList)); + disorderList.add(CollectionUtil.reverse(tempList)); tempList = new ArrayList<>(); remainWidth = carWidth - (int) Math.max(item.getWidth(), item.getHeight()); } @@ -379,7 +381,7 @@ tempList.add(queueInfo); remainWidth = remainWidth - glassGap; } - hollowQueues.addAll(CollectionUtil.reverse(tempList)); + disorderList.add(CollectionUtil.reverse(tempList)); HollowBigStorageCageDetails cageDetails = entry.getValue().get(0); if (cageDetails.getIsPair() == 1) { isPairCount = isPairCount - cageDetails.getTotalLayer(); @@ -388,6 +390,11 @@ } } } + //闃叉鐜荤拑涓┖绾跨幓鐠冩棤搴忥紝灏嗙幓鐠冩寜鐓ч『搴忛噸鏂版帓搴� + Collections.sort(disorderList, (s1, s2) -> s1.get(0).getHollowSequence() - s2.get(0).getHollowSequence()); + for (List<HollowGlassQueueInfo> list : disorderList) { + hollowQueues.addAll(list); + } } else { loop: for (HollowBigStorageCageDetails item : hollowBigStorageCageDetailsList) { -- Gitblit v1.8.0