修改人:邹江涛

修改内容:API映射公共单据
修改时间:2024/11/28
This commit is contained in:
zoujiangtao 2024-11-28 15:48:02 +08:00
parent 060c4715b6
commit cc38039589
1 changed files with 4 additions and 0 deletions

View File

@ -50,8 +50,10 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
if ("shkd_generatejson".equals(itemKey)) {
// 获取想要推送单据编码
String billNumber = dataEntity.getString("shkd_sourcenumber");
logger.info("获取推送单据编码 → billNumber{}", billNumber);
// 获取想要推送单据类型
String billMark = dataEntity.getDynamicObject("shkd_sourcebill").getDataEntityType().getName();
logger.info("获取推送单据类型 → billMark{}", billMark);
// 获取推送单据对象
DynamicObject billObject = BusinessDataServiceHelper.loadSingle(billMark, new QFilter("billno", QCP.equals, billNumber).toArray());
logger.info("获取推送对象 → billObject{}", billObject);
@ -138,10 +140,12 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
}
jsonArray.add(json);
codeEdit.setText(jsonArray.toJSONString());
logger.info("JSON{}", jsonArray.toJSONString());
} else {
JSONObject resultJson = new JSONObject();
processFloor(resultJson, "data", floors.get(0), floors, billObject);
codeEdit.setText(resultJson.toJSONString());
logger.info("JSON{}", resultJson.toJSONString());
}
}