修改人:邹江涛

修改内容:API映射公共单据
修改时间:2024/12/04
This commit is contained in:
zoujiangtao 2024-12-04 11:33:12 +08:00
parent 9950c97873
commit 0dfe66c8d2
1 changed files with 12 additions and 8 deletions

View File

@ -303,15 +303,17 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
logger.info("key: {}, value: {}", key, value);
String tartype = dynamicObject.getString("shkd_tartype");
if ("string".equals(tartype) || "date".equals(tartype)) {
if ("String".equals(tartype) || "Date".equals(tartype)) {
json.put(key, value);
} else if ("int".equals(tartype)) {
} else if ("Integer".equals(tartype)) {
json.put(key, Integer.parseInt(value.toString()));
} else if ("object".equals(tartype)) {
} else if ("BigDecimal".equals(tartype)) {
json.put(key, new BigDecimal(value.toString()));
} else if ("对象".equals(tartype)) {
JSONObject childJson = new JSONObject();
processFloor(childJson, key, getChildren(floors, dynamicObject.getString("shkd_tarfield")), floors, dynamic);
json.put(key, childJson);
} else if ("arrayList".equals(tartype)) {
} else if ("数组".equals(tartype)) {
JSONArray childJsonArray = new JSONArray();
for (DynamicObject childDynamicObject : getChildren(floors, dynamicObject.getString("shkd_tarfield"))) {
JSONObject childJson = new JSONObject();
@ -377,15 +379,17 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
logger.info("key: {}, value: {}", key, value);
String tartype = dynamicObject.getString("shkd_tartype");
if ("string".equals(tartype) || "date".equals(tartype)) {
if ("String".equals(tartype) || "Date".equals(tartype)) {
parentJson.put(key, value);
} else if ("int".equals(tartype)) {
} else if ("Integer".equals(tartype)) {
parentJson.put(key, Integer.parseInt(value.toString()));
} else if ("object".equals(tartype)) {
} else if ("BigDecimal".equals(tartype)) {
parentJson.put(key, new BigDecimal(value.toString()));
} else if ("对象".equals(tartype)) {
JSONObject childJson = new JSONObject();
processFloor(childJson, key, getChildren(floors, dynamicObject.getString("shkd_tarfield")), floors, dynamic);
parentJson.put(key, childJson);
} else if ("arrayList".equals(tartype)) {
} else if ("数组".equals(tartype)) {
JSONArray childJsonArray = new JSONArray();
JSONObject childJson = new JSONObject();
processFloor(childJson, key, getChildren(floors, dynamicObject.getString("shkd_tarfield")), floors, dynamic);