package com.engine.kq.biz;
import weaver.conn.RecordSet;
import weaver.file.Prop;
import weaver.general.Util;
import weaver.hrm.common.Tools;
import weaver.interfaces.schedule.BaseCronJob;

public class KQScheduleSignImportJob extends BaseCronJob{
	public void execute() {
		RecordSet rs = new RecordSet();
		try{
			
			rs.writeLog("begin do KQScheduleSignImportJob invoke ...");
			
			KQScheduleSignImport kqScheduleSignImport	= new KQScheduleSignImport();
			//导入策略 每天导入前一天和当天数据
			int kqScheduleSignImportDay =  Util.getIntValue(Prop.getInstance().getPropValue("QC637173", "KQScheduleSignImportDay"),1);//考勤自动同步同步几天前的数据，默认一天
			String date_from = Tools.getDate(Tools.getToday(),-kqScheduleSignImportDay);
			String date_to = Tools.getDate(Tools.getToday());
			
			rs.writeLog("do KQScheduleSignImportJob invoke..["+date_from+";"+date_to+"]");

			kqScheduleSignImport.importData(date_from,date_to,false);
			
			rs.writeLog("end do KQScheduleSignImportJob invoke  ...");
		}catch (Exception e) {
			rs.writeLog(e) ;
		}
	}
}
