| | |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | if (emptyInSta.getStaNo()==607 && staProtocol.getStaNo()==607 && staProtocol.getWorkNo()>20000 && staProtocol.isLoading() && staProtocol.isAutoing()){ |
| | | String barcode = staProtocol.getBarcode(); |
| | | if (!Cools.isEmpty(barcode)) { |
| | | // log.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode); |
| | | if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { |
| | | continue; |
| | | } |
| | | } else { |
| | | continue; |
| | | } |
| | | if (emptyInSta.getStaNo()==607 && staProtocol.getStaNo()==607 && staProtocol.getWorkNo()==0 |
| | | && staProtocol.isLoading() && staProtocol.isAutoing() && staProtocol.isInEnable()){ |
| | | try { |
| | | BasDevp basDevp = basDevpService.selectById(staProtocol.getStaNo()); |
| | | if (basDevp.getReportSign()==0){ |
| | | WrkMast wrkMast = wrkMastMapper.selectByBarcodeTwo(barcode); |
| | | if (!Cools.isEmpty(wrkMast)){ |
| | | continue; |
| | | } |
| | | LocTypeDto locTypeDto = new LocTypeDto(staProtocol); |
| | | |
| | | SearchLocParam param = new SearchLocParam(); |
| | | param.setIoType(10); |
| | | param.setSourceStaNo(emptyInSta.getStaNo()); |
| | | param.setLocType1(locTypeDto.getLocType1()); |
| | | param.setBarcode(barcode); |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath("/rpc/pakin/loc/v1") |
| | |
| | | if (staNo1!=0){ |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 2); |
| | | StaProtocol staProtocol607 = devpThread.getStation().get(607); |
| | | if (staProtocol607.getWorkNo()<9001 && staProtocol607.getWorkNo()!=0 && staProtocol607.isLoading() && staProtocol607.isAutoing() && staProtocol607.getStaNo() == 607){ |
| | | staProtocol607.setStaNo(staNo1); |
| | | boolean result2 = MessageQueue.offer(SlaveType.Devp, 2, new Task(5, staProtocol607)); |
| | | String barcode = staProtocol607.getBarcode(); |
| | | if (!Cools.isEmpty(barcode)) { |
| | | // log.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode); |
| | | if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) { |
| | | return; |
| | | } |
| | | } else { |
| | | return; |
| | | } |
| | | if (staProtocol607.getWorkNo()==0 && staProtocol607.isLoading() && staProtocol607.isAutoing() |
| | | && staProtocol607.getStaNo() == 607 && 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(5, staProtocol607)); |
| | | } |
| | | } |
| | | } else { |
| | | |