From 78b52c20a27a02466c8af9c0c8222b9f2f3ff20c Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期四, 18 一月 2024 19:59:47 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |  307 ++++++++++++++++++++------------------------------
 1 files changed, 125 insertions(+), 182 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 4b31eb4..b28f535 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -19,6 +19,7 @@
 import com.zy.common.model.SearchLocParam;
 import com.zy.common.model.StartupDto;
 import com.zy.common.service.CommonService;
+import com.zy.common.utils.CollectionUtils;
 import com.zy.common.utils.HttpHandler;
 import com.zy.common.utils.News;
 import com.zy.core.CrnThread;
@@ -90,7 +91,7 @@
     @Value("${wms.url}")
     private String wmsUrl;
 
-    public short wrkNo = 10000;
+    public short wrkNo = 11000;
 
     /**
      * 缁勬墭
@@ -152,6 +153,8 @@
                 // 閫�鍥�
                 if (back) {
 //                        News.warn("鎵爜鍏ュ簱澶辫触锛寋}鍏ュ簱绔欏洜{}寮傚父锛屾墭鐩樺凡琚��鍥�", inSta.getStaNo(), errMsg);
+                    MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errMsg));
+
                     if (!staProtocol.isLoading()){
                         continue;
                     }
@@ -159,6 +162,7 @@
                         continue;
                     }
                     staProtocol.setWorkNo(wrkNo);
+                    News.info("{}鍏ュ簱鍥為��锛歿}锛屼换鍔″彿锛歿}", inSta.getStaNo(), errMsg,wrkNo);
                     wrkNo++;
                     staProtocol.setStaNo(inSta.getBackSta().shortValue());
                     devpThread.setPakMk(staProtocol.getSiteId(), false);
@@ -170,12 +174,11 @@
                         && staProtocol.isLoading()
                         && staProtocol.isInEnable()
                         && !staProtocol.isEmptyMk()
-                        && (staProtocol.getWorkNo() == 9999 || staProtocol.getWorkNo() == 9997 || staProtocol.getWorkNo() == 9995)
                         && staProtocol.isPakMk()) {// && !Cools.isEmpty(barcode)) {
 
-//                    if(Cools.isEmpty(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode)) {
-//                        News.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode);
-//                        //鏉$爜涓虹┖鎴栬�呬笉绗﹀悎锛岄��搴撳埌172绔欑偣
+                    if(Cools.isEmpty(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode)) {
+                        News.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode);
+                        //鏉$爜涓虹┖鎴栬�呬笉绗﹀悎锛岄��搴撳埌172绔欑偣
 //                        staProtocol.setWorkNo((short)9999);
 //                        staProtocol.setStaNo((short)172);
 //                        devpThread.setPakMk(staProtocol.getSiteId(), false);
@@ -183,8 +186,8 @@
 //                        if (!result) {
 //                            throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触");
 //                        }
-//                        continue;
-//                    }
+                        continue;
+                    }
 
                     // 鍒ゆ柇閲嶅宸ヤ綔妗�
                     WrkMast wrkMast = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode);
@@ -199,7 +202,7 @@
 
                     WrkMast checkPick = wrkMastService.selectOne(new EntityWrapper<WrkMast>()
                             .eq("barcode", barcode)
-                            .eq("io_type", 103));
+                            .in("io_type", 107,103));
                     if (!Cools.isEmpty(checkPick)) {
                         continue;
                     }
@@ -236,8 +239,9 @@
 
 
                         } else {
-                            staProtocol.setWorkNo((short) 9998);
-                            staProtocol.setStaNo((short) 14);
+                            staProtocol.setWorkNo(wrkNo);
+                            wrkNo++;
+                            staProtocol.setStaNo(inSta.getBackSta().shortValue());
                             devpThread.setPakMk(staProtocol.getSiteId(), false);
                             MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
 
@@ -409,11 +413,21 @@
                 }
                 String barcode = barcodeThread.getBarcode();
 
-                if (!Cools.isEmpty(barcode) && (staProtocol.getWorkNo() != 9998 || staProtocol.getWorkNo() != 9996)) {
+                if (!Cools.isEmpty(barcode)) {
 //                    log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", pickSta.getBarcode(), barcode);
-                    if ("NG".endsWith(barcode) || "NoRead".equals(barcode)) {
-                        staProtocol.setWorkNo((short) 9998);
-                        staProtocol.setStaNo((short) 14);
+                    if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode)) {
+                        if (!staProtocol.isLoading()) {
+                            continue;
+                        }
+                        if (!staProtocol.isPakMk()) {
+                            continue;
+                        }
+                        if(staProtocol.getWorkNo() != 0) {
+                            continue;
+                        }
+                        staProtocol.setWorkNo(wrkNo);
+                        wrkNo++;
+                        staProtocol.setStaNo(pickSta.getBackSta().shortValue());
                         devpThread.setPakMk(staProtocol.getSiteId(), false);
                         MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                         // led 寮傚父鏄剧ず
@@ -436,7 +450,7 @@
                         && staProtocol.isLoading()
                         && staProtocol.isInEnable()
                         && !staProtocol.isEmptyMk()
-                        && (staProtocol.getWorkNo() == 9999 || staProtocol.getWorkNo() == 9997 || staProtocol.getWorkNo() == 9995)
+//                        && (staProtocol.getWorkNo() == 9999 || staProtocol.getWorkNo() == 9997 || staProtocol.getWorkNo() == 9995)
                         && staProtocol.isPakMk()) {
 
                     WrkMast wrkMast = wrkMastMapper.selectPickStep(barcode);
@@ -462,8 +476,7 @@
                     // 鑾峰彇鐩爣绔�
                     Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>()
                             .eq("type_no", wrkMast.getIoType() - 50)
-                            //閫熻吘鐗规湁鎹℃枡锛� 11绔欐槸鍑哄簱绔欙紝 鐒跺悗鎵嬪姩璧板埌15绔欒繘琛屽啀鍏ュ簱
-                            .eq("stn_no", 15) // 浣滀笟绔欑偣 = 鎷f枡鍑哄簱鐨勭洰鏍囩珯
+                            .eq("stn_no", pickSta.getStaNo()) // 浣滀笟绔欑偣 = 鎷f枡鍑哄簱鐨勭洰鏍囩珯
                             .eq("crn_no", wrkMast.getCrnNo()); // 鍫嗗灈鏈哄彿
                     StaDesc staDesc = staDescService.selectOne(wrapper);
                     if (Cools.isEmpty(staDesc)) {
@@ -1085,7 +1098,7 @@
             for (WrkMast wrkMast : wrkMasts) {
                 CrnSlave.CrnStn crnStn = null;
                 for (CrnSlave.CrnStn crnStn1 : slave.getCrnOutStn()) {
-                    if (crnStn1.getStaNo() == wrkMast.getSourceStaNo()) {
+                    if (wrkMast.getSourceStaNo().equals(crnStn1.getStaNo())) {
                         crnStn = crnStn1;
                         break;
                     } else {
@@ -1746,144 +1759,111 @@
      * 鍑哄簱  ===>> 宸ヤ綔妗d俊鎭啓鍏ed鏄剧ず鍣�
      */
     public synchronized void ledExecute() {
-//        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
-
         for (LedSlave led : slaveProperties.getLed()) {
             // 鑾峰彇杈撻�佺嚎plc绾跨▼
             DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, led.getDevpPlcId());
-//            // 鍛戒护闆嗗悎
-//            List<LedCommand> commands = new ArrayList<>();
-//            // 宸ヤ綔妗i泦鍚�
-//            List<WrkMast> wrkMasts = new ArrayList<>();
+            // 鍛戒护闆嗗悎
+            List<LedCommand> commands = new ArrayList<>();
+            // 宸ヤ綔妗i泦鍚�
+            List<WrkMast> wrkMasts = new ArrayList<>();
             for (Integer staNo : led.getStaArr()) {
                 // 鑾峰彇鍙夎溅绔欑偣
                 StaProtocol staProtocol = devpThread.getStation().get(staNo);
                 if (null == staProtocol || null == staProtocol.getWorkNo() || 0 == staProtocol.getWorkNo() || !staProtocol.isLoading()) {
-                    MessageQueue.offer(SlaveType.Led, led.getId(), new Task(3, ""));
                     continue;
                 } else {
                     staProtocol = staProtocol.clone();
                 }
                 // 鑾峰彇宸ヤ綔妗f暟鎹�
                 WrkMast wrkMast = wrkMastMapper.selectById(staProtocol.getWorkNo());
-                if (null == wrkMast) {
-                    MessageQueue.offer(SlaveType.Led, led.getId(), new Task(3, ""));
-                    continue;
-                }
-                ArrayList<MatDto> matDtos = new ArrayList<>();
-                Wrapper<WrkDetl> detlWrapper = new EntityWrapper<WrkDetl>()
-                        .eq("wrk_no", wrkMast.getWrkNo());
+                if (null == wrkMast || wrkMast.getWrkSts() < 14 || wrkMast.getIoType() < 100) { continue; }
+                wrkMasts.add(wrkMast);
+                // 缁勮鍛戒护
                 LedCommand ledCommand = new LedCommand();
                 ledCommand.setWorkNo(wrkMast.getWrkNo());
-                ledCommand.setStaNo(wrkMast.getStaNo());
-                ledCommand.setSourceStaNo(wrkMast.getSourceStaNo());
-                ledCommand.setLocNo(wrkMast.getLocNo());
-                ledCommand.setSourceLocNo(wrkMast.getSourceLocNo());
                 ledCommand.setIoType(wrkMast.getIoType());
-                ledCommand.setTitle(wrkMast.getIoType$());
-
+                // 鍑哄簱妯″紡
                 switch (wrkMast.getIoType()) {
-                    case 10:
+                    case 101:
+                        ledCommand.setTitle("鍏ㄦ澘鍑哄簱");
+                        break;
+                    case 103:
+                        ledCommand.setTitle("鎷f枡鍑哄簱");
+                        break;
+                    case 104:
+                        ledCommand.setTitle("骞舵澘鍑哄簱");
+                        break;
+                    case 107:
+                        ledCommand.setTitle("鐩樼偣鍑哄簱");
+                        break;
                     case 110:
+                        ledCommand.setTitle("绌烘澘鍑哄簱");
                         ledCommand.setEmptyMk(true);
                         break;
                     default:
-                        ledCommand.setBarcode(wrkMast.getBarcode());
-                        List<WrkDetl> wrkDetls = wrkDetlService.selectList(detlWrapper);
-                        for (WrkDetl wrkDetl : wrkDetls) {
-                            MatDto matDto = new MatDto();
-                            matDto.setMaknx(wrkDetl.getMaktx());
-                            matDto.setMatNo(wrkDetl.getMatnr());
-                            matDto.setCount(wrkDetl.getAnfme());
-                            matDtos.add(matDto);
-                        }
+                        News.error("浠诲姟鍏ュ嚭搴撶被鍨嬮敊璇紒锛侊紒[宸ヤ綔鍙凤細{}] [鍏ュ嚭搴撶被鍨嬶細{}]", wrkMast.getWrkNo(), wrkMast.getIoType());
                         break;
-
-
                 }
-                ledCommand.setMatDtos(matDtos);
-                MessageQueue.offer(SlaveType.Led, led.getId(), new Task(3, ledCommand.toString()));
+                ledCommand.setSourceLocNo(wrkMast.getSourceLocNo());
+                ledCommand.setStaNo(wrkMast.getStaNo());
+                ledCommand.setBarcode(wrkMast.getBarcode());
+                if (wrkMast.getIoType() != 110) {
+                    List<WrkDetl> wrkDetls = wrkDetlService.findByWorkNo(wrkMast.getWrkNo());
 
-//                wrkMasts.add(wrkMast);
-//                // 缁勮鍛戒护
-//                LedCommand ledCommand = new LedCommand();
-//                ledCommand.setWorkNo(wrkMast.getWrkNo());
-//                ledCommand.setIoType(wrkMast.getIoType());
-//                // 鍑哄簱妯″紡
-//                switch (wrkMast.getIoType()) {
-//                    case -1:
-//                        ledCommand.setTitle("鍏ㄦ澘鍏ュ簱");
-//                        break;
-//                    case 10:
-//                        ledCommand.setTitle("绌烘澘鍏ュ簱");
-//                        break;
-//                    case 10-1:
-//                        ledCommand.setTitle("鍏ㄦ澘鍑哄簱");
-//                        break;
-//                    case 103:
-//                        ledCommand.setTitle("鎷f枡鍑哄簱");
-//                        break;
-//                    case 104:
-//                        ledCommand.setTitle("骞舵澘鍑哄簱");
-//                        break;
-//                    case 107:
-//                        ledCommand.setTitle("鐩樼偣鍑哄簱");
-//                        break;
-//                    case 110:
-//                        ledCommand.setTitle("绌烘澘鍑哄簱");
-//                        ledCommand.setEmptyMk(true);
-//                        break;
-//                    default:
-//                        News.error(methodName + ":浠诲姟鍏ュ嚭搴撶被鍨嬮敊璇紒锛侊紒[宸ヤ綔鍙凤細{}] [鍏ュ嚭搴撶被鍨嬶細{}]", wrkMast.getWrkNo(), wrkMast.getIoType());
-//                        break;
-//                }
-//                ledCommand.setSourceLocNo(wrkMast.getSourceLocNo());
-//                ledCommand.setLocNo(wrkMast.getLocNo());
-//                ledCommand.setStaNo(wrkMast.getStaNo());
-////                ledCommand.setSourceStaNo(wrkMast.getSourceStaNo());
-//                if (wrkMast.getIoType() != 110 && wrkMast.getIoType() != 10) {
-//                    List<WrkDetl> wrkDetls = wrkDetlService.findByWorkNo(wrkMast.getWrkNo());
-//                    wrkDetls.forEach(wrkDetl -> ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getAnfme())));
-//                }
-//                commands.add(ledCommand);
-//            }
-//            Set<Integer> workNos = wrkMasts.stream().map(WrkMast::getWrkNo).collect(Collectors.toSet());
-//            // 鑾峰彇LED绾跨▼
-//            LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getId());
-//            // 鐩稿悓宸ヤ綔鍙烽泦鍚堝垯杩囨护
-////            if (CollectionUtils.equals(ledThread.getWorkNos(), workNos)) {
-////                continue;
-////            }
-//            // 鍛戒护涓嬪彂 -------------------------------------------------------------------------------
-//            if (!commands.isEmpty()) {
-//                String errMsg = "";
-//                if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(3, commands))) {
-//                    News.error(methodName + ":{}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort());
-//                    continue;
-//                } else {
-//                    ledThread.setLedMk(false);
-//                }
-//
-//
+                    wrkDetls.forEach(wrkDetl -> {
+                        Double total = 0.0;
+                        EntityWrapper<LocDetl> wrapper = new EntityWrapper<>();
+                        LocDetl locDetl = locDetlService.selectOne(wrapper.eq("zpallet", wrkDetl.getZpallet()).eq("matnr", wrkDetl.getMatnr()));
+                        if (Cools.isEmpty(locDetl)) {
+                            total = wrkDetl.getAnfme();
+                        } else {
+                            total = locDetl.getAnfme();
+                        }
+                        if (wrkMast.getIoType() == 101) {
+                            ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getBatch(), wrkDetl.getSpecs(), wrkDetl.getManu(), wrkDetl.getMemo(), wrkDetl.getAnfme(),total));
+                        }
+                        if (wrkMast.getIoType() == 103 && (null == wrkDetl.getInspect() || 0 == wrkDetl.getInspect())) {
+                            ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getBatch(), wrkDetl.getSpecs(), wrkDetl.getManu(), wrkDetl.getMemo(), wrkDetl.getAnfme(),total));
+                        }
+                        if (wrkMast.getIoType() == 107) {
+                            ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getBatch(), wrkDetl.getSpecs(), wrkDetl.getManu(), wrkDetl.getMemo(), wrkDetl.getAnfme(),total));
+                        }
+                    });
+                }
+                commands.add(ledCommand);
             }
