| | |
| | | |
| | | String barcode = wrkMast.getBarcode(); |
| | | if(!Cools.isEmpty(barcode)) { |
| | | if("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) { |
| | | if("NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode) || "empty".equals(barcode)) { |
| | | continue; |
| | | } |
| | | } else { |
| | |
| | | String barcode = staProtocol.getBarcode(); |
| | | if (!Cools.isEmpty(barcode)) { |
| | | // log.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode); |
| | | if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { |
| | | if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { |
| | | continue; |
| | | } |
| | | } else { |
| | |
| | | String barcode = staProtocol607.getBarcode(); |
| | | if (!Cools.isEmpty(barcode)) { |
| | | // log.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode); |
| | | if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { |
| | | if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { |
| | | return; |
| | | } |
| | | } else { |
| | |
| | | && staProtocol607.getStaNo() == 0 && staProtocol607.isInEnable()){ |
| | | WrkMast wrkMast = wrkMastMapper.selectByBarcodeTwo(barcode); |
| | | if (!Cools.isEmpty(wrkMast)){ |
| | | staProtocol607.setWorkNo(wrkMast.getWrkNo()); |
| | | staProtocol607.setStaNo(staNo1); |
| | | boolean result2 = MessageQueue.offer(SlaveType.Devp, 2, new Task(2, staProtocol607)); |
| | | |
| | | StaProtocol staProtocolNew = new StaProtocol(); |
| | | staProtocolNew.setSiteId(staProtocol607.getSiteId()); |
| | | staProtocolNew.setWorkNo(wrkMast.getWrkNo()); |
| | | staProtocolNew.setStaNo(staNo1); |
| | | // devpThread.setPakMk(staProtocolNew.getSiteId(), false,7989); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, 2, new Task(2, staProtocolNew)); |
| | | } |
| | | } |
| | | } else { |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | // try{ |
| | | // for (int idi = 1;idi<5;idi++){ |
| | | // LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, idi); |
| | | // |
| | | // if (ledThread != null) { |
| | | // ErrMsg errMsg1 = new ErrMsg(); |
| | | // errMsg1.setErrMsg("测试:"+idi); |
| | | // errMsg1.setArea("1"); |
| | | // MessageQueue.offer(SlaveType.Led, idi, new Task(5, errMsg1)); |
| | | // } try { |
| | | // Thread.sleep(500); |
| | | // } catch (Exception e){ |
| | | // |
| | | // } |
| | | // } |
| | | // LedThread ledThread3 = (LedThread) SlaveConnection.get(SlaveType.Led, 3); |
| | | // |
| | | // if (ledThread3 != null) { |
| | | // ErrMsg errMsg1 = new ErrMsg(); |
| | | // errMsg1.setErrMsg("测试测试测试测试测试测试测试测试测试测试测试测试测试:"+3); |
| | | // errMsg1.setArea("1"); |
| | | // MessageQueue.offer(SlaveType.Led, 3, new Task(5, errMsg1)); |
| | | // } try { |
| | | // Thread.sleep(500); |
| | | // } catch (Exception e){ |
| | | // |
| | | // } |
| | | // } catch (Exception e){ } |
| | | |
| | | |
| | | } |
| | | public synchronized void stackingCompletionDriveTray2() { |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 2); |
| | | StaProtocol staProtocol = devpThread.getStation().get(518); |
| | | String barcode = staProtocol.getBarcode(); |
| | | if (!Cools.isEmpty(barcode)) { |
| | | if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { |
| | | return; |
| | | } |
| | | } else { |
| | | return; |
| | | } |
| | | if (staProtocol.getWorkNo()==0 && staProtocol.isLoading() && staProtocol.isAutoing() |
| | | && staProtocol.getStaNo() == 0 && staProtocol.isInEnable()){ |
| | | WrkMast wrkMast = wrkMastMapper.selectByBarcodeTwo(barcode); |
| | | if (!Cools.isEmpty(wrkMast)){ |
| | | StaProtocol staProtocolNew = new StaProtocol(); |
| | | staProtocolNew.setSiteId(staProtocol.getSiteId()); |
| | | staProtocolNew.setWorkNo(wrkMast.getWrkNo()); |
| | | staProtocolNew.setStaNo(wrkMast.getStaNo()); |
| | | devpThread.setPakMk(staProtocolNew.getSiteId(), false,7989); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, 2, new Task(2, staProtocolNew)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public synchronized Integer jarGetStartStaNo(Integer staNo) { |
| | | try { |
| | | int[] jarNos=new int[]{3,1,4,2};//(607分配硫化罐) |