114 lines
4.5 KiB
XML
114 lines
4.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.CrackdownStatusMapper">
|
|
<sql id="selectCrackdownStatusListWhere">
|
|
<where>
|
|
|
|
</where>
|
|
</sql>
|
|
|
|
<select id="selectCrackdownStatusList" resultType="CrackdownStatus" parameterType="CrackdownStatus">
|
|
SELECT
|
|
cs.cds_key
|
|
, cs.case_num
|
|
, cs.napo_dt
|
|
, cs.napo_sea_point_lon
|
|
, cs.napo_sea_point_lat
|
|
, cs.napo_sea_point_detail
|
|
, cs.invasion_type
|
|
, cs.nll
|
|
, cs.case_agency
|
|
, cs.case_police_officer
|
|
, cs.crackdown_boat
|
|
, cs.crackdown_police
|
|
, cs.mmsi
|
|
, cs.field_ivsgt
|
|
, cs.obstr_exspd_cnt
|
|
, cs.person_damage_cnt
|
|
, cs.person_damage_amount
|
|
, cs.person_damage_detail
|
|
, cs.material_damage_cnt
|
|
, cs.material_damage_amount
|
|
, cs.material_damage_detail
|
|
, cs.field_ivsgt_napo_dt
|
|
, cs.field_ivsgt_release_dt
|
|
, cs.field_ivsgt_time_taken
|
|
, cs.pressurized_start_dt
|
|
, cs.pressurized_end_dt
|
|
, cs.distance
|
|
, cs.wrt_organ
|
|
, cs.wrt_user_seq
|
|
, cs.wrt_user_nm
|
|
, cs.wrt_dt
|
|
, fb.fb_key
|
|
, fb.boat_name_kr
|
|
, fb.boat_name_cn
|
|
, fb.ton_cnt
|
|
, fb.fishery_type
|
|
, fb.boat_material
|
|
, fb.boat_nny_sung
|
|
, fb.boat_nny_si
|
|
, fb.offense_quantity
|
|
, fb.offense_amount
|
|
, fb.offense_illegal_waste_quantity
|
|
, fb.dambo_unpaid_amount
|
|
, fb.dambo_payment
|
|
, fb.payment_payment_dt
|
|
, fb.confiscation_frame
|
|
, fb.confiscation_width
|
|
, fb.confiscation_jo
|
|
, fb.confiscation_gae
|
|
, fb.confiscation_etc
|
|
, fb.catch_fish_species
|
|
, fb.catch_cnt
|
|
, fb.offense_fish_species
|
|
, fb.offense_catch_cnt
|
|
, fb.save_yn
|
|
, pr.pr_key
|
|
, pr.process_status
|
|
, pr.eviction_dt
|
|
, pr.direct_handover_dt
|
|
, pr.handover_sea_point_lon
|
|
, pr.handover_sea_point_lat
|
|
, pr.handover_sea_point_detail
|
|
, pr.handover_boat
|
|
, pr.middle_takeover_boat
|
|
, pr.consignment_start_dt
|
|
, pr.consignment_end_dt
|
|
, pr.confiscation_dt
|
|
, pr.boat_disposal_dt
|
|
, pr.boat_disposal_type
|
|
, pr.return_dt
|
|
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.is_restriction = 'Y' AND s.position != 'POS004') AS restrictionTotal
|
|
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.is_restriction = 'N' AND s.position != 'POS004') AS notRestrictionTotal
|
|
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.position = 'POS001' AND s.is_restriction = 'Y') AS restrictionCaptin
|
|
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.position = 'POS001' AND s.is_restriction = 'Y') AS notRestrictionCaptin
|
|
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.position = 'POS002' AND s.is_restriction = 'Y') AS restrictionMate
|
|
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.position = 'POS003' AND s.is_restriction = 'Y') AS restrictionWarden
|
|
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.position = 'POS002' AND s.is_restriction = 'Y') AS notRestrictionMate
|
|
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.position = 'POS003' AND s.is_restriction = 'Y') AS notRestrictionWarden
|
|
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.is_restriction = 'Y' AND (s.position = 'POS005' or s."position" = 'POS006')) AS restrictionSailor
|
|
, (SELECT count(*) FROM sailor s WHERE s.fb_key = fb.fb_key AND s.is_restriction = 'N' AND (s.position = 'POS005' or s."position" = 'POS006')) AS notRestrictionSailor
|
|
FROM crackdown_status cs
|
|
INNER JOIN fishing_boat fb
|
|
ON cs.cds_key = fb.cds_key
|
|
INNER JOIN process_result pr
|
|
ON cs.cds_key = pr.cds_key
|
|
<include refid="selectCrackdownStatusListWhere"></include>
|
|
ORDER BY cs.cds_key DESC
|
|
LIMIT #{rowCnt} OFFSET #{firstIndex}
|
|
</select>
|
|
|
|
<select id="selectCrackdownStatusListCnt" resultType="int" parameterType="CrackdownStatus">
|
|
SELECT count(*)
|
|
FROM crackdown_status cs
|
|
INNER JOIN fishing_boat fb
|
|
ON cs.cds_key = fb.cds_key
|
|
INNER JOIN process_result pr
|
|
ON cs.cds_key = pr.cds_key
|
|
<include refid="selectCrackdownStatusListWhere"></include>
|
|
</select>
|
|
</mapper> |