|  | @@ -0,0 +1,45 @@
 | 
	
		
			
				|  |  | +package com.care.bigscreen.schedule;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import com.care.bigscreen.mapper.StOrganizationMapper;
 | 
	
		
			
				|  |  | +import com.care.bigscreen.mapper.StStationMapper;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import org.apache.logging.log4j.LogManager;
 | 
	
		
			
				|  |  | +import org.apache.logging.log4j.Logger;
 | 
	
		
			
				|  |  | +import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | +import org.springframework.context.annotation.Configuration;
 | 
	
		
			
				|  |  | +import org.springframework.scheduling.annotation.EnableScheduling;
 | 
	
		
			
				|  |  | +import org.springframework.scheduling.annotation.Scheduled;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/** 大屏统计调度
 | 
	
		
			
				|  |  | + * @author 许明
 | 
	
		
			
				|  |  | + * @version 2.7.0.0 创建于 2018/7/16
 | 
	
		
			
				|  |  | + **/
 | 
	
		
			
				|  |  | +@Configuration
 | 
	
		
			
				|  |  | +@EnableScheduling
 | 
	
		
			
				|  |  | +public class BigScreenSchedule {
 | 
	
		
			
				|  |  | +    private static final Logger logger = LogManager.getLogger(BigScreenSchedule.class);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private StOrganizationMapper stOrganizationMapper;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private StStationMapper stStationMapper;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 10 秒钟调用一次
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    @Scheduled(cron = "0/10 * * * * ?")
 | 
	
		
			
				|  |  | +    public void exeStatistics() {
 | 
	
		
			
				|  |  | +        try {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        } catch (Exception e) {
 | 
	
		
			
				|  |  | +            logger.error("统计计算出错:{}", e.getMessage());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +}
 |