From ae61c06d4f1f335b421cca6dd0ae2383f0669787 Mon Sep 17 00:00:00 2001 From: zhangzhiguo Date: Fri, 3 Jan 2025 18:48:28 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=9F=BF=E5=B1=B1=E7=BB=84=E7=BB=87=E4=B8=8B?= =?UTF-8?q?=E5=B7=AE=E6=97=85=E6=8A=A5=E9=94=80=E5=8D=95=E3=80=81=E8=B4=B9?= =?UTF-8?q?=E7=94=A8=E6=8A=A5=E9=94=80=E5=8D=95=E3=80=81=E5=AF=B9=E5=85=AC?= =?UTF-8?q?=E6=8A=A5=E9=94=80=E5=8D=95=E3=80=81=E9=A2=84=E4=BB=98=E5=8D=95?= =?UTF-8?q?=E8=B6=85=E9=A2=84=E7=AE=97=E6=8F=90=E9=86=92=202.=E7=A7=91?= =?UTF-8?q?=E7=9B=AE=E7=9A=84=E7=A7=91=E7=9B=AE=E7=B1=BB=E5=9E=8B=E8=BF=87?= =?UTF-8?q?=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fs/plugin/form/AccountFilterPlugin.java | 57 +++++++++++++++++++ .../form/DailyloanbillExpAccPlugin.java | 14 ++--- .../form/DailyreimbursExpAccPlugin.java | 14 ++--- .../plugin/form/PrepaybillExpAccPlugin.java | 14 ++--- .../form/PublicreimbursebillExpAccPlugin.java | 14 ++--- 5 files changed, 85 insertions(+), 28 deletions(-) create mode 100644 code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/AccountFilterPlugin.java 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 new file mode 100644 index 0000000..665f170 --- /dev/null +++ b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/AccountFilterPlugin.java @@ -0,0 +1,57 @@ +package zcgj.zcdev.zcdev.fs.plugin.form; + +import kd.bos.bill.AbstractBillPlugIn; +import kd.bos.context.RequestContext; +import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.form.field.BasedataEdit; +import kd.bos.form.field.events.AfterF7SelectListener; +import kd.bos.form.field.events.BeforeF7SelectEvent; +import kd.bos.form.field.events.BeforeF7SelectListener; +import kd.bos.list.ListShowParameter; +import kd.bos.orm.query.QCP; +import kd.bos.orm.query.QFilter; +import kd.bos.servicehelper.BusinessDataServiceHelper; +import kd.bos.servicehelper.user.UserServiceHelper; +import kd.sdk.plugin.Plugin; + +import java.util.EventObject; + +public class AccountFilterPlugin extends AbstractBillPlugIn implements Plugin, BeforeF7SelectListener { + + private final static String ACCOUNT_ITEM ="zcgj_account_item"; + + @Override + public void registerListener(EventObject e) { + super.registerListener(e); + Long currentUserId = UserServiceHelper.getCurrentUserId(); + // 当前用户所属组织 + Long mainOrgId = UserServiceHelper.getUserMainOrgId(currentUserId); + //当前切换选择的组织 + Long currentOrgId = RequestContext.get().getOrgId(); + //当前所在的组织是属于矿山下的 costcompany + //costcompany 费用承担公司 + //DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany"); + //long costcompanyId = costcompany.getLong("id"); + //if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){ + BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM); + fieldEdit.addBeforeF7SelectListener(this); + + // } + } + + @Override + public void beforeF7Select(BeforeF7SelectEvent arg0) { + String name = arg0.getProperty().getName(); + if(name.equals(ACCOUNT_ITEM)){ + //会计科目根据左树根据科目表编码过滤 + 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}); + if(accountTableFilterObj!=null){ + long id = accountTableFilterObj.getLong("id"); + ListShowParameter param = (ListShowParameter) arg0.getFormShowParameter(); + param.getTreeFilterParameter().getQFilters().add(new QFilter("accounttableid", QCP.equals, id)); + } + } + } +} 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 6a6d283..00b117e 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 @@ -102,7 +102,7 @@ public class DailyloanbillExpAccPlugin extends AbstractBillPlugIn implements Plu id=Long.valueOf(inputValue.toString()); } if(id!=null){ - QFilter nameQFilter = new QFilter(prefix+"_accounts", QCP.equals,id); + QFilter nameQFilter = new QFilter(prefix+"_account_item", QCP.equals,id); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); DynamicObject dynamicObject1 = BusinessDataServiceHelper.loadSingle(MAP_TABLE, "createorg,zcgj_entryentity,zcgj_entryentity.zcgj_entity_items", new QFilter[]{nameQFilter,billTypeQFilter}); DynamicObject dynamicObject2 = this.getModel().getDataEntity(true).getDynamicObjectCollection(EXPENSE_ENTRY_ENTITY).get(selectRow); @@ -127,11 +127,11 @@ public class DailyloanbillExpAccPlugin extends AbstractBillPlugIn implements Plu String id = String.valueOf(inputValue) ; QFilter nameQFilter = new QFilter(prefix+"_entryentity.zcgj_entity_items.id", QCP.equals,Long.valueOf(id)); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); - DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_accounts", new QFilter[]{nameQFilter,billTypeQFilter}); + DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_account_item", new QFilter[]{nameQFilter,billTypeQFilter}); Object value = this.getModel().getValue(ACCOUNT_ITEM, selectRow); if(value==null && load!=null && load.length>0){ DynamicObject dynamicObject = load[0]; - long aLong = dynamicObject.getLong("zcgj_accounts_id"); + long aLong = dynamicObject.getLong("zcgj_account_item.id"); this.getModel().setValue(ACCOUNT_ITEM,aLong,selectRow); } } @@ -194,10 +194,10 @@ public class DailyloanbillExpAccPlugin extends AbstractBillPlugIn implements Plu if(accountItem==null){ QFilter nameQFilter = new QFilter(prefix+"_entryentity.zcgj_entity_items.id", QCP.equals,listSelectedRow.getPrimaryKeyValue()); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); - DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_accounts", new QFilter[]{nameQFilter,billTypeQFilter}); + DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_account_item", new QFilter[]{nameQFilter,billTypeQFilter}); if(load!=null && load.length>0){ DynamicObject dynamicObject = load[0]; - long aLong = dynamicObject.getLong("zcgj_accounts_id"); + long aLong = dynamicObject.getLong("zcgj_account_item.id"); this.getModel().setValue(ACCOUNT_ITEM,aLong,index); }else{ this.getModel().setValue(ACCOUNT_ITEM,null,index); @@ -209,10 +209,10 @@ public class DailyloanbillExpAccPlugin extends AbstractBillPlugIn implements Plu //if(accountItem == null){ QFilter nameQFilter = new QFilter(prefix+"_entryentity.zcgj_entity_items.id", QCP.equals,listSelectedRow.getPrimaryKeyValue()); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); - DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_accounts", new QFilter[]{nameQFilter,billTypeQFilter}); + DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_account_item", new QFilter[]{nameQFilter,billTypeQFilter}); if(load!=null && load.length>0){ DynamicObject dynamicObject = load[0]; - DynamicObject zcgjAccounts = dynamicObject.getDynamicObject("zcgj_accounts"); + DynamicObject zcgjAccounts = dynamicObject.getDynamicObject("zcgj_account_item"); if(zcgjAccounts!=null){ //会计科目 insertRow.set(ACCOUNT_ITEM,zcgjAccounts); 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 db09489..b9b41c1 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 @@ -96,7 +96,7 @@ public class DailyreimbursExpAccPlugin extends AbstractBillPlugIn implements Plu id=Long.valueOf(inputValue.toString()); } if(id!=null){ - QFilter nameQFilter = new QFilter(prefix+"_accounts",QCP.equals,id); + QFilter nameQFilter = new QFilter(prefix+"_account_item",QCP.equals,id); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); DynamicObject dynamicObject1 = BusinessDataServiceHelper.loadSingle(MAP_TABLE, "createorg,zcgj_entryentity,zcgj_entryentity.zcgj_entity_items", new QFilter[]{nameQFilter,billTypeQFilter}); DynamicObject dynamicObject2 = this.getModel().getDataEntity(true).getDynamicObjectCollection(EXPENSE_ENTRY_ENTITY).get(selectRow); @@ -121,11 +121,11 @@ public class DailyreimbursExpAccPlugin extends AbstractBillPlugIn implements Plu String id = String.valueOf(inputValue) ; QFilter nameQFilter = new QFilter(prefix+"_entryentity.zcgj_entity_items.id", QCP.equals,Long.valueOf(id)); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); - DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_accounts,zcgj_entryentity.zcgj_rim_expense_type", new QFilter[]{nameQFilter,billTypeQFilter}); + DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_account_item,zcgj_entryentity.zcgj_rim_expense_type", new QFilter[]{nameQFilter,billTypeQFilter}); Object value = this.getModel().getValue(ACCOUNT_ITEM, selectRow); if(value==null && load!=null && load.length>0){ DynamicObject dynamicObject = load[0]; - long aLong = dynamicObject.getLong("zcgj_accounts_id"); + long aLong = dynamicObject.getLong("zcgj_account_item.id"); this.getModel().setValue(ACCOUNT_ITEM,aLong,selectRow); } } @@ -189,10 +189,10 @@ public class DailyreimbursExpAccPlugin extends AbstractBillPlugIn implements Plu if(accountItem==null){ QFilter nameQFilter = new QFilter(prefix+"_entryentity.zcgj_entity_items.id", QCP.equals,listSelectedRow.getPrimaryKeyValue()); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); - DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_accounts", new QFilter[]{nameQFilter,billTypeQFilter}); + DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_account_item", new QFilter[]{nameQFilter,billTypeQFilter}); if(load!=null && load.length>0){ DynamicObject dynamicObject = load[0]; - long aLong = dynamicObject.getLong("zcgj_accounts_id"); + long aLong = dynamicObject.getLong("zcgj_account_item.id"); this.getModel().setValue(ACCOUNT_ITEM,aLong,index); }else{ this.getModel().setValue(ACCOUNT_ITEM,null,index); @@ -204,10 +204,10 @@ public class DailyreimbursExpAccPlugin extends AbstractBillPlugIn implements Plu //if(accountItem == null){ QFilter nameQFilter = new QFilter(prefix+"_entryentity.zcgj_entity_items.id", QCP.equals,listSelectedRow.getPrimaryKeyValue()); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); - DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_accounts", new QFilter[]{nameQFilter,billTypeQFilter}); + DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_account_item", new QFilter[]{nameQFilter,billTypeQFilter}); if(load!=null && load.length>0){ DynamicObject dynamicObject = load[0]; - DynamicObject zcgjAccounts = dynamicObject.getDynamicObject("zcgj_accounts"); + DynamicObject zcgjAccounts = dynamicObject.getDynamicObject("zcgj_account_item"); if(zcgjAccounts!=null){ //会计科目 insertRow.set(ACCOUNT_ITEM,zcgjAccounts); 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 300a589..6f53d0f 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 @@ -100,7 +100,7 @@ public class PrepaybillExpAccPlugin extends AbstractBillPlugIn implements Plugin id=Long.valueOf(inputValue.toString()); } if(id!=null){ - QFilter nameQFilter = new QFilter(prefix+"_accounts", QCP.equals,id); + QFilter nameQFilter = new QFilter(prefix+"_account_item", QCP.equals,id); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); DynamicObject dynamicObject1 = BusinessDataServiceHelper.loadSingle(MAP_TABLE, "createorg,zcgj_entryentity,zcgj_entryentity.zcgj_entity_items", new QFilter[]{nameQFilter,billTypeQFilter}); DynamicObject dynamicObject2 = this.getModel().getDataEntity(true).getDynamicObjectCollection(EXPENSE_ENTRY_ENTITY).get(selectRow); @@ -125,11 +125,11 @@ public class PrepaybillExpAccPlugin extends AbstractBillPlugIn implements Plugin String id = String.valueOf(inputValue) ; QFilter nameQFilter = new QFilter(prefix+"_entryentity.zcgj_entity_items.id", QCP.equals,Long.valueOf(id)); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); - DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_accounts", new QFilter[]{nameQFilter,billTypeQFilter}); + DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_account_item", new QFilter[]{nameQFilter,billTypeQFilter}); Object value = this.getModel().getValue(ACCOUNT_ITEM, selectRow); if(value==null && load!=null && load.length>0){ DynamicObject dynamicObject = load[0]; - long aLong = dynamicObject.getLong("zcgj_accounts_id"); + long aLong = dynamicObject.getLong("zcgj_account_item.id"); this.getModel().setValue(ACCOUNT_ITEM,aLong,selectRow); } } @@ -192,10 +192,10 @@ public class PrepaybillExpAccPlugin extends AbstractBillPlugIn implements Plugin if(accountItem==null){ QFilter nameQFilter = new QFilter(prefix+"_entryentity.zcgj_entity_items.id", QCP.equals,listSelectedRow.getPrimaryKeyValue()); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); - DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_accounts", new QFilter[]{nameQFilter,billTypeQFilter}); + DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_account_item", new QFilter[]{nameQFilter,billTypeQFilter}); if(load!=null && load.length>0){ DynamicObject dynamicObject = load[0]; - long aLong = dynamicObject.getLong("zcgj_accounts_id"); + long aLong = dynamicObject.getLong("zcgj_account_item.id"); this.getModel().setValue(ACCOUNT_ITEM,aLong,index); }else{ this.getModel().setValue(ACCOUNT_ITEM,null,index); @@ -207,10 +207,10 @@ public class PrepaybillExpAccPlugin extends AbstractBillPlugIn implements Plugin //if(accountItem == null){ QFilter nameQFilter = new QFilter(prefix+"_entryentity.zcgj_entity_items.id", QCP.equals,listSelectedRow.getPrimaryKeyValue()); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); - DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_accounts", new QFilter[]{nameQFilter,billTypeQFilter}); + DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_account_item", new QFilter[]{nameQFilter,billTypeQFilter}); if(load!=null && load.length>0){ DynamicObject dynamicObject = load[0]; - DynamicObject zcgjAccounts = dynamicObject.getDynamicObject("zcgj_accounts"); + DynamicObject zcgjAccounts = dynamicObject.getDynamicObject("zcgj_account_item"); if(zcgjAccounts!=null){ //会计科目 insertRow.set(ACCOUNT_ITEM,zcgjAccounts); 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 15a2241..de79c9d 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 @@ -100,7 +100,7 @@ public class PublicreimbursebillExpAccPlugin extends AbstractBillPlugIn implemen id=Long.valueOf(inputValue.toString()); } if(id!=null){ - QFilter nameQFilter = new QFilter(prefix+"_accounts", QCP.equals,id); + QFilter nameQFilter = new QFilter(prefix+"_account_item", QCP.equals,id); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); DynamicObject dynamicObject1 = BusinessDataServiceHelper.loadSingle(MAP_TABLE, "createorg,zcgj_entryentity,zcgj_entryentity.zcgj_entity_items", new QFilter[]{nameQFilter,billTypeQFilter}); DynamicObject dynamicObject2 = this.getModel().getDataEntity(true).getDynamicObjectCollection(EXPENSE_ENTRY_ENTITY).get(selectRow); @@ -125,11 +125,11 @@ public class PublicreimbursebillExpAccPlugin extends AbstractBillPlugIn implemen String id = String.valueOf(inputValue) ; QFilter nameQFilter = new QFilter(prefix+"_entryentity.zcgj_entity_items.id", QCP.equals,Long.valueOf(id)); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); - DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_accounts", new QFilter[]{nameQFilter,billTypeQFilter}); + DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_account_item", new QFilter[]{nameQFilter,billTypeQFilter}); Object value = this.getModel().getValue(ACCOUNT_ITEM, selectRow); if(value==null && load!=null && load.length>0){ DynamicObject dynamicObject = load[0]; - long aLong = dynamicObject.getLong("zcgj_accounts_id"); + long aLong = dynamicObject.getLong("zcgj_account_item.id"); this.getModel().setValue(ACCOUNT_ITEM,aLong,selectRow); } } @@ -192,10 +192,10 @@ public class PublicreimbursebillExpAccPlugin extends AbstractBillPlugIn implemen if(accountItem==null){ QFilter nameQFilter = new QFilter(prefix+"_entryentity.zcgj_entity_items.id", QCP.equals,listSelectedRow.getPrimaryKeyValue()); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); - DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_accounts", new QFilter[]{nameQFilter,billTypeQFilter}); + DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_account_item", new QFilter[]{nameQFilter,billTypeQFilter}); if(load!=null && load.length>0){ DynamicObject dynamicObject = load[0]; - long aLong = dynamicObject.getLong("zcgj_accounts_id"); + long aLong = dynamicObject.getLong("zcgj_account_item.id"); this.getModel().setValue(ACCOUNT_ITEM,aLong,index); }else{ this.getModel().setValue(ACCOUNT_ITEM,null,index); @@ -207,10 +207,10 @@ public class PublicreimbursebillExpAccPlugin extends AbstractBillPlugIn implemen //if(accountItem == null){ QFilter nameQFilter = new QFilter(prefix+"_entryentity.zcgj_entity_items.id", QCP.equals,listSelectedRow.getPrimaryKeyValue()); QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE); - DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_accounts", new QFilter[]{nameQFilter,billTypeQFilter}); + DynamicObject[] load = BusinessDataServiceHelper.load(MAP_TABLE, "createorg,zcgj_account_item", new QFilter[]{nameQFilter,billTypeQFilter}); if(load!=null && load.length>0){ DynamicObject dynamicObject = load[0]; - DynamicObject zcgjAccounts = dynamicObject.getDynamicObject("zcgj_accounts"); + DynamicObject zcgjAccounts = dynamicObject.getDynamicObject("zcgj_account_item"); if(zcgjAccounts!=null){ //会计科目 insertRow.set(ACCOUNT_ITEM,zcgjAccounts);