package com.palmnest.webapp.quartz;

import com.palmnest.service.repair.RepairBillService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 维修单推送定时任务
 * <p>
 * 1.在工程人员发起挂单，选择的挂单时间到了，给挂单的工程人员发起提醒。
 *
 * @author wangxz
 * <p>
 * 2018年5月15日
 */
@Slf4j
@Component("repairPendBillPushTimerTask")
public class RepairPendBillPushTimerTask {

	@Autowired
	private RepairBillService repairBillService;

	public void run() {
		//System.out.println("1.在工程人员发起挂单，选择的挂单时间到了，给挂单的工程人员发起提醒。");
		log.info("quartz into RepairPendBillPushTimerTask start ...");
		//查找挂单时间大于当前时间的
		try {
			repairBillService.pendBillOvertimePush();
		} catch (Exception e) {
			e.printStackTrace();
			log.error(e.getMessage());
		}
		log.info("quartz into RepairPendBillPushTimerTask end ...");


	}
}
