科目分类通用插件优化
This commit is contained in:
parent
0ec46b3a82
commit
11d72a8bc5
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue