付款会计科目过滤

This commit is contained in:
程小伟 2025-03-06 14:01:31 +08:00
parent 5b6938e397
commit 4ec0e1b517
6 changed files with 18 additions and 18 deletions

View File

@ -25,18 +25,18 @@ public class AccountFilterPlugin extends AbstractBillPlugIn implements Plugin,
@Override
public void registerListener(EventObject e) {
super.registerListener(e);
Long currentUserId = UserServiceHelper.getCurrentUserId();
Long currentUserId = UserServiceHelper.getCurrentUserId();//获取当前登录用户的ID
// 当前用户所属组织
Long mainOrgId = UserServiceHelper.getUserMainOrgId(currentUserId);
Long mainOrgId = UserServiceHelper.getUserMainOrgId(currentUserId);//获取当前用户所属组织ID
//当前切换选择的组织
Long currentOrgId = RequestContext.get().getOrgId();
Long currentOrgId = RequestContext.get().getOrgId();//获取当前上下文组织ID
//当前所在的组织是属于矿山下的 costcompany
//costcompany 费用承担公司
//DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
//long costcompanyId = costcompany.getLong("id");
//if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM);
fieldEdit.addBeforeF7SelectListener(this);
BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM);//获取名为ACCOUNT_ITEM的控件
fieldEdit.addBeforeF7SelectListener(this);//为当前控件注册F7监听事件
// }
}
@ -47,17 +47,17 @@ public class AccountFilterPlugin extends AbstractBillPlugIn implements Plugin,
if(name.equals(ACCOUNT_ITEM)){
//会计科目根据左树根据科目表编码过滤
String zcgjAccounttableNumber = (String)this.getModel().getValue("zcgj_accounttable_number");
QFilter accountTableFilter = new QFilter("number", QCP.equals,zcgjAccounttableNumber);
QFilter accountTableFilter = new QFilter("number", QCP.equals,zcgjAccounttableNumber);//筛选出属性number=zcgjAccounttableNumber的结果
List<QFilter> qFilterList = new ArrayList<>();
qFilterList.add(new QFilter("isleaf", QCP.equals,true));
arg0.setCustomQFilters(qFilterList);
arg0.setCustomQFilters(qFilterList);//设置筛选条件 是叶子节点的结果
//从数据库查找名为entityName的表筛选条件fiters返回只有id number字段的动态记录
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));
ListShowParameter param = (ListShowParameter) arg0.getFormShowParameter();//当前F7查询事件的表单显示参数
param.getTreeFilterParameter().getQFilters().add(new QFilter("accounttableid", QCP.equals, id));//返回特定条件下显示参数的结果
// param.getTreeFilterParameter().getQFilters().add(new QFilter("isleaf", QCP.equals,true));
}
}

View File

@ -43,7 +43,7 @@ public final class CosmicLauncher {
*/
private static final String DEFAULT_COSMIT_HOME_PATH = System.getProperty("user.home").replaceAll("\\\\", "/") + "/cosmic/home";
private static final String PROJECT_HOME = "D:/ideazcgj";
private static final String PROJECT_HOME = "D:/WorkSpace/zcdev";
private static final String LOCAL_IP = "127.0.0.1";

View File

@ -26,10 +26,10 @@ public class DebugApplication {
cosmic.setTenantNumber("ierp");
// cosmic.setConfigUrl("127.0.0.1:2181?user=zk&password=xxx");
cosmic.setConfigUrl("127.0.0.1:2181");
cosmic.setConfigUrl("192.168.10.210:2181?user=zookeeper&password=123456abc");
// cosmic.setMcServerUrl("http://127.0.0.1:8090");
cosmic.setMcServerUrl("http://127.0.0.1:8090/");
cosmic.setMcServerUrl("http://192.168.10.210:8090/");
// cosmic.setFsServerUrl("127.0.0.1", 8100);
// cosmic.setImageServerUrl("127.0.0.1", 8100);

View File

@ -1,5 +1,5 @@
{
"COSMIC_DEVELOPER_FLAG": "zcgj",
"COSMIC_PROJECT_FLAG": "zcdev",
"COSMIC_RES_URL": "http://127.0.0.1:8090/appstore/dev_env"
"COSMIC_RES_URL": "http://192.168.10.210:268/studio/environment/download/3"
}

View File

@ -1 +1 @@
MCServerURL=http://127.0.0.1:8090/appstore/dev_env
MCServerURL=http://192.168.10.210:268/studio/environment/download/3

View File

@ -3,13 +3,13 @@
### If there are any issues during the use process, you can provide feedback to the kingdee developer community website.
### Website: https://developer.kingdee.com/developer?productLineId=29
### Author: liebin.zheng
### Generate Date: 2024-12-15 21:22:07
### Generate Date: 2025-03-04 10:51:23
### ----------------------------
systemProp.kddt_version=2.2.0-Beta
systemProp.template_type=app
systemProp.groupId=zcgj.cosmic
systemProp.artifactId=zcgj-cosmic
#systemProp.version=1.0.0
systemProp.version=1.0.0
systemProp.ci_version=2.0
systemProp.jdk.version=1.8
systemProp.new_cosmic_project=true
@ -18,7 +18,7 @@ systemProp.developer_flag=zcgj
#--This is the project flag
systemProp.project_flag=zcdev
#--This is the project dir
systemProp.project_dir=E:/code/zcdev
systemProp.project_dir=D:/WorkSpace/zcdev
#--This is the dir for cosmic project libs and static resouces
systemProp.cosmic_home=D:/comsic/home
#--Performance configuration for gradle build