SELECT DISTINCT subcompanyid1, departmentid, jobtitle
from hrmresource
select id, subcompanyid1 , departmentid , jobtitle , lastname , dspOrder from hrmresource t
where 1=1
and subcompanyid1 = #{resourcePO.subcompanyid1}
and departmentid = #{resourcePO.departmentid}
and jobtitle = #{resourcePO.jobtitle}
select lastname,
sex,
birthday,
resourceimageid as image,
nativeplace,
policy as politics,
a.departmentname as department,
maritalstatus as marriage,
b.jobtitlename as jobTitle,
companystartdate,
workstartdate,
certificatenum as idCard,
residentplace as address,
mobile as telephone,
email
from hrmresource h
inner join hrmdepartment a on a.id = h.departmentid
inner join hrmjobtitles b on b.id = h.jobtitle
where h.id = #{id}
AND t.lastname like CONCAT('%',#{resourcePO.lastName},'%')
AND t.lastname like '%'||#{resourcePO.lastName}||'%'
AND t.lastname like '%'+#{resourcePO.lastName}+'%'