From 83f738105416c9b11e3b7c5246a0980e41b6650e Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期一, 13 十月 2025 16:59:48 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java |   30 +++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 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 61c9c18..2299c73 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
@@ -23,6 +23,9 @@
 import com.mes.hollow.service.HollowBigStorageCageService;
 import com.mes.hollow.service.HollowGlassOutRelationInfoService;
 import com.mes.hollow.service.HollowGlassRelationInfoService;
+import com.mes.order.entity.HollowGlassDetailsDTO;
+import com.mes.order.entity.OrderDetailsDTO;
+import com.mes.order.service.OrdersService;
 import com.mes.sysconfig.service.SysConfigService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
@@ -60,6 +63,8 @@
     SysConfigService sysConfigService;
     @Resource
     DamageService damageService;
+    @Resource
+    OrdersService ordersService;
 //    @Value("${mes.slotWidth}")
 //    private Integer slotWidth;
 //    @Value("${mes.glassGap}")
@@ -207,13 +212,13 @@
             return;
         }
         //鎸夌収娴佺▼鍗¤幏鍙栨湰娴佺▼鍗℃渶鍚庝竴灞傛垨绗竴娆$殑鐜荤拑鏁版嵁
-        List<HollowGlassDetailsDTO> glassDetailsDTOS = this.baseMapper.queryFlowCardIdMaxLayerGlassInfo(flowCardId, totalLayer);
+        List<HollowGlassDetailsDTO> glassDetailsDTOS = ordersService.queryFlowCardIdMaxLayerGlassInfo(flowCardId, totalLayer);
         if (CollectionUtil.isEmpty(glassDetailsDTOS)) {
             log.info("褰撳墠娴佺▼鍗℃渶澶栧眰鏁版嵁鏈壘鍒帮紝璇峰湪erp纭鏁版嵁鏃犺锛屾祦绋嬪崱锛歿}锛屾�诲眰鏁皗}", flowCardId, totalLayer);
             return;
         }
         if (totalLayer != layer) {
-            glassDetailsDTOS = this.baseMapper.queryFlowCardIdLayerGlassInfo(flowCardId, totalLayer, layer);
+            glassDetailsDTOS = ordersService.queryFlowCardIdLayerGlassInfo(flowCardId, totalLayer, layer);
         }
         if (CollectionUtil.isEmpty(glassDetailsDTOS)) {
             log.info("褰撳墠娴佺▼鍗℃渶澶栧眰鏁版嵁鏈壘鍒帮紝璇峰湪erp纭鏁版嵁鏃犺锛屾祦绋嬪崱锛歿}锛屾�诲眰鏁皗},灞傛暟{}", flowCardId, totalLayer, layer);
@@ -298,8 +303,12 @@
         for (List<HollowGlassRelationInfo> item : tempHollowList) {
             relationInfoList.addAll(item);
         }
-        log.info("鍒嗛厤瀹屾瘯");
-        this.saveBatch(relationInfoList);
+        log.info("鍒嗛厤瀹屾瘯:{}", relationInfoList);
+        try {
+            this.saveBatch(relationInfoList);
+        } catch (Exception e) {
+            log.error("淇濆瓨澶辫触:{}", e);
+        }
     }
 
     @Override
@@ -404,7 +413,7 @@
     }
 
     @Override
-    public Map<Integer,List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId) {
+    public Map<Integer, List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId) {
         List<LackDetailsDTO> detailsDTOS = baseMapper.queryLackByFlowCard(flowCardId);
         return detailsDTOS.stream().collect(Collectors.groupingBy(item -> item.getLayer()));
     }
@@ -429,7 +438,9 @@
         List<GlassInfo> glassInfos = glassInfoService.list(new LambdaQueryWrapper<GlassInfo>()
                 .eq(GlassInfo::getFlowCardId, request.getFlowCardId())
                 .eq(GlassInfo::getLayer, request.getLayer())
-                .eq(GlassInfo::getGlassType, request.getGlassType()));
+                .eq(GlassInfo::getGlassType, request.getGlassType())
+                .eq(request.getGlassId() != null, GlassInfo::getGlassId, request.getGlassId())
+        );
         for (GlassInfo glassInfo : glassInfos) {
             //鎺扮墖鎶ョ牬鎹�
             damageService.autoSubmitReport(glassInfo.getGlassId(), request.getLine(), request.getWorkingProcedure(), request.getRemark(), request.getState());
@@ -438,8 +449,13 @@
     }
 
     @Override
+    public List<LackDetailsDTO> queryLackGlassByFlowCard(HollowBigStorageDetailsQueryVO query) {
+        return baseMapper.queryLackGlassByFlowCard(query.getFlowCardId(), query.getOrderSort(), query.getLayer());
+    }
+
+    @Override
     public OrderDetailsDTO queryProductNameByFlowCardId(String flowCardId, String productName, String customerName) {
-        OrderDetailsDTO dto = hollowGlassOutRelationInfoService.queryProductNameByFlowCardId(flowCardId);
+        OrderDetailsDTO dto = ordersService.queryProductNameByFlowCardId(flowCardId);
         if ((StringUtils.isBlank(productName) || dto.getProductName().contains(productName)) && (StringUtils.isBlank(customerName) || dto.getCustomerName().contains(customerName))) {
             return dto;
         }

--
Gitblit v1.8.0