select e.ID as employeeId,
e.LASTNAME as username,
d.DEPARTMENTNAME as departmentName,
e.status,
e.mobile,
e.workcode,
e.certificatenum as idNo,
e.accounttype as accountType,
e.sex as sex,
'false' as extEmp
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
where e.status not in (7)
select e.id as employeeId,
e.lastname as username,
e.sex as sex,
e.certificatenum as idNo,
e.status as status,
e.workcode as workcode,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.accounttype as accountType,
e.workyear as workYear
from hrmresource e
where e.status not in (7)
AND e.id IN
#{id}
select e.id as employeeId,
e.lastname as username,
e.sex as sex,
e.certificatenum as idNo,
e.status as status,
e.workcode as workcode,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.accounttype as accountType,
e.workyear as workYear
from hrmresource e
where e.status not in (7)
AND e.id IN
#{id}
select e.id as employeeId,
e.lastname as username,
d.departmentname as departmentName,
d.id as departmentId,
sc.SUBCOMPANYNAME as subcompanyName,
sc.id as subcompanyid,
c.jobtitlename as jobtitleName,
c.id as jobtitleId,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.status as status,
e.workcode as workcode,
e.sex as sex,
e.email as email,
e.telephone as telephone,
e.jobcall as jobcallId,
job.name as jobcall,
e.birthday as birthday,
e.certificatenum as idNo,
e.enddate as dismissdate,
e.workyear,
e.accounttype as accountType,
e.companyworkyear
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
left join hrmjobtitles c on e.jobtitle = c.id
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
left join hrmjobcall job on e.jobcall=job.id
where e.status not in (7)
AND e.id IN
#{id}
select t.id,
t.jobtitlename as name
from hrmjobtitles t
where 1=1
AND t.id IN
#{id}
select t.id,
t.jobtitlename as name
from hrmjobtitles t
where t.id = #{positionId}
select e.id as employeeId,
e.lastname as username,
e.status as status,
e.sex as sex,
e.certificatenum as idNo,
e.workcode as workcode,
d.departmentname as departmentName,
d.id as departmentId,
c.jobtitlename as jobtitleName,
c.id as jobtitleId,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.accounttype as accountType,
sc.SUBCOMPANYNAME as subcompanyName,
sc.id as subcompanyid,
job.id as jobcallId,
job.name as jobcall
from hrmresource e
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
left join hrmdepartment d on e.departmentid = d.id
left join hrmjobtitles c on e.jobtitle = c.id
left join hrmjobcall job on e.jobcall=job.id
WHERE e.status not in (7)
AND ( 1=2
OR
(
e.id IN
#{targetId}
d.id IN
#{targetId}
c.id IN
#{targetId}
e.subcompanyid1 IN
#{targetId}
AND e.status IN
#{status}
)
)
select h.id as employeeId,
h.lastname as username,
h.status as status,
h.certificatenum as idNo,
h.workcode as workcode,
h.companystartdate as companystartdate,
h.accounttype as accountType,
h.mobile as mobile
from hrmresourcevirtual v
left join hrmresource h on v.resourceid=h.id
WHERE h.status not in (7)
AND ( 1=2
OR
(
v.departmentid IN
#{targetId}
v.subcompanyid IN
#{targetId}
AND h.status IN
#{status}
)
)
select e.id as employeeId,
e.lastname as username,
e.status as status,
e.sex as sex,
e.certificatenum as idNo,
e.workcode as workcode,
d.departmentname as departmentName,
d.id as departmentId,
c.jobtitlename as jobtitleName,
c.id as jobtitleId,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.enddate as dismissdate,
e.accounttype as accountType,
sc.SUBCOMPANYNAME as subcompanyName,
sc.id as subcompanyid
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
left join hrmjobtitles c on e.jobtitle = c.id
where e.status not in (7)
AND e.id = #{id}
AND
(
a.lastname like CONCAT('%',#{userName},'%')
)
AND
(
a.lastname like '%'||#{userName}||'%'
)
AND
(
a.lastname like '%'+#{userName}+'%'
)
select e.id as employeeId,
e.lastname as username,
e.status as status,
e.workcode as workcode,
e.sex as sex,
e.certificatenum as idNo,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.accounttype as accountType,
e.subcompanyid1 as subcompanyid,
d.departmentname as departmentName,
d.id as departmentId,
c.jobtitlename as jobtitleName,
c.id as jobtitleId
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
left join hrmjobtitles c on e.jobtitle = c.id
where e.status not in (7)
select e.id as employeeId,
e.lastname as username,
e.status as status,
e.workcode as workcode,
e.certificatenum as idNo,
e.sex as sex,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.accounttype as accountType,
e.subcompanyid1 as subcompanyid,
e.departmentid as departmentId,
d.DEPARTMENTNAME as departmentName,
e.jobtitle as jobtitleId
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
where e.status not in (7)
select e.id as employeeId,
e.lastname as username,
e.status as status,
e.workcode as workcode,
e.certificatenum as idNo,
e.sex as sex,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.departmentid as departmentId,
e.subcompanyid1 as subcompanyid,
e.accounttype as accountType,
e.costcenterid as costcenterId,
e.locationid as locationId,
e.jobtitle as jobtitleId,
d.departmentname as departmentName,
d.id as departmentId
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
where e.status not in (7)
select d.departmentname as name,
d.id as id
from hrmdepartment d
where 1=1
AND d.id IN
#{departmentId}
select d.departmentname as name,
d.id as id
from hrmdepartmentvirtual d
where 1=1
AND d.id IN
#{virtualDepartmentId}
select d.subcompanyname as name,
d.id as id
from hrmsubcompany d
where 1=1
AND d.id IN
#{subDepartmentId}
select d.subcompanyname as name,
d.id as id
from hrmsubcompany d
where d.id = #{subDepartmentId}
select d.subcompanyname as name,
d.id as id
from hrmsubcompanyvirtual d
where 1=1
AND d.id IN
#{virtualSubCompanyId}
select e.id as employeeId,
e.lastname as username
from hrmresource e
where 1=1
AND e.id IN
#{id}
AND
(
e.lastname like CONCAT('%',#{param.userName},'%')
)
select e.id as employeeId,
e.lastname as username
from hrmresource e
where 1=1
AND e.id IN
#{id}
AND
(
e.lastname like '%'+#{param.userName}+'%'
)
select e.id as employeeId,
e.lastname as username
from hrmresource e
where 1=1
AND e.id IN
#{id}
AND
(
e.lastname like '%'||#{param.userName}||'%'
)
select d.departmentname as name,
d.id as id,
d.subcompanyid1 as subcompanyid1
from hrmdepartment d
where d.departmentname = #{name}
select d.subcompanyname as name,
d.id as id
from hrmsubcompany d
where d.subcompanyname = #{name}
select d.departmentname as name,
d.id as id,
d.subcompanyid1 as subcompanyid1
from hrmdepartment d
where d.id = #{id}
select e.id as employeeId,
e.lastname as username,
e.status as status,
e.certificatenum as idNo,
e.sex as sex,
e.workcode as workcode,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.accounttype as accountType,
e.enddate as dismissdate
from hrmresource e
where e.status in (4,5,6)
AND e.enddate >= #{dismissDate}
select e.id as employeeId,
e.username as username
from hrsa_external_employee e
where 1=1
AND e.id IN
#{id}
AND
(
e.username like CONCAT('%',#{param.userName},'%')
)
select e.id as employeeId,
e.username as username
from hrsa_external_employee e
where 1=1
AND e.id IN
#{id}
AND
(
e.username like '%'+#{param.userName}+'%'
)
select e.id as employeeId,
e.username as username
from hrsa_external_employee e
where 1=1
AND e.id IN
#{id}
AND
(
e.username like '%'||#{param.userName}||'%'
)
select e.id as employeeId,
e.lastname as username,
e.status as status,
e.certificatenum as idNo,
e.sex as sex,
e.workcode as workcode,
d.departmentname as departmentName,
d.id as departmentId,
c.jobtitlename as jobtitleName,
c.id as jobtitleId,
e.companystartdate as companystartdate,
e.accounttype as accountType,
e.mobile as mobile
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
left join hrmjobtitles c on e.jobtitle = c.id
WHERE e.status not in (7)
AND e.subcompanyid1 IN
#{subCompanyId}
AND d.id IN
#{departmentId}
select e.RESOURCEID as employeeId,
e.SUBCOMPANYID as subcompanyid,
h.accounttype as accountType,
e.DEPARTMENTID as departmentId
from hrmresourcevirtual e
left join hrmresource h on e.RESOURCEID=h.id
where h.status not in (7)
AND e.DEPARTMENTID IN
#{virtualDepartmentId}
select
e.RESOURCEID as employeeId,
e.SUBCOMPANYID as subcompanyid,
h.accounttype as accountType,
e.DEPARTMENTID as departmentId
from hrmresourcevirtual e
left join hrmresource h on e.RESOURCEID=h.id
where h.status not in (7)
AND e.SUBCOMPANYID IN
#{virtualSubCompanyId}
select
e.id
from hrmresource e
where e.status not in (7)
AND e.subcompanyid1 IN
#{subCompanyId}
select
e.id
from hrmresource e
where e.status not in (7)
AND e.departmentid IN
#{departmentId}
select
e.id
from hrmresource e
where e.status not in (7)
AND e.jobtitle IN
#{jobId}
select e.id as employeeId,
e.lastname as username,
e.status as status,
e.certificatenum as idNo,
e.workcode as workcode,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.enddate as dismissdate
from hrmresource e
where e.status not in (7)
AND
(
e.lastname like CONCAT('%',#{keyword},'%')
OR
e.workcode like CONCAT('%',#{keyword},'%')
)
AND
(
e.lastname like '%'||#{keyword}||'%'
OR
e.workcode like '%'||#{keyword}||'%'
)
AND
(
e.lastname like '%'+#{keyword}+'%'
OR
e.workcode like '%'+#{keyword}+'%'
)
select job.id,
job.NAME as name
from hrmjobcall job
where job.id = #{jobCallId}
select e.id as employeeId,
e.lastname as username,
e.status as status,
e.certificatenum as idNo,
e.workcode as workcode,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.enddate as dismissdate
from hrmresource e
where e.status not in (7)
AND e.workcode IN
#{workCode}