| | |
| | | |
| | | 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 { |
| | |
| | | |
| | | 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 { |
| | |
| | | |
| | | 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 { |
| | |
| | | |
| | | 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 { |
| | |
| | | staProtocol.setStaNo(wrkMast.getStaNo()); |
| | | |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | log.info("锁定标记flase===》N===》站点号:{},工作号:{},条码:{}",staProtocol.getStaNo(),staProtocol.getWorkNo(),barcode); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | if (!result) { |
| | | if (ledThread != null) { |
| | |
| | | } |
| | | |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | log.info("锁定标记flase===》N===》站点号:{},工作号:{},条码:{}",staProtocol.getStaNo(),staProtocol.getWorkNo(),barcode); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | if (!result) { |
| | | throw new CoolException("更新plc站点信息失败"); |
| | |
| | | return false; |
| | | } |
| | | if (steProtocol.getMode() != (short)1) { |
| | | log.error(steNo + "号小车离线,无法操作"); |
| | | // log.error(steNo + "号小车离线,无法操作"); |
| | | return false; |
| | | } |
| | | if (steProtocol.getChargeStatus()!=0){ |
| | |
| | | return false; |
| | | } |
| | | if (steProtocol.getMode() != (short)1) { |
| | | log.error(steNo + "号小车离线,无法操作"); |
| | | // log.error(steNo + "号小车离线,无法操作"); |
| | | return false; |
| | | } |
| | | if (steProtocol.getCharge()<31.0F && chargeSign){ |