package nckd.jxccl.base.org.helper;

import kd.bos.servicehelper.basedata.BaseDataServiceHelper;
import nckd.jxccl.base.common.utils.ConvertUtil;

import java.util.List;

/**
 * Org帮助类
 *
 * @author W.Y.C
 * @version 1.0
 * @date 2025/12/4 10:22
 */
public class OrgHelper {

    /**
     * 获取创建组织
     * @param entity 实体id
     * @return: java.lang.Long
     * @author W.Y.C
     * @date: 2025/12/04 10:27
     */
    public static Long getCreateOrgList(String entity) {
        List<Long> createOrgList = BaseDataServiceHelper.getCreateOrgList(entity);
        if (createOrgList != null && !createOrgList.isEmpty()) {
            return createOrgList.get(0);
        }
        return null;
    }

    /**
     * 获取控制策略
     * @param entity 实体id
     * @param createOrg 创建组织id
     * @return: java.lang.String
     * @author W.Y.C
     * @date: 2025/12/04 10:26
     */
    public static String getBdCtrlStrgy(String entity, Long createOrg) {
        return BaseDataServiceHelper.getBdCtrlStrgy(entity, ConvertUtil.toStr(createOrg));
    }



}
