package com.engine.attendance.vacation.job.holidaygeneration;

import com.engine.attendance.attendanceplan.service.AttendancePlanService;
import com.engine.attendance.attendanceplan.service.impl.AttendancePlanServiceImpl;
import com.engine.attendance.vacation.service.VocationService;
import com.engine.attendance.vacation.service.impl.VocationServiceImpl;
import com.engine.common.util.ServiceUtil;
import com.engine.common.util.Utils;
import com.google.common.collect.Maps;
import weaver.interfaces.schedule.BaseCronJob;

import java.util.Map;

public class HolidayGenerationJob extends BaseCronJob {

    private VocationService basicsetService = ServiceUtil.getService(VocationServiceImpl.class);

    /**
     * 是否覆盖，1：覆盖，0：不覆盖
     */
    private String cover;

    /**
     * 发放日期
     */
    private String executeDate;
    @Override
    public void execute() {
        Map<String,String> formmodeIdMap = Utils.getFormmodeIdMap();
        //假期额度模块id
        String modeId = formmodeIdMap.get("uf_jcl_kq_jqed");
        Map<String, Object> params = Maps.newHashMap();
        params.put("modeId",modeId);
        params.put("releaseDate",executeDate);
        params.put("cover",cover);
        basicsetService.generateVocation(params);

    }
}
