And EXTRACT(YEAR FROM pr.wrt_dt) = #{year}::NUMERIC
And EXTRACT(MONTH FROM pr.wrt_dt) = #{month}::NUMERIC
AND caseNum = #{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}