| | |
| | | } 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") |
| | |
| | | return false; |
| | | } |
| | | |
| | | //临时 |
| | | if (basJar.getJarCode()==1){ |
| | | JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); |
| | | JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); |
| | | if (jarOtherProtocol == null) { |
| | | return false; |
| | | } |
| | | |
| | | if (!jarOtherProtocol.isAutoing() || jarOtherProtocol.jarErr!=0 |
| | | || !jarOtherProtocol.isLeftDoor() || !jarOtherProtocol.isRightDoor() |
| | | || jarOtherProtocol.leftDoorOpen==1 || jarOtherProtocol.leftDoorClose==1 || jarOtherProtocol.rightDoorOpen==1 || jarOtherProtocol.rightDoorClose==1){ |
| | | log.error("{}号硫化罐查询设备不满足前往冷却池条件,代号2硫化罐门没开!!!",jarOtherProtocol.getJarNo()); |
| | | return false; |
| | | } |
| | | } |
| | | // //临时 |
| | | // if (basJar.getJarCode()==1){ |
| | | // JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); |
| | | // JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); |
| | | // if (jarOtherProtocol == null) { |
| | | // return false; |
| | | // } |
| | | // |
| | | // if (!jarOtherProtocol.isAutoing() || jarOtherProtocol.jarErr!=0 |
| | | // || !jarOtherProtocol.isLeftDoor() || !jarOtherProtocol.isRightDoor() |
| | | // || jarOtherProtocol.leftDoorOpen==1 || jarOtherProtocol.leftDoorClose==1 || jarOtherProtocol.rightDoorOpen==1 || jarOtherProtocol.rightDoorClose==1){ |
| | | // log.error("{}号硫化罐查询设备不满足前往冷却池条件,代号2硫化罐门没开!!!",jarOtherProtocol.getJarNo()); |
| | | // return false; |
| | | // } |
| | | // } |
| | | |
| | | //门作业 无 |
| | | // if (jarProtocol.isAutoing() && jarProtocol.statusType == JarStatusType.WAITING4 && jarProtocol.jarErr==0 |
| | |
| | | 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 { |
| | | |