From d13a478b112861a6826a785d532b81d336826ed5 Mon Sep 17 00:00:00 2001 From: houyi <1398559711@qq.com> Date: Mon, 27 Oct 2025 17:07:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E6=96=99=E8=AE=A1=E5=88=92=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=A4=87=E6=96=99=E9=87=8D=E7=AE=97=E5=90=8E=E8=B0=83?= =?UTF-8?q?=E9=AB=98=E5=8E=8BMES=E4=BF=AE=E6=94=B9=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rule/AfterApproveRuleHighpressureMes.java | 20 +++++++++++-------- .../rule/AfterPickmRuleHighpressureRule.java | 10 ++++++---- .../pickm/service/SyncGyMesPickmUtil.java | 10 ++++++---- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/mmpac/src/private/nc/bs/mmpac/pickm/bp/rule/AfterApproveRuleHighpressureMes.java b/mmpac/src/private/nc/bs/mmpac/pickm/bp/rule/AfterApproveRuleHighpressureMes.java index 839ceadb..a42a2d08 100644 --- a/mmpac/src/private/nc/bs/mmpac/pickm/bp/rule/AfterApproveRuleHighpressureMes.java +++ b/mmpac/src/private/nc/bs/mmpac/pickm/bp/rule/AfterApproveRuleHighpressureMes.java @@ -101,9 +101,10 @@ public class AfterApproveRuleHighpressureMes implements IRule { // 生产部门 String deptsql = " select code,name from org_dept where pk_dept='" + pickmHeadVO.getCdeptid() + "' and dr=0 "; Map dept = (Map) baseDAO.executeQuery(deptsql, new MapProcessor()); - singleObj.put("bipDeptName", dept.get("name")); // 生产部门 - singleObj.put("bipDeptId", dept.get("code")); // 生产部门编码 - + if (!dept.isEmpty()) { + singleObj.put("bipDeptName", dept.get("name")); // 生产部门 + singleObj.put("bipDeptId", dept.get("code")); // 生产部门编码 + } singleObj.put("bipProcessProductionOrderId", pickmHeadVO.getVsourcemocode()); // 流程生产订单号 singleObj.put("bipProcessProductionOrderRowNum", pickmHeadVO.getVsourcemorowcode()); // 来源单据号行号 singleObj.put("bipParentProcessProductionOrderId", pickmHeadVO.getVfirstbillcode()); // 上级来源单据号 @@ -140,8 +141,8 @@ public class AfterApproveRuleHighpressureMes implements IRule { JSONObject itemObj = new JSONObject(); itemObj.put("bipChildId", item.getCpickm_bid()); // 子项主键ID -// itemObj.put("bchkitemforwr", item.getBchkitemforwr()); // 完工齐套检查 - itemObj.put("bchkitemforwr", "Y"); // 完工齐套检查 +// itemObj.put("bchkitemforwr", "Y"); // 完工齐套检查 + itemObj.put("bchkitemforwr",item.getBchkitemforwr().booleanValue()?"Y":"N"); // 完工齐套检查 itemObj.put("quantityPerSet", item.getNunituseastnum() != null ? item.getNunituseastnum().doubleValue() : null); // 单套数量(单位用量) itemObj.put("reservedQuantity", item.getNatpastnum() != null ? item.getNatpastnum().doubleValue() : null); // 预留数量 itemObj.put("cumulativePendingQuantity", item.getNshouldastnum() != null ? item.getNshouldastnum().doubleValue() : null); // 累计待发数量 @@ -180,8 +181,10 @@ public class AfterApproveRuleHighpressureMes implements IRule { // 生产部门 String deptsql = " select code,name from org_dept where pk_dept='" + pickmHeadVO.getCdeptid() + "' and dr=0 "; Map dept = (Map) baseDAO.executeQuery(deptsql, new MapProcessor()); - singleObj.put("bipDeptName", dept.get("name")); // 生产部门 - singleObj.put("bipDeptId", dept.get("code")); // 生产部门编码 + if (!dept.isEmpty()) { + singleObj.put("bipDeptName", dept.get("name")); // 生产部门 + singleObj.put("bipDeptId", dept.get("code")); // 生产部门编码 + } singleObj.put("bipProcessProductionOrderId", pickmHeadVO.getVsourcemocode()); // 流程生产订单号 singleObj.put("bipProcessProductionOrderRowNum", pickmHeadVO.getVsourcemorowcode()); // 来源单据号行号 @@ -220,7 +223,8 @@ public class AfterApproveRuleHighpressureMes implements IRule { JSONObject itemObj = new JSONObject(); itemObj.put("bipChildId", item.getCpickm_bid()); // 子项主键ID - itemObj.put("bchkitemforwr", "Y"); // 完工齐套检查 +// itemObj.put("bchkitemforwr", "Y"); // 完工齐套检查 + itemObj.put("bchkitemforwr",item.getBchkitemforwr().booleanValue()?"Y":"N"); // 完工齐套检查 itemObj.put("quantityPerSet", item.getNunituseastnum() != null ? item.getNunituseastnum().doubleValue() : null); // 单套数量(单位用量) itemObj.put("reservedQuantity", item.getNatpastnum() != null ? item.getNatpastnum().doubleValue() : null); // 预留数量 itemObj.put("cumulativePendingQuantity", item.getNshouldastnum() != null ? item.getNshouldastnum().doubleValue() : null); // 累计待发数量 diff --git a/mmpac/src/private/nc/bs/mmpac/pmo/pac0002/bp/rule/AfterPickmRuleHighpressureRule.java b/mmpac/src/private/nc/bs/mmpac/pmo/pac0002/bp/rule/AfterPickmRuleHighpressureRule.java index bb77c8ee..bfb749f7 100644 --- a/mmpac/src/private/nc/bs/mmpac/pmo/pac0002/bp/rule/AfterPickmRuleHighpressureRule.java +++ b/mmpac/src/private/nc/bs/mmpac/pmo/pac0002/bp/rule/AfterPickmRuleHighpressureRule.java @@ -130,9 +130,10 @@ public class AfterPickmRuleHighpressureRule implements IRule { // 生产部门 String deptsql = " select code,name from org_dept where pk_dept='" + pickmHeadVO.getCdeptid() + "' and dr=0 "; Map dept = (Map) baseDAO.executeQuery(deptsql, new MapProcessor()); - singleObj.put("bipDeptName", dept.get("name")); // 生产部门 - singleObj.put("bipDeptId", dept.get("code")); // 生产部门编码 - + if (!dept.isEmpty()) { + singleObj.put("bipDeptName", dept.get("name")); // 生产部门 + singleObj.put("bipDeptId", dept.get("code")); // 生产部门编码 + } singleObj.put("bipProcessProductionOrderId", pickmHeadVO.getVsourcemocode()); // 流程生产订单号 singleObj.put("bipProcessProductionOrderRowNum", pickmHeadVO.getVsourcemorowcode()); // 来源单据号行号 singleObj.put("bipParentProcessProductionOrderId", pickmHeadVO.getVfirstbillcode()); // 上级来源单据号 @@ -168,7 +169,8 @@ public class AfterPickmRuleHighpressureRule implements IRule { JSONObject itemObj = new JSONObject(); itemObj.put("bipChildId", item.getCpickm_bid()); // 子项主键ID - itemObj.put("bchkitemforwr", "Y"); // 完工齐套检查 +// itemObj.put("bchkitemforwr", "Y"); // 完工齐套检查 + itemObj.put("bchkitemforwr",item.getBchkitemforwr().booleanValue()?"Y":"N"); // 完工齐套检查 itemObj.put("quantityPerSet", item.getNunituseastnum() != null ? item.getNunituseastnum().doubleValue() : null); // 单套数量(单位用量) itemObj.put("reservedQuantity", item.getNatpastnum() != null ? item.getNatpastnum().doubleValue() : null); // 预留数量 itemObj.put("cumulativePendingQuantity", item.getNshouldastnum() != null ? item.getNshouldastnum().doubleValue() : null); // 累计待发数量 diff --git a/mmpac/src/public/nccloud/web/mmpac/pickm/service/SyncGyMesPickmUtil.java b/mmpac/src/public/nccloud/web/mmpac/pickm/service/SyncGyMesPickmUtil.java index dd392046..68d29084 100644 --- a/mmpac/src/public/nccloud/web/mmpac/pickm/service/SyncGyMesPickmUtil.java +++ b/mmpac/src/public/nccloud/web/mmpac/pickm/service/SyncGyMesPickmUtil.java @@ -88,9 +88,10 @@ public class SyncGyMesPickmUtil { // 生产部门 String deptsql = " select code,name from org_dept where pk_dept='" + pickmHeadVO.getCdeptid() + "' and dr=0 "; Map dept = (Map) baseDAO.executeQuery(deptsql, new MapProcessor()); - singleObj.put("bipDeptName", dept.get("name")); // 生产部门 - singleObj.put("bipDeptId", dept.get("code")); // 生产部门编码 - + if (!dept.isEmpty()) { + singleObj.put("bipDeptName", dept.get("name")); // 生产部门 + singleObj.put("bipDeptId", dept.get("code")); // 生产部门编码 + } singleObj.put("bipProcessProductionOrderId", pickmHeadVO.getVsourcemocode()); // 流程生产订单号 singleObj.put("bipProcessProductionOrderRowNum", pickmHeadVO.getVsourcemorowcode()); // 来源单据号行号 singleObj.put("bipParentProcessProductionOrderId", pickmHeadVO.getVfirstbillcode()); // 上级来源单据号 @@ -126,7 +127,8 @@ public class SyncGyMesPickmUtil { JSONObject itemObj = new JSONObject(); itemObj.put("bipChildId", item.getCpickm_bid()); // 子项主键ID - itemObj.put("bchkitemforwr", "Y"); // 完工齐套检查 +// itemObj.put("bchkitemforwr", "Y"); // 完工齐套检查 + itemObj.put("bchkitemforwr",item.getBchkitemforwr().booleanValue()?"Y":"N"); // 完工齐套检查 itemObj.put("quantityPerSet", item.getNunituseastnum() != null ? item.getNunituseastnum().doubleValue() : null); // 单套数量(单位用量) itemObj.put("reservedQuantity", item.getNatpastnum() != null ? item.getNatpastnum().doubleValue() : null); // 预留数量 itemObj.put("cumulativePendingQuantity", item.getNshouldastnum() != null ? item.getNshouldastnum().doubleValue() : null); // 累计待发数量