1.功能开发

This commit is contained in:
zhangzhiguo 2025-01-20 11:27:32 +08:00
parent a7f9de802e
commit 62a675fe82
5 changed files with 31 additions and 0 deletions

View File

@ -14,7 +14,9 @@ import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.servicehelper.user.UserServiceHelper;
import kd.sdk.plugin.Plugin;
import java.util.ArrayList;
import java.util.EventObject;
import java.util.List;
public class AccountFilterPlugin extends AbstractBillPlugIn implements Plugin, BeforeF7SelectListener {
@ -46,11 +48,17 @@ public class AccountFilterPlugin extends AbstractBillPlugIn implements Plugin,
//会计科目根据左树根据科目表编码过滤
String zcgjAccounttableNumber = (String)this.getModel().getValue("zcgj_accounttable_number");
QFilter accountTableFilter = new QFilter("number", QCP.equals,zcgjAccounttableNumber);
List<QFilter> qFilterList = new ArrayList<>();
qFilterList.add(new QFilter("isleaf", QCP.equals,true));
arg0.setCustomQFilters(qFilterList);
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));
// param.getTreeFilterParameter().getQFilters().add(new QFilter("isleaf", QCP.equals,true));
}
}
}

View File

@ -27,7 +27,9 @@ import kd.bos.servicehelper.user.UserServiceHelper;
import kd.sdk.plugin.Plugin;
import zcgj.zcdev.zcdev.fs.utils.OrgCheckUtils;
import java.util.ArrayList;
import java.util.EventObject;
import java.util.List;
/**
* 借款单会计科目与费用项目关联插件
@ -142,6 +144,9 @@ public class DailyloanbillExpAccPlugin extends AbstractBillPlugIn implements Plu
String name = arg0.getProperty().getName();
if(name.equals(ACCOUNT_ITEM)){
selectRow = arg0.getRow();
List<QFilter> qFilterList = new ArrayList<>();
qFilterList.add(new QFilter("isleaf", QCP.equals,true));
arg0.setCustomQFilters(qFilterList);
//会计科目根据左树根据科目表编码过滤
String zcgjAccounttableNumber = (String)this.getModel().getValue("zcgj_accounttable_number");
QFilter accountTableFilter = new QFilter("number",QCP.equals,zcgjAccounttableNumber);

View File

@ -25,7 +25,9 @@ import kd.bos.servicehelper.user.UserServiceHelper;
import kd.sdk.plugin.Plugin;
import zcgj.zcdev.zcdev.fs.utils.OrgCheckUtils;
import java.util.ArrayList;
import java.util.EventObject;
import java.util.List;
/**
* 费用报销单会计科目与费用项目关联插件
@ -143,6 +145,11 @@ public class DailyreimbursExpAccPlugin extends AbstractBillPlugIn implements Plu
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});
List<QFilter> qFilterList = new ArrayList<>();
qFilterList.add(new QFilter("isleaf", QCP.equals,true));
arg0.setCustomQFilters(qFilterList);
if(accountTableFilterObj!=null){
long id = accountTableFilterObj.getLong("id");
ListShowParameter param = (ListShowParameter) arg0.getFormShowParameter();

View File

@ -25,7 +25,9 @@ import kd.bos.servicehelper.user.UserServiceHelper;
import kd.sdk.plugin.Plugin;
import zcgj.zcdev.zcdev.fs.utils.OrgCheckUtils;
import java.util.ArrayList;
import java.util.EventObject;
import java.util.List;
/**
* 预付单会计科目与费用项目关联插件
@ -140,6 +142,10 @@ public class PrepaybillExpAccPlugin extends AbstractBillPlugIn implements Plugin
String name = arg0.getProperty().getName();
if(name.equals(ACCOUNT_ITEM)){
selectRow = arg0.getRow();
List<QFilter> qFilterList = new ArrayList<>();
qFilterList.add(new QFilter("isleaf", QCP.equals,true));
arg0.setCustomQFilters(qFilterList);
//会计科目根据左树根据科目表编码过滤
String zcgjAccounttableNumber = (String)this.getModel().getValue("zcgj_accounttable_number");
QFilter accountTableFilter = new QFilter("number",QCP.equals,zcgjAccounttableNumber);

View File

@ -25,7 +25,9 @@ import kd.bos.servicehelper.user.UserServiceHelper;
import kd.sdk.plugin.Plugin;
import zcgj.zcdev.zcdev.fs.utils.OrgCheckUtils;
import java.util.ArrayList;
import java.util.EventObject;
import java.util.List;
/**
* 对公报销单会计科目与费用项目关联插件
@ -140,6 +142,9 @@ public class PublicreimbursebillExpAccPlugin extends AbstractBillPlugIn implemen
String name = arg0.getProperty().getName();
if(name.equals(ACCOUNT_ITEM)){
selectRow = arg0.getRow();
List<QFilter> qFilterList = new ArrayList<>();
qFilterList.add(new QFilter("isleaf", QCP.equals,true));
arg0.setCustomQFilters(qFilterList);
//会计科目根据左树根据科目表编码过滤
String zcgjAccounttableNumber = (String)this.getModel().getValue("zcgj_accounttable_number");
QFilter accountTableFilter = new QFilter("number",QCP.equals,zcgjAccounttableNumber);