package com.kingdee.eas.custom.synctask;

import javax.ejb.*;
import java.rmi.RemoteException;

import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;
import java.text.ParseException;


public abstract class AbstractSyncTranForMJFacadeControllerBean extends AbstractBizControllerBean implements SyncTranForMJFacadeController {
    protected AbstractSyncTranForMJFacadeControllerBean() {
    }

    protected BOSObjectType getBOSType() {
        return new BOSObjectType("135AEBA4");
    }

    public void syncPunchRecordFromMJ(Context ctx, String beginDate, String endDate) throws BOSException {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("e6a006be-d425-49a0-94d9-9630fd2fd6c3"), new Object[]{ctx, beginDate, endDate});
            invokeServiceBefore(svcCtx);
            if (!svcCtx.invokeBreak()) {
                _syncPunchRecordFromMJ(ctx, beginDate, endDate);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }

    protected void _syncPunchRecordFromMJ(Context ctx, String beginDate, String endDate) throws BOSException {
        return;
    }

    public void syncAccessRecord(Context ctx, String startDate, String endDate) throws BOSException {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7a253a5e-baa2-4503-8afd-31837467a8a3"), new Object[]{ctx, startDate, endDate});
            invokeServiceBefore(svcCtx);
            if (!svcCtx.invokeBreak()) {
                _syncAccessRecord(ctx, startDate, endDate);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }

    protected void _syncAccessRecord(Context ctx, String startDate, String endDate) throws BOSException {
        return;
    }

}
