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" + "