<?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="com.gkhy.exam.system.mapper.EmployeeRecordMapper">
|
|
|
|
<select id="selectEmployeeRecordList" parameterType="com.gkhy.exam.system.domain.req.EmployeeRecordReq"
|
resultType="com.gkhy.exam.system.domain.vo.EmployeeRecordVO">
|
|
select
|
a.name, a.sex, a.age, a.person_type personType , a.phone, a.dept_id deptId, a.post,a.duty,
|
aa.employee_id employeeId, aa.company_id companyId,
|
b.dept_name deptName,aa.user_id userId,aa.duties,aa.seniority,aa.qualification_requirements qualificationRequirements,
|
aa.qualification,aa.id_card idCard,aa.positional,aa.entry_time entryTime,aa.resign_time resignTime,aa.certificate,
|
aa.version,aa.create_time createTime,aa.update_time updateTime,aa.create_by createBy,aa.update_by updateBy
|
from employee_record aa
|
inner join sys_user a on a.id = aa.user_id and a.company_id = aa.company_id
|
inner join sys_dept b on a.dept_id = b.dept_id
|
where a.del_flag = 0 and aa.del_flag = 0
|
<if test="companyId != null">
|
and aa.company_id = #{companyId}
|
</if>
|
<if test="name != null and name != ''">
|
and a.name like concat('%',#{name},'%')
|
</if>
|
<if test="phone != null and phone != ''">
|
and a.phone like concat('%',#{phone},'%')
|
</if>
|
<if test="qualification != null">
|
and aa.qualification = #{qualification}
|
</if>
|
<if test="positional != null">
|
and aa.positional = #{positional}
|
</if>
|
</select>
|
|
<select id="getEmployeeRecordList" parameterType="long"
|
resultType="com.gkhy.exam.system.domain.EmployeeRecord">
|
select
|
a.name,
|
aa.employee_id employeeId, aa.user_id userId
|
from employee_record aa
|
inner join sys_user a on a.id = aa.user_id and a.company_id = aa.company_id
|
where a.del_flag = 0 and aa.del_flag = 0
|
<if test="companyId != null">
|
and aa.company_id = #{companyId}
|
</if>
|
</select>
|
|
|
</mapper>
|