|  | @ -3,6 +3,7 @@ package com.yihu.jw.healthCare.service;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.healthCare.utils.AES;
 | 
	
		
			
				|  |  | import com.yihu.jw.healthCare.utils.MD5;
 | 
	
		
			
				|  |  | import com.yihu.jw.healthCare.utils.SafeUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.healthCare.utils.StringUtils;
 | 
	
	
		
			
				|  | @ -83,9 +84,12 @@ public class HealthCareService {
 | 
	
		
			
				|  |  |         object.put("access_token",accessToken);
 | 
	
		
			
				|  |  |         object.put("funid",funid);
 | 
	
		
			
				|  |  |         String encrypt_data = SafeUtil.encrypt(data,ylzConfigEncryptKey);
 | 
	
		
			
				|  |  |         object.put("encrypt_data",encrypt_data);
 | 
	
		
			
				|  |  |         object.put("data",data);
 | 
	
		
			
				|  |  |         String response = httpClientUtil.postBody(ylzConfigUrl,object);
 | 
	
		
			
				|  |  |         String signResult = SafeUtil.sign(object.toJSONString(),ylzConfigSignKey);
 | 
	
		
			
				|  |  |         String obj = SafeUtil.encrypt(signResult,ylzConfigEncryptKey);
 | 
	
		
			
				|  |  |         JSONObject jsonObject = JSONObject.parseObject(obj);
 | 
	
		
			
				|  |  |         logger.info("请求前funid=="+funid+"data="+data);
 | 
	
		
			
				|  |  |         String response = httpClientUtil.postBody(ylzConfigUrl,jsonObject);
 | 
	
		
			
				|  |  |         return response;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -100,12 +104,12 @@ public class HealthCareService {
 | 
	
		
			
				|  |  |         JSONObject object = new JSONObject();
 | 
	
		
			
				|  |  |         object.put("sign_type","md5");
 | 
	
		
			
				|  |  |         object.put("appid",ylzConfigAppid);
 | 
	
		
			
				|  |  |         String stringSignTemp ="appid="+ylzConfigAppid+"&appsecret="+ylzConfigAppSecret+"&data="+data+"&funid="+funid+"&sign_type=md5&key="+ylzConfigSignKey;
 | 
	
		
			
				|  |  |         String sign = MD5.md5(stringSignTemp).toUpperCase();
 | 
	
		
			
				|  |  |         object.put("sign",sign);
 | 
	
		
			
				|  |  |        /* String stringSignTemp ="appid="+ylzConfigAppid+"&appsecret="+ylzConfigAppSecret+"&data="+data+"&funid="+funid+"&sign_type=md5&key="+ylzConfigSignKey;
 | 
	
		
			
				|  |  |         String sign = MD5.md5(stringSignTemp).toUpperCase();*/
 | 
	
		
			
				|  |  |         object.put("data",data);
 | 
	
		
			
				|  |  |         object.put("funid",funid);
 | 
	
		
			
				|  |  |         String obj = SafeUtil.encrypt(object.toJSONString(),ylzConfigEncryptKey);
 | 
	
		
			
				|  |  |         String signResult = SafeUtil.sign(object.toJSONString(),ylzConfigSignKey);
 | 
	
		
			
				|  |  |         String obj = SafeUtil.encrypt(signResult,ylzConfigEncryptKey);
 | 
	
		
			
				|  |  |         JSONObject jsonObject = JSONObject.parseObject(obj);
 | 
	
		
			
				|  |  |         logger.info("请求前funid=="+funid+"data="+data);
 | 
	
		
			
				|  |  |         String response = httpClientUtil.postBody(ylzConfigUrl,jsonObject);
 | 
	
	
		
			
				|  | @ -113,8 +117,9 @@ public class HealthCareService {
 | 
	
		
			
				|  |  |         if (response!=null&&response!=""){
 | 
	
		
			
				|  |  |             JSONObject result = JSONObject.parseObject(response);
 | 
	
		
			
				|  |  |             if (result.getString("flag").equalsIgnoreCase("1")){
 | 
	
		
			
				|  |  |                 String dataResult = result.getString("data");
 | 
	
		
			
				|  |  |                 String dataResult = result.getString("encrypt_data");
 | 
	
		
			
				|  |  |                 if (dataResult!=null&&dataResult!=""){
 | 
	
		
			
				|  |  |                     String decryptResult = AES.aesDecrypt(dataResult,ylzConfigEncryptKey);
 | 
	
		
			
				|  |  |                     JSONObject dataObject = JSONObject.parseObject(dataResult);
 | 
	
		
			
				|  |  |                     token = dataObject.getString("access_token");
 | 
	
		
			
				|  |  |                 }
 |