| | |
| | | String barcode = barcodeThread.getBarcode(); |
| | | |
| | | ////判断101和104是否是拣料、并板、盘点再入库 |
| | | //WrkMast wrkMast1=wrkMastMapper.selectpj(inSta.getStaNo(),barcode); |
| | | //if((inSta.getStaNo().equals(101) || inSta.getStaNo().equals(104)) &&!Cools.isEmpty(barcode)&&!Cools.isEmpty(wrkMast1)){ |
| | | // log.error("101或104拣料、并板、盘点再入库", wrkMast1.getWrkNo()); |
| | | // continue; |
| | | //} |
| | | WrkMast wrkMast1=wrkMastMapper.selectpj(inSta.getStaNo(),barcode); |
| | | if((inSta.getStaNo().equals(101) || inSta.getStaNo().equals(104)) &&!Cools.isEmpty(barcode)&&!Cools.isEmpty(wrkMast1)){ |
| | | log.error("101或104拣料、并板、盘点再入库", wrkMast1.getWrkNo()); |
| | | continue; |
| | | } |
| | | |
| | | if (!Cools.isEmpty(barcode)) { |
| | | log.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode); |
| | |
| | | continue; |
| | | } |
| | | } |
| | | // 获取入库通知档 |
| | | // List<WaitPakin> waitPakins = waitPakinMapper.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", barcode).eq("io_status", "N")); |
| | | // if (waitPakins.isEmpty()) { |
| | | // log.error("无此入库条码数据。条码号={}", barcode); |
| | | // continue; |
| | | // } |
| | | |
| | | try { |
| | | LocTypeDto locTypeDto = new LocTypeDto(staProtocol); |
| | |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | if (!result) { |
| | | throw new CoolException("更新plc站点信息失败"); |
| | | } |
| | | } else if(jsonObject.getInteger("code").equals(700)) { |
| | | staProtocol.setWorkNo((short) 9999); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | // led 异常显示 |
| | | if (ledThread != null) { |
| | | String errorMsg = barcode + "托盘识别异常,请先进行组托!"; |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errorMsg)); |
| | | } |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response); |
| | |
| | | } |
| | | if (wrkMast == null) { |
| | | // 无拣料数据 |
| | | Integer led = pickSta.getLed(); |
| | | if (ledThread != null) { |
| | | String errorMsg = "暂无拣料/盘点信息!!!"; |
| | | MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(3, errorMsg)); |
| | | } |
| | | // // 更新站点信息 且 下发plc命令 |
| | | staProtocol.setWorkNo((short)9999); |
| | | staProtocol.setStaNo((short)(staProtocol.getStaNo()-1)); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | if (!result) { |
| | | log.error("发布命令至输送线队列失败!!! [plc编号:{}]", devp.getId()); |
| | | } |
| | | continue; |
| | | } |
| | | if ((wrkMast.getIoType() != 103 && wrkMast.getIoType() != 104 && wrkMast.getIoType() != 107) |