Commit f0094b9778e6eceb4c0fc6b826246b7fdebd8928

Authored by liquanyu
1 parent e0fe37ae0d

承德his

Showing 1 changed file with 39 additions and 37 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/cdfy/CdfyHisService.java View file @ f0094b9
... ... @@ -78,24 +78,24 @@
78 78 String url = "http://10.0.200.2:9090/his/getCdFyIdByVcCardNo?vcCardNo="+vcCardNo;
79 79 DefaultHttpClient client = new DefaultHttpClient(new PoolingClientConnectionManager());
80 80 try {
81   - HttpPost httpPost = new HttpPost(url);
82   - /*StringEntity se = new StringEntity(vcCardNo,"UTF-8");
83   - se.setContentType("text/json");
84   - httpPost.setEntity(se);*/
85   - //执行post请求
86   - HttpResponse respon = client.execute(httpPost);
87   - if(respon != null && respon.getStatusLine().getStatusCode() == 200){
88   - String result= EntityUtils.toString(respon.getEntity());
89   - System.out.print(result);
90   - // 生成 JSON 对象
91   - JSONObject obj = JSONObject.parseObject(result);
92   - if(obj!=null){
93   - id = obj.getString("id");
94   - }
  81 +// HttpPost httpPost = new HttpPost(url);
  82 +// /*StringEntity se = new StringEntity(vcCardNo,"UTF-8");
  83 +// se.setContentType("text/json");
  84 +// httpPost.setEntity(se);*/
  85 +// //执行post请求
  86 +// HttpResponse respon = client.execute(httpPost);
  87 +// if(respon != null && respon.getStatusLine().getStatusCode() == 200){
  88 +// String result= EntityUtils.toString(respon.getEntity());
  89 +// System.out.print(result);
  90 +// // 生成 JSON 对象
  91 +// JSONObject obj = JSONObject.parseObject(result);
  92 +// if(obj!=null){
  93 +// id = obj.getString("id");
  94 +// }
95 95 return id == null ? vcCardNo : id;
96   - }else{
97   - System.out.println("传输失败!");
98   - }
  96 +// }else{
  97 +// System.out.println("传输失败!");
  98 +// }
99 99 }catch (Exception e){
100 100 ExceptionUtils.catchException(e,"承德就诊卡号获取病人id异常");
101 101 return vcCardNo;
102 102  
... ... @@ -104,31 +104,33 @@
104 104 client.close();
105 105 }
106 106  
107   - return vcCardNo;
  107 + //return vcCardNo;
108 108 }
109 109 public String getIdByVcCardNo2(String vcCardNo, String phone, String cardNo){
110 110 String id = null;
111 111 String url = "http://10.0.200.2:9090/his/getCdFyIdByVcCardNo2?vcCardNo="+vcCardNo+"&phone="+phone+"&cardNo="+cardNo;
112 112 DefaultHttpClient client = new DefaultHttpClient(new PoolingClientConnectionManager());
113 113 try {
114   - HttpPost httpPost = new HttpPost(url);
115   - /*StringEntity se = new StringEntity(vcCardNo,"UTF-8");
116   - se.setContentType("text/json");
117   - httpPost.setEntity(se);*/
118   - //执行post请求
119   - HttpResponse respon = client.execute(httpPost);
120   - if(respon != null && respon.getStatusLine().getStatusCode() == 200){
121   - String result= EntityUtils.toString(respon.getEntity());
122   - System.out.print(result);
123   - // 生成 JSON 对象
124   - JSONObject obj = JSONObject.parseObject(result);
125   - if(obj!=null){
126   - id = obj.getString("id");
127   - }
128   - return id == null ? vcCardNo : id;
129   - }else{
130   - System.out.println("传输失败!");
131   - }
  114 +// HttpPost httpPost = new HttpPost(url);
  115 +// /*StringEntity se = new StringEntity(vcCardNo,"UTF-8");
  116 +// se.setContentType("text/json");
  117 +// httpPost.setEntity(se);*/
  118 +// //执行post请求
  119 +// HttpResponse respon = client.execute(httpPost);
  120 +// if(respon != null && respon.getStatusLine().getStatusCode() == 200){
  121 +// String result= EntityUtils.toString(respon.getEntity());
  122 +// System.out.print(result);
  123 +// // 生成 JSON 对象
  124 +// JSONObject obj = JSONObject.parseObject(result);
  125 +// if(obj!=null){
  126 +// id = obj.getString("id");
  127 +// }
  128 +// return id == null ? vcCardNo : id;
  129 +// }else{
  130 +// System.out.println("传输失败!");
  131 +// }
  132 + return id == null ? vcCardNo : id;
  133 +
132 134 }catch (Exception e){
133 135 ExceptionUtils.catchException(e,"承德就诊卡号获取病人id异常");
134 136 return vcCardNo;
... ... @@ -137,7 +139,7 @@
137 139 client.close();
138 140 }
139 141  
140   - return vcCardNo;
  142 + //return vcCardNo;
141 143 }
142 144  
143 145 }