diff --git a/pom.xml b/pom.xml index 8bf2cb8..ebffb18 100644 --- a/pom.xml +++ b/pom.xml @@ -121,7 +121,7 @@ cn.hutool hutool-all - 5.8.12 + 5.8.33 diff --git a/src/main/java/com/glxp/mipsdl/client/scpwxyy/ScpwxyyClient.java b/src/main/java/com/glxp/mipsdl/client/scpwxyy/ScpwxyyClient.java index 4a7e37e..0e3f83b 100644 --- a/src/main/java/com/glxp/mipsdl/client/scpwxyy/ScpwxyyClient.java +++ b/src/main/java/com/glxp/mipsdl/client/scpwxyy/ScpwxyyClient.java @@ -6,10 +6,13 @@ import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ReflectUtil; import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONConfig; import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; +import com.alibaba.fastjson.serializer.SerializeConfig; +import com.alibaba.fastjson.serializer.SerializerFeature; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -1872,9 +1875,12 @@ public class ScpwxyyClient extends CommonHttpClient { JSONObject dataJson = JSONObject.parseObject(jsonStr); - ybClient.ybPostScyh("3505A", dataJson); + return ybClient.ybPostScyh("3505A", dataJson); + + }else { + return ResultVOUtils.error(500,"未上传医保视图数据查不到"); } - return ResultVOUtils.success(); + } @@ -1918,7 +1924,7 @@ public class ScpwxyyClient extends CommonHttpClient { basePcsc3501Request.setSelinfoDetail(pcsc3501Requests); String jsonStr = JSONUtil.toJsonStr(basePcsc3501Request); JSONObject dataJson = JSONObject.parseObject(jsonStr); - ybClient.ybPost("3501A", dataJson); + ybClient.ybPostScyh("3501A", dataJson); } } @@ -1964,7 +1970,7 @@ public class ScpwxyyClient extends CommonHttpClient { baseKcbg3502Request.setSelinfoDetail(kcbg3502Requests); String jsonStr = JSONUtil.toJsonStr(baseKcbg3502Request); JSONObject dataJson = JSONObject.parseObject(jsonStr); - ybClient.ybPost("3502A", dataJson); + ybClient.ybPostScyh("3502A", dataJson); } } @@ -2022,10 +2028,11 @@ public class ScpwxyyClient extends CommonHttpClient { } + BaseXsth3506Request baseXsth3506Request = new BaseXsth3506Request(); baseXsth3506Request.setSelinfoDetail(xsth3506Requests); String jsonStr = JSONUtil.toJsonStr(baseXsth3506Request); JSONObject dataJson = JSONObject.parseObject(jsonStr); - ybClient.ybPost("3506A", dataJson); + ybClient.ybPostScyh("3506A", dataJson); } } diff --git a/src/main/java/com/glxp/mipsdl/service/yb/YbClient.java b/src/main/java/com/glxp/mipsdl/service/yb/YbClient.java index 7afdfe8..d963374 100644 --- a/src/main/java/com/glxp/mipsdl/service/yb/YbClient.java +++ b/src/main/java/com/glxp/mipsdl/service/yb/YbClient.java @@ -91,7 +91,9 @@ public class YbClient { log.info("[" + apiNo + "]医保接口请求参数:" + data); ThrYbSetup thrYbSetup = thrYbSetupService.getSetUp(); if (thrYbSetup == null) + { throw new RuntimeException("未配置医保接口"); + } // 组装访问数据 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); // 获取当前日期和时间 @@ -135,7 +137,10 @@ public class YbClient { jsonObject.put("input", jsonObjectSignIn); try { - String json = HttpUtil.post(thrYbSetup.getIp(), JSONUtil.toJsonStr(jsonObject)); + log.info("医保签到入参===" + JSONUtil.toJsonStr(jsonObject)); + String json = HttpUtil.post(thrYbSetup.getUrl(), JSONUtil.toJsonStr(jsonObject)); + log.info("医保签到返回===" + json); + // String json = "{\n" + // " \"output\":{\n" + // " \"signinoutb\":{\n" + @@ -178,16 +183,18 @@ public class YbClient { jsonObject.put("infno", apiNo); jsonObject.put("input", data); jsonObject.put("sign_no", signNo); + log.info("上传医保入参===" + JSONUtil.toJsonStr(jsonObject)); + String json; try { - String json = HttpUtil.post(thrYbSetup.getIp(), JSONUtil.toJsonStr(jsonObject)); + json= HttpUtil.post(thrYbSetup.getUrl(), JSONUtil.toJsonStr(jsonObject)); log.info("上传医保结果===" + json); + return ResultVOUtils.success("上传医保结果===" + json); }catch (Exception e){ return ResultVOUtils.error(500, "上传医保失败!!"+e.getMessage()); } // - return ResultVOUtils.success(); }