单据类型关联约束付款事项代码提交03
This commit is contained in:
parent
fb18d6c961
commit
8f8dcf1c84
|
@ -79,8 +79,26 @@ public class CommonBillOsPaymentBillFormPlugin extends AbstractBillPlugIn implem
|
||||||
ArrayList<Object> paymentNumbers = new ArrayList<>();
|
ArrayList<Object> paymentNumbers = new ArrayList<>();
|
||||||
DynamicObject[] loads = BusinessDataServiceHelper.load("shkd_paymatter", "id,shkd_paymatterinfo.number", QF.toArray());
|
DynamicObject[] loads = BusinessDataServiceHelper.load("shkd_paymatter", "id,shkd_paymatterinfo.number", QF.toArray());
|
||||||
for (DynamicObject load : loads) {
|
for (DynamicObject load : loads) {
|
||||||
String paymentNumber = load.getString("shkd_paymatterinfo.number");
|
String paymentNumber = load.getString("shkd_paymatterinfo.number");//由于辅助资料包含的付款事项可能存在非叶子节点的情况。查询对象的下级叶子对象。
|
||||||
paymentNumbers.add(paymentNumber);
|
String sql_number = "%"+paymentNumber+"%";
|
||||||
|
QFilter QFSon = new QFilter("longnumber", QCP.like, sql_number);
|
||||||
|
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");//长编码
|
||||||
|
if (data.getInt("level")>1){
|
||||||
|
int index = longnumber.indexOf("!");
|
||||||
|
String substr = longnumber.substring(0, index);
|
||||||
|
if (substr.equals(paymentNumber)){
|
||||||
|
paymentNumbers.add(data.getString("number"));
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (longnumber.equals(paymentNumber)){
|
||||||
|
paymentNumbers.add(paymentNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!paymentNumbers.isEmpty()){
|
if (!paymentNumbers.isEmpty()){
|
||||||
logger.info("付款事项编码集合为"+paymentNumbers.toString());
|
logger.info("付款事项编码集合为"+paymentNumbers.toString());
|
||||||
|
|
Loading…
Reference in New Issue