diff --git a/src/main/resources/mybatisMapper/AffairStatisticsMapper.xml b/src/main/resources/mybatisMapper/AffairStatisticsMapper.xml
index c717b7f9..1e8a4e01 100644
--- a/src/main/resources/mybatisMapper/AffairStatisticsMapper.xml
+++ b/src/main/resources/mybatisMapper/AffairStatisticsMapper.xml
@@ -15,6 +15,9 @@
and wrt_dt <= #{endDate}::date+1
+
+ and doc_no like '%'||#{reportOrgan}||'%'
+
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)
-
+ where ab.affair_key = ar.affair_key
+ and (ar.organ_up != 'T' or ar.organ_up is null)
+
and wrt_user_nm like '%'||#{userNm}||'%'
@@ -133,12 +136,15 @@
and wrt_dt <= #{endDate}::date+1
+
+ and doc_no like '%'||#{reportOrgan}||'%'
+
- 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
and ar2.affair_rate in
@@ -347,6 +353,9 @@
and wrt_dt <= #{endDate}::date+1
+
+ and doc_no like '%'||#{reportOrgan}||'%'
+
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)
-
+ and (ar.organ_up != 'T' or ar.organ_up is null)
+
group by ab.wrt_organ) c
on a.item_cd = c.wrt_organ
order by item_cd asc