<?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="cc.mrbird.febs.server.hr.mapper.EmpContractInfoMapper">
|
|
<select id="selectPageVo" resultType="cc.mrbird.febs.server.hr.entity.EmpContractInfo">
|
select a.*,b.allDeptName from t_emp_contractinfo a
|
inner join t_emp_baseinfo b on a.empId = b.empId
|
inner join t_dept c on b.deptId = c.DEPT_ID
|
${ew.customSqlSegment}
|
</select>
|
<select id="selectUnionPageVo" resultType="cc.mrbird.febs.server.hr.entity.EmpContractInfo">
|
SELECT * FROM (
|
(SELECT a.*, b.allDeptName
|
FROM t_emp_contractinfo a
|
INNER JOIN t_emp_baseinfo b ON a.empId = b.empId
|
INNER JOIN t_dept c ON b.deptId = c.DEPT_ID
|
<where>
|
${sqlSegment1}
|
</where>)
|
|
UNION
|
|
(SELECT a.*, b.allDeptName
|
FROM t_emp_contractinfo a
|
INNER JOIN t_emp_baseinfo b ON a.empId = b.empId
|
INNER JOIN t_dept c ON b.deptId = c.DEPT_ID
|
<where>
|
${sqlSegment2}
|
</where>)
|
) t
|
ORDER BY diffDay ASC
|
</select>
|
|
<select id="selectLastContractPageVo" resultType="cc.mrbird.febs.server.hr.entity.EmpContractInfo">
|
SELECT a.*, b.allDeptName
|
FROM t_emp_contractinfo a
|
INNER JOIN t_emp_baseinfo b ON a.empId = b.empId
|
INNER JOIN t_dept c ON b.deptId = c.DEPT_ID
|
<where>
|
${sqlSegment}
|
</where>
|
ORDER BY a.diffDay DESC
|
</select>
|
</mapper>
|