| 
					
				 | 
			
			
				@ -39,16 +39,13 @@ public class WlyyPatientExpressageAddrEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "新增地址") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop create( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "jsonData", value = "Json数据", required = true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam String jsonData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam String jsonData)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyPatientExpressageAddrDO addrDO = wlyyPatientExpressageAddrService.createAddr(jsonData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (addrDO == null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return failed("新增地址失败,新增数据为空"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(addrDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return failed("新增地址失败,"+e.getMessage()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -65,8 +62,7 @@ public class WlyyPatientExpressageAddrEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "将地址设置为默认") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop setAddrDefault( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "patient", value = "居民code", required = true) @RequestParam(value = "patient") String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "addrId", value = "当前地址id", required = true) @RequestParam(value = "addrId") String addrId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "addrId", value = "当前地址id", required = true) @RequestParam(value = "addrId") String addrId)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Object result = wlyyPatientExpressageAddrService.setAddrDefault(patient, addrId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (!"OK".equals(result.toString())) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -74,14 +70,11 @@ public class WlyyPatientExpressageAddrEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success("设置默认地址成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return failed("设置默认地址失败,"+e.getMessage()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = BaseHospitalRequestMapping.WlyyPatientExpressageAddr.hasDefault) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "判断当前居民是否已经存在默认地址") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop setAddrDefault( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop hasDefault( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "patient", value = "居民code", required = true) @RequestParam(value = "patient") String patient) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        boolean result = wlyyPatientExpressageAddrService.hasDefault(patient); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(result); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -96,7 +89,7 @@ public class WlyyPatientExpressageAddrEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (null == wlyyPatientExpressageAddr.getId()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return failed("ID不能为空", ObjEnvelop.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        wlyyPatientExpressageAddr = wlyyPatientExpressageAddrService.save(wlyyPatientExpressageAddr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        wlyyPatientExpressageAddr = wlyyPatientExpressageAddrService.updateAddr(wlyyPatientExpressageAddr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(wlyyPatientExpressageAddr, WlyyPatientExpressageAddrVO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 |