| | |
| | | if (wrkMast == null) { |
| | | return; |
| | | } |
| | | if (wrkMast.getPltType().shortValue() != staProtocol.getFinishWorkNo()) { |
| | | log.info("工作档和完结工作号不匹配,{},{}", wrkMast.getPltType(), staProtocol.getFinishWorkNo()); |
| | | return; |
| | | } |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "2.5F_Mode")); |
| | | if (Cools.isEmpty(config) || config.getValue().equals("false")) { |
| | | return; |
| | |
| | | // 遍历拣料入库口 |
| | | for (DevpSlave.Sta pickSta : devp.getPickSta()) { |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, pickSta.getBarcode()); |
| | | if (barcodeThread == null) { |
| | | // BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, pickSta.getBarcode()); |
| | | // if (barcodeThread == null) { |
| | | // continue; |
| | | // } |
| | | // 获取拣料入库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(pickSta.getStaNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | String barcode = barcodeThread.getBarcode(); |
| | | String barcode = staProtocol.getBarcode(); |
| | | if (!Cools.isEmpty(barcode)) { |
| | | // News.info(""+mark+" - 1"+" - {}号条码扫描器检测条码信息:{}", pickSta.getBarcode(), barcode); |
| | | if ("NG".endsWith(barcode) || "NoRead".equals(barcode)) { |
| | |
| | | continue; |
| | | } |
| | | |
| | | // 获取拣料入库站信息 |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(pickSta.getStaNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | |
| | | // // 入出库模式判断 |
| | | // if (devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; } |
| | |
| | | |
| | | // 更新站点信息 且 下发plc命令 |
| | | staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue()); |
| | | staProtocol.setStaNo((short) 161); |
| | | staProtocol.setStaNo(wrkMast.getStaNo().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | log.error("输送线下发5:" + wrkMast.getWrkNo() + "," + wrkMast.getStaNo()); |
| | |
| | | && staProtocol.isPakMk()) { |
| | | |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, pickSta.getBarcode()); |
| | | if (barcodeThread == null) { |
| | | continue; |
| | | } |
| | | String barcode = barcodeThread.getBarcode(); |
| | | |
| | | String barcode = staProtocol.getBarcode(); |
| | | if (!Cools.isEmpty(barcode)) { |
| | | // log.info("{}号条码扫描器检测条码信息:{}", pickSta.getBarcode(), barcode); |
| | | if ("00000000".equals(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) { |
| | |
| | | try { |
| | | // 更新站点信息 且 下发plc命令 |
| | | staProtocol.setWorkNo(dto.getWorkNo().shortValue()); |
| | | staProtocol.setStaNo((short) 161); |
| | | staProtocol.setStaNo(wrkMast.getStaNo().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | | if (wrkMast.getWrkNo().shortValue() != staProtocol.getFinishWorkNo()) { |
| | | continue; |
| | | } |
| | | // 判断工作档条件 |
| | | if (wrkMast.getIoType() < 100 || wrkMast.getStaNo() == null || wrkMast.getSourceStaNo() == null) { |
| | | continue; |
| | |
| | | |
| | | // 下发站点信息 |
| | | staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue()); |
| | | staProtocol.setStaNo(RouteUtils.CrnStaEnd(1031, 1135)); |
| | | staProtocol.setStaNo((short) 1031); |
| | | if (!MessageQueue.offer(SlaveType.Devp, devpSlave.getId(), new Task(2, staProtocol))) { |
| | | log.info(staProtocol.getWorkNo() + "," + staProtocol.getStaNo() + "输送线出库命令下发失败222"); |
| | | continue; |