单据类型关联约束付款事项代码提交05

This commit is contained in:
zengweihai 2024-06-14 11:31:39 +08:00
parent 2eeec3ee90
commit aaa884977f
1 changed files with 2 additions and 1 deletions

View File

@ -75,6 +75,7 @@ public class CommonBillOsPaymentBillFormPlugin extends AbstractBillPlugIn implem
DynamicObject org = (DynamicObject) this.getModel().getValue("org");
String orgName = org.getString("name");
QF.and("shkd_org.name",QCP.equals,orgName);
QF.and("enable",QCP.equals,"1");//使用状态为可用
logger.info("过滤条件单据类型为"+billType+",组织名称为:"+orgName);
ArrayList<Object> paymentNumbers = new ArrayList<>();
DynamicObject[] loads = BusinessDataServiceHelper.load("shkd_paymatter", "id,shkd_paymatterinfo.number", QF.toArray());
@ -83,7 +84,7 @@ public class CommonBillOsPaymentBillFormPlugin extends AbstractBillPlugIn implem
logger.info("开始查询该付款事项及其下游叶子事项");
String sql_number = "%"+paymentNumber+"%";
QFilter QFSon = new QFilter("longnumber", QCP.like, sql_number);
QFSon.and("isleaf",QCP.equals,"1");
QFSon.and("isleaf",QCP.equals,"1");//是叶子节点
DynamicObject[] datum = BusinessDataServiceHelper.load("bos_assistantdata_detail", "id,number,longnumber,level", QFSon.toArray());
for (DynamicObject data : datum) {
String longnumber = data.getString("longnumber");//长编码