|  | @ -3,10 +3,10 @@ package com.yihu.wlyy.service.app.record;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.service.BaseService;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.util.HttpClientUtil;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.util.SystemConf;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.util.XMLUtil;
 | 
	
		
			
				|  |  | import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  | import org.apache.http.NameValuePair;
 | 
	
		
			
				|  |  | import org.apache.http.message.BasicNameValuePair;
 | 
	
		
			
				|  |  | import org.json.JSONArray;
 | 
	
		
			
				|  |  | import org.json.JSONObject;
 | 
	
		
			
				|  |  | import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -22,7 +22,7 @@ public class HealthDataService extends BaseService {
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 获取健康档案信息
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public String getHealthData(String strSSID, String strEvent, String strCatalog, String strSerial) throws Exception {
 | 
	
		
			
				|  |  |     public JSONObject getHealthData(String strSSID, String strEvent, String strCatalog, String strSerial) throws Exception {
 | 
	
		
			
				|  |  |         String url = SystemConf.getInstance().getSystemProperties().getProperty("sign_check_upload");
 | 
	
		
			
				|  |  |         url = url + "/third/smjk/HealthData";
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -33,20 +33,20 @@ public class HealthDataService extends BaseService {
 | 
	
		
			
				|  |  |         params.add(new BasicNameValuePair("strSerial", strSerial));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         String response = HttpClientUtil.post(url, params, "UTF-8");
 | 
	
		
			
				|  |  |         JSONArray result = new JSONArray();
 | 
	
		
			
				|  |  |         JSONObject result = new JSONObject();
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if (!StringUtils.isEmpty(response)){
 | 
	
		
			
				|  |  |             JSONObject jsonObject = new JSONObject(response);
 | 
	
		
			
				|  |  |             int status = jsonObject.getInt("status");
 | 
	
		
			
				|  |  |             if (status == 200){
 | 
	
		
			
				|  |  |                 String data = jsonObject.getString("data");
 | 
	
		
			
				|  |  |                 if (!StringUtils.isEmpty(data)){
 | 
	
		
			
				|  |  |                     JSONObject jsonData = new JSONObject(data);
 | 
	
		
			
				|  |  |                     result = jsonData.getJSONArray("EhrList");
 | 
	
		
			
				|  |  |                 String xmlData = jsonObject.getString("data");
 | 
	
		
			
				|  |  |                 if (!StringUtils.isEmpty(xmlData)){
 | 
	
		
			
				|  |  |                     String xmlJson = XMLUtil.xml2JSON(xmlData);
 | 
	
		
			
				|  |  |                     result = new JSONObject(xmlJson);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return result.toString();
 | 
	
		
			
				|  |  |         return result;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | }
 |