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}
select h.id,
lastname,
sex,
birthday,
resourceimageid as image,
resourceimageid as imageId,
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.status < 4
select *
from HrmFamilyInfo
where resourceid = #{resourceId}
select t.id, t.subcompanyid1 , t.departmentid , t.jobtitle , t.lastname , t.dspOrder
from hrmresource t inner join JCL_ORG_JOB a ON a.EC_COMPANY =t.SUBCOMPANYID1 AND a.EC_DEPARTMENT =t.DEPARTMENTID
AND a.EC_JOBTITLE =t.JOBTITLE
where 1 = 1
AND t.subcompanyid1 IN
#{subcompanyid1}
AND t.departmentid IN
#{departmentid}
AND a.id IN
#{jobId}
AND t.id IN
#{resourceId}
select id,
name,
'false' as selected
from jcl_org_search_template
where creator = #{userId}
select *
from jcl_org_search_template
where id = #{id}
INSERT INTO JCL_ORG_SEARCH_TEMPLATE
creator,
create_time,
update_time,
name,
basic_fields,
personal_fields,
work_fields,
#{creator},
#{createTime},
#{updateTime},
#{name},
#{basicFields},
#{personalFields},
#{workFields},
delete
from jcl_org_search_template
where id = #{id}
and creator = #{userId}
AND t.lastname like CONCAT('%',#{resourcePO.lastName},'%')
AND t.lastname like '%'||#{resourcePO.lastName}||'%'
AND t.lastname like '%'+#{resourcePO.lastName}+'%'