user_status = #{userStatus}
user_status != 'D'
and user_id like '%'||#{userId}||'%'
and user_nm like '%'||#{userNm}||'%'
and og_cd = #{ogCd}
and ofc_cd = #{ofcCd}
and title_cd = #{titleCd}
and user_role like '%ROLE_USER'
and (user_role = 'ROLE_SUB_ADMIN,ROLE_USER' or user_role = 'ROLE_USER')
and og_cd in
#{organCd}
select user_seq,
dic_code,
user_id,
user_nm,
user_role,
email,
og_cd,
ofc_cd,
title_cd,
wrt_dt
from user_info
order by og_cd, ofc_cd, title_cd desc
limit #{rowCnt} offset #{firstIndex}
select count(*)
from user_info
select user_seq,
user_id,
(select item_value from code_mgt where item_cd = title_cd) as title_cd,
user_nm
from user_info
where og_cd in
#{item}
order by user_nm asc
select a.menu_key ,
a.cat1_cd ,
a.cat2_cd ,
a.cat3_cd ,
a.menu_url ,
b.order_num
from menu_mgt a
inner join dashboard_config b
on a.menu_key = b.menu_key
where b.user_seq = #{userSeq}
order by b.order_num
user_status = #{userStatus}
and og_cd in
#{item}
and og_cd = #{ogCd}
and sex = #{sex}
and user_nm like '%'||#{userNm}||'%'
select (ROW_NUMBER() OVER(order by user_nm desc)) AS rownum,
a.user_seq,
(select item_value from code_mgt where item_cd = title_cd) as title_cd,
user_nm,
og_cd,
(select item_value from code_mgt where item_cd = og_cd) as organ_nm,
(select item_value from code_mgt where item_cd = ofc_cd) as ofc_cd,
birth_date,
(select item_value from code_mgt where item_cd = sex) as sex,
police_in_date,
title_in_date,
ofc_in_date,
(select item_value from code_mgt where item_cd = outturn_cd) as outturn_cd,
(select item_value from code_mgt where item_cd = job_in_cd) as job_in_cd,
wrt_dt,
b.crc001Sum,
b.crc002Sum,
b.crc003Sum,
b.crc004Sum,
b.crc005Sum,
b.crc006Sum
from user_info a
left outer join (
select user_seq,
sum(case when career_cd = 'CRC001' then work_month else 0 end) as crc001Sum,
sum(case when career_cd = 'CRC002' then work_month else 0 end) as crc002Sum,
sum(case when career_cd = 'CRC003' then work_month else 0 end) as crc003Sum,
sum(case when career_cd = 'CRC004' then work_month else 0 end) as crc004Sum,
sum(case when career_cd = 'CRC005' then work_month else 0 end) as crc005Sum,
sum(case when career_cd = 'CRC006' then work_month else 0 end) as crc006Sum
from user_career
group by user_seq
) b on a.user_seq = b.user_seq
order by rownum desc
limit #{rowCnt} offset #{firstIndex}
select count(*)
from(
select user_seq,
(select item_value from code_mgt where item_cd = title_cd) as title_cd,
user_nm,
og_cd,
(select item_value from code_mgt where item_cd = og_cd) as organ_nm,
(select item_value from code_mgt where item_cd = ofc_cd) as ofc_cd,
birth_date,
(select item_value from code_mgt where item_cd = sex) as sex,
police_in_date,
title_in_date,
ofc_in_date,
(select item_value from code_mgt where item_cd = outturn_cd) as outturn_cd,
(select item_value from code_mgt where item_cd = job_in_cd) as job_in_cd,
wrt_dt
from user_info
order by user_seq desc
) a
select user_seq,
version_no,
(select item_value from code_mgt where item_cd = wrt_organ) as wrt_organ,
(select item_value from code_mgt where item_cd = wrt_part) as wrt_part,
(select item_value from code_mgt where item_cd = wrt_title) as wrt_title,
wrt_nm,
wrt_dt
from user_info_history
where user_seq = #{userSeq}
order by version_no desc
select user_seq,
version_no,
dic_code,
user_id,
user_nm,
phone_no,
email,
(select item_value from code_mgt where item_cd = sex) as sex,
birth_date,
police_in_date,
(select item_value from code_mgt where item_cd = og_cd) as og_cd,
organ_in_date,
ofc_cd,
ofc_in_date,
(select item_value from code_mgt where item_cd = title_cd) as title_cd,
title_in_date,
(select item_value from code_mgt where item_cd = outturn_cd) as outturn_cd,
(select item_value from code_mgt where item_cd = series_cd) as series_cd,
(select item_value from code_mgt where item_cd = language_cd) as language_cd
from user_info_history
where user_seq = #{userSeq}
and version_no = #{versionNo}
select
case
when a.year is null then #{year}
else a.year
end as year,
case
when a.og_cd is null then c.organ_cd
else a.og_cd
end as og_cd,
a.version_no,
jt007_max,
jt007_now,
jt006_max,
jt006_now,
jt005_max,
jt005_now,
jt004_max,
jt004_now,
jt003_max,
jt003_now,
jt002_max,
jt002_now,
jt001_max,
jt001_now,
wrt_organ,
wrt_part,
wrt_user_seq,
wrt_user_grd,
wrt_user_nm,
wrt_dt
from personnel_status a
inner join (select year, og_cd, max(version_no) as version_no
from personnel_status
group by year, og_cd) b
on a.year = b.year and a.og_cd = b.og_cd and a.version_no = b.version_no
right outer join organ_config c
on a.og_cd = c.organ_cd and a.year = #{year}
where c.organ_cd in
#{item}
order by c.organ_type, c.parent_organ, c.organ_cd
select a.og_cd,
sum(case
when a.title_cd = 'JT001' then 1
else 0
end) as jt001Now,
sum(case
when a.title_cd = 'JT002' then 1
else 0
end) as jt002Now,
sum(case
when a.title_cd = 'JT003' then 1
else 0
end) as jt003Now,
sum(case
when a.title_cd = 'JT004' then 1
else 0
end) as jt004Now,
sum(case
when a.title_cd = 'JT005' then 1
else 0
end) as jt005Now,
sum(case
when a.title_cd = 'JT006' then 1
else 0
end) as jt006Now,
sum(case
when a.title_cd = 'JT007' then 1
else 0
end) as jt007Now
from user_info a
where a.user_status = 'USC003'
and a.og_cd = #{ogCd}
group by a.og_cd
order by a.og_cd
select user_seq,
user_nm,
dic_code,
(select item_value from code_mgt where item_cd = title_cd) as title_cd,
(select item_value from code_mgt where item_cd = og_cd) as og_cd,
(select item_value from code_mgt where item_cd = ofc_cd) as ofc_cd,
(select item_value from code_mgt where item_cd = sex) as sex,
birth_date,
(select item_value from code_mgt where item_cd = language_cd) as language_cd
from user_info
where user_seq = #{userSeq}
select edu_seq,
user_seq,
edu_name,
edu_sdate,
edu_edate,
edu_ra,
(select item_value from code_mgt where item_cd = wrt_organ) as wrt_organ,
(select item_value from code_mgt where item_cd = wrt_part) as wrt_part,
(select item_value from code_mgt where item_cd = wrt_title) as wrt_title,
wrt_user_seq,
wrt_nm,
wrt_dt
from user_edu
where user_seq = #{userSeq}
order by edu_seq desc
user_organ in
#{organCd}
and contact_ip like '%'||#{contactIp}||'%'
and request_url like '%'||#{requestUrl}||'%'
and request_method = #{requestMethod}
and user_belong like '%'||#{userBelong}||'%'
and wrt_dt >= #{startDate}::date
and wrt_dt <= #{endDate}::date+1
select *
from user_request_log
order by ul_key desc
limit #{rowCnt} offset #{firstIndex}
select count(*)
from user_request_log
user_organ in
#{organCd}
and contact_ip like '%'||#{contactIp}||'%'
and inout_type = #{inoutType}
and user_belong like '%'||#{userBelong}||'%'
and wrt_dt >= #{startDate}::date
and wrt_dt <= #{endDate}::date+1
select *
from user_inout_log
order by inout_key desc
limit #{rowCnt} offset #{firstIndex}
select count(*)
from user_inout_log
and a.user_seq = #{userSeq}
and a.view_yn = #{viewYn}
and b.cat1_cd = #{cat1Cd}
and b.cat2_cd = #{cat2Cd}
and b.cat3_cd = #{cat3Cd}
and a.alarm_msg like '%'||#{alarmMsg}||'%'
And a.wrt_dt >= #{startDate}::DATE
AND a.wrt_dt <= #{endDate}::DATE+1
select a.alarm_key ,
a.user_seq ,
a.menu_key ,
a.ref_doc_key ,
b.cat1_cd,
b.cat2_cd,
b.cat3_cd,
a.alarm_msg ,
a.view_yn ,
a.wrt_dt
from user_alarm a
inner join menu_mgt b on a.menu_key = b.menu_key
order by wrt_dt desc
limit #{rowCnt} offset #{firstIndex}
select count(*)
from user_alarm a
inner join menu_mgt b on a.menu_key = b.menu_key