From 8a55b97e053bf688ecf4a54ee24215c2f1a335ba Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Thu, 17 Nov 2022 15:55:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/HandNewMaterialServiceImpl.java | 4 ++++ .../org/nl/pda/st/in/wql/QPADST_IN_SERVICE.wql | 16 ++++++++++++++++ .../impl/InspectionsheetmstServiceImpl.java | 3 +++ 3 files changed, 23 insertions(+) diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/in/service/impl/HandNewMaterialServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/in/service/impl/HandNewMaterialServiceImpl.java index 87881316..dde09097 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/in/service/impl/HandNewMaterialServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/in/service/impl/HandNewMaterialServiceImpl.java @@ -345,6 +345,10 @@ public class HandNewMaterialServiceImpl implements HandNewMaterialService { bill_type = "000601"; break; } + JSONObject jo_now = WQL.getWO("QPADST_IN_SERVICE").addParam("flag", "11").addParam("storagevehicle_code", storagevehicle_code).process().uniqueResult(0); + if(jo_now!=null){ + throw new PdaRequestException("该载具"+storagevehicle_code+"已存在未完成的入库单!"); + } JSONObject mst_jo = new JSONObject(); String bill_code = CodeUtil.getNewCode("IO_CODE"); mst_jo.put("iostorinv_id", iostorinv_id); diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/in/wql/QPADST_IN_SERVICE.wql b/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/in/wql/QPADST_IN_SERVICE.wql index 59e7dca6..422c293a 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/in/wql/QPADST_IN_SERVICE.wql +++ b/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/in/wql/QPADST_IN_SERVICE.wql @@ -63,6 +63,22 @@ ENDQUERY ENDIF + IF 输入.flag = "11" + QUERY + SELECT + IOStorInvDisDtl.* + FROM + ST_IVT_IOStorInvDisDtl IOStorInvDisDtl + LEFT JOIN st_ivt_iostorinvdtl iostorinvdtl ON iostorinvdtl.iostorinvdtl_id = IOStorInvDisDtl.iostorinvdtl_id + LEFT JOIN st_ivt_iostorinv iostorinv ON iostorinv.iostorinv_id = IOStorInvDisDtl.iostorinv_id + WHERE + iostorinvdtl.bill_status<>'99' + and iostorinv.is_delete<>'1' + and IOStorInvDisDtl.storagevehicle_code = 输入.storagevehicle_code + ENDSELECT + ENDQUERY + ENDIF + IF 输入.flag = "2" QUERY SELECT diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/InspectionsheetmstServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/InspectionsheetmstServiceImpl.java index ddb7212e..1a4a9aeb 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/InspectionsheetmstServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/InspectionsheetmstServiceImpl.java @@ -547,6 +547,9 @@ public class InspectionsheetmstServiceImpl implements InspectionsheetmstService if (jsonIvt.getDoubleValue("canuse_qty") != jsonIvt.getDoubleValue("ivt_qty")) { throw new BadRequestException("此批次物料有未完成的单据"); } + if (jsonDtl.getString("result").equals(jsonIvt.getString("quality_scode"))) { + continue; + } JSONObject prarm = new JSONObject(); String change_type_scode = ""; prarm.put("struct_id", jsonIvt.getString("struct_id"));