From c6ec93c2bf8cc9dbf5ff3c0ecdda96bc7a7b278d Mon Sep 17 00:00:00 2001 From: xuhaihui <2098865055@qq.com> Date: Wed, 23 Jul 2025 10:07:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=91=E7=9B=AE=E5=88=86=E7=B1=BB=E9=80=9A?= =?UTF-8?q?=E7=94=A8=E6=8F=92=E4=BB=B6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/ReimbursementAccountTypePlugin.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/ReimbursementAccountTypePlugin.java b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/ReimbursementAccountTypePlugin.java index 1f88205..ab0eeae 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/ReimbursementAccountTypePlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/ReimbursementAccountTypePlugin.java @@ -205,8 +205,10 @@ public class ReimbursementAccountTypePlugin extends AbstractBillPlugIn implement switch (entryRuleRuleType) { case "公司": DynamicObject entryRuleCompanyType = entryRule.getDynamicObject("zcgj_companytype");//公司默认分类(科目分类) - this.getModel().setValue("zcgj_accounttype", entryRuleCompanyType, rowIndex); - return; + if (entryRuleCompanyType != null) { + this.getModel().setValue("zcgj_accounttype", entryRuleCompanyType, rowIndex); + return; + } case "部门属性": DynamicObject dutyRelation = BusinessDataServiceHelper.loadSingle("bos_org_dutyrelation", "orgduty", new QFilter("org.id", QCP.equals, costDept.getLong("id")).toArray());//部门属性管理单 @@ -215,8 +217,10 @@ public class ReimbursementAccountTypePlugin extends AbstractBillPlugIn implement long id = orgDuty.getLong("id"); DynamicObject accountType = BusinessDataServiceHelper.loadSingle("zcgj_accounttype", "id", new QFilter("zcgj_orgtype.fbasedataid", QCP.in, id).toArray());//科目分类单 - this.getModel().setValue("zcgj_accounttype", accountType, rowIndex); - return; + if (accountType != null) { + this.getModel().setValue("zcgj_accounttype", accountType, rowIndex); + return; + } } case "职位": QFilter filter4 = new QFilter("zcgj_entryposition.zcgj_cusposition.name", QCP.equals, userMainJob);//职位 @@ -293,8 +297,10 @@ public class ReimbursementAccountTypePlugin extends AbstractBillPlugIn implement accountType = "zcgj_yanzhou"; break; } - long id = orgTypeDefaultCollection.get(0).getLong("zcgj_entryexpense." + accountType); - this.getModel().setValue("zcgj_accounttype", id, rowIndex);//科目属性 + if (accountType != null){ + long id = orgTypeDefaultCollection.get(0).getLong("zcgj_entryexpense." + accountType); + this.getModel().setValue("zcgj_accounttype", id, rowIndex);//科目属性 + } } else { //组织分类配置表中未查询到对应数据,说明组织分类中编码有所改变,需维护对应的组织分类配置表 this.getModel().setValue("zcgj_accounttype", null, rowIndex);//科目属性