| 
					
				 | 
			
			
				@ -107,7 +107,7 @@ public class MyFamilyService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //生成社保卡号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(!StringUtils.isEmpty(principalNum)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(!StringUtils.isEmpty(principalNum)&&!patientMedicareCardService.existsByCodeAndDel(principalNum)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            PatientMedicareCardDO medicareCardDO = new PatientMedicareCardDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            medicareCardDO.setCode(principalNum); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            medicareCardDO.setParentType(PatientMedicareCardDO.ParentType.CareCard.getType()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -186,13 +186,28 @@ public class MyFamilyService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Map<String,Object> signBindFamily( String patient, String familyMobile, Integer platform,Integer familyBindRole,Integer isAdult, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                              String familyName,String principalNum,String idcard) throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //判断身份证号和社保卡号重复问题 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(patientService.existsByIdcard(idcard)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            throw new Exception("填写身份证已存在!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(patientMedicareCardService.existsByCodeAndDel(principalNum)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            throw new Exception("填写社保卡号已存在!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        BasePatientDO familyPatient2 = patientService.findByMobileAndDel(familyMobile); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(familyPatient2!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(!idcard.equals(familyPatient2.getIdcard())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                throw new Exception("填写身份证有误!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(!StringUtils.isEmpty(principalNum)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                PatientMedicareCardDO card = patientMedicareCardService.findByTypeAndPatientCodeAndDel(PatientMedicareCardDO.Type.MedicareCard.getType(),familyPatient2.getId(),"1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(card!=null&&!principalNum.equals(card.getCode())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    throw new Exception("填写社保卡号有误!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //判断身份证号和社保卡号重复问题 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(patientService.existsByIdcard(idcard)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                throw new Exception("填写身份证已存在!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(patientMedicareCardService.existsByCodeAndDel(principalNum)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                throw new Exception("填写社保卡号已存在!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(isAdult==1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Map<String,Object> p = bindingMyFamily(patient, familyMobile, platform,familyBindRole,familyName,principalNum,idcard); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -322,6 +337,9 @@ public class MyFamilyService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Transactional(rollbackFor = Exception.class) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Map<String,Object> scanQRcodeConfirmApply(Integer status,String applyPatient,String familyPatient,Integer familyBindRole,Integer isAuthorize)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(applyPatient.equals(familyPatient)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            throw new Exception("非家人操作!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String,Object> map = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(status==3){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            BasePatientFamilyMemberDO patientFamilyMember = new BasePatientFamilyMemberDO(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -612,12 +630,12 @@ public class MyFamilyService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 解除绑定 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param familyMemberId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param patient 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Transactional(rollbackFor = Exception.class) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public void cancelBindFamily(String familyMemberId) throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        int i = patientFamilyMemberService.cancelBindFamily(familyMemberId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public void cancelBindFamily(String patient,String familyPatientId) throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        int i = patientFamilyMemberService.cancelBindFamily(patient,familyPatientId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(i<0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            throw new Exception("update data failur !"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 |