And EXTRACT(YEAR FROM pr.wrt_dt) = #{year}::NUMERIC And EXTRACT(MONTH FROM pr.wrt_dt) = #{month}::NUMERIC AND case_num = #{caseNum} AND nll = #{nll} AND napo_dt::DATE = #{napoDate}::DATE AND violation = #{violation} AND invasion_type = #{invasionType} AND ( napo_sea_point_detail LIKE CONCAT('%', #{napoSeaPointDetail}, '%') OR napo_sea_point_lon LIKE CONCAT('%', #{napoSeaPointDetail}, '%') OR napo_sea_point_lat LIKE CONCAT('%', #{napoSeaPointDetail}, '%') ) AND obstr_exspd_cnt = #{obstrExspdCnt} AND person_damage_cnt = #{personDamageCnt} AND person_damage_amount = #{personDamageAmount} AND person_damage_detail LIKE CONCAT('%', #{personDamageDetail}, '%') AND material_damage_cnt = #{materialDamageCnt} AND material_damage_amount = #{materialDamageAmount} AND material_damage_detail LIKE CONCAT('%', #{materialDamageDetail}, '%') AND case_agency = #{caseAgency} AND crackdown_police = #{crackdownPolice} AND crackdown_boat = #{crackdownBoat} AND mmsi LIKE CONCAT('%', #{mmsi}, '%') AND boat_name_kr LIKE CONCAT('%', #{boatNameKr}, '%') AND ton_cnt =]]> #{tonStartCnt} AND ton_cnt #{tonEndCnt} AND boat_material = #{boatMaterial} AND boat_nny_sung LIKE CONCAT('%', #{boatNnySung}, '%') AND boat_nny_si LIKE CONCAT('%', #{boatNnySi}, '%') AND sailor_name_kr LIKE CONCAT('%', #{sailorNameKr}, '%') AND fishery_type = #{fisheryType} AND catch_fish_species LIKE CONCAT('%', #{catchFishSpecies}, '%') AND catch_cnt = #{catchCnt} AND offense_fish_species LIKE CONCAT('%', #{offenseFishSpecies}, '%') AND offense_catch_cnt = #{offenseCatchCnt} AND offense_illegal_waste_quantity = #{offenseIllegalWasteQuantity} AND offense_quantity = #{offenseQuantity} AND offense_amount = #{offenseAmount} AND process_status = #{processStatus} AND dambo_payment = #{damboPayment} AND payment_payment_dt::DATE = #{paymentPaymentDate}::DATE AND dambo_unpaid_amount = #{damboUnpaidAmount} AND ( dambo_unpaid_amount IS NOT NULL AND dambo_unpaid_amount > 0 ) AND ( direct_handover_dt IS NULL OR dambo_unpaid_amount = 0 ) AND direct_handover_dt IS NOT NULL AND direct_handover_dt IS NULL AND eviction_dt IS NOT NULL AND eviction_dt IS NULL AND return_dt IS NOT NULL AND return_dt IS NULL AND consignment_start_dt = #{consignmentStartDate}::DATE AND consignment_end_dt = #{consignmentEndDate}::DATE AND confiscation_dt IS NOT NULL AND confiscation_dt IS NULL AND consignment_start_dt IS NOT NULL AND consignment_start_dt IS NULL AND boat_disposal_type = #{boatDisposalType} AND direct_handover_dt::DATE = #{directHandoverDate}::DATE AND ( handover_sea_point_lat LIKE CONCAT('%', #{handoverSeaPointDetail}, '%') OR handover_sea_point_lon LIKE CONCAT('%', #{handoverSeaPointDetail}, '%') OR handover_sea_point_detail LIKE CONCAT('%', #{handoverSeaPointDetail}, '%') ) AND handover_boat LIKE CONCAT('%', #{handoverBoat}, '%') AND middle_takeover_boat LIKE CONCAT('%', #{middleTakeoverBoat}, '%') AND ( position = 'POS001' AND is_restriction = #{captin} ) AND ( position = 'POS002' AND is_restriction = #{mate} ) AND ( position = 'POS003' AND is_restriction = #{warden} ) AND field_ivsgt_napo_dt::DATE = #{fieldIvsgtNapoDate}::DATE AND field_ivsgt_release_dt::DATE = #{fieldIvsgtReleaseDate}::DATE AND distance = #{distance} AND confiscation_frame = #{confiscationFrame} AND confiscation_width = #{confiscationWidth} AND confiscation_jo = #{confiscationJo} AND confiscation_gae = #{confiscationGae} AND confiscation_etc = #{confiscationEtc} and extract(year from a.napo_dt) = ${year} and a.case_agency = #{caseAgency} and a.crackdown_police = #{crackdownPolice} and a.crackdown_boat = #{crackdownBoat} and b.boat_name_kr like '%'||#{boatNameKr}||'%' and b.boat_nny_sung like '%'||#{boatNnySung}||'%' and b.boat_nny_si like '%'||#{boatNnySi}||'%' and b.boat_material = #{boatMaterial} and b.fishery_type = #{fisheryType} and c.process_status = #{processStatus} and b.ton_cnt >= #{tonMin} and b.ton_cnt <= #{tonMax} and e.violationCode like '%'||#{violation}||'%' and a.napo_dt >= #{startDate}::date and a.napo_dt <= #{endDate}::date+1 and c.eviction_dt >= #{startDate}::date and c.eviction_dt <= #{endDate}::date+1 and c.direct_handover_dt >= #{startDate}::date and c.direct_handover_dt <= #{endDate}::date+1 and c.consignment_dt >= #{startDate}::date and c.consignment_dt <= #{endDate}::date+1 and c.confiscation_dt >= #{startDate}::date and c.confiscation_dt <= #{endDate}::date+1 and c.boat_disposal_dt >= #{startDate}::date and c.boat_disposal_dt <= #{endDate}::date+1 and c.return_dt >= #{startDate}::date and c.return_dt <= #{endDate}::date+1 and a.wrt_dt >= #{startDate}::date and a.wrt_dt <= #{endDate}::date+1