|  | @ -2,6 +2,7 @@ package com.yihu.jw.controller;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONArray;
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  | import com.yihu.jw.dao.SpecialistPatientRelationDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.specialist.SpecialistPatientRelationDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.Envelop;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.MixEnvelop;
 | 
	
	
		
			
				|  | @ -17,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | import org.springframework.cloud.sleuth.Tracer;
 | 
	
		
			
				|  |  | import org.springframework.data.redis.core.StringRedisTemplate;
 | 
	
		
			
				|  |  | import org.springframework.jdbc.core.JdbcTemplate;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import java.util.List;
 | 
	
	
		
			
				|  | @ -35,6 +37,8 @@ public class SpecialistController extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  |     private Tracer tracer;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private StringRedisTemplate redisTemplate;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private SpecialistPatientRelationDao specialistPatientRelationDao;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @PostMapping(value = SpecialistMapping.specialist.createSpecialistRelation)
 | 
	
		
			
				|  |  |     @ApiOperation(value = "创建专科医生与患者匹配关系")
 | 
	
	
		
			
				|  | @ -462,6 +466,10 @@ public class SpecialistController extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | //            specialistPatientRelationDO.setDoctor(getUID());
 | 
	
		
			
				|  |  | //            specialistPatientRelationDO.setDoctorName(getUNAME());
 | 
	
		
			
				|  |  |             List<SpecialistPatientRelationDO> list = specialistPatientRelationDao.findListByTeamAndPatient(specialistPatientRelationDO.getTeamCode(),specialistPatientRelationDO.getPatient());
 | 
	
		
			
				|  |  |             if (list.size()>0){
 | 
	
		
			
				|  |  |                 return ObjEnvelop.getSuccess("success", list.get(0));
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             return specialistService.createPatientInSpeciaRelation(specialistPatientRelationDO);
 | 
	
		
			
				|  |  |         }catch (Exception e){
 | 
	
		
			
				|  |  |             e.printStackTrace();
 |