From 85ce1fa2f3d894cce2be0faa24551dfca7896ac9 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期二, 22 十月 2024 08:10:46 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/ahyxwcs' into ahyxwcs --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 56 +++++++++++++++++++++++--------------------------------- 1 files changed, 23 insertions(+), 33 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 1b9768f..2c4ee46 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -139,7 +139,7 @@ if (!Cools.isEmpty(barcode)) { // log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode); - if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { + if ("00000000".endsWith(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { continue; } } else { @@ -235,7 +235,7 @@ staProtocol.setWorkNo(wrkMast.getWrkNo()); staProtocol.setStaNo(wrkMast.getStaNo()); - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,238); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); @@ -280,7 +280,7 @@ staProtocol.setStaNo(dto.getRgvSstaNo()); } - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,283); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); @@ -323,7 +323,7 @@ if (!Cools.isEmpty(barcode)) { // log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode); - if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { + if ("00000000".endsWith(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { continue; } } else { @@ -419,7 +419,7 @@ staProtocol.setWorkNo(wrkMast.getWrkNo()); staProtocol.setStaNo(wrkMast.getStaNo()); - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,422); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); @@ -464,7 +464,7 @@ staProtocol.setStaNo(dto.getRgvSstaNo()); } - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,467); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); @@ -538,7 +538,7 @@ if (!Cools.isEmpty(barcode)) { // log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode); - if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { + if ("00000000".endsWith(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { continue; } } else { @@ -634,7 +634,7 @@ staProtocol.setWorkNo(wrkMast111.getWrkNo()); staProtocol.setStaNo(wrkMast111.getStaNo()); - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,637); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { if (ledThread != null) { @@ -692,7 +692,7 @@ staProtocol.setStaNo(dto.getRgvSstaNo()); } - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,695); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { if (ledThread != null) { @@ -738,19 +738,7 @@ if (!Cools.isEmpty(barcode)) { // log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode); - if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { - continue; - } - if ("00000000".equals(barcode)){ - log.error(inSta+"绔欑偣锛屾壂鐮佸け璐ワ紝barcode锛�"+barcode); - // led 寮傚父鏄剧ず - LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed()); - if (ledThread != null) { - ErrMsg errMsg1 = new ErrMsg(); - errMsg1.setErrMsg(inSta+"绔欑偣锛屾壂鐮佸け璐ワ紝barcode锛�"+barcode); - errMsg1.setArea("1"); - MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errMsg1)); - } + if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { continue; } } else { @@ -852,7 +840,8 @@ staProtocol.setWorkNo(wrkMast.getWrkNo()); staProtocol.setStaNo(wrkMast.getStaNo()); - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,843); + log.info("閿佸畾鏍囪flase===銆婲===銆嬬珯鐐瑰彿锛歿}锛屽伐浣滃彿锛歿}锛屾潯鐮�:{}",staProtocol.getSiteId(),staProtocol.getWorkNo(),barcode); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { if (ledThread != null) { @@ -900,7 +889,8 @@ staProtocol.setStaNo(dto.getRgvSstaNo()); } - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,892); + log.info("閿佸畾鏍囪flase===銆婲===銆嬬珯鐐瑰彿锛歿}锛屽伐浣滃彿锛歿}锛屾潯鐮�:{}",staProtocol.getStaNo(),staProtocol.getWorkNo(),barcode); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); @@ -995,7 +985,7 @@ staNo = 147; } staProtocol.setStaNo(staNo); - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,988); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (result) { // 鏇存柊宸ヤ綔涓绘。 @@ -1103,7 +1093,7 @@ // 鏇存柊绔欑偣淇℃伅 涓� 涓嬪彂plc鍛戒护 staProtocol.setWorkNo(wrkMast.getWrkNo()); staProtocol.setStaNo(dto.getStaNo()); - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,1096); // ledThread.errorReset(); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { @@ -1218,7 +1208,7 @@ // 鏇存柊绔欑偣淇℃伅 涓� 涓嬪彂plc鍛戒护 staProtocol.setWorkNo(wrkMast.getWrkNo()); staProtocol.setStaNo(dto.getStaNo()); - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,1211); // ledThread.errorReset(); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { @@ -2332,7 +2322,7 @@ staProtocol.setWorkNo(wrkMast.getWrkNo()); staProtocol.setStaNo(wrkMast.getStaNo()); - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,2325); if (!MessageQueue.offer(SlaveType.Devp, crnStn.getDevpPlcId(), new Task(99, crnCommand.getCrnNo()-2))) { log.error("杈撻�佺嚎閿佸畾鍛戒护涓嬪彂澶辫触锛屽爢鍨涙満鍙�={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), crnCommand.getCrnNo()-2); @@ -4094,7 +4084,7 @@ // 鏇存柊绔欑偣淇℃伅 涓� 涓嬪彂plc鍛戒护 staProtocol.setWorkNo(dto.getWorkNo()); staProtocol.setStaNo(dto.getStaNo()); - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,4087); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); @@ -4157,7 +4147,7 @@ // 鏇存柊绔欑偣淇℃伅 涓� 涓嬪彂plc鍛戒护 staProtocol.setWorkNo(dto.getWorkNo()); staProtocol.setStaNo(dto.getStaNo()); - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,4150); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); @@ -4220,7 +4210,7 @@ // 鏇存柊绔欑偣淇℃伅 涓� 涓嬪彂plc鍛戒护 staProtocol.setWorkNo(dto.getWorkNo()); staProtocol.setStaNo(dto.getStaNo()); - devpThread.setPakMk(staProtocol.getSiteId(), false); + devpThread.setPakMk(staProtocol.getSiteId(), false,4213); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); @@ -6039,7 +6029,7 @@ return false; } if (steProtocol.getMode() != (short)1) { - log.error(steNo + "鍙峰皬杞︾绾匡紝鏃犳硶鎿嶄綔"); +// log.error(steNo + "鍙峰皬杞︾绾匡紝鏃犳硶鎿嶄綔"); return false; } if (steProtocol.getChargeStatus()!=0){ @@ -6094,7 +6084,7 @@ return false; } if (steProtocol.getMode() != (short)1) { - log.error(steNo + "鍙峰皬杞︾绾匡紝鏃犳硶鎿嶄綔"); +// log.error(steNo + "鍙峰皬杞︾绾匡紝鏃犳硶鎿嶄綔"); return false; } if (steProtocol.getCharge()<31.0F && chargeSign){ -- Gitblit v1.9.1