where status <> 'DST008' and case_agency = #{caseAgency} and crackdown_boat = #{crackdownBoat} and (napo_sea_point_lon like '%'||#{searchKeyword}||'%' or napo_sea_point_lat like '%'||#{searchKeyword}||'%' or napo_sea_point_detail like '%'||#{searchKeyword}||'%' or case_police_officer like '%'||#{searchKeyword}||'%' or case_num like '%'||#{searchKeyword}||'%' or person_damage_detail like '%'||#{searchKeyword}||'%' or material_damage_detail like '%'||#{searchKeyword}||'%' or catch_fish_species like '%'||#{searchKeyword}||'%') 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} or wrt_user_seq = #{viewUserSeq} ) and (case_agency = #{viewOrgan} or wrt_user_seq = #{viewUserSeq}) where a.status <> 'DST008' and (a.boat_name_kr like '%'||#{boatName}||'%' or a.boat_name_cn like '%'||#{boatName}||'%') and (a.boat_nny_sung like '%'||#{searchKeyword}||'%' or a.boat_nny_si like '%'||#{searchKeyword}||'%' or a.nationality like '%'||#{searchKeyword}||'%' or a.offense_type like '%'||#{searchKeyword}||'%' or b.case_num like '%'||#{searchKeyword}||'%') and a.deposit_payment_dt >= #{startDate}::date and a.deposit_payment_dt <= #{endDate}::date+1 and a.wrt_dt >= #{startDate}::date and a.wrt_dt <= #{endDate}::date+1 and (b.case_agency in #{organCd} or a.wrt_user_seq = #{viewUserSeq} ) and (b.case_agency = #{viewOrgan} or a.wrt_user_seq = #{viewUserSeq}) where a.status <> 'DST008' 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_detail like '%'||#{searchKeyword}||'%' or a.sentencing_court like '%'||#{searchKeyword}||'%' or c.case_num like '%'||#{searchKeyword}||'%' or a.handover_boat like '%'||#{searchKeyword}||'%' or a.middle_takeover_boat like '%'||#{searchKeyword}||'%') 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} or a.wrt_user_seq = #{viewUserSeq} ) and (c.case_agency = #{viewOrgan} or a.wrt_user_seq = #{viewUserSeq}) 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} or iss.wrt_user_seq = #{viewUserSeq} ) and (ci.case_agency = #{viewOrgan} or iss.wrt_user_seq = #{viewUserSeq})