package nckd.jxccl.base.orm.helper;

import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import nckd.jxccl.base.common.constant.FormConstant;

/**
 * QFilter 人员查询辅助类
 * @author W.Y.C
 * @date 2025/7/7 16:52
 * @version 1.0
 */
public class QFilterPersonHelper {

    /** 组织人关联的任职类型编码（任职类型.任职类型分类.编码）*/
    private static final String POS_TYPE_POST_CATEGORY_KEY = String.join(".", FormConstant.POSTYPE,FormConstant.POSTCATEGORY,FormConstant.NUMBER_KEY);
    /**任职类型全职编码*/
    private static final String POST_CATEGORY_OF_STAFF_NUMBER = "1010_S";

    /** 组织人关联的用工关系状态编码（企业人.用工关系状态.用工状态分类.编码）*/
    private static final String LAB_REL_STATUS_CLS_KEY = "employee.laborrelstatus.labrelstatuscls.number";
    /**用工状态分类为在职*/
    private static final String LAB_REL_STATUS_CLS_NUMBER = "1020_S";

    /** 组织团队分类编码（组织团队分类.编码）*/
    private static final String OT_CLASSIFY_NUMBER_KEY = "otclassify.number";
    /**行政组织*/
    private static final String OT_CLASSIFY_NUMBER = "1010_S";

    /**
     * 获取任职类型为全职的Filter（组织人）
      * @param
     * @return: kd.bos.orm.query.QFilter
     * @author W.Y.C
     * @date: 2025/07/07 17:29
     */
    public static QFilter getPostCategoryOfStaffFilter(){
        return new QFilter(POS_TYPE_POST_CATEGORY_KEY, QCP.equals, POST_CATEGORY_OF_STAFF_NUMBER);
    }

    /**
     * 获取用工关系状态为在职的Filter（组织人）
     * @return: kd.bos.orm.query.QFilter
     * @author W.Y.C
     * @date: 2025/07/07 17:29
     */
    public static QFilter getLaborRelStatusOfStaffFilter(){
        return new QFilter(LAB_REL_STATUS_CLS_KEY, QCP.equals, LAB_REL_STATUS_CLS_NUMBER);
    }

    /**
     * 获取组织团队分类为行政组织的Filter（组织人）
     * @return: kd.bos.orm.query.QFilter
     * @author W.Y.C
     * @date: 2025/07/07 17:28
     */
    public static QFilter getOtClassifyFilter(){
        return new QFilter(OT_CLASSIFY_NUMBER_KEY, QCP.equals, OT_CLASSIFY_NUMBER);
    }

}