From aa64540348a39c2247a79b48156e089d80f43030 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期二, 31 十二月 2024 17:01:21 +0800
Subject: [PATCH] 1、启动关闭plc任务

---
 hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
index f9f171e..17e9a24 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
@@ -9,12 +9,10 @@
 import com.mes.glassinfo.service.GlassInfoService;
 import com.mes.hollow.entity.HollowBigStorageCageDetails;
 import com.mes.hollow.entity.HollowGlassOutRelationInfo;
-import com.mes.hollow.entity.HollowGlassOutRelationTaskDetails;
 import com.mes.hollow.entity.request.HollowTaskRequest;
 import com.mes.hollow.mapper.HollowGlassOutRelationInfoMapper;
 import com.mes.hollow.service.HollowBigStorageCageDetailsService;
 import com.mes.hollow.service.HollowGlassOutRelationInfoService;
-import com.mes.hollow.service.HollowGlassOutRelationTaskDetailsService;
 import com.mes.hollowqueue.entity.HollowGlassQueueInfo;
 import com.mes.hollowqueue.service.HollowGlassQueueInfoService;
 import com.mes.utils.RedisUtil;
@@ -44,8 +42,6 @@
     HollowBigStorageCageDetailsService hollowBigStorageCageDetailsService;
     @Resource
     HollowGlassQueueInfoService hollowGlassQueueInfoService;
-    @Resource
-    HollowGlassOutRelationTaskDetailsService hollowGlassOutRelationTaskDetailsService;
 
     @Resource
     RedisUtil redisUtil;
@@ -149,9 +145,10 @@
         }
         List<HollowGlassOutRelationInfo> outRelationInfos = this.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                 .eq(HollowGlassOutRelationInfo::getCell, request.getCell())
-                .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START));
+                .eq(HollowGlassOutRelationInfo::getFlowCardId, request.getFlowCardId())
+                .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE));
         if (CollectionUtil.isNotEmpty(outRelationInfos)) {
-            log.info("鏈夋鍦ㄦ墽琛岀殑浠诲姟");
+            log.info("褰撳墠娴佺▼鍗″湪鏈潯绾挎湁鏈畬鎴愮殑浠诲姟");
             return null;
         }
         //淇濆瓨浠诲姟鍏崇郴涓昏〃
@@ -161,12 +158,8 @@
         info.setTotalLayer(glassInfo.getTotalLayer());
         info.setState(Const.HOLLOW_FLOW_CARD_NEW);
         info.setTotalPairQuantity(request.getTotalPairQuantity());
+        info.setFormulaId(request.getFormulaId());
         this.save(info);
-        //淇濆瓨浠诲姟璇︽儏琛�
-        HollowGlassOutRelationTaskDetails taskDetails = new HollowGlassOutRelationTaskDetails();
-        BeanUtils.copyProperties(request, taskDetails);
-        taskDetails.setRelationId(info.getId());
-        hollowGlassOutRelationTaskDetailsService.save(taskDetails);
         // 鏌ヨ鍑洪渶瑕佸嚭鐜荤拑鐨勯槦鍒�
         List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService
                 .queryOutGlassList(request.getFlowCardId(), request.getCell());

--
Gitblit v1.8.0