From 62a675fe82e31986ecc2948a975cab54d6e6bf3f Mon Sep 17 00:00:00 2001 From: zhangzhiguo Date: Mon, 20 Jan 2025 11:27:32 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zcdev/zcdev/fs/plugin/form/AccountFilterPlugin.java | 8 ++++++++ .../zcdev/fs/plugin/form/DailyloanbillExpAccPlugin.java | 5 +++++ .../zcdev/fs/plugin/form/DailyreimbursExpAccPlugin.java | 7 +++++++ .../zcdev/fs/plugin/form/PrepaybillExpAccPlugin.java | 6 ++++++ .../fs/plugin/form/PublicreimbursebillExpAccPlugin.java | 5 +++++ 5 files changed, 31 insertions(+) diff --git a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/AccountFilterPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/AccountFilterPlugin.java index 665f170..9e1c88e 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/AccountFilterPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/AccountFilterPlugin.java @@ -14,7 +14,9 @@ import kd.bos.servicehelper.BusinessDataServiceHelper; import kd.bos.servicehelper.user.UserServiceHelper; import kd.sdk.plugin.Plugin; +import java.util.ArrayList; import java.util.EventObject; +import java.util.List; public class AccountFilterPlugin extends AbstractBillPlugIn implements Plugin, BeforeF7SelectListener { @@ -46,11 +48,17 @@ public class AccountFilterPlugin extends AbstractBillPlugIn implements Plugin, //会计科目根据左树根据科目表编码过滤 String zcgjAccounttableNumber = (String)this.getModel().getValue("zcgj_accounttable_number"); QFilter accountTableFilter = new QFilter("number", QCP.equals,zcgjAccounttableNumber); + + List qFilterList = new ArrayList<>(); + qFilterList.add(new QFilter("isleaf", QCP.equals,true)); + arg0.setCustomQFilters(qFilterList); + DynamicObject accountTableFilterObj = BusinessDataServiceHelper.loadSingle("bd_accounttable", "id,number", new QFilter[]{accountTableFilter}); if(accountTableFilterObj!=null){ long id = accountTableFilterObj.getLong("id"); ListShowParameter param = (ListShowParameter) arg0.getFormShowParameter(); param.getTreeFilterParameter().getQFilters().add(new QFilter("accounttableid", QCP.equals, id)); + // param.getTreeFilterParameter().getQFilters().add(new QFilter("isleaf", QCP.equals,true)); } } } diff --git a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/DailyloanbillExpAccPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/DailyloanbillExpAccPlugin.java index 0e9ee59..00f2335 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/DailyloanbillExpAccPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/DailyloanbillExpAccPlugin.java @@ -27,7 +27,9 @@ import kd.bos.servicehelper.user.UserServiceHelper; import kd.sdk.plugin.Plugin; import zcgj.zcdev.zcdev.fs.utils.OrgCheckUtils; +import java.util.ArrayList; import java.util.EventObject; +import java.util.List; /** * 借款单会计科目与费用项目关联插件 @@ -142,6 +144,9 @@ public class DailyloanbillExpAccPlugin extends AbstractBillPlugIn implements Plu String name = arg0.getProperty().getName(); if(name.equals(ACCOUNT_ITEM)){ selectRow = arg0.getRow(); + List qFilterList = new ArrayList<>(); + qFilterList.add(new QFilter("isleaf", QCP.equals,true)); + arg0.setCustomQFilters(qFilterList); //会计科目根据左树根据科目表编码过滤 String zcgjAccounttableNumber = (String)this.getModel().getValue("zcgj_accounttable_number"); QFilter accountTableFilter = new QFilter("number",QCP.equals,zcgjAccounttableNumber); diff --git a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/DailyreimbursExpAccPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/DailyreimbursExpAccPlugin.java index 4919171..e67cab7 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/DailyreimbursExpAccPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/DailyreimbursExpAccPlugin.java @@ -25,7 +25,9 @@ import kd.bos.servicehelper.user.UserServiceHelper; import kd.sdk.plugin.Plugin; import zcgj.zcdev.zcdev.fs.utils.OrgCheckUtils; +import java.util.ArrayList; import java.util.EventObject; +import java.util.List; /** * 费用报销单会计科目与费用项目关联插件 @@ -143,6 +145,11 @@ public class DailyreimbursExpAccPlugin extends AbstractBillPlugIn implements Plu String zcgjAccounttableNumber = (String)this.getModel().getValue("zcgj_accounttable_number"); QFilter accountTableFilter = new QFilter("number",QCP.equals,zcgjAccounttableNumber); DynamicObject accountTableFilterObj = BusinessDataServiceHelper.loadSingle("bd_accounttable", "id,number", new QFilter[]{accountTableFilter}); + + List qFilterList = new ArrayList<>(); + qFilterList.add(new QFilter("isleaf", QCP.equals,true)); + arg0.setCustomQFilters(qFilterList); + if(accountTableFilterObj!=null){ long id = accountTableFilterObj.getLong("id"); ListShowParameter param = (ListShowParameter) arg0.getFormShowParameter(); diff --git a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/PrepaybillExpAccPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/PrepaybillExpAccPlugin.java index 5597de4..05df9c7 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/PrepaybillExpAccPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/PrepaybillExpAccPlugin.java @@ -25,7 +25,9 @@ import kd.bos.servicehelper.user.UserServiceHelper; import kd.sdk.plugin.Plugin; import zcgj.zcdev.zcdev.fs.utils.OrgCheckUtils; +import java.util.ArrayList; import java.util.EventObject; +import java.util.List; /** * 预付单会计科目与费用项目关联插件 @@ -140,6 +142,10 @@ public class PrepaybillExpAccPlugin extends AbstractBillPlugIn implements Plugin String name = arg0.getProperty().getName(); if(name.equals(ACCOUNT_ITEM)){ selectRow = arg0.getRow(); + List qFilterList = new ArrayList<>(); + qFilterList.add(new QFilter("isleaf", QCP.equals,true)); + arg0.setCustomQFilters(qFilterList); + //会计科目根据左树根据科目表编码过滤 String zcgjAccounttableNumber = (String)this.getModel().getValue("zcgj_accounttable_number"); QFilter accountTableFilter = new QFilter("number",QCP.equals,zcgjAccounttableNumber); diff --git a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/PublicreimbursebillExpAccPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/PublicreimbursebillExpAccPlugin.java index be66971..6432e92 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/PublicreimbursebillExpAccPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/PublicreimbursebillExpAccPlugin.java @@ -25,7 +25,9 @@ import kd.bos.servicehelper.user.UserServiceHelper; import kd.sdk.plugin.Plugin; import zcgj.zcdev.zcdev.fs.utils.OrgCheckUtils; +import java.util.ArrayList; import java.util.EventObject; +import java.util.List; /** * 对公报销单会计科目与费用项目关联插件 @@ -140,6 +142,9 @@ public class PublicreimbursebillExpAccPlugin extends AbstractBillPlugIn implemen String name = arg0.getProperty().getName(); if(name.equals(ACCOUNT_ITEM)){ selectRow = arg0.getRow(); + List qFilterList = new ArrayList<>(); + qFilterList.add(new QFilter("isleaf", QCP.equals,true)); + arg0.setCustomQFilters(qFilterList); //会计科目根据左树根据科目表编码过滤 String zcgjAccounttableNumber = (String)this.getModel().getValue("zcgj_accounttable_number"); QFilter accountTableFilter = new QFilter("number",QCP.equals,zcgjAccounttableNumber);