yubo
2026-04-11 2a192abbbca7adce3571ed4a9f4f94b847ff8c94
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?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>