| 
					
				 | 
			
			
				@ -846,12 +846,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        WlyyPrescriptionExpressageDO previous = checkOutPatientPre(outpatientDO.getPatient()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //2.物流信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        WlyyPrescriptionExpressageDO expressageDO = objectMapper.readValue(expressageJson, WlyyPrescriptionExpressageDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (null!=previous&&previous.getOneselfPickupFlg()!=expressageDO.getOneselfPickupFlg()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      /*  if (null!=previous&&previous.getOneselfPickupFlg()!=expressageDO.getOneselfPickupFlg()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            outpatientDao.delete(outpatient.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            businessOrderDao.delete(businessOrderDO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            patientRegisterTimeDao.delete(wlyyPatientRegisterTimeDO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            throw new Exception("您今日发起过复诊,不允许更改取药方式"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (0==expressageDO.getOneselfPickupFlg()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            /*if("xm_ykyy_wx".equalsIgnoreCase(wechatId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String drugCode= expressageDO.getHospitalCode()==null?"5550":expressageDO.getHospitalCode(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -909,15 +908,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql +=" and t.outpatient_type = 1  order by t.create_time desc"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        System.out.println(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> listPrescript = hibenateUtils.createSQLQuery(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String outPatientId=""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (listPrescript.size()>1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Map<String,Object> mapPrescript = listPrescript.get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            outPatientId = mapPrescript.get("id").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPrescriptionExpressageDO> list =  prescriptionExpressageDao.findByOutpatientId(outPatientId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        WlyyPrescriptionExpressageDO wlyyPrescriptionExpressageDO = new WlyyPrescriptionExpressageDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(list.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             wlyyPrescriptionExpressageDO = list.get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (listPrescript!=null&&listPrescript.size()>=1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Map<String,Object> mapPrescript = listPrescript.get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String outPatientId = mapPrescript.get("id").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<WlyyPrescriptionExpressageDO> list =  prescriptionExpressageDao.findByOutpatientId(outPatientId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(list!=null&&list.size()!=0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                wlyyPrescriptionExpressageDO = list.get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return wlyyPrescriptionExpressageDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 |