| 
					
				 | 
			
			
				@ -269,15 +269,20 @@ public class PrescriptionStatusUpdateService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Calendar calendar = Calendar.getInstance(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        calendar.setTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        int i = calendar.get(Calendar.HOUR_OF_DAY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //复诊记录状态状态安全锁,每天0~2点才允许触发 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //复诊记录状态状态安全锁,每天0~2点才允许触发,避免误调用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //将所有的已接诊的处方记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(i==0||i==1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<WlyyOutpatientDO> outpatientDOs = outpatientDao.findByStatus("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(outpatientDOs!=null&&outpatientDOs.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                for(WlyyOutpatientDO outpatientDO:outpatientDOs){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //结束门诊 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    outpatientDO.setStatus("2"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                outpatientDao.save(outpatientDOs); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //TODO:结束咨询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("setOutPatientOver count :"+outpatientDOs.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("setOutPatientOver count :"+0); 
			 |