From f46e6a76cee1e4f231fab74981a87947bf84677d Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期二, 15 十月 2024 11:02:47 +0800
Subject: [PATCH] #
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java | 40 ++++++++++++++++++++++++++++------------
1 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java
index b84fccf..1392aca 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java
@@ -99,6 +99,11 @@
BasConveyor basConveyor = basConveyorService.getOne(new LambdaQueryWrapper<BasConveyor>().eq(BasConveyor::getDeviceId, devp.getId()).eq(BasConveyor::getHostId, devp.getHostId()));
// 閬嶅巻鍏ュ簱鍙�
for (StaDto inSta : JSON.parseArray(basConveyor.getInSta(), StaDto.class)) {
+ BasConveyorSta basConveyorSta = basConveyorStaService.selectBySiteNo(inSta.getStaNo().toString());
+ if(basConveyorSta == null) {
+ continue;
+ }
+
// 鑾峰彇鍏ュ簱绔欎俊鎭�
DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Conveyor, devp.getId().intValue());
StaProtocol staProtocol = devpThread.getStation().get(inSta.getStaNo());
@@ -156,13 +161,18 @@
) {
// 鑾峰彇鏉$爜鎵弿浠俊鎭�
- BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode());
+ 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;
}
String barcode = barcodeThread.getBarcode();
if (!Cools.isEmpty(barcode)) {
- News.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode);
+ News.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", deviceBarcode.getId(), barcode);
+
if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode) || "00000000".equals(barcode)) {
staProtocol.setWorkNo((short) 32002);
staProtocol.setStaNo(inSta.getBackSta().shortValue());
@@ -208,10 +218,10 @@
param.setBarcode(barcode);
param.setIoType(1);
param.setSourceStaNo(inSta.getStaNo());
- param.setLocType1(staProtocol.getLocType1().shortValue());
+ param.setLocType1((short)1);
String response = new HttpHandler.Builder()
.setUri(wmsUrl)
- .setPath("/rpc/pakin/loc/v2")
+ .setPath("/rpc/pakin/loc/v1")
.setJson(JSON.toJSONString(param))
.build()
.doPost();
@@ -439,15 +449,21 @@
if (basConveyor == null) {
continue;
}
- DeviceBarcode deviceBarcode = deviceBarcodeService.getById(basConveyorSta.getBarcodeId());
- if (deviceBarcode == null) {
+// 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;
+// }
+ if (Cools.isEmpty(basConveyorSta.getTaskNo())){
continue;
}
- BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, Integer.parseInt(deviceBarcode.getDeviceId()));
- if (barcodeThread == null) {
- continue;
- }
- if (!barcodeThread.getBarcode().equals(task.getZpallet())) {
+ if (!basConveyorSta.getTaskNo().toString().equals(task.getWmsTaskNo())){
continue;
}
DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Conveyor, basConveyor.getDeviceId().intValue());
@@ -528,7 +544,7 @@
// staProtocol1 = staProtocol1.clone();
}
- // 鍒ゆ柇鍫嗗灈鏈哄嚭搴撶珯鐘舵��
+ // 鍒ゆ柇鍑哄簱绔欑姸鎬�
if (staProtocol.isAutoing() && !staProtocol.isLoading() && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) {
// if (!(staProtocol1.isAutoing() && !staProtocol1.isLoading() && staProtocol1.getWorkNo() == 0 && staProtocol1.isOutEnable())) {
// continue;
--
Gitblit v1.9.1