package com.kingdee.eas.custom.beisen.syncperson;

import com.kingdee.bos.framework.ejb.EJBRemoteException;
import com.kingdee.bos.util.BOSObjectType;
import java.rmi.RemoteException;
import com.kingdee.bos.framework.AbstractBizCtrl;
import com.kingdee.bos.orm.template.ORMObject;

import com.kingdee.bos.BOSException;
import com.kingdee.bos.util.*;
import com.kingdee.eas.common.EASBizException;
import java.lang.String;
import com.kingdee.bos.Context;
import com.kingdee.bos.framework.*;
import com.kingdee.eas.custom.beisen.syncperson.*;

public class SyncPersonToBeisenFacade extends AbstractBizCtrl implements ISyncPersonToBeisenFacade
{
    public SyncPersonToBeisenFacade()
    {
        super();
        registerInterface(ISyncPersonToBeisenFacade.class, this);
    }
    public SyncPersonToBeisenFacade(Context ctx)
    {
        super(ctx);
        registerInterface(ISyncPersonToBeisenFacade.class, this);
    }
    public BOSObjectType getType()
    {
        return new BOSObjectType("7CCEF719");
    }
    private SyncPersonToBeisenFacadeController getController() throws BOSException
    {
        return (SyncPersonToBeisenFacadeController)getBizController();
    }
    /**
     *同步人员-User defined method
     *@param personId 人员ID
     *@param day 前延天
     *@return
     */
    public String syncPerson(String personId, int day) throws BOSException, EASBizException
    {
        try {
            return getController().syncPerson(getContext(), personId, day);
        }
        catch(RemoteException err) {
            throw new EJBRemoteException(err);
        }
    }
    /**
     *前置同步人员-User defined method
     *@param day 前延天
     *@param endDate 默认当前时间，结束日期不为空默认，以结束日期往前延天数
     */
    public void beforeSyncPerson(int day, String endDate) throws BOSException, EASBizException
    {
        try {
            getController().beforeSyncPerson(getContext(), day, endDate);
        }
        catch(RemoteException err) {
            throw new EJBRemoteException(err);
        }
    }
}