From 42f72c5b05278974e119828b3e64867e701d3464 Mon Sep 17 00:00:00 2001 From: ldj_willow Date: Wed, 26 Oct 2022 17:30:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/nl/wms/sch/PointFindUtil.java | 93 ------------------- .../src/views/wms/sch/point/index.vue | 2 +- .../src/views/wms/st/cppoint/cppInventory.vue | 34 ------- .../src/views/wms/st/ysa/inventory.vue | 36 +------ 4 files changed, 2 insertions(+), 163 deletions(-) delete mode 100644 lms/nladmin-system/src/main/java/org/nl/wms/sch/PointFindUtil.java diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/PointFindUtil.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/PointFindUtil.java deleted file mode 100644 index 43f7200..0000000 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/PointFindUtil.java +++ /dev/null @@ -1,93 +0,0 @@ -package org.nl.wms.sch; - -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson.JSONObject; - -import org.nl.modules.common.exception.BadRequestException; -import org.nl.modules.wql.WQL; -import org.nl.modules.wql.core.bean.WQLObject; - - -public class PointFindUtil { - public static JSONObject getInStruct(JSONObject jsonObject) { - String material_id = jsonObject.getString("material_id"); - String area_type = jsonObject.getString("area_type"); - String vehicle_code = jsonObject.getString("vehicle_code"); - if (StrUtil.isEmpty(vehicle_code)) { - throw new BadRequestException("托盘不能为空!"); - } - //根据托盘找托盘类型, - JSONObject vehicleObj = WQLObject.getWQLObject("md_pb_vehicle").query("vehicle_code='" + vehicle_code + "'").uniqueResult(0); - if (ObjectUtil.isEmpty(vehicleObj)) { - throw new BadRequestException("未找到托盘号为'" + vehicle_code + "' 托盘信息!"); - } - if (StrUtil.isEmpty(material_id)) { - throw new BadRequestException("物料不能为空!"); - } - if (StrUtil.isEmpty(area_type)) { - throw new BadRequestException("区域不能为空!"); - } - String vehice_type = vehicleObj.getString("vehicle_type"); - JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "2") - .addParam("material_id", material_id).addParam("area_type", area_type).addParam("vehice_type", vehice_type).process().uniqueResult(0); - return result; - } - - public static JSONObject getOutStruct(JSONObject jsonObject) { - String material_id = jsonObject.getString("material_id"); - String area_type = jsonObject.getString("area_type"); - String is_full = jsonObject.getString("is_full"); - String workprocedure_id = jsonObject.getString("workprocedure_id"); - - if (StrUtil.isEmpty(material_id)) { - throw new BadRequestException("物料不能为空!"); - } - if (StrUtil.isEmpty(area_type)) { - throw new BadRequestException("区域不能为空!"); - } - if (StrUtil.isEmpty(is_full)) { - throw new BadRequestException("是否满托不能为空!"); - } - if (StrUtil.isEmpty(workprocedure_id)) { - throw new BadRequestException("工序不能为空!"); - } - JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "3") - .addParam("material_id", material_id).addParam("area_type", area_type) - .addParam("is_full", is_full).addParam("workprocedure_id", workprocedure_id) - .process().uniqueResult(0); - return result; - } - - public static JSONObject getEmptyVehicleInStruct(JSONObject jsonObject) { - String area_type = jsonObject.getString("area_type"); - String vehicle_code = jsonObject.getString("vehicle_code"); - if (StrUtil.isEmpty(vehicle_code)) { - throw new BadRequestException("托盘不能为空!"); - } - //根据托盘找托盘类型, - JSONObject vehicleObj = WQLObject.getWQLObject("md_pb_vehicle").query("vehicle_code='" + vehicle_code + "'").uniqueResult(0); - if (ObjectUtil.isEmpty(vehicleObj)) { - throw new BadRequestException("未找到托盘号为'" + vehicle_code + "' 托盘信息!"); - } - if (StrUtil.isEmpty(area_type)) { - throw new BadRequestException("区域不能为空!"); - } - String vehice_type = vehicleObj.getString("vehicle_type"); - JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "4") - .addParam("area_type", area_type).addParam("vehice_type", vehice_type).process().uniqueResult(0); - return result; - } - - public static JSONObject getEmptyVehicleOutStruct(JSONObject jsonObject) { - String area_type = jsonObject.getString("area_type"); - String vehicle_type = jsonObject.getString("vehicle_type"); - 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).process().uniqueResult(0); - return result; - } - -} diff --git a/lms/nladmin-ui/src/views/wms/sch/point/index.vue b/lms/nladmin-ui/src/views/wms/sch/point/index.vue index b2acaf5..cfbce62 100644 --- a/lms/nladmin-ui/src/views/wms/sch/point/index.vue +++ b/lms/nladmin-ui/src/views/wms/sch/point/index.vue @@ -295,7 +295,7 @@ - +