修改人:邹江涛

修改内容:API入参出参修改
修改时间:2024/11/14
This commit is contained in:
zoujiangtao 2024-11-14 17:32:49 +08:00
parent 53e2426579
commit df62a13ac3
1 changed files with 25 additions and 13 deletions

View File

@ -68,15 +68,21 @@ public class PayBillApiSavePlugin implements ApiSavePlugin, ApiSerializerPlugin
logger.info("付款处理 → \nobjectType{}\nobjectNumber{}\nbankNumber:{}", objectType, objectNumber, bankNumber);
fieldName2 = "payerbank";
DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(objectType, "id,billno", new QFilter("billno", QCP.equals, objectNumber).toArray());
logger.info("objectNumber:{}", objectNumber);
DynamicObject amAccountbank = BusinessDataServiceHelper.loadSingle("am_accountbank", "id,bank,bank.number", new QFilter("number", QCP.equals, bankNumber).toArray());
logger.info("amAccountbank:{}", amAccountbank);
map.put(fieldName1, dynamicObject.getString("id"));
DynamicObject[] dynamicObjects = BusinessDataServiceHelper.load(objectType, "id,billno", new QFilter("billno", QCP.equals, objectNumber).toArray());
logger.info("dynamicObjects.length{}", dynamicObjects.length);
if (dynamicObjects.length > 0) {
map.put(fieldName1, dynamicObjects[0].getPkValue());
logger.info("dynamicObjects[0]{}", dynamicObjects[0]);
}
DynamicObject[] amAccountbanks = BusinessDataServiceHelper.load("am_accountbank", "id,bank,bank.number", new QFilter("number", QCP.equals, bankNumber).toArray());
logger.info("amAccountbanks.length:{}", amAccountbanks.length);
Map<String, Object> payerbank = new HashMap<>();
payerbank.put("number", amAccountbank.getDynamicObject("bank").getString("number"));
if (amAccountbanks.length > 0) {
payerbank.put("number", amAccountbanks[0].getDynamicObject("bank").getString("number"));
logger.info("amAccountbanks[0]{}", amAccountbanks[0]);
}
logger.info("payerbank:{}", payerbank);
map.put(fieldName2, payerbank);
}
@ -90,14 +96,20 @@ public class PayBillApiSavePlugin implements ApiSavePlugin, ApiSerializerPlugin
bankNumber = (String) accountbank.get("number");
logger.info("收款处理 → \nobjectType{}\nobjectNumber{}\nbankNumber:{}", objectType, objectNumber, bankNumber);
fieldName2 = "payeebank";
DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(objectType, "id", new QFilter("billno", QCP.equals, objectNumber).toArray());
logger.info("objectType:{},objectNumber:{}", objectType, objectNumber);
DynamicObject amAccountbank = BusinessDataServiceHelper.loadSingle("am_accountbank", "id,bank,bank.number", new QFilter("number", QCP.equals, bankNumber).toArray());
logger.info("amAccountbank:{}", amAccountbank);
map.put(fieldName1, dynamicObject.getString("id"));
DynamicObject[] dynamicObjects = BusinessDataServiceHelper.load(objectType, "id", new QFilter("billno", QCP.equals, objectNumber).toArray());
logger.info("dynamicObjects.length{}", dynamicObjects.length);
if (dynamicObjects.length > 0) {
map.put(fieldName1, dynamicObjects[0].getPkValue());
logger.info("dynamicObjects[0]{}", dynamicObjects[0]);
}
DynamicObject[] amAccountbanks = BusinessDataServiceHelper.load("am_accountbank", "id,bank,bank.number", new QFilter("number", QCP.equals, bankNumber).toArray());
logger.info("amAccountbanks.length:{}", amAccountbanks.length);
Map<String, Object> payeebank = new HashMap<>();
payeebank.put("number", amAccountbank.getDynamicObject("bank").getString("number"));
if (amAccountbanks.length > 0) {
payeebank.put("number", amAccountbanks[0].getDynamicObject("bank").getString("number"));
}
logger.info("payerbank:{}", payeebank);
map.put(fieldName2, payeebank);
}
shkd_businessid = map.get("shkd_businessid").toString();