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

import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
import com.kingdee.bos.sql.ParserException;
import com.kingdee.eas.basedata.org.AdminOrgUnitFactory;
import com.kingdee.eas.basedata.org.AdminOrgUnitInfo;
import com.kingdee.eas.basedata.org.IAdminOrgUnit;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.custom.synctask.SyncTranForOAFacadeFactory;
import com.kingdee.eas.framework.CoreBaseInfo;
import com.kingdee.eas.framework.ICoreBase;
import com.kingdee.shr.base.syssetting.app.io.fileImport.ImportException;
import com.kingdee.shr.base.syssetting.app.io.impl.AdminImportFileService;
import org.apache.log4j.Logger;

/**
 * @author qingwu
 * @date 2024/10/26
 * @apiNote
 */
public class AdminImportFileServiceEx extends AdminImportFileService {
    private static Logger logger = Logger.getLogger(AdminImportFileServiceEx.class);

    @Override
    protected void submitData(Context ctx, ICoreBase corebase, CoreBaseInfo baseInfo, boolean hasExist) throws ParserException, EASBizException, BOSException {
        super.submitData(ctx, corebase, baseInfo, hasExist);
        AdminOrgUnitInfo adminOrgUnitInfo = (AdminOrgUnitInfo) baseInfo;
        logger.error("adminOrgUnitInfo" + adminOrgUnitInfo.get("bmfzr"));
        logger.error("adminOrgUnitInfo" + adminOrgUnitInfo.get("bmjl"));
        logger.error("adminOrgUnitInfo" + adminOrgUnitInfo.get("fz"));
        logger.error("adminOrgUnitInfo" + adminOrgUnitInfo.get("zj"));
        IAdminOrgUnit iAdminOrgUnit = AdminOrgUnitFactory.getLocalInstance(ctx);
        SelectorItemCollection sic = new SelectorItemCollection();
        sic.add("bmfzr");
        sic.add("bmjl");
        sic.add("fz");
        sic.add("zj");
        iAdminOrgUnit.updatePartial(adminOrgUnitInfo, sic);
    }

}
