| | |
| | | // } |
| | | |
| | | try { |
| | | //String pack=barcode.substring(6);//pack码 |
| | | String pack="MJY0136 0300"; |
| | | String pack =null;//pack码 |
| | | if(barcode.length()>6){ |
| | | pack=barcode.substring(6); |
| | | } |
| | | //String pack="MJY0136 0400"; |
| | | barcode=barcode.substring(0,6);//托盘码 |
| | | LocTypeDto locTypeDto = new LocTypeDto(staProtocol); |
| | | locTypeDto.setLocType1((short)1); |
| | |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | StartupDto dto = jsonObject.getObject("data", StartupDto.class); |
| | | |
| | | barcodeThread.setBarcode(""); |
| | | staProtocol.setWorkNo(dto.getWorkNo().shortValue()); |
| | | staProtocol.setStaNo(dto.getStaNo().shortValue()); |
| | |
| | | crnCommand.setDestinationPosX(locMast.getRow1().shortValue()); // 目标库位排 |
| | | crnCommand.setDestinationPosY(locMast.getBay1().shortValue()); // 目标库位列 |
| | | crnCommand.setDestinationPosZ(locMast.getLev1().shortValue()); // 目标库位层\ |
| | | crnCommand.setBarcode(wrkMast.getBarcode()); |
| | | crnCommand.setBarcode(wrkMast.getBarcode());//托盘码 |
| | | if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) { |
| | | log.error("堆垛机命令下发失败,堆垛机号={},任务数据={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); |
| | | } else { |
| | |
| | | crnCommand.setDestinationPosX(sta.getRow1().shortValue()); // 目标库位排 |
| | | crnCommand.setDestinationPosY(sta.getBay1().shortValue()); // 目标库位列 |
| | | crnCommand.setDestinationPosZ(sta.getLev1().shortValue()); // 目标库位层 |
| | | crnCommand.setBarcode(wrkMast.getBarcode());//托盘码 |
| | | if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) { |
| | | log.error("堆垛机命令下发失败,堆垛机号={},任务数据={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); |
| | | } else { |