From 728b494350e519ea781491319e759f3421854b6d Mon Sep 17 00:00:00 2001 From: qiuyt Date: Fri, 3 Jan 2025 13:08:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B9=96=E9=87=8C=E5=A6=87=E5=B9=BC=E9=83=BD?= =?UTF-8?q?=E8=BD=AC=E6=88=90=E5=AD=97=E7=AC=A6=E4=B8=B2=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/glxp/mipsdl/client/hlfyyy/HlfyyyClient.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/glxp/mipsdl/client/hlfyyy/HlfyyyClient.java b/src/main/java/com/glxp/mipsdl/client/hlfyyy/HlfyyyClient.java index f20b12a..d57929a 100644 --- a/src/main/java/com/glxp/mipsdl/client/hlfyyy/HlfyyyClient.java +++ b/src/main/java/com/glxp/mipsdl/client/hlfyyy/HlfyyyClient.java @@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fasterxml.jackson.databind.JsonNode; import com.glxp.mipsdl.client.CommonHttpClient; import com.glxp.mipsdl.client.hlfyyy.entity.InvCodeResultEntity; @@ -2394,6 +2395,12 @@ public class HlfyyyClient extends CommonHttpClient { private static final String WSDL_URL = "http://192.168.158.208:8152/ZoesoftHipService.asmx?WSDL"; public BaseResponse callInterface(String msgHeader, String msgBody) { + // 先将JSON字符串转为Map + Map map = JSONUtil.toBean(msgBody, Map.class); + // 遍历Map将所有值转换为字符串 + map.replaceAll((key, value) -> value == null? null : value.toString()); + // 再将转换后的Map转回JSON字符串(此时所有值都已是字符串类型) + msgBody = JSONUtil.toJsonStr(map); String xml = "\n" + "