견문통계 분야별, 평가별 조건 수정.

master
강석 최 2023-10-19 15:25:23 +09:00
parent 423c7ddc1f
commit b1c8e7386e
1 changed files with 19 additions and 10 deletions

View File

@ -15,6 +15,9 @@
<if test='endDate != null and endDate != ""'>
and wrt_dt &lt;= #{endDate}::date+1
</if>
<if test='reportOrgan != null and reportOrgan != ""'>
and doc_no like '%'||#{reportOrgan}||'%'
</if>
<if test='rating != null and rating != "" or sangbo != null and sangbo != ""'>
and ab.affair_key in (
select affair_key
@ -122,9 +125,9 @@
count(*) as cnt
from affair_board ab,
affair_rating ar
where ab.affair_key = ar.affair_key
and (ar.organ_up != 'T' or ar.organ_up is null)
<if test='userNm != null and userNm != ""'>
where ab.affair_key = ar.affair_key
and (ar.organ_up != 'T' or ar.organ_up is null)
<if test='userNm != null and userNm != ""'>
and wrt_user_nm like '%'||#{userNm}||'%'
</if>
<if test='startDate != null and startDate != ""'>
@ -133,12 +136,15 @@
<if test='endDate != null and endDate != ""'>
and wrt_dt &lt;= #{endDate}::date+1
</if>
<if test='reportOrgan != null and reportOrgan != ""'>
and doc_no like '%'||#{reportOrgan}||'%'
</if>
<if test='rating != null and rating != "" or sangbo != null and sangbo != ""'>
and ab.affair_key in (
select affair_key
from affair_rating ar2
inner join organ_config oc2
on ar2.rating_organ = oc2.organ_cd
and ab.affair_key in (
select affair_key
from affair_rating ar2
inner join organ_config oc2
on ar2.rating_organ = oc2.organ_cd
<where>
<if test='rating != null and rating != ""'>
and ar2.affair_rate in
@ -347,6 +353,9 @@
<if test='endDate != null and endDate != ""'>
and wrt_dt &lt;= #{endDate}::date+1
</if>
<if test='reportOrgan != null and reportOrgan != ""'>
and doc_no like '%'||#{reportOrgan}||'%'
</if>
<if test='rating != null and rating != "" or sangbo != null and sangbo != ""'>
and ab.affair_key in (
select affair_key
@ -424,8 +433,8 @@
from affair_board ab,
affair_rating ar
where ab.affair_key = ar.affair_key
and (ar.organ_up != 'T' or ar.organ_up is null)
<include refid="raitingSearch"></include>
and (ar.organ_up != 'T' or ar.organ_up is null)
<include refid="raitingSearch"></include>
group by ab.wrt_organ) c
on a.item_cd = c.wrt_organ
order by item_cd asc