package com.kingdee.shr.recuritment.app;


import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.util.BOSUuid;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.custom.recuritment.task.IRecuritmentFacade;
import com.kingdee.eas.custom.recuritment.task.RecuritmentFacadeFactory;
import com.kingdee.eas.framework.CoreBaseInfo;

/**
 * 招聘需求控制器Bean扩展类
 * 2025-06
 * coyle
 */
public class RecuritmentDemandControllerBeanEx  extends RecuritmentDemandControllerBean {


//    @Override
//    protected IObjectPK _submitEffect(Context ctx, CoreBaseInfo model) throws BOSException, EASBizException {
//        IObjectPK iObjectPK = super._submitEffect(ctx, model);
//        //同步到北森  2025-06
//        IRecuritmentFacade localInstance = RecuritmentFacadeFactory.getLocalInstance(ctx);
//        localInstance.syncRecuritmentToBeisen(iObjectPK.toString());
//        return iObjectPK;
//    }


    @Override
    protected void _againstApprove(Context ctx, String[] billIds) throws BOSException {
        super._againstApprove(ctx, billIds);
        //同步到北森  2025-06
        IRecuritmentFacade localInstance = RecuritmentFacadeFactory.getLocalInstance(ctx);
        for(int i=0;i<billIds.length;i++){
            try {
                localInstance.syncRecuritmentToBeisen(billIds[i]);
            } catch (EASBizException e) {
                throw new RuntimeException(e);
            }
        }
    }
    
    
    
    @Override
    protected void _setAudited(Context ctx, BOSUuid billID) throws BOSException, EASBizException {
    	super._setAudited(ctx, billID);
    	//同步到北森  2025-06
        IRecuritmentFacade localInstance = RecuritmentFacadeFactory.getLocalInstance(ctx);
        localInstance.syncRecuritmentToBeisen(billID.toString());
    }
    
    
    
    @Override
    	protected void _untiCheckBizBill(Context ctx, String billID) throws BOSException, EASBizException {
    		super._untiCheckBizBill(ctx, billID);
    		//同步到北森  2025-06
            IRecuritmentFacade localInstance = RecuritmentFacadeFactory.getLocalInstance(ctx);
            localInstance.syncRecuritmentToBeisen(billID.toString());
    		
    	}
    
    
    @Override
    	protected void _setPassState(Context ctx, BOSUuid billId) throws BOSException, EASBizException {
    		super._setPassState(ctx, billId);
    		//同步到北森  2025-06
            IRecuritmentFacade localInstance = RecuritmentFacadeFactory.getLocalInstance(ctx);
            localInstance.syncRecuritmentToBeisen(billId.toString());
    	}
    
}
