<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.enfi.modules.system.mapper.IOaEmployeeVMapper">

    <!-- 开启二级缓存 -->
<!--    <cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>-->

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="org.enfi.modules.system.entity.OaEmployeeV">
        <result column="EMPLOYEE_NUMBER" property="employeeNumber" />
        <result column="PERSON_ID" property="personId" />
        <result column="LAST_NAME" property="lastName" />
        <result column="ORGANIZATION_NAME" property="organizationName" />
        <result column="ORGANIZATION_ID" property="organizationId" />
        <result column="COMPANY_NAME" property="companyName" />
        <result column="PRIMARY_FLAG" property="primaryFlag" />
        <result column="SUPERVISOR_NUM" property="supervisorNum" />
        <result column="SUPERVISOR_NAME" property="supervisorName" />
        <result column="PERSON_STATUS" property="personStatus" />
        <result column="OFFICE_NUMBER" property="officeNumber" />
        <result column="INTERNAL_LOCATION" property="internalLocation" />
        <result column="NATIONAL_IDENTIFIER" property="nationalIdentifier" />
        <result column="WORKROOM" property="workroom" />
        <result column="EMAIL_ADDRESS" property="emailAddress" />
        <result column="TIME_TO_WORK" property="timeToWork" />
        <result column="JOIN_DATE" property="joinDate" />
        <result column="RZGW" property="rzgw" />
        <result column="SECURITY_LEVEL" property="securityLevel" />
        <result column="DATE_OF_BIRTH" property="dateOfBirth" />
        <result column="REGION_OF_BIRTH" property="regionOfBirth" />
        <result column="GRADE_NAME" property="gradeName" />
        <result column="SPECIALITY" property="speciality" />
        <result column="JOB_NAME" property="jobName" />
        <result column="POSITION_NAME" property="positionName" />
        <result column="ZC" property="zc" />
        <result column="ZG" property="zg" />
        <result column="ZGXL" property="zgxl" />
        <result column="GLJSKS" property="gljsks" />
        <result column="GZLX" property="gzlx" />
        <result column="GLRCKZJ" property="glrckzj" />
        <result column="SJRCKZJ" property="sjrckzj" />
        <result column="SFLWPQ" property="sflwpq" />
        <result column="XZPM" property="xzpm" />
        <result column="SEX" property="sex" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        EMPLOYEE_NUMBER, PERSON_ID, LAST_NAME, ORGANIZATION_NAME, ORGANIZATION_ID, COMPANY_NAME, PRIMARY_FLAG, SUPERVISOR_NUM, SUPERVISOR_NAME, PERSON_STATUS, OFFICE_NUMBER, INTERNAL_LOCATION, NATIONAL_IDENTIFIER, WORKROOM, EMAIL_ADDRESS, TIME_TO_WORK, JOIN_DATE, RZGW, SECURITY_LEVEL, DATE_OF_BIRTH, REGION_OF_BIRTH, GRADE_NAME, SPECIALITY, JOB_NAME, POSITION_NAME, ZC, ZG, ZGXL, GLJSKS, GZLX, GLRCKZJ, SJRCKZJ, SFLWPQ, XZPM, SEX
    </sql>

    <select id="findErpDepAll"  resultType="org.enfi.modules.system.entity.DepartHierarchy" >
        SELECT org_level "orgLevel",child_org_id "childOrgId",org_code "orgCode",org_sequence_number "orgSequenceNumber" ,child_org_name "childOrgName" ,organization_id_parent "organizationIdParent",parent_org_name "parentOrgName" from CUX_HR_HIERARCHY
    </select>
</mapper>
