where status <> 'DST008'
and case_agency = #{caseAgency}
and case_police_officer like '%'||#{casePoliceOfficer}||'%'
and crackdown_police = #{crackdownPolice}
and crackdown_boat = #{crackdownBoat}
and case_num like '%'||#{caseNum}||'%'
and mmsi like '%'||#{mmsi}||'%'
and (napo_sea_point_lon like '%'||#{napoPoint}||'%'
or napo_sea_point_lat like '%'||#{napoPoint}||'%'
or napo_sea_point_detail like '%'||#{napoPoint}||'%')
and napo_dt >= #{startDate}::date
and napo_dt <= #{endDate}::date
and wrt_dt >= #{startDate}::date
and wrt_dt <= #{endDate}::date
and case_agency in
#{organCd}
and case_agency = #{viewOrgan}
where a.status <> 'DST008'
and b.case_num like '%'||#{caseNum}||'%'
and a.permit_num like '%'||#{permitNum}||'%'
and (a.boat_nny_sung like '%'||#{boatNny}||'%' or a.boat_nny_si like '%'||#{boatNny}||'%')
and (a.boat_name_kr like '%'||#{boatName}||'%' or a.boat_name_cn like '%'||#{boatName}||'%')
and a.boat_material = #{boatMaterial}
and a.fishery_type = #{fisheryType}
and a.payment_payment_dt >= #{startDate}::date
and a.payment_payment_dt <= #{endDate}::date+1
and a.wrt_dt >= #{startDate}::date
and a.wrt_dt <= #{endDate}::date+1
and b.case_agency in
#{organCd}
and b.case_agency = #{viewOrgan}
where a.status <> 'DST008'
and c.case_num like '%'||#{caseNum}||'%'
and (b.boat_name_kr like '%'||#{boatName}||'%' or b.boat_name_cn like '%'||#{boatName}||'%')
and a.process_status = #{processStatus}
and a.is_ivsgt_stop = #{isIvsgtStop}
and a.sentencing_court like '%'||#{sentencingCourt}||'%'
and a.sentencing_detail like '%'||#{sentencingDetail}||'%'
and c.napo_dt >= #{startDate}::date
and c.napo_dt <= #{endDate}::date
and a.wrt_dt >= #{startDate}::date
and a.wrt_dt <= #{endDate}::date+1
and c.case_agency in
#{organCd}
and c.case_agency = #{viewOrgan}
where iss.status <> 'DST008'
and ci.case_num like '%'||#{caseNum}||'%'
and (isi.boat_name_kr like '%'||#{boatName}||'%'
or isi.boat_name_cn like '%'||#{boatName}||'%')
and (iss.sailorName_kr like '%'||#{sailorName}||'%'
or iss.sailorName_cn like '%'||#{sailorName}||'%')
and iss.position = #{position}
and iss.career = #{career}
and iss.similar_criminal_history = #{similarCriminalHistory}
and iss.heterogeneous_criminal_history = #{heterogeneousCriminalHistory}
and iss.arrest_history = #{arrestHistory}
and iss.birthdate >= #{startDate}::date
and iss.birthdate <= #{endDate}::date
and iss.wrt_dt >= #{startDate}::date
and iss.wrt_dt <= #{endDate}::date+1
and ci.case_agency in
#{organCd}
and ci.case_agency = #{viewOrgan}