From 8ba4aa33cb9f0a8fb2df2c14a4d0bfef4456a240 Mon Sep 17 00:00:00 2001 From: zengweihai Date: Thu, 25 Jul 2024 18:00:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A6=86=E5=8F=B6=E7=BB=84=E7=BB=87=E9=9A=94?= =?UTF-8?q?=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../formplugin/CommonCostCompanyPlugin.java | 46 +++++++-------- .../formplugin/ContractbillFromPlugin.java | 58 +++++++++---------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/shkd-cosmic-debug/src/main/java/shkd/fi/er/plugin/formplugin/CommonCostCompanyPlugin.java b/shkd-cosmic-debug/src/main/java/shkd/fi/er/plugin/formplugin/CommonCostCompanyPlugin.java index 16aef8b..8bf6e57 100644 --- a/shkd-cosmic-debug/src/main/java/shkd/fi/er/plugin/formplugin/CommonCostCompanyPlugin.java +++ b/shkd-cosmic-debug/src/main/java/shkd/fi/er/plugin/formplugin/CommonCostCompanyPlugin.java @@ -63,29 +63,29 @@ public class CommonCostCompanyPlugin extends AbstractBillPlugIn implements Befor @Override public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) { -// String name = beforeF7SelectEvent.getProperty().getName(); -// if ("paycompany".equals(name)){ -// DynamicObject org = (DynamicObject) this.getModel().getValue("org"); -// if (org != null){ -// Long orgId = org.getLong("id"); -// List allSuperiorOrges = OrgUnitServiceHelper.getAllSuperiorOrgs("01", orgId);//获取当前组织的所有上级行政组织 -// QFilter numberQF = new QFilter("number", QCP.equals, "16004610"); -// DynamicObject yuye = BusinessDataServiceHelper.loadSingle("bos_adminorg", "id", numberQF.toArray());//查询组织榆叶飞云 -// if (yuye != null){ -// Long yyId= yuye.getLong("id"); -// if (allSuperiorOrges.contains(yyId) || yyId.equals(orgId) ){//当组织为榆叶飞云或者上级组织包含榆叶飞云则认定为归属榆叶飞云 -// //过滤为榆叶飞云下级组织 -// QFilter inNumberQF = new QFilter("number", QCP.in, orgNumberList); -// ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); -// formShowParameter.getListFilterParameter().setFilter(inNumberQF); -// }else {// -// QFilter inNumberQF = new QFilter("number", QCP.not_in, orgNumberList); -// ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); -// formShowParameter.getListFilterParameter().setFilter(inNumberQF); -// } -// } -// } -// } + String name = beforeF7SelectEvent.getProperty().getName(); + if ("paycompany".equals(name)){ + DynamicObject org = (DynamicObject) this.getModel().getValue("org"); + if (org != null){ + Long orgId = org.getLong("id"); + List allSuperiorOrges = OrgUnitServiceHelper.getAllSuperiorOrgs("01", orgId);//获取当前组织的所有上级行政组织 + QFilter numberQF = new QFilter("number", QCP.equals, "16004610"); + DynamicObject yuye = BusinessDataServiceHelper.loadSingle("bos_adminorg", "id", numberQF.toArray());//查询组织榆叶飞云 + if (yuye != null){ + Long yyId= yuye.getLong("id"); + if (allSuperiorOrges.contains(yyId) || yyId.equals(orgId) ){//当组织为榆叶飞云或者上级组织包含榆叶飞云则认定为归属榆叶飞云 + //过滤为榆叶飞云下级组织 + QFilter inNumberQF = new QFilter("number", QCP.in, orgNumberList); + ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); + formShowParameter.getListFilterParameter().setFilter(inNumberQF); + }else {// + QFilter inNumberQF = new QFilter("number", QCP.not_in, orgNumberList); + ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); + formShowParameter.getListFilterParameter().setFilter(inNumberQF); + } + } + } + } } } diff --git a/shkd-cosmic-debug/src/main/java/shkd/fi/er/plugin/formplugin/ContractbillFromPlugin.java b/shkd-cosmic-debug/src/main/java/shkd/fi/er/plugin/formplugin/ContractbillFromPlugin.java index 870a0a0..bc27041 100644 --- a/shkd-cosmic-debug/src/main/java/shkd/fi/er/plugin/formplugin/ContractbillFromPlugin.java +++ b/shkd-cosmic-debug/src/main/java/shkd/fi/er/plugin/formplugin/ContractbillFromPlugin.java @@ -154,35 +154,35 @@ public class ContractbillFromPlugin extends AbstractFormPlugin implements Before @Override public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) { -// String name = beforeF7SelectEvent.getProperty().getName(); -// if ("contractparty".equals(name)){ -// int row = beforeF7SelectEvent.getRow(); -// DynamicObjectCollection t_er_contractparty = this.getModel().getEntryEntity("contractpartyentry"); -// DynamicObject dynamicObject = t_er_contractparty.get(row);//获取当前行数据 -// String signcontract = dynamicObject.getString("signcontract");//获取签约方 -// if ("0".equals(signcontract)){//当签约方为甲方时 -// DynamicObject org = (DynamicObject) this.getModel().getValue("org"); -// if (org != null){ -// Long orgId = org.getLong("id"); -// List allSuperiorOrges = OrgUnitServiceHelper.getAllSuperiorOrgs("01", orgId);//获取当前组织的所有上级行政组织 -// QFilter numberQF = new QFilter("number", QCP.equals, "16004610"); -// DynamicObject yuye = BusinessDataServiceHelper.loadSingle("bos_adminorg", "id", numberQF.toArray());//查询组织榆叶飞云 -// if (yuye != null){ -// Long yyId= yuye.getLong("id"); -// if (allSuperiorOrges.contains(yyId) || yyId.equals(orgId) ){//当组织为榆叶飞云或者上级组织包含榆叶飞云则认定为归属榆叶飞云 -// //过滤为榆叶飞云下级组织 -// QFilter inNumberQF = new QFilter("number", QCP.in, orgNumberList); -// ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); -// formShowParameter.getListFilterParameter().setFilter(inNumberQF); -// }else {// -// QFilter inNumberQF = new QFilter("number", QCP.not_in, orgNumberList); -// ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); -// formShowParameter.getListFilterParameter().setFilter(inNumberQF); -// } -// } -// } -// } -// } + String name = beforeF7SelectEvent.getProperty().getName(); + if ("contractparty".equals(name)){ + int row = beforeF7SelectEvent.getRow(); + DynamicObjectCollection t_er_contractparty = this.getModel().getEntryEntity("contractpartyentry"); + DynamicObject dynamicObject = t_er_contractparty.get(row);//获取当前行数据 + String signcontract = dynamicObject.getString("signcontract");//获取签约方 + if ("0".equals(signcontract)){//当签约方为甲方时 + DynamicObject org = (DynamicObject) this.getModel().getValue("org"); + if (org != null){ + Long orgId = org.getLong("id"); + List allSuperiorOrges = OrgUnitServiceHelper.getAllSuperiorOrgs("01", orgId);//获取当前组织的所有上级行政组织 + QFilter numberQF = new QFilter("number", QCP.equals, "16004610"); + DynamicObject yuye = BusinessDataServiceHelper.loadSingle("bos_adminorg", "id", numberQF.toArray());//查询组织榆叶飞云 + if (yuye != null){ + Long yyId= yuye.getLong("id"); + if (allSuperiorOrges.contains(yyId) || yyId.equals(orgId) ){//当组织为榆叶飞云或者上级组织包含榆叶飞云则认定为归属榆叶飞云 + //过滤为榆叶飞云下级组织 + QFilter inNumberQF = new QFilter("number", QCP.in, orgNumberList); + ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); + formShowParameter.getListFilterParameter().setFilter(inNumberQF); + }else {// + QFilter inNumberQF = new QFilter("number", QCP.not_in, orgNumberList); + ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter(); + formShowParameter.getListFilterParameter().setFilter(inNumberQF); + } + } + } + } + } } }