|  | @ -32,7 +32,7 @@ import java.util.List;
 | 
	
		
			
				|  |  | public class AutoTimeOutRemind implements SchedulingConfigurer {
 | 
	
		
			
				|  |  |     private static final Logger logger = LoggerFactory.getLogger(AutoTimeOutRemind.class);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private static String cron;
 | 
	
		
			
				|  |  |     private static String cron = "0 0/1 * * * ?";
 | 
	
		
			
				|  |  |     private static String dictName = "remind_patient_job";
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private WlyyHospitalSysDictDao wlyyHospitalSysDictDao;
 | 
	
	
		
			
				|  | @ -45,7 +45,7 @@ public class AutoTimeOutRemind implements SchedulingConfigurer {
 | 
	
		
			
				|  |  |     @Value("${wechat.ids}")
 | 
	
		
			
				|  |  |     private String wxId;
 | 
	
		
			
				|  |  |     public AutoTimeOutRemind() {
 | 
	
		
			
				|  |  |       cron = "0 /5 * * * ?";
 | 
	
		
			
				|  |  |       cron = "0 0/1 * * * ?";
 | 
	
		
			
				|  |  |         System.out.println("创建时的corn"+cron);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  |     public String change(String corIn){
 | 
	
	
		
			
				|  | @ -88,7 +88,7 @@ public class AutoTimeOutRemind implements SchedulingConfigurer {
 | 
	
		
			
				|  |  |                 if (null!=wlyyOutpatientDOS){
 | 
	
		
			
				|  |  |                     for (WlyyOutpatientDO wlyyOutpatientDO:wlyyOutpatientDOS){
 | 
	
		
			
				|  |  |                         long patientTime = wlyyOutpatientDO.getCreateTime().getTime();
 | 
	
		
			
				|  |  |                         Integer currentRemindCount = wlyyOutpatientDO.getRemindCount();
 | 
	
		
			
				|  |  |                         Integer currentRemindCount = null==wlyyOutpatientDO.getRemindCount()?0:wlyyOutpatientDO.getRemindCount();
 | 
	
		
			
				|  |  |                         logger.info("接诊创建时间="+patientTime);
 | 
	
		
			
				|  |  |                         List<WlyyHospitalSysDictDO> wlyyHospitalSysDictDOS = wlyyHospitalSysDictDao.findByDictName("outpatient_timeout_remind");
 | 
	
		
			
				|  |  |                         if (wlyyHospitalSysDictDOS.size()>0){
 | 
	
	
		
			
				|  | @ -98,6 +98,9 @@ public class AutoTimeOutRemind implements SchedulingConfigurer {
 | 
	
		
			
				|  |  |                         logger.info("当前时间="+currentTime);
 | 
	
		
			
				|  |  |                         logger.info("数据库配置时间=0"+timeCount);
 | 
	
		
			
				|  |  |                         if (currentTime-patientTime>timeCount*60*1000){
 | 
	
		
			
				|  |  |                             wlyyOutpatientDO.setRemindCount(currentRemindCount+1);
 | 
	
		
			
				|  |  |                             System.out.println("remind_count"+currentRemindCount+1);
 | 
	
		
			
				|  |  |                             outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  |                             logger.info("--便利发送消息");
 | 
	
		
			
				|  |  |                             reciverId = wlyyOutpatientDO.getPatient();
 | 
	
		
			
				|  |  |                             logger.info("---发送人id"+senderId);
 | 
	
	
		
			
				|  | @ -107,8 +110,7 @@ public class AutoTimeOutRemind implements SchedulingConfigurer {
 | 
	
		
			
				|  |  |                             logger.info("--发送结束");
 | 
	
		
			
				|  |  |                             logger.info("--模板发送开始");
 | 
	
		
			
				|  |  |                             prescriptionService.sendWxTemplateMsg(wxId,wlyyOutpatientDO.getId(),null,null,"outPatientTimeOutRemind","");
 | 
	
		
			
				|  |  |                             wlyyOutpatientDO.setRemindCount(currentRemindCount+1);
 | 
	
		
			
				|  |  |                             outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 |