From da9edee66e4cdabeee26d6f961751da652025d41 Mon Sep 17 00:00:00 2001
From: ynhfasrs <ynhfasrs@qq.com>
Date: 星期三, 21 五月 2025 09:27:25 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   38 +++++++++++++-------------------------
 1 files changed, 13 insertions(+), 25 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 3a85a83..a52b7ef 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -160,6 +160,11 @@
                         }
 
                         String barcode = barcodeThread.getBarcode();
+                        if (Cools.isEmpty(barcode)) {
+                            log.info("鍏ュ簱淇″彿婊¤冻锛屾墭鐩樼爜鏈┖");
+                            continue;
+                        }
+
                         TaskWrk taskWrk1 = taskWrkService.selectOne(new EntityWrapper<TaskWrk>().eq("barcode", barcode));
                         if (taskWrk1 != null) {
                             log.info("鎵樼洏鐮侊細" + barcode + "浠诲姟妗e瓨鍦�");
@@ -192,7 +197,12 @@
                                     .doPost();
                             JSONObject jsonObject = JSON.parseObject(response);
                             redisUtil.set(RedisKeyType.IN_TASK_LOCK.key, "lock", 5);
-                            if (jsonObject.getInteger("code") != 200) {
+                            if (jsonObject.getInteger("code") == 200) {
+
+                            } else if (jsonObject.getInteger("code") == 500) {
+                                log.info("鏉$爜锛�" + barcode + "鐢宠WMS澶辫触,response=" + JSON.toJSONString(jsonObject));
+                                continue;
+                            }else {
                                 log.info("鏉$爜锛�" + barcode + "鐢宠WMS澶辫触,response=" + JSON.toJSONString(jsonObject));
                                 continue;
                             }
@@ -313,7 +323,7 @@
         for (CrnSlave crnSlave : slaveProperties.getCrn()) {
             // 閬嶅巻鍫嗗灈鏈哄嚭搴撶珯
             for (CrnSlave.CrnStn crnStn : crnSlave.getCrnOutStn()) {
-                List<StaDesc> staDescs = staDescMapper.selectList(new EntityWrapper<StaDesc>().eq("crn_no", crnSlave.getId()).eq("crn_stn", crnStn.getStaNo()));
+                List<StaDesc> staDescs = staDescMapper.selectList(new EntityWrapper<StaDesc>().eq("type_no", 2).eq("crn_no", crnSlave.getId()).eq("crn_stn", crnStn.getStaNo()));
                 for (StaDesc staDesc : staDescs) {
                     try {
                         // 鑾峰彇鍫嗗灈鏈哄嚭搴撶珯淇℃伅
@@ -519,28 +529,6 @@
                         continue;
                     }
 
-                    LocMast locMast=locMastService.selectByLocNo(taskWrk.getStartPoint());
-                    //鍒ゆ柇鍏跺簱浣嶆槸鍚︿负娣卞簱浣嶏紝濡傛灉涓烘繁搴撲綅鎵惧叾娴呭簱浣嶆槸閮芥湁璐�
-                    if(locMast.getRow1()==1||locMast.getRow1()==5){
-                        LocMast locMast1=locMastService.selectOne(new EntityWrapper<LocMast>()
-                                .eq("row1", (locMast.getRow1()+1))
-                                .eq("bay1",locMast.getBay1())
-                                .eq("lev1",locMast.getLev1()).eq("loc_sts","F"));
-                        if (!Cools.isEmpty(locMast1)){
-                            log.info(locMast.getLocNo()+"鍑烘繁搴撲綅锛屾祬搴撲綅鏈夎揣");
-                            continue;
-                        }
-                    }else if(locMast.getRow1()==4||locMast.getRow1()==8){
-                        LocMast locMast1=locMastService.selectOne(new EntityWrapper<LocMast>()
-                                .eq("row1", (locMast.getRow1()-1))
-                                .eq("bay1",locMast.getBay1())
-                                .eq("lev1",locMast.getLev1()).eq("loc_sts","F"));
-                        if (!Cools.isEmpty(locMast1)){
-                            log.info(locMast.getLocNo()+"鍑烘繁搴撲綅锛屾祬搴撲綅鏈夎揣");
-                            continue;
-                        }
-                    }
-
                     // 鑾峰彇鍫嗗灈鏈哄嚭搴撶珯淇℃伅
                     SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId());
                     StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo());
@@ -558,7 +546,7 @@
                     }
 
                     // 鍒ゆ柇鍫嗗灈鏈哄嚭搴撶珯鐘舵��
-                    if (staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")
+                    if (staProtocol.isAutoing() && staProtocol.isOutEnable() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")
                     ) {
                         // 鍛戒护涓嬪彂鍖� --------------------------------------------------------------------------
 

--
Gitblit v1.9.1