-//
-//            try {
-//                // 淇敼涓绘。led鏍囪
-//                for (WrkMast wrkMast : wrkMasts) {
-//                    wrkMast.setOveMk("Y");
-//                    wrkMast.setModiTime(new Date());
-//                    if (wrkMastMapper.updateById(wrkMast) == 0) {
-//                        throw new CoolException("鏇存柊宸ヤ綔妗eけ璐�");
-//                    }
-//                }
-//
-//                // 鏇存柊绾跨▼褰撳墠宸ヤ綔鍙烽泦鍚�
-//                ledThread.setWorkNos(workNos);
-//
-//            } catch (Exception e) {
-//                e.printStackTrace();
-//                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-//            }
+            Set<Integer> workNos = wrkMasts.stream().map(WrkMast::getWrkNo).collect(Collectors.toSet());
+            // 鑾峰彇LED绾跨▼
+            LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getId());
+            // 鐩稿悓宸ヤ綔鍙烽泦鍚堝垯杩囨护
+            if (CollectionUtils.equals(ledThread.getWorkNos(), workNos)) {
+                continue;
+            }
+            // 鍛戒护涓嬪彂 -------------------------------------------------------------------------------
+            if (!commands.isEmpty()) {
+                if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(1, commands))) {
+                    News.error("{}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort());
+                    continue;
+                }
+            }
+
+            try {
+                // 淇敼涓绘。led鏍囪
+                for (WrkMast wrkMast : wrkMasts) {
+                    wrkMast.setOveMk("Y");
+                    wrkMast.setModiTime(new Date());
+                    if (wrkMastMapper.updateById(wrkMast) == 0) {
+                        throw new CoolException("鏇存柊宸ヤ綔妗eけ璐�");
+                    }
+                }
+
+                // 鏇存柊绾跨▼褰撳墠宸ヤ綔鍙烽泦鍚�
+                ledThread.setWorkNos(workNos);
+
+            } catch (Exception e) {
+                e.printStackTrace();
+                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            }
 
         }
     }
