From 5252d40ed210204c9055207a834f1162f9616e08 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期五, 04 十一月 2022 16:01:42 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 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 09096b7..679c3da 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -192,7 +192,21 @@
                             if (!result) {
                                 throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触");
                             }
-                        } else {
+                        } else if (jsonObject.getInteger("code").equals(700) && (!barcodeThread.getBarcode().equals("NG"))){
+                            StartupDto dto = jsonObject.getObject("data", StartupDto.class);
+                            barcodeThread.setBarcode("");
+                            staProtocol.setWorkNo((short)9998);
+                            staProtocol.setStaNo((short)101);
+                            devpThread.setPakMk(staProtocol.getSiteId(), false);
+                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
+                            log.error("url锛歿}锛況equest锛歿}锛況esponse锛歿}", wmsUrl+"/rpc/pakin/loc/v1", JSON.toJSONString(param), response);
+                        }else {
+                            StartupDto dto = jsonObject.getObject("data", StartupDto.class);
+                            barcodeThread.setBarcode("");
+                            staProtocol.setWorkNo((short)9998);
+                            staProtocol.setStaNo((short)101);
+                            devpThread.setPakMk(staProtocol.getSiteId(), false);
+                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                             log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", wmsUrl+"/rpc/pakin/loc/v1", JSON.toJSONString(param), response);
                         }
 
@@ -473,7 +487,7 @@
                 } else {
                     staProtocol = staProtocol.clone();
                 }
-                if (staProtocol.isAutoing() && staProtocol.isLoading() && (staProtocol.getWorkNo() == 0 || staProtocol.getStaNo() == null)) {
+                if (staProtocol.isAutoing() && (staProtocol.isLoading()||staProtocol.getSiteId()==109) && (staProtocol.getWorkNo() == 0 || staProtocol.getStaNo() == null)) {
                     // 鏌ヨ宸ヤ綔妗�
                     WrkMast wrkMast = wrkMastMapper.selectPakOutStep2(staProtocol.getSiteId());
                     if (wrkMast == null) {
@@ -2082,7 +2096,7 @@
                             LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>()
                                     .eq("channel",(i+1)));
                             if (locMast.getLocSts().equals("F")){
-                                locMast.setPackStatus(7); //7.绱ф�ュ嚭搴�
+                                locMast.setPackStatus(8); //8.绱ф�ュ嚭搴�
                                 locMastService.update(locMast,new EntityWrapper<LocMast>()
                                         .eq("channel",(i+1)));
                             }
@@ -2162,12 +2176,12 @@
                 LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("fire_status", 1));
                 if (!Cools.isEmpty(locMast)){
                     //鎶ヨ淇″彿鍐欏叆1
-                    if (!MessageQueue.offer(SlaveType.Crn, locMast.getCrnNo(), new Task(4, (short)1))) {
+                    if (!MessageQueue.offer(SlaveType.Crn, 1, new Task(4, (short)1))) {
                         log.error("鐏  ===>> 缁欏爢鍨涙満鍙戦�佹姤璀︿俊鍙峰け璐�");
                     }
                 } else {
                     //鎶ヨ淇″彿娌℃湁鍚庯紝澶嶄綅鍦板潃
-                    if (!MessageQueue.offer(SlaveType.Crn, locMast.getCrnNo(), new Task(4, (short)0))) {
+                    if (!MessageQueue.offer(SlaveType.Crn, 1, new Task(4, (short)0))) {
                         log.error("鐏  ===>> 缁欏爢鍨涙満娓呴浂澶嶄綅鎶ヨ淇″彿澶辫触");
                     }
                 }

--
Gitblit v1.9.1