package com.kingdee.eas.custom.synctask.handler;

import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.eas.custom.synctask.SyncTranForMJFacadeFactory;
import com.kingdee.shr.ats.web.handler.PunchCardRecordListHandler;
import com.kingdee.shr.base.syssetting.context.SHRContext;
import com.kingdee.shr.base.syssetting.exception.ShrWebBizException;
import org.apache.log4j.Logger;
import org.springframework.ui.ModelMap;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.*;


/**
 * @Description TODO
 * @Date 2024/10/29 17:51
 * @Created by 30489
 */
public class PunchCardRecordListHandlerEx extends PunchCardRecordListHandler {
    private Context ctx = SHRContext.getInstance().getContext();

    /**
     * 获取门禁打卡记录
     *
     * @param request
     * @param response
     * @param modelMap
     * @throws BOSException
     */
    public void syncPunchRecordFromMJAction(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) throws BOSException, ShrWebBizException {
        String startDate = request.getParameter("startDate");
        String endDate = request.getParameter("endDate");
        SyncTranForMJFacadeFactory.getLocalInstance(ctx).syncAccessRecord(startDate + " 00:00:00", endDate + " 23:59:59");
        //syncZKPunchCardData(request, response, modelMap);
        //_syncAccessRecord(ctx, null, null);
    }


}
