From 13304e6d01f1da6467996c3d2796fac948871194 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期四, 13 三月 2025 17:28:32 +0800
Subject: [PATCH] 1、中空lisec文件优化:出片顺序
---
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 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 e237003..bedc273 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
@@ -217,10 +217,11 @@
// .eq(HollowGlassRelationInfo::getFlowCardId, flowCardId).orderByAsc(HollowGlassRelationInfo::getHollowSequence));
List<HollowBigStorageCageDetails> hollowGlassRelationInfos = hollowBigStorageCageDetailsService.queryPairGlassList(flowCardId, relationInfo.getTotalLayer(), relationInfo.getTotalPairQuantity(), isOut);
Map<Integer, List<HollowBigStorageCageDetails>> listMap = hollowGlassRelationInfos.stream().collect(Collectors.groupingBy(HollowBigStorageCageDetails::getHollowSequence));
-
+ Map<Integer, List<HollowBigStorageCageDetails>> sortListMap = new TreeMap<>();
+ sortListMap.putAll(listMap);
//璁剧疆闂撮殧鏉挎暟鎹叡鎵�鏈夐厤瀵圭幓鐠冧娇鐢�
List<LisecHollowGlassAndFrameDetails> glassAndFrameList = new ArrayList<>();
- listMap.forEach((e, v) -> {
+ sortListMap.forEach((e, v) -> {
LisecHollowGlassAndFrameDetails glassAndFrame = new LisecHollowGlassAndFrameDetails();
List<LisecHollowGlassDetails> glassList = new ArrayList<>();
List<LisecHollowFrameDetails> frameList = new ArrayList<>();
@@ -281,10 +282,7 @@
glassAndFrame.setFrameList(frameList);
glassAndFrameList.add(glassAndFrame);
});
- Collections.sort(glassAndFrameList, (s1, s2) -> Integer.parseInt(s1.getItemNum()) - Integer.parseInt(s2.getItemNum()));
details.setGlassAndFrameList(glassAndFrameList);
-
-
Configuration cfg = new Configuration(new Version("2.3.29"));
cfg.setClassForTemplateLoading(HollowBigStorageCageController.class, "/templates/");
// 鍒涘缓Calculator瀹炰緥
@@ -363,8 +361,9 @@
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()) {
+ Map<Integer, List<HollowBigStorageCageDetails>> sortListMap = new TreeMap<>();
+ sortListMap.putAll(listMap);
+ for (Map.Entry<Integer, List<HollowBigStorageCageDetails>> entry : sortListMap.entrySet()) {
//鍒涘缓闃熷垪鎺ユ敹涓嶆弧瓒虫垚瀵规儏鍐典笅锛氫竴瀵圭幓鐠冨垎鍑犳涓婅溅鐨勬搴忛棶棰�
List<HollowGlassQueueInfo> tempList = new ArrayList<>();
//鍏堝皢鐜荤拑鎸夌収姝e父椤哄簭鎺掑垪锛岃绠椾竴杞︽渶澶氭斁鍑犲潡锛岀畻濂藉潡鏁颁箣鍚庡皢涓�杞︾殑鐜荤拑鎸夌収鍊掑簭瀛樺偍
@@ -373,7 +372,7 @@
for (HollowBigStorageCageDetails item : reverse) {
remainWidth = remainWidth - (int) Math.max(item.getWidth(), item.getHeight());
if (remainWidth < 0) {
- disorderList.add(CollectionUtil.reverse(tempList));
+ hollowQueues.addAll(CollectionUtil.reverse(tempList));
tempList = new ArrayList<>();
remainWidth = carWidth - (int) Math.max(item.getWidth(), item.getHeight());
}
@@ -381,7 +380,7 @@
tempList.add(queueInfo);
remainWidth = remainWidth - glassGap;
}
- disorderList.add(CollectionUtil.reverse(tempList));
+ hollowQueues.addAll(CollectionUtil.reverse(tempList));
HollowBigStorageCageDetails cageDetails = entry.getValue().get(0);
if (cageDetails.getIsPair() == 1) {
isPairCount = isPairCount - cageDetails.getTotalLayer();
@@ -390,11 +389,7 @@
}
}
}
- //闃叉鐜荤拑涓┖绾跨幓鐠冩棤搴忥紝灏嗙幓鐠冩寜鐓ч『搴忛噸鏂版帓搴�
- 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