64 lines
2.4 KiB
XML
64 lines
2.4 KiB
XML
<?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.engine.salary.mapper.datacollection.EmployMapper">
|
|
<!-- 员工基本信息 -->
|
|
<select id="listEmployee" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
|
select e.ID as employeeId,
|
|
e.LASTNAME as username,
|
|
d.DEPARTMENTNAME as deparmentName
|
|
from hrmresource e
|
|
left join hrmdepartment d on e.departmentid = d.id
|
|
where e.status not in (7)
|
|
</select>
|
|
|
|
<select id="getEmployeeByIds" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
|
select e.ID as employeeId,
|
|
e.LASTNAME as username
|
|
from hrmresource e
|
|
where e.status not in (7)
|
|
<if test="collection != null and collection.size()>0">
|
|
AND e.id IN
|
|
<foreach collection="collection" open="(" item="id" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</if>
|
|
</select>
|
|
|
|
|
|
<select id="getEmployeeByIdsAll" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
|
select e.id as employeeId,
|
|
e.lastname as username,
|
|
d.departmentname as departmentName,
|
|
c.jobtitlename as jobtitleName,
|
|
e.companystartdate as companystartdate,
|
|
e.mobile as mobile,
|
|
b.dismissdate as dismissdate
|
|
from hrmresource e
|
|
left join hrmdepartment d on e.departmentid = d.id
|
|
left join hrmjobtitles c on e.jobtitle = c.id
|
|
left join bill_hrmdismiss b on e.id = b.resource_n
|
|
where 1 = 1
|
|
<if test="collection != null and collection.size()>0">
|
|
AND e.id IN
|
|
<foreach collection="collection" open="(" item="id" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</if>
|
|
</select>
|
|
|
|
|
|
<select id="listPositionInfo" resultType="com.engine.salary.entity.hrm.PositionInfo">
|
|
select t.id,
|
|
t.jobtitlename as name
|
|
from hrmjobtitles t
|
|
where 1=1
|
|
<if test="collection != null and collection.size()>0">
|
|
AND t.id IN
|
|
<foreach collection="collection" open="(" item="id" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</if>
|
|
</select>
|
|
|
|
|
|
</mapper> |