From ab8d79b3d5e88155b423649b0ad96e1eacb0b5e8 Mon Sep 17 00:00:00 2001 From: weiyunlong Date: Tue, 17 Dec 2024 15:59:24 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=A0=B9=E6=8D=AE=E7=BB=84=E7=BB=87=E6=90=BA?= =?UTF-8?q?=E5=B8=A6=E9=A1=B9=E7=9B=AE=E7=9A=84=E9=80=BB=E8=BE=91(?= =?UTF-8?q?=E7=BC=BA=E7=9C=81=E5=80=BC:=E8=99=9A=E6=8B=9F=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit S --- .../rebm/formplugin/ImportPurchaseApplyBillPlugin.java | 8 +------- .../shkd/repc/rebm/formplugin/PurDemandFormPlugin.java | 8 +------- .../java/shkd/repc/rebm/formplugin/PurPlanFormPlugin.java | 8 +------- .../repc/recon/formplugin/ContractProjectFormPlugin.java | 5 ----- .../recon/formplugin/ReconPayreqProjectFormPlugin.java | 5 ----- 5 files changed, 3 insertions(+), 31 deletions(-) diff --git a/main/java/shkd/repc/rebm/formplugin/ImportPurchaseApplyBillPlugin.java b/main/java/shkd/repc/rebm/formplugin/ImportPurchaseApplyBillPlugin.java index 748af95..5745d6e 100644 --- a/main/java/shkd/repc/rebm/formplugin/ImportPurchaseApplyBillPlugin.java +++ b/main/java/shkd/repc/rebm/formplugin/ImportPurchaseApplyBillPlugin.java @@ -51,16 +51,10 @@ public class ImportPurchaseApplyBillPlugin extends AbstractBillPlugIn implements private void updateRenovationProject() { DynamicObject org = (DynamicObject) this.getModel().getValue("org"); - DynamicObject qeugRenovationProj = (DynamicObject) this.getModel().getValue("qeug_renovation_proj"); // 只有在需求组织不为空的情况下才进行查询 if (org != null) { - if (qeugRenovationProj == null) { - setRenovationProjectByOrg(org); - } else { - // 如果已存在项目字段,且组织发生了变化,需更新 - setRenovationProjectByOrg(org); - } + setRenovationProjectByOrg(org); } else { // 组织为空,清空项目 this.getModel().setValue("qeug_renovation_proj", null); diff --git a/main/java/shkd/repc/rebm/formplugin/PurDemandFormPlugin.java b/main/java/shkd/repc/rebm/formplugin/PurDemandFormPlugin.java index 33d6372..77f2109 100644 --- a/main/java/shkd/repc/rebm/formplugin/PurDemandFormPlugin.java +++ b/main/java/shkd/repc/rebm/formplugin/PurDemandFormPlugin.java @@ -70,16 +70,10 @@ public class PurDemandFormPlugin extends AbstractFormPlugin { private void updateRenovationProject() { DynamicObject org = (DynamicObject) this.getModel().getValue("org"); - DynamicObject qeugRenovationProj = (DynamicObject) this.getModel().getValue("qeug_renovation_proj"); // 只有在需求组织不为空的情况下才进行查询 if (org != null) { - if (qeugRenovationProj == null) { - setRenovationProjectByOrg(org); - } else { - // 如果已存在项目字段,且组织发生了变化,需更新 - setRenovationProjectByOrg(org); - } + setRenovationProjectByOrg(org); } else { // 组织为空,清空项目 this.getModel().setValue("qeug_renovation_proj", null); diff --git a/main/java/shkd/repc/rebm/formplugin/PurPlanFormPlugin.java b/main/java/shkd/repc/rebm/formplugin/PurPlanFormPlugin.java index 752ff1c..e39402f 100644 --- a/main/java/shkd/repc/rebm/formplugin/PurPlanFormPlugin.java +++ b/main/java/shkd/repc/rebm/formplugin/PurPlanFormPlugin.java @@ -75,16 +75,10 @@ public class PurPlanFormPlugin extends AbstractBillPlugIn implements HyperLinkCl private void updateRenovationProject() { DynamicObject org = (DynamicObject) this.getModel().getValue("org"); - DynamicObject purproject = (DynamicObject) this.getModel().getValue("purproject"); // 只有在需求组织不为空的情况下才进行查询 if (org != null) { - if (purproject == null) { - setRenovationProjectByOrg(org); - } else { - // 如果已存在项目字段,且组织发生了变化,需更新 - setRenovationProjectByOrg(org); - } + setRenovationProjectByOrg(org); } else { // 组织为空,清空项目 this.getModel().setValue("purproject", null); diff --git a/main/java/shkd/repc/recon/formplugin/ContractProjectFormPlugin.java b/main/java/shkd/repc/recon/formplugin/ContractProjectFormPlugin.java index c3594c7..9c754f9 100644 --- a/main/java/shkd/repc/recon/formplugin/ContractProjectFormPlugin.java +++ b/main/java/shkd/repc/recon/formplugin/ContractProjectFormPlugin.java @@ -42,11 +42,6 @@ public class ContractProjectFormPlugin extends AbstractBillPlugIn { } private void setRenovationProjectByOrg(DynamicObject org) { - // 检查 org 是否为 null - if (org == null) { - return; // 如果为 null,直接返回 - } - // 采购项目 DynamicObject[] projectbills = BusinessDataServiceHelper.load("rebm_purproject", "id", new QFilter[]{new QFilter("org.id", QCP.equals, org.getPkValue())}); diff --git a/main/java/shkd/repc/recon/formplugin/ReconPayreqProjectFormPlugin.java b/main/java/shkd/repc/recon/formplugin/ReconPayreqProjectFormPlugin.java index 4946296..b46fab7 100644 --- a/main/java/shkd/repc/recon/formplugin/ReconPayreqProjectFormPlugin.java +++ b/main/java/shkd/repc/recon/formplugin/ReconPayreqProjectFormPlugin.java @@ -42,11 +42,6 @@ public class ReconPayreqProjectFormPlugin extends AbstractBillPlugIn { } private void setRenovationProjectByOrg(DynamicObject org) { - // 检查 org 是否为 null - if (org == null) { - return; // 如果为 null,直接返回 - } - // 采购项目 DynamicObject[] projectbills = BusinessDataServiceHelper.load("rebm_purproject", "id", new QFilter[]{new QFilter("org.id", QCP.equals, org.getPkValue())});