From e021ca7fe59647b483a8762f509cc708841cc9cf Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期二, 22 四月 2025 15:25:58 +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 | 43 ++++++++++++++++++++++++++++---------------
1 files changed, 28 insertions(+), 15 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..48244d2 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
@@ -7,6 +7,7 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mes.common.config.Const;
+import com.mes.common.config.ConstSysConfig;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.glassinfo.service.GlassInfoService;
import com.mes.hollow.controller.HollowBigStorageCageController;
@@ -23,6 +24,8 @@
import com.mes.hollow.service.HollowGlassRelationInfoService;
import com.mes.hollowqueue.entity.HollowGlassQueueInfo;
import com.mes.hollowqueue.service.HollowGlassQueueInfoService;
+import com.mes.largenscreen.entity.PieChartVO;
+import com.mes.sysconfig.service.SysConfigService;
import com.mes.tools.DateUtil;
import com.mes.utils.Blank;
import com.mes.utils.RedisUtil;
@@ -32,7 +35,6 @@
import freemarker.template.Version;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -61,15 +63,17 @@
HollowFormulaDetailsService hollowFormulaDetailsService;
@Resource
HollowGlassRelationInfoService hollowGlassRelationInfoService;
+ @Resource
+ SysConfigService sysConfigService;
@Resource
RedisUtil redisUtil;
- @Value("${mes.glassGap}")
- private Integer glassGap;
-
- @Value("${mes.carWidth}")
- private Integer carWidth;
+// @Value("${mes.glassGap}")
+// private Integer glassGap;
+//
+// @Value("${mes.carWidth}")
+// private Integer carWidth;
private static final int ID_RATIO = 10;
@@ -213,14 +217,16 @@
//璁剧疆鏂囦欢绗竴灞傚垪琛ㄦ暟鎹�
//鏆傛椂鐢熸垚绗煎唴鎵�鏈夌殑鐜荤拑淇℃伅锛堝凡閰嶅鍜屾湭閰嶅鐨勶級
-// List<HollowGlassRelationInfo> hollowGlassRelationInfos = hollowGlassRelationInfoService.list(new LambdaQueryWrapper<HollowGlassRelationInfo>()
-// .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>> listMap = hollowGlassRelationInfos.stream()
+ .collect(Collectors.groupingBy(HollowBigStorageCageDetails::getHollowSequence,
+ Collectors.collectingAndThen(Collectors.toList(),
+ list -> list.stream().sorted(Comparator.comparing(HollowBigStorageCageDetails::getLayer)).collect(Collectors.toList()))));
+ 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<>();
@@ -282,8 +288,6 @@
glassAndFrameList.add(glassAndFrame);
});
details.setGlassAndFrameList(glassAndFrameList);
-
-
Configuration cfg = new Configuration(new Version("2.3.29"));
cfg.setClassForTemplateLoading(HollowBigStorageCageController.class, "/templates/");
// 鍒涘缓Calculator瀹炰緥
@@ -358,11 +362,14 @@
.queryOutGlassList(request.getFlowCardId(), request.getCell());
int isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity();
List<HollowGlassQueueInfo> hollowQueues = new ArrayList<>();
-
+ Integer carWidth = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_CAR_WIDTH);
+ Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_GLASS_GAP);
if (930 == request.getCell()) {
Map<Integer, List<HollowBigStorageCageDetails>> listMap = hollowBigStorageCageDetailsList.stream()
.collect(Collectors.groupingBy(HollowBigStorageCageDetails::getHollowSequence));
- 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父椤哄簭鎺掑垪锛岃绠椾竴杞︽渶澶氭斁鍑犲潡锛岀畻濂藉潡鏁颁箣鍚庡皢涓�杞︾殑鐜荤拑鎸夌収鍊掑簭瀛樺偍
@@ -388,6 +395,7 @@
}
}
}
+
} else {
loop:
for (HollowBigStorageCageDetails item : hollowBigStorageCageDetailsList) {
@@ -422,5 +430,10 @@
queueInfo.setUpdateTime(new Date());
return queueInfo;
}
+
+ @Override
+ public List<PieChartVO> queryPieChart(){
+ return baseMapper.queryPieChart();
+ }
}
--
Gitblit v1.8.0