From aa93e512a60379c6373d10023f49dae4403b51c4 Mon Sep 17 00:00:00 2001 From: zhaowenxuan <chacca165@163.com> Date: 星期五, 21 二月 2025 17:55:09 +0800 Subject: [PATCH] 金堆成同步字典服务 --- src/main/java/com/example/service/shanxiqin/xian/MeiJiHisService.java | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/example/service/shanxiqin/xian/MeiJiHisService.java b/src/main/java/com/example/service/shanxiqin/xian/MeiJiHisService.java index 51fcd0e..5609acb 100644 --- a/src/main/java/com/example/service/shanxiqin/xian/MeiJiHisService.java +++ b/src/main/java/com/example/service/shanxiqin/xian/MeiJiHisService.java @@ -408,7 +408,9 @@ map.put ("yeWuLx",string); // 鍙傛暟绫诲瀷鍖哄垎 map.put("type","1"); - String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/pushZhiFuMsg", map); + HashMap<String, Object> headers = new HashMap<>(); + headers.put("hospId","xamjyy"); + String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/pushZhiFuMsg", map,headers); JSONObject jsonObject = JSONUtil.parseObj(post); JSONObject obj = JSONUtil.createObj(); if (jsonObject.getStr("code").equals("200")) { @@ -537,13 +539,15 @@ public void syncDict(String hospName) { HashMap<String, Object> map = new HashMap<>(); map.put("hosp","shanxiqinxamjyy"); - String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/getZdList", map); + HashMap<String, Object> headers = new HashMap<>(); + headers.put("hospId","xamjyy"); + String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/getZdList", map,headers); JSONArray jsonArray = JSONUtil.parseObj(post).getJSONArray("data"); - if (jsonArray != null && jsonArray.size() > 0) { + if (jsonArray != null && !jsonArray.isEmpty()) { List<HisSyncDict> list = jsonArray.toList(HisSyncDict.class); String token = ""; Map<Object, Object> entries = redisTemplate.opsForHash().entries("token:his:shanxixamjyy"); - if (entries != null && !entries.isEmpty()) { + if (!entries.isEmpty()) { String timeStr = entries.get("time").toString(); String expiresInStr = entries.get("expires_in").toString(); long time = Long.parseLong(timeStr); -- Gitblit v1.8.0