提交内容:接口调整,编码传统一社会信用代码

备注:接口调整,编码传统一社会信用代码
提交人:邹江涛
This commit is contained in:
zoujiangtao 2024-12-26 16:40:20 +08:00
parent b68a70e36d
commit c3730790f9
1 changed files with 11 additions and 4 deletions

View File

@ -76,16 +76,20 @@ public class PayBillApiSavePlugin implements ApiSavePlugin {
} }
if ("bd_supplier".equals(payeetype) || "bd_customer".equals(payeetype)) { if ("bd_supplier".equals(payeetype) || "bd_customer".equals(payeetype)) {
logger.info("收款人ID{}", map.get("payeenumber"));
DynamicObject[] objects = BusinessDataServiceHelper.load(payeetype.toString(), "id,number,name,societycreditcode", new QFilter("societycreditcode", QCP.equals, map.get("payeenumber").toString()).toArray()); DynamicObject[] objects = BusinessDataServiceHelper.load(payeetype.toString(), "id,number,name,societycreditcode", new QFilter("societycreditcode", QCP.equals, map.get("payeenumber").toString()).toArray());
if (objects.length > 0) { if (objects.length > 0) {
map.put("payeenumber", objects[0].getString("number")); map.put("payeenumber", objects[0].getString("number"));
}
//收款人编码 //收款人编码
objectNumber = objects[0].getString("number"); objectNumber = objects[0].getString("number");
} else { } else {
//收款人编码 //收款人编码
objectNumber = map.get("payeenumber").toString(); objectNumber = map.get("payeenumber").toString();
} }
} else {
//收款人编码
objectNumber = map.get("payeenumber").toString();
}
logger.info("进入付款处理单API"); logger.info("进入付款处理单API");
@ -146,13 +150,16 @@ public class PayBillApiSavePlugin implements ApiSavePlugin {
DynamicObject[] objects = BusinessDataServiceHelper.load(payertype.toString(), "id,number,name,societycreditcode", new QFilter("societycreditcode", QCP.equals, map.get("payernumber").toString()).toArray()); DynamicObject[] objects = BusinessDataServiceHelper.load(payertype.toString(), "id,number,name,societycreditcode", new QFilter("societycreditcode", QCP.equals, map.get("payernumber").toString()).toArray());
if (objects.length > 0) { if (objects.length > 0) {
map.put("payernumber", objects[0].getString("number")); map.put("payernumber", objects[0].getString("number"));
}
//收款人编码 //收款人编码
objectNumber = objects[0].getString("number"); objectNumber = objects[0].getString("number");
} else { } else {
//收款人编码 //收款人编码
objectNumber = map.get("payernumber").toString(); objectNumber = map.get("payernumber").toString();
} }
} else {
//收款人编码
objectNumber = map.get("payernumber").toString();
}
objectType = payertype.toString(); objectType = payertype.toString();
if (!"other".equals(objectType)) { if (!"other".equals(objectType)) {