|  | @ -782,7 +782,7 @@ public class PatientController extends WeixinBaseController {
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @RequestMapping(value = "/switch_account")
 | 
	
		
			
				|  |  |     @ResponseBody
 | 
	
		
			
				|  |  |     public String switchFamilyAccount(@RequestParam(required = false) String lastUid, String family, String openid) {
 | 
	
		
			
				|  |  |     public String switchFamilyAccount(String family, String openid) {
 | 
	
		
			
				|  |  |         try {
 | 
	
		
			
				|  |  |             if (StringUtils.isEmpty(family)) {
 | 
	
		
			
				|  |  |                 return error(-1, "家庭成员不能为空");
 | 
	
	
		
			
				|  | @ -791,7 +791,13 @@ public class PatientController extends WeixinBaseController {
 | 
	
		
			
				|  |  |                 return error(-1, "openid不能为空");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             JSONObject result = patientInfoService.switchFamilyAccount(StringUtils.isNotEmpty(lastUid) ? lastUid : getUID(), family, openid);
 | 
	
		
			
				|  |  |             String lastUid = getLastUid();
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             if(StringUtils.isEmpty(lastUid)){
 | 
	
		
			
				|  |  |                 lastUid = getUID();
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             JSONObject result = patientInfoService.switchFamilyAccount(lastUid, family, openid);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             int status = result.getInt("status");
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -801,6 +807,11 @@ public class PatientController extends WeixinBaseController {
 | 
	
		
			
				|  |  |                 return error(-2, "家庭成员不存在该人");
 | 
	
		
			
				|  |  |             } else {
 | 
	
		
			
				|  |  |                 JSONObject json = result.getJSONObject("data");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 if(StringUtils.isNotEmpty(lastUid)){
 | 
	
		
			
				|  |  |                     json.put("lastUid",lastUid);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 return write(200, "切换账号成功", "data", json);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         } catch (Exception e) {
 |