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())});