2022-12-29 09:16:45 +00:00
<?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.dbnt.faisp.main.counterIntelligence.mapper.CounterIntelligenceMapper" >
2022-12-30 09:01:34 +00:00
<sql id= "selectCounterIntelligenceWorkListWhere" >
<where >
2023-01-04 00:12:17 +00:00
a.status < > 'DST008'
2022-12-30 09:01:34 +00:00
<if test= 'wrtUserSeq != null and wrtUserSeq != 0' >
2023-01-06 09:22:18 +00:00
and ((a.wrt_user_seq = #{wrtUserSeq} and a.status = 'DST001') or a.status = 'DST007')
2022-12-30 09:01:34 +00:00
</if>
<if test= 'workRating != null and workRating != ""' >
and a.work_rating = #{workRating}
</if>
<if test= 'title != null and title != ""' >
and a.title like '%'||#{title}||'%'
</if>
<if test= 'wrtUserNm != null and wrtUserNm != ""' >
and a.wrt_user_nm like '%'||#{wrtUserNm}||'%'
</if>
<if test= 'wrtOrgan != null and wrtOrgan != ""' >
and a.wrt_organ = #{wrtOrgan}
</if>
<if test= 'hashTags != null and hashTags != ""' >
and a.ciw_key in (
2023-03-15 04:31:24 +00:00
select aa.ciw_key
from hash_tag_link_ciw aa
inner join hash_tag ab on aa.tag_key = ab.tag_key
where ab.tag_nm like '%'||#{hashTags}||'%'
2022-12-30 09:01:34 +00:00
)
</if>
<if test= 'dateSelector == "workStartDate"' >
<if test= 'startDate != null and startDate != ""' >
and a.work_start_date >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and a.work_start_date < = #{endDate}::date+1
</if>
</if>
<if test= 'dateSelector == "workEndDate"' >
<if test= 'startDate != null and startDate != ""' >
and a.work_end_date >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and a.work_end_date < = #{endDate}::date+1
</if>
</if>
<if test= 'dateSelector == "reRatingDate1"' >
<if test= 'startDate != null and startDate != ""' >
and a.re_rating_date1 >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and a.re_rating_date1 < = #{endDate}::date+1
</if>
</if>
<if test= 'dateSelector == "reRatingDate2"' >
<if test= 'startDate != null and startDate != ""' >
and a.re_rating_date2 >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and a.re_rating_date2 < = #{endDate}::date+1
</if>
</if>
<if test= 'dateSelector == "wrtDt"' >
<if test= 'startDate != null and startDate != ""' >
and a.wrt_dt >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and a.wrt_dt < = #{endDate}::date+1
</if>
</if>
2023-03-14 09:04:22 +00:00
<if test= "downOrganCdList != null" >
and a.wrt_organ in
<foreach collection= "downOrganCdList" item= "organCd" separator= "," open= "(" close= ")" >
#{organCd}
</foreach>
</if>
2022-12-30 09:01:34 +00:00
</where>
</sql>
<select id= "selectCounterIntelligenceWorkList" parameterType= "CounterIntelligenceWork" resultType= "CounterIntelligenceWork" >
select a.ciw_key,
2023-03-15 04:31:24 +00:00
a.status,
a.work_rating,
a.work_start_date,
a.work_end_date,
a.re_rating_date1,
a.re_rating_date2,
a.title,
a.wrt_organ,
a.wrt_part,
a.wrt_user_seq,
a.wrt_user_grd,
a.wrt_user_nm,
a.wrt_dt,
b.fileCnt
2022-12-30 09:01:34 +00:00
from counter_intelligence_work a
2023-01-04 00:12:17 +00:00
left outer join (select ciw_key, count(*) as fileCnt from ciw_file group by ciw_key) b
on a.ciw_key = b.ciw_key
2022-12-30 09:01:34 +00:00
<include refid= "selectCounterIntelligenceWorkListWhere" > </include>
ORDER BY a.ciw_key DESC
LIMIT #{rowCnt} OFFSET #{firstIndex}
</select>
<select id= "selectCounterIntelligenceWorkCnt" parameterType= "CounterIntelligenceWork" resultType= "int" >
select count(*)
from counter_intelligence_work a
2023-01-04 00:12:17 +00:00
left outer join (select ciw_key, count(*) as fileCnt from ciw_file group by ciw_key) b
2022-12-30 09:01:34 +00:00
on a.ciw_key = b.ciw_key
<include refid= "selectCounterIntelligenceWorkListWhere" > </include>
</select>
2022-12-29 09:16:45 +00:00
<select id= "selectHashTags" resultType= "string" parameterType= "int" >
select array_to_string(array_agg(b.tag_nm), ' ') as hashTags
from hash_tag_link_ciw a
inner join hash_tag b on a.tag_key = b.tag_key
where a.ciw_key = #{ciwKey}
</select>
2023-01-04 00:14:48 +00:00
2023-01-04 00:12:17 +00:00
<select id= "selectCiWorkStatisticsList" resultType= "ciWorkStatistics" parameterType= "ciWorkStatistics" >
select work_rating,
2023-01-06 05:56:49 +00:00
count(case when work_start_date >= (#{year}||'-01-01')::date and work_start_date < = (#{year}+1||'-01-01')::date then 1 end) as newWorkCnt,
count(case when work_end_date is null or (work_end_date >= (#{year}+1||'-01-01')::date and work_end_date < (#{year}+2||'-01-01')::date) then 1 end) as doingWorkCnt,
count(case when work_start_date > (#{year}-1||'-01-01')::date and work_start_date < = (#{year}||'-01-01')::date and work_end_date >= (#{year}||'-01-01')::date and work_end_date < (#{year}+1||'-01-01')::date then 1 end) as prevYearWorkEndCnt,
count(case when work_start_date >= (#{year}||'-01-01')::date and work_start_date < = (#{year}+1||'-01-01')::date and work_end_date >= (#{year}||'-01-01')::date and work_end_date < (#{year}+1||'-01-01')::date then 1 end) as thisYearWorkEndCnt
2023-01-04 00:12:17 +00:00
from counter_intelligence_work a
WHERE a.status = 'DST007'
2023-03-15 04:31:24 +00:00
<if test= 'ogCd != null and ogCd != ""' >
and a.wrt_organ = #{ogCd}
</if>
<if test= "downOrganCdList != null" >
and a.wrt_organ in
<foreach collection= "downOrganCdList" item= "organCd" separator= "," open= "(" close= ")" >
#{organCd}
</foreach>
</if>
2023-01-04 00:12:17 +00:00
group by work_rating
order by work_rating
</select>
<select id= "selectCiWorkYearList" resultType= "int" >
select year
from ( select EXTRACT(YEAR FROM work_start_date) AS year
2023-03-15 04:31:24 +00:00
from counter_intelligence_work
where status < > 'DST008'
union
select EXTRACT(YEAR FROM now()) AS year
2023-01-04 00:12:17 +00:00
) a
group by year
order by year desc
</select>
2023-01-04 00:14:48 +00:00
2023-03-15 04:31:24 +00:00
2023-01-04 00:04:39 +00:00
<select id= "selectCiaSaftyDemandList" parameterType= "CounterIntelligenceActivity" resultType= "CounterIntelligenceActivity" >
select cia.ci_key,
2023-03-15 04:31:24 +00:00
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
cia.ci_type,
(select item_value from code_mgt where item_cd = cia.wrt_organ) as wrt_organ,
sdi.local_info,
sdi.outlook_problem,
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm,
cia.wrt_dt
from counter_intelligence_activity cia,
safty_demand_info sdi
where cia.ci_key = sdi.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test= 'wrtOrgan != null and wrtOrgan != ""' >
2023-01-06 05:58:37 +00:00
and cia.wrt_organ = #{wrtOrgan}
2023-03-15 04:31:24 +00:00
</if>
<if test= 'wrtUserNm != null and wrtUserNm != ""' >
2023-01-06 05:58:37 +00:00
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
2023-03-15 04:31:24 +00:00
</if>
<if test= 'startDate != null and startDate != ""' >
2023-01-06 05:58:37 +00:00
and cia.wrt_dt >= #{startDate}::date
2023-03-15 04:31:24 +00:00
</if>
<if test= 'endDate != null and endDate != ""' >
and cia.wrt_dt < = #{endDate}::date+1
</if>
and cia.wrt_organ in
<foreach collection= "downOrganCdList" item= "item" index= "index" separator= "," open= "(" close= ")" >
#{item}
</foreach>
2023-01-04 00:04:39 +00:00
ORDER BY cia.ci_key DESC
LIMIT #{rowCnt} OFFSET #{firstIndex}
</select>
2023-03-15 04:31:24 +00:00
2023-01-04 00:04:39 +00:00
<select id= "selectCiaSaftyDemandListCnt" parameterType= "CounterIntelligenceActivity" resultType= "Integer" >
2023-03-15 04:31:24 +00:00
select count(*)
from(
select cia.ci_key,
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
cia.ci_type,
(select item_value from code_mgt where item_cd = cia.wrt_organ) as wrt_organ,
sdi.local_info,
sdi.outlook_problem,
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm,
cia.wrt_dt
from counter_intelligence_activity cia,
safty_demand_info sdi
where cia.ci_key = sdi.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test= 'wrtOrgan != null and wrtOrgan != ""' >
and cia.wrt_organ = #{wrtOrgan}
</if>
<if test= 'wrtUserNm != null and wrtUserNm != ""' >
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
</if>
<if test= 'startDate != null and startDate != ""' >
and cia.wrt_dt >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and cia.wrt_dt < = #{endDate}::date+1
</if>
and cia.wrt_organ in
<foreach collection= "downOrganCdList" item= "item" index= "index" separator= "," open= "(" close= ")" >
#{item}
</foreach>
ORDER BY cia.ci_key DESC
)a
2023-01-04 00:04:39 +00:00
</select>
2023-03-15 04:31:24 +00:00
<select id= "selectCiaManageCompanyList" parameterType= "CounterIntelligenceActivity" resultType= "CounterIntelligenceActivity" >
2023-01-04 08:54:59 +00:00
select cia.ci_key,
2023-03-15 04:31:24 +00:00
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
cia.ci_type,
(select item_value from code_mgt where item_cd = mci.mgt_organ) as mgt_organ,
mci.company_nm,
mci.company_location,
mci.related_field,
mci.description,
mci.cell_phone,
mci.department,
mci."name",
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm,
cia.wrt_dt
from counter_intelligence_activity cia,
manage_company_info mci
where cia.ci_key = mci.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test= 'wrtOrgan != null and wrtOrgan != ""' >
2023-01-06 05:58:37 +00:00
and cia.wrt_organ = #{wrtOrgan}
2023-03-15 04:31:24 +00:00
</if>
<if test= 'companyNm != null and companyNm != ""' >
2023-01-06 05:58:37 +00:00
and mci.company_nm like '%'||#{companyNm}||'%'
2023-03-15 04:31:24 +00:00
</if>
<if test= 'wrtUserNm != null and wrtUserNm != ""' >
2023-01-06 05:58:37 +00:00
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
2023-03-15 04:31:24 +00:00
</if>
<if test= 'startDate != null and startDate != ""' >
2023-01-06 05:58:37 +00:00
and cia.wrt_dt >= #{startDate}::date
2023-03-15 04:31:24 +00:00
</if>
<if test= 'endDate != null and endDate != ""' >
and cia.wrt_dt < = #{endDate}::date+1
</if>
and mci.mgt_organ in
<foreach collection= "downOrganCdList" item= "item" index= "index" separator= "," open= "(" close= ")" >
#{item}
</foreach>
2023-01-04 08:54:59 +00:00
ORDER BY cia.ci_key DESC
LIMIT #{rowCnt} OFFSET #{firstIndex}
</select>
2023-03-15 04:31:24 +00:00
2023-01-04 08:54:59 +00:00
<select id= "selectCiaManageCompanyListCnt" parameterType= "CounterIntelligenceActivity" resultType= "Integer" >
2023-03-15 04:31:24 +00:00
select count(*)
from(
select cia.ci_key,
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
cia.ci_type,
(select item_value from code_mgt where item_cd = mci.mgt_organ) as mgt_organ,
mci.company_nm,
mci.company_location,
mci.related_field,
mci.description,
mci.cell_phone,
mci.department,
mci."name",
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm,
cia.wrt_dt
from counter_intelligence_activity cia, manage_company_info mci
where cia.ci_key = mci.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test= 'wrtOrgan != null and wrtOrgan != ""' >
and cia.wrt_organ = #{wrtOrgan}
</if>
<if test= 'companyNm != null and companyNm != ""' >
and mci.company_nm like '%'||#{companyNm}||'%'
</if>
<if test= 'wrtUserNm != null and wrtUserNm != ""' >
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
</if>
<if test= 'startDate != null and startDate != ""' >
and cia.wrt_dt >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and cia.wrt_dt < = #{endDate}::date+1
</if>
and mci.mgt_organ in
<foreach collection= "downOrganCdList" item= "item" index= "index" separator= "," open= "(" close= ")" >
#{item}
</foreach>
ORDER BY cia.ci_key DESC
)a
2023-01-04 08:54:59 +00:00
</select>
2023-03-15 04:31:24 +00:00
2023-01-05 02:42:12 +00:00
<select id= "selectCiaForeignerList" parameterType= "CounterIntelligenceActivity" resultType= "CounterIntelligenceActivity" >
select cia.ci_key,
2023-03-15 04:31:24 +00:00
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
(select item_value from code_mgt where item_cd = fi.mgt_organ) as mgt_organ,
fi.manager,
fi.commu_location,
fi.commu_national,
fi.commu_address,
fi.select_reason,
fi.monitoring_info,
fi.fix_date,
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm,
cia.wrt_dt
from counter_intelligence_activity cia, foreigner_info fi
where cia.ci_key = fi.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test= 'manager != null and manager != ""' >
2023-01-06 05:58:37 +00:00
and fi.manager like '%'||#{manager}||'%'
2023-03-15 04:31:24 +00:00
</if>
<if test= 'wrtOrgan != null and wrtOrgan != ""' >
2023-01-06 05:58:37 +00:00
and cia.wrt_organ = #{wrtOrgan}
2023-03-15 04:31:24 +00:00
</if>
<if test= 'wrtUserNm != null and wrtUserNm != ""' >
2023-01-06 05:58:37 +00:00
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
2023-03-15 04:31:24 +00:00
</if>
<if test= 'dateSelector == "fixDate"' >
2023-01-06 05:58:37 +00:00
<if test= 'startDate != null and startDate != ""' >
and fi.fix_date >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and fi.fix_date < = #{endDate}::date
</if>
</if>
2023-03-15 04:31:24 +00:00
<if test= 'dateSelector == "wrtDt"' >
2023-01-06 05:58:37 +00:00
<if test= 'startDate != null and startDate != ""' >
and cia.wrt_dt >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and cia.wrt_dt < = #{endDate}::date+1
</if>
2023-03-15 04:31:24 +00:00
</if>
and fi.mgt_organ in
<foreach collection= "downOrganCdList" item= "item" index= "index" separator= "," open= "(" close= ")" >
#{item}
</foreach>
2023-01-05 02:42:12 +00:00
ORDER BY cia.ci_key DESC
LIMIT #{rowCnt} OFFSET #{firstIndex}
</select>
2023-03-15 04:31:24 +00:00
2023-01-05 02:42:12 +00:00
<select id= "selectCiaForeignerListCnt" parameterType= "CounterIntelligenceActivity" resultType= "Integer" >
2023-03-15 04:31:24 +00:00
select count(*)
from(
select cia.ci_key,
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
(select item_value from code_mgt where item_cd = fi.mgt_organ) as mgt_organ,
fi.manager,
fi.commu_location,
fi.commu_national,
fi.commu_address,
fi.select_reason,
fi.monitoring_info,
fi.fix_date,
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm,
cia.wrt_dt
from counter_intelligence_activity cia, foreigner_info fi
where cia.ci_key = fi.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test= 'manager != null and manager != ""' >
and fi.manager like '%'||#{manager}||'%'
</if>
<if test= 'wrtOrgan != null and wrtOrgan != ""' >
and cia.wrt_organ = #{wrtOrgan}
</if>
<if test= 'wrtUserNm != null and wrtUserNm != ""' >
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
</if>
<if test= 'dateSelector == "fixDate"' >
<if test= 'startDate != null and startDate != ""' >
and fi.fix_date >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and fi.fix_date < = #{endDate}::date
</if>
</if>
<if test= 'dateSelector == "wrtDt"' >
<if test= 'startDate != null and startDate != ""' >
and cia.wrt_dt >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and cia.wrt_dt < = #{endDate}::date+1
</if>
</if>
and fi.mgt_organ in
<foreach collection= "downOrganCdList" item= "item" index= "index" separator= "," open= "(" close= ")" >
#{item}
</foreach>
ORDER BY cia.ci_key DESC
)a
2023-01-05 02:42:12 +00:00
</select>
2023-03-15 04:31:24 +00:00
2023-01-05 09:00:37 +00:00
<select id= "selectCiaEduList" parameterType= "CounterIntelligenceActivity" resultType= "CounterIntelligenceActivity" >
2023-03-15 04:31:24 +00:00
select cia.ci_key,
2023-01-06 08:58:15 +00:00
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
2023-03-15 04:31:24 +00:00
(select item_value from code_mgt where item_cd = ei.mgt_organ) as mgt_organ,
ei.edu_date,
ei.edu_type,
ei.people_cnt,
ei.description,
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm,
cia.wrt_dt
from counter_intelligence_activity cia, edu_info ei
where cia.ci_key = ei.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test= 'mgtOrgan != null and mgtOrgan != ""' >
2023-01-06 05:58:37 +00:00
and ei.mgt_organ = #{mgtOrgan}
2023-03-15 04:31:24 +00:00
</if>
<if test= 'wrtUserNm != null and wrtUserNm != ""' >
2023-01-06 05:58:37 +00:00
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
2023-03-15 04:31:24 +00:00
</if>
<if test= 'dateSelector == "eduDate"' >
2023-01-06 05:58:37 +00:00
<if test= 'startDate != null and startDate != ""' >
and ei.edu_date >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and ei.edu_date < = #{endDate}::date
</if>
</if>
2023-03-15 04:31:24 +00:00
<if test= 'dateSelector == "wrtDt"' >
2023-01-06 05:58:37 +00:00
<if test= 'startDate != null and startDate != ""' >
and cia.wrt_dt >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and cia.wrt_dt < = #{endDate}::date+1
</if>
2023-03-15 04:31:24 +00:00
</if>
and ei.mgt_organ in
<foreach collection= "downOrganCdList" item= "item" index= "index" separator= "," open= "(" close= ")" >
#{item}
</foreach>
2023-01-05 09:00:37 +00:00
ORDER BY cia.ci_key DESC
LIMIT #{rowCnt} OFFSET #{firstIndex}
</select>
2023-03-15 04:31:24 +00:00
2023-01-05 09:00:37 +00:00
<select id= "selectCiaEduListCnt" parameterType= "CounterIntelligenceActivity" resultType= "Integer" >
2023-03-15 04:31:24 +00:00
select count(*)
from(
select cia.ci_key,
(select item_value from code_mgt where item_cd = cia.content_status) as content_status,
(select item_value from code_mgt where item_cd = ei.mgt_organ) as mgt_organ,
ei.edu_date,
ei.edu_type,
ei.people_cnt,
ei.description,
(select item_value from code_mgt where item_cd = cia.wrt_user_grd) as wrt_user_grd,
cia.wrt_user_seq,
cia.wrt_user_nm,
cia.wrt_dt
from counter_intelligence_activity cia, edu_info ei
where cia.ci_key = ei.ci_key
and cia.content_status != 'DST008'
and ((cia.wrt_user_seq = #{wrtUserSeq} and cia.content_status = 'DST001') or cia.content_status = 'DST007')
<if test= 'mgtOrgan != null and mgtOrgan != ""' >
and ei.mgt_organ = #{mgtOrgan}
</if>
<if test= 'wrtUserNm != null and wrtUserNm != ""' >
and cia.wrt_user_nm like '%'||#{wrtUserNm}||'%'
</if>
<if test= 'dateSelector == "eduDate"' >
<if test= 'startDate != null and startDate != ""' >
and ei.edu_date >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and ei.edu_date < = #{endDate}::date
</if>
</if>
<if test= 'dateSelector == "wrtDt"' >
<if test= 'startDate != null and startDate != ""' >
and cia.wrt_dt >= #{startDate}::date
</if>
<if test= 'endDate != null and endDate != ""' >
and cia.wrt_dt < = #{endDate}::date+1
</if>
</if>
and ei.mgt_organ in
<foreach collection= "downOrganCdList" item= "item" index= "index" separator= "," open= "(" close= ")" >
#{item}
</foreach>
ORDER BY cia.ci_key DESC
)a
2023-01-05 09:00:37 +00:00
</select>
2023-01-04 00:16:39 +00:00
2022-12-29 09:16:45 +00:00
</mapper>