diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ExtAcctBankListEdit.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ExtAcctBankListEdit.java new file mode 100644 index 0000000..d2fce98 --- /dev/null +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ExtAcctBankListEdit.java @@ -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 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); + } + } + }); + } + +} \ No newline at end of file