|  | @ -255,13 +255,14 @@ public class PatientFamilyMemberService extends BaseJpaService<BasePatientFamily
 | 
	
		
			
				|  |  |             return result;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         List<BasePatientDO> addPatients = patientDao.findByNameAndIdcard(name,idcard);
 | 
	
		
			
				|  |  |         BasePatientDO addPatient = new BasePatientDO();
 | 
	
		
			
				|  |  |         if (2  == type){
 | 
	
		
			
				|  |  |             if (addPatients.size()==0){
 | 
	
		
			
				|  |  |                 BasePatientDO basePatientDO = new BasePatientDO();
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 String salt = UUID.randomUUID().toString().substring(0, 5);
 | 
	
		
			
				|  |  |                 String pw = "";
 | 
	
		
			
				|  |  |                 if(true){
 | 
	
		
			
				|  |  |                 if(idcard.length()!=18){
 | 
	
		
			
				|  |  |                     pw = idcard.substring(idcard.length()-7,idcard.length()-1);
 | 
	
		
			
				|  |  |                 }else{
 | 
	
		
			
				|  |  |                     pw = idcard.substring(idcard.length()-6);
 | 
	
	
		
			
				|  | @ -275,7 +276,14 @@ public class PatientFamilyMemberService extends BaseJpaService<BasePatientFamily
 | 
	
		
			
				|  |  |                 basePatientDO.setCreateUserName(relatives);
 | 
	
		
			
				|  |  |                 basePatientDO.setCreateTime(new Date());
 | 
	
		
			
				|  |  |                 basePatientDO.setDel("1");
 | 
	
		
			
				|  |  |                 basePatientDO.setLocked(0);
 | 
	
		
			
				|  |  |                 basePatientDO.setEnabled(1);
 | 
	
		
			
				|  |  |                 patientDao.save(basePatientDO);
 | 
	
		
			
				|  |  |                 addPatient = basePatientDO;
 | 
	
		
			
				|  |  |             }else {
 | 
	
		
			
				|  |  |                 result.put(ResponseContant.resultFlag,ResponseContant.fail);
 | 
	
		
			
				|  |  |                 result.put(ResponseContant.resultMsg,"添加成员已存在");
 | 
	
		
			
				|  |  |                 return result;
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }else {
 | 
	
		
			
				|  |  |             if (addPatients.size()==0){
 | 
	
	
		
			
				|  | @ -283,10 +291,8 @@ public class PatientFamilyMemberService extends BaseJpaService<BasePatientFamily
 | 
	
		
			
				|  |  |                 result.put(ResponseContant.resultMsg,"添加成员不存在");
 | 
	
		
			
				|  |  |                 return result;
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             addPatient = addPatients.get(0);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         BasePatientDO addPatient = addPatients.get(0);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         // 添加自己与对方的关系
 | 
	
		
			
				|  |  |         BasePatientFamilyMemberDO fm = memberDao.findByPatientAndFamilyMember(patientDO.getId(), addPatient.getId());
 | 
	
		
			
				|  |  |         // 家庭关系已存在时,不重复添加
 |