package com.engine.custom.hg.corn;

import com.engine.custom.hg.service.TextDocFileService;
import weaver.general.BaseBean;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class OA2HGorn extends weaver.interfaces.schedule.BaseCronJob {
    TextDocFileService service =  new TextDocFileService();
    BaseBean bean = new BaseBean();
    @Override
    public void execute() {
        bean.writeLog("OA2HGorn====Begin========");
        Date date = new Date();
        // Calendar calendar = Calendar.getInstance();
        // calendar.setTime(date);
        // //把日期往后增加一天.整数往后推,负数往前移动(1:表示明天、-1：表示昨天，0：表示今天)
        // calendar.add(Calendar.DATE, -1);
        // date = calendar.getTime();
        SimpleDateFormat yyyyMMdd = new SimpleDateFormat("yyyyMMdd");
        String format = yyyyMMdd.format(date);
        service.genDocTxt(format,"HG");
    }
}
