From 00c4f07663e50eddf0707b716b0de0da7591f031 Mon Sep 17 00:00:00 2001 From: "ZHOUZ\\Noble'lift" <1014987728@qq.com> Date: Sat, 15 Oct 2022 15:47:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mps/service/impl/RawFoilServiceImpl.java | 23 ++++++++----------- .../org/nl/wms/pda/mps/wql/PDA_RAWFOIL_01.wql | 15 +++++------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java index 0cb85d80e..013439a09 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java @@ -126,23 +126,18 @@ public class RawFoilServiceImpl implements RawFoilService { WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); - String end_pint_code = whereJson.getString("point_code"); + JSONObject raw_jo = whereJson.getJSONObject("raw_jo"); - if (ObjectUtil.isEmpty(end_pint_code)) throw new BadRequestException("终点点位不能为空"); String start_pint_code = ""; - - // 1.查询此点位是否存在 - PointDto jsonPoint = pointService.findByCode(end_pint_code); - if (ObjectUtil.isEmpty(jsonPoint)) throw new BadRequestException("此点位不存在"); // 2.根据就近原则查对应空卷抽 JSONObject map = new JSONObject(); map.put("flag", "1"); - map.put("product_area", jsonPoint.getProduct_area()); - map.put("point_location", jsonPoint.getPoint_location()); + map.put("product_area", raw_jo.getString("product_area")); + map.put("point_location", raw_jo.getString("point_location")); JSONObject jsonIvt = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0); // 3.如果没找到则继续找下一节点 if (ObjectUtil.isEmpty(jsonIvt)) { - String point_location = jsonPoint.getPoint_location(); + String point_location = raw_jo.getString("point_location"); if (StrUtil.equals(point_location, "0")) map.put("point_location", "1"); if (StrUtil.equals(point_location, "1")) map.put("point_location", "0"); JSONObject jsonIvt_tow = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0); @@ -158,12 +153,12 @@ public class RawFoilServiceImpl implements RawFoilService { String point_code4= ""; JSONObject map4 = new JSONObject(); map4.put("flag", "2"); - map4.put("product_area", jsonPoint.getProduct_area()); - map4.put("point_location", jsonPoint.getPoint_location()); + map4.put("product_area", raw_jo.getString("product_area")); + map4.put("point_location", raw_jo.getString("point_location")); JSONObject jsonIvt4 = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0); // 3.如果没找到则继续找下一节点 if (ObjectUtil.isEmpty(jsonIvt)) { - String point_location = jsonPoint.getPoint_location(); + String point_location = raw_jo.getString("point_location"); if (StrUtil.equals(point_location, "0")) { map.put("point_location", "1"); } @@ -182,8 +177,8 @@ public class RawFoilServiceImpl implements RawFoilService { // 起点和终点确定 生成任务 JSONObject param = new JSONObject(); param.put("point_code1", start_pint_code); - param.put("point_code2", end_pint_code); - param.put("point_code3", end_pint_code); + param.put("point_code2", raw_jo.getString("point_code")); + param.put("point_code3", raw_jo.getString("point_code")); param.put("point_code4", point_code4); param.put("task_type", "010101"); param.put("material_code", whereJson.getString("container_name")); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/wql/PDA_RAWFOIL_01.wql b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/wql/PDA_RAWFOIL_01.wql index 08eea9140..a34f8caa0 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/wql/PDA_RAWFOIL_01.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/wql/PDA_RAWFOIL_01.wql @@ -132,16 +132,10 @@ IF 输入.flag = "5" QUERY SELECT - ( - CASE - der.status - WHEN '1' THEN '开始' - WHEN '2' THEN '结束' - END - ) AS status_name, + ( CASE der.STATUS WHEN '1' THEN '开始' WHEN '2' THEN '结束' END ) AS status_name, der.mfg_order_name AS mfg_order_name, der.container_name AS container_name, - der.resource_name AS point_code, + ivt.point_code, der.product_name AS pcsn, der.theory_height AS theory_height, der.realstart_time AS realstart_time, @@ -149,9 +143,12 @@ der.productin_qty AS productin_qty, der.agvno AS agvno, der.product_area AS product_area, - der.update_time AS update_time + der.update_time AS update_time, + ivt.point_location, + ivt.product_area FROM PDM_BI_RawFoilWorkOrder der + LEFT JOIN st_ivt_sbpointivt ivt ON ivt.ext_code = der.resource_name WHERE der.status = '1' AND der.is_delete = '0'