package com.ssj.task.sz;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.ssj.framework.core.util.SystemResourceLocator;
import com.ssj.service.sys.fx.service.DeviceBalanceService;

@Component
@DisallowConcurrentExecution
public class DeviceBalanceTask implements Job {
	
    private static Logger logger = LoggerFactory.getLogger(DeviceBalanceTask.class);

    @Override
    public void execute(JobExecutionContext jobExecutionContext){
    	DeviceBalanceService deviceBalanceService = SystemResourceLocator.getBean(DeviceBalanceService.class);
        try {
            logger.info("有小塾、没小塾统计开始");
            deviceBalanceService.runCountDeviceBalance(null);
        } catch (Exception e) {
            logger.error("有小塾、没小塾统计任务异常-->",e);
        }finally{
            logger.info("有小塾、没小塾统计任务结束");
        }
    }

	

}
