| 
					
				 | 
			
			
				@ -12,6 +12,7 @@ import com.yihu.jw.service.SpecialistService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiOperation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.cloud.sleuth.Tracer; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.*; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -403,7 +404,37 @@ public class SpecialistController extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            tracer.getCurrentSpan().logEvent(e.getMessage()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return ObjEnvelop.getError(e.getMessage()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = SpecialistMapping.specialist.createPatientInSpeciaRelation) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "专科医生发起签约") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop<SpecialistPatientRelationDO> createPatientInSpeciaRelation( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "jsonData", value = "签约关系json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "jsonData") String jsonData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            SpecialistPatientRelationDO specialistPatientRelationDO=toEntity(jsonData,SpecialistPatientRelationDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(StringUtils.isBlank(specialistPatientRelationDO.getPatient())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return failed("病人编码不能为空!",ObjEnvelop.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(StringUtils.isBlank(specialistPatientRelationDO.getPatientName())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return failed("病人姓名不能为空!",ObjEnvelop.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(StringUtils.isBlank(specialistPatientRelationDO.getDoctor())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return failed("医生编码不能为空!",ObjEnvelop.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(StringUtils.isBlank(specialistPatientRelationDO.getDoctorName())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return failed("医生姓名不能为空!",ObjEnvelop.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(null==specialistPatientRelationDO.getTeamCode()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return failed("医生团队不能为空!",ObjEnvelop.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return specialistService.createPatientInSpeciaRelation(specialistPatientRelationDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            tracer.getCurrentSpan().logEvent(e.getMessage()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return ObjEnvelop.getError(e.getMessage()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 |