From 6713250a56c27ae46ecc4b03a4cd8c6edd37d714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E4=BF=8A=E6=9D=B0?= <9463626+zhou-junjiezjj@user.noreply.gitee.com> Date: Wed, 13 Dec 2023 16:34:23 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=B5=B7=E8=8D=A3=E6=88=90=E5=93=81?= =?UTF-8?q?=E7=A9=BA=E8=BD=BD=E5=85=B7=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WithStationDeviceDriver.java | 43 ++++++++++++++----- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/wcs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_old/hailiang_with_station/WithStationDeviceDriver.java b/wcs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_old/hailiang_with_station/WithStationDeviceDriver.java index ccc51a97..41677454 100644 --- a/wcs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_old/hailiang_with_station/WithStationDeviceDriver.java +++ b/wcs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/hailiang_old/hailiang_with_station/WithStationDeviceDriver.java @@ -211,9 +211,20 @@ public class WithStationDeviceDriver extends AbstractOpcDeviceDriver implements > Integer.parseInt(this.getExtraValue().get("apply_time").toString()) * 1000) { //否则对接位单独申请任务 JSONObject reqParam = new JSONObject(); - reqParam.put("type", StatusEnum.HAIROU_LIKU_REQ.getCode()); - reqParam.put("device_code_one", hailiangHrSsxDeviceDriver.getDevice_code()); - reqParam.put("vehicle_code_one", hailiangHrSsxDeviceDriver.getBarcode()); + //半成品入库 + if(StrUtil.equals(hailiangHrSsxDeviceDriver.getDevice_code(),"A3_BCP_RM_01")||StrUtil.equals(hailiangHrSsxDeviceDriver.getDevice_code(),"A3_BCP_RM_02")) { + reqParam.put("type", StatusEnum.HAIROU_LIKU_REQ.getCode()); + reqParam.put("item_type", StatusEnum.HAIROU_IN_REQ.getCode()); + reqParam.put("device_code1", hailiangHrSsxDeviceDriver.getDevice_code()); + reqParam.put("barcode1", hailiangHrSsxDeviceDriver.getBarcode()); + } + //空载具入库 + if(StrUtil.equals(hailiangHrSsxDeviceDriver.getDevice_code(),"A3_BCP_RK_01")||StrUtil.equals(hailiangHrSsxDeviceDriver.getDevice_code(),"A3_BCP_RK_02")) { + reqParam.put("type", StatusEnum.HAIROU_LIKU_REQ.getCode()); + reqParam.put("item_type", StatusEnum.HAIROU_EMPTY_IN_REQ.getCode()); + reqParam.put("device_code1", hailiangHrSsxDeviceDriver.getDevice_code()); + reqParam.put("barcode1", hailiangHrSsxDeviceDriver.getBarcode()); + } //联调时加上 // HttpResponse httpResponse = acsToWmsService.applyTaskToWms(reqParam); // if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { @@ -232,14 +243,24 @@ public class WithStationDeviceDriver extends AbstractOpcDeviceDriver implements ObjectUtil.isNotEmpty(hailiangHrSsxDeviceDriver2.getBarcode()) ) { JSONObject reqParam = new JSONObject(); - //半成品库任务 - reqParam.put("type", StatusEnum.HAIROU_LIKU_REQ.getCode()); - //具体海柔出入库任务类型 - reqParam.put("item_type", DeviceEnum.getTypeByCode(hailiangHrSsxDeviceDriver.getDevice_code())); - reqParam.put("device_code_one", hailiangHrSsxDeviceDriver.getDevice_code()); - reqParam.put("vehicle_code_one", hailiangHrSsxDeviceDriver.getBarcode()); - reqParam.put("device_code_two", hailiangHrSsxDeviceDriver2.getDevice_code()); - reqParam.put("vehicle_code_two", hailiangHrSsxDeviceDriver2.getBarcode()); + //半成品入库 + if(StrUtil.equals(hailiangHrSsxDeviceDriver.getDevice_code(),"A3_BCP_RM_01")||StrUtil.equals(hailiangHrSsxDeviceDriver.getDevice_code(),"A3_BCP_RM_02")) { + reqParam.put("type", StatusEnum.HAIROU_LIKU_REQ.getCode()); + reqParam.put("item_type", StatusEnum.HAIROU_IN_REQ.getCode()); + reqParam.put("device_code1", hailiangHrSsxDeviceDriver.getDevice_code()); + reqParam.put("barcode1", hailiangHrSsxDeviceDriver.getBarcode()); + reqParam.put("device_code2", hailiangHrSsxDeviceDriver2.getDevice_code()); + reqParam.put("barcode2", hailiangHrSsxDeviceDriver2.getBarcode()); + } + //空载具入库 + if(StrUtil.equals(hailiangHrSsxDeviceDriver.getDevice_code(),"A3_BCP_RK_01")||StrUtil.equals(hailiangHrSsxDeviceDriver.getDevice_code(),"A3_BCP_RK_02")) { + reqParam.put("type", StatusEnum.HAIROU_LIKU_REQ.getCode()); + reqParam.put("item_type", StatusEnum.HAIROU_EMPTY_IN_REQ.getCode()); + reqParam.put("device_code1", hailiangHrSsxDeviceDriver.getDevice_code()); + reqParam.put("barcode1", hailiangHrSsxDeviceDriver.getBarcode()); + reqParam.put("device_code2", hailiangHrSsxDeviceDriver2.getDevice_code()); + reqParam.put("barcode2", hailiangHrSsxDeviceDriver2.getBarcode()); + } //向lms请求任务 // 联调时加上 // HttpResponse httpResponse = acsToWmsService.applyTaskToWms(reqParam);