yubo
2026-04-11 4e55bd9cee8e44f7a7a0d9185d8323fc7be9193d
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/mapper/EmpContractInfoMapper.xml
@@ -8,5 +8,37 @@
        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>