From 0dfe66c8d26d71eee1182ee9ea9bb540a0dd7343 Mon Sep 17 00:00:00 2001 From: zoujiangtao Date: Wed, 4 Dec 2024 11:33:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=BA=EF=BC=9A=E9=82=B9?= =?UTF-8?q?=E6=B1=9F=E6=B6=9B=20=E4=BF=AE=E6=94=B9=E5=86=85=E5=AE=B9?= =?UTF-8?q?=EF=BC=9AAPI=E6=98=A0=E5=B0=84=E5=85=AC=E5=85=B1=E5=8D=95?= =?UTF-8?q?=E6=8D=AE=20=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=EF=BC=9A2024/1?= =?UTF-8?q?2/04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/plugin/form/ApiMappingBillPlugin.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java index caf0652..ef384c4 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java @@ -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);