and wrt_user_nm like '%'||#{userNm}||'%' and wrt_dt >= #{startDate}::date and wrt_dt <= #{endDate}::date+1 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 #{item} and ar2.organ_up = 'T' and oc2.organ_type in #{item} ) and item_cd in #{item} and item_cd not in (select item_cd from code_mgt where category_cd = 'DC01') and item_cd in #{item} and item_cd not in (select item_cd from code_mgt where category_cd = 'DC02') and item_cd in #{item} and item_cd not in (select item_cd from code_mgt where category_cd = 'DC03') and item_cd in #{item} and item_cd not in (select item_cd from code_mgt where category_cd = 'DC04') and wrt_user_nm like '%'||#{userNm}||'%' and wrt_dt >= #{startDate}::date and wrt_dt <= #{endDate}::date+1 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 #{item} and ar2.organ_up = 'T' and oc2.organ_type in #{item} ) and affair_type1 in #{item} and affair_type2 in #{item} and affair_type3 in #{item} and affair_type4 in #{item} and user_status = #{userStatus} and user_status in ('USC003', 'USC007') and user_nm like '%'||#{userNm}||'%' and og_cd in #{item} and aa.wrt_dt >= #{startDate}::date and aa.wrt_dt <= #{endDate}::date+1 and ab.affair_rate in #{item} and aa.affair_type1 in #{item} and aa.affair_type2 in #{item} and aa.affair_type3 in #{item} and aa.affair_type4 in #{item} and aa.affair_key in ( select aaa.affair_key from affair_rating aaa inner join organ_config aab on aaa.rating_organ = aab.organ_cd where aaa.organ_up = 'T' and aab.organ_type in #{item} )