提交内容:实现是过滤这里的内部账户

时间:2025-07-09 11:36
提交人:邹江涛
This commit is contained in:
zoujiangtao 2025-07-09 11:36:47 +08:00
parent e6b0f1bae8
commit 899f550f3d
1 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,32 @@
package shkd.sys.sys.plugin.form;
import kd.bos.entity.AppMetadataCache;
import kd.bos.form.plugin.AbstractFormPlugin;
import kd.bos.list.BillList;
import kd.bos.orm.query.QFilter;
import kd.tmc.am.common.property.BusinessApplyProps;
import kd.tmc.fbp.common.helper.TmcParameterHelper;
import java.util.Map;
public class ExtAcctBankListEdit extends AbstractFormPlugin {
@Override
public void initialize() {
super.initialize();
BillList list = this.getView().getControl(BusinessApplyProps.BILLLISTAP);
list.addSetFilterListener(l -> {
Map<String, Object> customParams = this.getView().getFormShowParameter().getCustomParams();
Object company = customParams.get("companyid");
if (company != null && Long.parseLong(company.toString()) > 0) {
Long companyId = Long.parseLong(company.toString());
String amId = AppMetadataCache.getAppInfo("am").getId();
Boolean showInternalAccount = (Boolean) TmcParameterHelper.getAppParameter(amId, companyId, "isshowinternalaccount");
if (showInternalAccount != null && !showInternalAccount) {
QFilter filter = new QFilter("finorgtype", QFilter.not_equals, "1");
l.getQFilters().add(filter);
}
}
});
}
}