From e8128dc341c4130669bc99381c16f30bb0e5ddef Mon Sep 17 00:00:00 2001 From: 18188916393 <2562295436@qq.com> Date: Wed, 31 Aug 2022 17:03:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=BC=E5=8F=AB=E7=A9=BA=E6=89=98=E7=9B=98?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/nl/wms/common/StructFindUtil.java | 30 ++++++++++++------- .../org/nl/wms/common/wql/QSTRUCT_RULE.wql | 22 +++++++++++++- 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java index b6d1270..0854dbd 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java @@ -69,7 +69,7 @@ public class StructFindUtil { if (StrUtil.isEmpty(vehicle_code)) { throw new BadRequestException("托盘不能为空!"); } - if (StrUtil.equals(point_code,"KGTPDDW05")){ + if (StrUtil.equals(point_code, "KGTPDDW05")) { JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.KGTDDQ).addParam("flag", "2").process().getResultJSONArray(0); PointUpdateUtil.updatePoint(pointarr); } @@ -93,20 +93,28 @@ public class StructFindUtil { public static JSONObject getEmptyVehicleOutStruct(JSONObject jsonObject) { String area_type = jsonObject.getString("area_type"); String vehicle_type = jsonObject.getString("vehicle_type"); - String point_code = jsonObject.getString("point_code"); + String point_code = jsonObject.getString("point_code"); + if (StrUtil.isEmpty(area_type)) { + throw new BadRequestException("区域不能为空!"); + } + JSONObject result = new JSONObject(); //如果是堆叠位5 需要更新 设备状态 - if(StrUtil.equals(point_code,"KGTPDDW05")){ + if (StrUtil.equals(point_code, "KGTPDDW05")) { JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.KGTDDQ).addParam("flag", "2").process().getResultJSONArray(0); PointUpdateUtil.updatePoint(pointarr); + result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "6") + .addParam("area_type", area_type) + .addParam("vehicle_type", vehicle_type) + .addParam("point_code", point_code) + .process().uniqueResult(0); + } else { + result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "5") + .addParam("area_type", area_type) + .addParam("vehicle_type", vehicle_type) + .addParam("point_code", point_code) + .process().uniqueResult(0); } - if (StrUtil.isEmpty(area_type)) { - throw new BadRequestException("区域不能为空!"); - } - JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "5") - .addParam("area_type", area_type) - .addParam("vehicle_type", vehicle_type) - .addParam("point_code", point_code) - .process().uniqueResult(0); + return result; } diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/wql/QSTRUCT_RULE.wql b/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/wql/QSTRUCT_RULE.wql index 58a4b00..a8ef5dc 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/wql/QSTRUCT_RULE.wql +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/common/wql/QSTRUCT_RULE.wql @@ -196,8 +196,28 @@ IF 输入.flag = "5" OPTION 输入.point_code <> "" point.point_code = 输入.point_code ENDOPTION + ENDSELECT + ENDQUERY +ENDIF - +IF 输入.flag = "6" + QUERY + SELECT DISTINCT + point.point_id AS struct_id, + point.point_code AS struct_code, + point.point_name AS struct_name, + point.vehicle_code + FROM + sch_base_point point + WHERE + point.lock_type = '00' + AND point.point_status = '01' + OPTION 输入.area_type <> "" + point.area_type = 输入.area_type + ENDOPTION + OPTION 输入.point_code <> "" + point.point_code = 输入.point_code + ENDOPTION ENDSELECT ENDQUERY ENDIF \ No newline at end of file