127 lines
3.8 KiB
XML
127 lines
3.8 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.AsfCovMapper">
|
|
|
|
<sql id="selectAsfCovListWhere">
|
|
<where>
|
|
a.content_status <> 'DST008'
|
|
<if test='majorType != null and majorType != ""'>
|
|
and a.major_type = #{majorType}
|
|
</if>
|
|
<if test='wrtOrgan != null and wrtOrgan != ""'>
|
|
and a.wrt_organ = #{wrtOrgan}
|
|
</if>
|
|
<if test="contentTitle != null and contentTitle != ''">
|
|
AND a.content_title LIKE CONCAT('%', #{contentTitle}, '%')
|
|
</if>
|
|
<if test="wrtUserNm != null and wrtUserNm != ''">
|
|
AND a.wrt_user_nm LIKE CONCAT('%', #{wrtUserNm}, '%')
|
|
</if>
|
|
<if test='startDate != null and startDate != ""'>
|
|
and a.wrt_dt >= #{startDate}::date
|
|
</if>
|
|
<if test='endDate != null and endDate != ""'>
|
|
and a.wrt_dt <= #{endDate}::date+1
|
|
</if>
|
|
|
|
and a.wrt_organ in
|
|
<foreach collection="downOrganCdList" item="organCd" separator="," open="(" close=")">
|
|
#{organCd}
|
|
</foreach>
|
|
|
|
</where>
|
|
</sql>
|
|
|
|
|
|
<select id="selectAsfCovList" resultType="AsfCov" parameterType="AsfCov">
|
|
select a.asfcov_key,
|
|
a.version_no,
|
|
a.cds_key,
|
|
a.person_cnt,
|
|
a.pressurized_yn,
|
|
a.pressurized_n,
|
|
a.person_positive_cnt,
|
|
a.person_negative_cnt,
|
|
a.asfcov_action_detail,
|
|
a.wrt_user_grd,
|
|
a.wrt_user_seq,
|
|
a.wrt_user_nm,
|
|
a.wrt_dt,
|
|
a.wrt_organ,
|
|
a.wrt_part,
|
|
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
|
|
, 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
|
|
|
|
FROM asfcov_status a
|
|
INNER JOIN crackdown_status cs
|
|
ON a.cds_key = cs.cds_key
|
|
|
|
INNER JOIN fishing_boat fb
|
|
ON a.cds_key = fb.cds_key
|
|
|
|
<!-- <include refid="selectAsfCovListWhere"></include>-->
|
|
order by a.asfcov_key desc
|
|
limit #{rowCnt} offset #{firstIndex}
|
|
</select>
|
|
|
|
<select id="selectAsfCovListCnt" resultType="int" parameterType="AsfCov">
|
|
select count(*)
|
|
from asfcov_status
|
|
<include refid="selectAsfCovListWhere"></include>
|
|
</select>
|
|
|
|
|
|
|
|
</mapper> |