@@ -1892,33 +1872,6 @@
      * 鍏朵粬  ===>> LED鏄剧ず鍣ㄥ浣嶏紝鏄剧ず榛樿淇℃伅
      */
     public synchronized void ledReset() {
-//        for (LedSlave led : slaveProperties.getLed()) {
-//            // 鑾峰彇杈撻�佺嚎plc绾跨▼
-//            DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, led.getDevpPlcId());
-//            // 鍛戒护闆嗗悎
-//            boolean reset = true;
-//            for (Integer staNo : led.getStaArr()) {
-//                // 鑾峰彇鍙夎溅绔欑偣
-//                StaProtocol staProtocol = devpThread.getStation().get(staNo);
-//                if (staProtocol == null) {
-//                    continue;
-//                } else {
-//                    staProtocol = staProtocol.clone();
-//                }
-//                if (staProtocol.getWorkNo() != 0) {
-//                    reset = false;
-//                    break;
-//                }
-//            }
-//            // 鑾峰彇led绾跨▼
-//            LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getDevpPlcId());
-//            // led鏄剧ず榛樿鍐呭
-//            if (reset) {
-//                if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(2, new ArrayList<>()))) {
-//                    News.error("{}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort());
-//                }
-//            }
-//        }
         for (LedSlave led : slaveProperties.getLed()) {
             // 鑾峰彇杈撻�佺嚎plc绾跨▼
             DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, led.getDevpPlcId());
@@ -1927,34 +1880,24 @@
             for (Integer staNo : led.getStaArr()) {
                 // 鑾峰彇鍙夎溅绔欑偣
                 StaProtocol staProtocol = devpThread.getStation().get(staNo);
-                if (staProtocol == null) {
-                    continue;
-                }
-                if (staProtocol.getWorkNo() != 0 && staProtocol.isLoading()) {
+                if (staProtocol == null) { continue; }
+                if (staProtocol.getWorkNo() != 0) {
                     reset = false;
                     break;
                 }
             }
-//            // 鑾峰彇led绾跨▼
-//            LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getId());
-//            // led鏄剧ず榛樿鍐呭
-//            if (reset && !ledThread.isLedMk()) {
-//                if (led.getId() == 7) {
-//                    ledThread.setLedMk(true);
-//                    if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(4, new ArrayList<>()))) {
-//                        News.error("{}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort());
-//                    } else {
-//
-//                    }
-//                } else {
-//                    ledThread.setLedMk(true);
-//                    if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(2, new ArrayList<>()))) {
-//                        News.error("{}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort());
-//                    } else {
-//
-//                    }
-//                }
-//            }
+            // 鑾峰彇led绾跨▼
+            LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getDevpPlcId());
+            // led鏄剧ず榛樿鍐呭
+            if (reset) {
+                if (ledThread == null) {
+                    continue;
+                }
+                ledThread.errorReset();
+                if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(2, new ArrayList<>()))) {
+                    News.error("{}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort());
+                }
+            }
         }
     }
 

--
Gitblit v1.9.1