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);//科目属性