package cn.com.ty.lift.ud.task;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import cn.com.ty.lift.ud.chat.service.ILiftCaseService;

/**
 * 定时确认诊单
 * 
 * @author sKing
 *
 */

@Component
public class SureLiftCaseTask {

    private static final Logger logger = LoggerFactory.getLogger(SureLiftCaseTask.class);
    
    @Resource(type = ILiftCaseService.class)
    private ILiftCaseService liftCaseService;
    
    /**
     * 每一个小时执行一次，定时确认
     * 线上必须用public ，本地用private也可以
     */
    @Scheduled(cron = "0 0 * * * ?")
    public void sureLiftCaseTask() {
       logger.info("开始调用确认诊单方法");
       liftCaseService.sureLiftCaseTask();
       logger.info("调用确认诊单方法完成");

    }
}
