From 11d72a8bc5ec7e8d2679ba5f435b5cda106ca044 Mon Sep 17 00:00:00 2001 From: xuhaihui <2098865055@qq.com> Date: Tue, 22 Jul 2025 18:02:01 +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 | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 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 685291a..91fc0ac 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 @@ -202,24 +202,21 @@ public class ReimbursementAccountTypePlugin extends AbstractBillPlugIn implement switch (entryRuleRuleType) { case "公司": DynamicObject entryRuleCompanyType = entryRule.getDynamicObject("zcgj_companytype");//公司默认分类(科目分类) - 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());//部门属性管理单 - - DynamicObject orgDuty = dutyRelation.getDynamicObject("orgduty");//业务属性 - - 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 (dutyRelation != null) { + DynamicObject orgDuty = dutyRelation.getDynamicObject("orgduty");//业务属性 + 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; + } case "职位": DynamicObject zcgj_positiontype = entryRule.getDynamicObject("zcgj_positiontype");//职位默认分类 - if (zcgj_positiontype != null) { QFilter filter4 = new QFilter("zcgj_entryposition.zcgj_cusposition.name", QCP.equals, userMainJob); DynamicObjectCollection zcgj_positionrule = QueryServiceHelper.query("zcgj_positionrule", @@ -236,7 +233,6 @@ public class ReimbursementAccountTypePlugin extends AbstractBillPlugIn implement break; case "人员": DynamicObject zcgj_persontype = entryRule.getDynamicObject("zcgj_persontype");//人员默认分类 - if (zcgj_persontype != null) { QFilter filter5 = new QFilter("zcgj_entryperson.zcgj_person.id", QCP.equals, userid); DynamicObjectCollection zcgj_positionrule = QueryServiceHelper.query("zcgj_personrule",