|  | @ -1191,14 +1191,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         }else if ("3".equalsIgnoreCase(outpatient.getOutpatientType())){
 | 
	
		
			
				|  |  |             BusinessOrderDO businessOrderDO = businessOrderService.recharge(outpatient.getId(), "专家咨询费", "1", "专家咨询费", outpatient.getConsumer(), outpatient.getConsumerName(), outpatient.getDoctor(), price);
 | 
	
		
			
				|  |  |         }else if ("4".equalsIgnoreCase(outpatient.getOutpatientType())){
 | 
	
		
			
				|  |  |             ServiceItemPlanDO serviceItemPlanDO = serviceItemPlanDao.findById(outpatient.getPlanId()).orElse(null);
 | 
	
		
			
				|  |  |             if(serviceItemPlanDO!=null){
 | 
	
		
			
				|  |  |                 if(!org.springframework.util.StringUtils.isEmpty(serviceItemPlanDO.getRelationCode())){
 | 
	
		
			
				|  |  |                     throw new RuntimeException("该计划已发起过咨询,请选择其他计划发起!");
 | 
	
		
			
				|  |  |             if(StringUtils.isNotBlank(outpatient.getPlanId())){
 | 
	
		
			
				|  |  |                 ServiceItemPlanDO serviceItemPlanDO = serviceItemPlanDao.findById(outpatient.getPlanId()).orElse(null);
 | 
	
		
			
				|  |  |                 if(serviceItemPlanDO!=null){
 | 
	
		
			
				|  |  |                     if(!org.springframework.util.StringUtils.isEmpty(serviceItemPlanDO.getRelationCode())){
 | 
	
		
			
				|  |  |                         throw new ServiceException("该计划已发起过咨询,请选择其他计划发起!");
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     serviceItemPlanDO.setStatus("3");
 | 
	
		
			
				|  |  |                     serviceItemPlanDO.setRelationCode(outpatient.getId());
 | 
	
		
			
				|  |  |                     serviceItemPlanDao.save(serviceItemPlanDO);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 serviceItemPlanDO.setStatus("3");
 | 
	
		
			
				|  |  |                 serviceItemPlanDO.setRelationCode(outpatient.getId());
 | 
	
		
			
				|  |  |                 serviceItemPlanDao.save(serviceItemPlanDO);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             BusinessOrderDO businessOrderDO = businessOrderService.recharge(outpatient.getId(), "康复咨询费", "6", "康复咨询费", outpatient.getConsumer(), outpatient.getConsumerName(), outpatient.getDoctor(), price);
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -1215,7 +1217,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |                 wlyyPatientRegisterTimeDO = patientRegisterTimeDao.save(registerTimeDO);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         } catch (Exception e) {
 | 
	
		
			
				|  |  |             throw new RuntimeException("号源已经被预约,请选择其他号源");
 | 
	
		
			
				|  |  |             throw new ServiceException("号源已经被预约,请选择其他号源");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (!outpatientDO.getOutpatientType().equalsIgnoreCase("3")&&!outpatientDO.getOutpatientType().equalsIgnoreCase("4")){
 | 
	
		
			
				|  |  |             if (1==expressageDO.getOneselfPickupFlg()){
 | 
	
	
		
			
				|  | @ -1257,7 +1259,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |             logger.info("眼科中心患者档案查询");
 | 
	
		
			
				|  |  |             PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(outpatient.getPatient());
 | 
	
		
			
				|  |  |             if (patientMappingDO==null){
 | 
	
		
			
				|  |  |                 throw new Exception("您的信息在院内无档案,请确认就诊人信息,并重新保存就诊人信息!");
 | 
	
		
			
				|  |  |                 throw new ServiceException("您的信息在院内无档案,请确认就诊人信息,并重新保存就诊人信息!");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             logger.info("眼科中心患者档案查询");
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -5153,6 +5155,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |             ServiceItemPlanDO serviceItemPlanDO = serviceItemPlanDao.findById(wlyyOutpatientDO.getPlanId()).orElse(null);
 | 
	
		
			
				|  |  |             if(serviceItemPlanDO!=null){
 | 
	
		
			
				|  |  |                 serviceItemPlanDO.setStatus("0");
 | 
	
		
			
				|  |  |                 serviceItemPlanDO.setRelationCode(null);
 | 
	
		
			
				|  |  |                 serviceItemPlanDao.save(serviceItemPlanDO);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 |