| | |
| | | Object returnData = entries.get("returnData"); |
| | | if (null != returnData && !returnData.toString().equals("null")) { |
| | | HashMap<String, String> hashMap = new HashMap<>(); |
| | | JSONObject data = entries.getJSONObject("returnData"); |
| | | hashMap.put(ApiParamsConstants.CARD_ID,data.getStr("jiuZhenKh")); |
| | | hashMap.put(ApiParamsConstants.PATIONID,data.getStr("bingRenId")); |
| | | JSONArray returnData1 = entries.getJSONArray("returnData"); |
| | | JSONObject jsonObject = (JSONObject) returnData1.get(0); |
| | | hashMap.put(ApiParamsConstants.CARD_ID,jsonObject.getStr("jiuZhenKh")); |
| | | hashMap.put(ApiParamsConstants.PATIONID,jsonObject.getStr("bingRenId")); |
| | | object.putOpt("code",200); |
| | | object.putOpt("data",hashMap); |
| | | return JSONUtil.toJsonStr(object); |
| | |
| | | map.put ("kaiLeiXing","4"); |
| | | map.put("jiuZhenKh",params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("xingMing", params.get(ApiParamsConstants.CUS_NAME)); |
| | | long cusSex = Long.parseLong(params.get(ApiParamsConstants.CUS_SEX).toString()); |
| | | if(cusSex==0L){ |
| | | map.put ("xingBie","男"); |
| | | }else if(cusSex==1L){ |
| | | map.put ("xingBie","女"); |
| | | }else { |
| | | map.put ("xingBie","未知"); |
| | | Long cusSex = Long.parseLong(params.get(ApiParamsConstants.CUS_SEX).toString()); |
| | | if (cusSex == 0L) { |
| | | map.put("xingBie", "男"); |
| | | } else if (cusSex == 1L) { |
| | | map.put("xingBie", "女"); |
| | | } else { |
| | | map.put("xingBie", "未知"); |
| | | } |
| | | |
| | | map.put ("shenFenZh", params.get(ApiParamsConstants.CUS_ID_CARD)); |
| | | map.put ("danWeiBh",""); |
| | | map.put ("chuShengRq", params.get(ApiParamsConstants.CUS_BRITHDAY)); |
| | |
| | | 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")) { |
| | |
| | | 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); |