From 96db4ef39a5514e018426566dac32344005cb645 Mon Sep 17 00:00:00 2001 From: qiuyt Date: Thu, 6 Mar 2025 11:58:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=92=8C=E5=8E=BF=E5=8C=BB=E9=99=A2?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0his=E5=8D=95=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/glxp/mipsdl/client/phxyy/PhxyyClient.java | 9 ++++++++- src/main/java/com/glxp/mipsdl/http/HttpClient.java | 6 ++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/glxp/mipsdl/client/phxyy/PhxyyClient.java b/src/main/java/com/glxp/mipsdl/client/phxyy/PhxyyClient.java index 3715ada..70e3ac1 100644 --- a/src/main/java/com/glxp/mipsdl/client/phxyy/PhxyyClient.java +++ b/src/main/java/com/glxp/mipsdl/client/phxyy/PhxyyClient.java @@ -337,6 +337,7 @@ public class PhxyyClient extends CommonHttpClient { } items.add(item); } catch (Exception e) { + log.error(e.getMessage(), e); uploadLog.setStatus(3); String errMsg = "提交失败,错误信息:" + e.getMessage(); @@ -362,7 +363,13 @@ public class PhxyyClient extends CommonHttpClient { for (IoCodeEntity codeDetaiEntity : ioCodeEntities) { if (CollUtil.isNotEmpty(stockOrderDetailEntities)) { for (IoOrderDetailBizEntity stockOrderDetailEntity : stockOrderDetailEntities) { - if (IntUtil.value(codeDetaiEntity.getRelId()) == IntUtil.value(stockOrderDetailEntity.getBindRlFk()) + log.error("详情判断===1==="); + log.error("{}", codeDetaiEntity.getRelId() == Long.valueOf(stockOrderDetailEntity.getBindRlFk())); + log.error("{}", StrUtil.trimToEmpty(codeDetaiEntity.getBatchNo()).equals(StrUtil.trimToEmpty(stockOrderDetailEntity.getBatchNo()))); + log.error("{}", stockOrderDetailEntity.getBindRlFk().equals(codeDetaiEntity.getRelId())); + log.error("详情判断===2==="); + + if (stockOrderDetailEntity.getBindRlFk().equals(codeDetaiEntity.getRelId()+"") && StrUtil.trimToEmpty(codeDetaiEntity.getBatchNo()).equals(StrUtil.trimToEmpty(stockOrderDetailEntity.getBatchNo()))) { IoOrderDetailBizEntity item = new IoOrderDetailBizEntity(); BeanUtils.copyProperties(stockOrderDetailEntity, item); diff --git a/src/main/java/com/glxp/mipsdl/http/HttpClient.java b/src/main/java/com/glxp/mipsdl/http/HttpClient.java index 302ccf8..8de5e3b 100644 --- a/src/main/java/com/glxp/mipsdl/http/HttpClient.java +++ b/src/main/java/com/glxp/mipsdl/http/HttpClient.java @@ -1,6 +1,7 @@ package com.glxp.mipsdl.http; import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONWriter; import com.glxp.mipsdl.config.HospConfig; @@ -63,9 +64,10 @@ public class HttpClient { public String postJson(String url, Object object) { //请求时间 Date date = new Date(); + log.error(object + "====" + object); //转json字符串时,将空属性转换为空字符串 - String json = JSONObject.toJSONString(object); - log.info(url + "\n" + json); + String json = JSONUtil.toJsonStr(object); + log.error(url + "\n" + json); String response = ""; Integer status; try {