zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/controller/OpenController.java
@@ -164,6 +164,7 @@ task.setOriginLoc(null); task.setDestSite(destSite); task.setDestLoc(param.getDestLoc()); task.setZpallet(param.getBarcode()); task.setIoTime(new Date()); task.setStartTime(new Date()); task.setStatus(1); zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/domain/param/CreateInTaskParam.java
@@ -20,4 +20,7 @@ //优先级 private Integer priority; //条码 private String barcode; } zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java
@@ -420,18 +420,38 @@ // 解析入库工作档 public synchronized void analyzeInBoundTask() { for (Task task : taskService.selectWaitAnalyzeInBoundTask()) { // BasConveyorSta basConveyorSta = basConveyorStaService.getOne(new LambdaQueryWrapper<BasConveyorSta>().eq(BasConveyorSta::getSiteNo, task.getDestSite())); // if (basConveyorSta == null) { // continue; // } // DeviceBarcode deviceBarcode = deviceBarcodeService.getById(basConveyorSta.getBarcodeId()); // if (deviceBarcode == null) { // continue; // } // BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, Integer.parseInt(deviceBarcode.getDeviceId())); // if (barcodeThread == null) { // continue; // } BasConveyorSta basConveyorSta = basConveyorStaService.getOne(new LambdaQueryWrapper<BasConveyorSta>().eq(BasConveyorSta::getSiteNo, task.getDestSite())); if (basConveyorSta == null) { continue; } BasConveyor basConveyor = basConveyorService.getById(basConveyorSta.getConveyorId()); if (basConveyor == null) { continue; } DeviceBarcode deviceBarcode = deviceBarcodeService.getById(basConveyorSta.getBarcodeId()); if (deviceBarcode == null) { continue; } BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, Integer.parseInt(deviceBarcode.getDeviceId())); if (barcodeThread == null) { continue; } if (!barcodeThread.getBarcode().equals(task.getZpallet())) { continue; } DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Conveyor, basConveyor.getDeviceId().intValue()); if (devpThread == null) { continue; } StaProtocol staProtocol = devpThread.getStation().get(basConveyorSta.getSiteNo()); if (staProtocol == null) { continue; } if (!(staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable())) { continue; } if (Cools.isEmpty(task.getShuttleNo())) { zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/SiemensBarcodeThread.java
@@ -27,7 +27,7 @@ private RedisUtil redisUtil; private SiemensS7Net siemensS7Net; private StringBuffer barcode = new StringBuffer(); private String lastBarcode; private String lastBarcode = ""; public SiemensBarcodeThread(Device device, RedisUtil redisUtil) { this.device = device; @@ -41,10 +41,10 @@ @Override public boolean setBarcode(String barcode) { this.lastBarcode = String.valueOf(this.barcode); this.barcode.delete(0, this.barcode.length()); this.barcode.append(barcode); if(!Cools.isEmpty(barcode) && !this.lastBarcode.equals(barcode)) { this.lastBarcode = String.valueOf(this.barcode); News.info("{}号条码器,检索数据:{}", device.getId(), this.barcode); JSONObject jsonObject = new JSONObject(); jsonObject.put("time", DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmss_F)); zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/SuopaiSiemensDevpThread.java
@@ -127,7 +127,7 @@ staProtocol.setOutEnable(siemensS7Net.getByteTransform().TransInt16(result.Content, i * 40 + 14) == 2);// 可出 staProtocol.setWorkMode((int) siemensS7Net.getByteTransform().TransInt16(result.Content, i * 40 + 8));// 工作模式 String barcode = siemensS7Net.getByteTransform().TransString(result.Content,56,10, "UTF-8");// 条码 String barcode = siemensS7Net.getByteTransform().TransString(result.Content,58,8, "UTF-8");// 条码 BasConveyorStaService basConveyorStaService = SpringUtils.getBean(BasConveyorStaService.class); DeviceBarcodeService deviceBarcodeService = SpringUtils.getBean(DeviceBarcodeService.class); BasConveyorSta basConveyorSta = basConveyorStaService.getOne(new LambdaQueryWrapper<BasConveyorSta>().eq(BasConveyorSta::getSiteNo, siteId));