81 lines
2.6 KiB
XML
81 lines
2.6 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.faStatistics.internationalCrimeArrest.mapper.InternationalCrimeArrestMapper">
|
||
|
|
<sql id="selectInternationalCrimeArrestListWhere">
|
||
|
|
<where>
|
||
|
|
<if test='wrtOrgan != null and wrtOrgan != ""'>
|
||
|
|
AND a.wrt_organ = #{wrtOrgan}
|
||
|
|
</if>
|
||
|
|
<if test='dateSelector == "wrtDt"'>
|
||
|
|
<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>
|
||
|
|
</if>
|
||
|
|
</where>
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectInternationalCrimeArrestList" resultType="InternationalCrimeArrest" parameterType="InternationalCrimeArrest">
|
||
|
|
SELECT
|
||
|
|
i.ica_key,
|
||
|
|
i.organ,
|
||
|
|
i.department,
|
||
|
|
i.crime_type,
|
||
|
|
i.violation_type,
|
||
|
|
i.crime_name,
|
||
|
|
i.smuggling_amount,
|
||
|
|
i.occur_table,
|
||
|
|
i.arrest_table,
|
||
|
|
i.suspect_table,
|
||
|
|
i.crime_awareness_dt,
|
||
|
|
i.case_sent_dt,
|
||
|
|
i.process_result,
|
||
|
|
i.other_crime,
|
||
|
|
i.case_num,
|
||
|
|
i.case_overview,
|
||
|
|
i.arrest_area,
|
||
|
|
i.means,
|
||
|
|
i.purpose,
|
||
|
|
i.smuggled_goods,
|
||
|
|
i.crackdown_personel,
|
||
|
|
i.violation_amount,
|
||
|
|
i.destination,
|
||
|
|
i.content_status,
|
||
|
|
i.wrt_organ,
|
||
|
|
i.wrt_user_seq,
|
||
|
|
i.wrt_nm,
|
||
|
|
i.wrt_dt
|
||
|
|
FROM international_crime_arrest i
|
||
|
|
<include refid="selectInternationalCrimeArrestListWhere"></include>
|
||
|
|
ORDER BY i.ica_key DESC
|
||
|
|
LIMIT #{rowCnt} OFFSET #{firstIndex}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectInternationalCrimeArrestListCnt" resultType="int" parameterType="InternationalCrimeArrest">
|
||
|
|
SELECT count(*)
|
||
|
|
FROM international_crime_arrest
|
||
|
|
<include refid="selectInternationalCrimeArrestListWhere"></include>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectSuspectPersonInfoList" resultType="SuspectPersonInfo" parameterType="int">
|
||
|
|
SELECT
|
||
|
|
s.spi_key,
|
||
|
|
s.ica_key,
|
||
|
|
s.sex,
|
||
|
|
s.age,
|
||
|
|
s.country,
|
||
|
|
s.stay_qualification,
|
||
|
|
s.stay_period_expired_dt,
|
||
|
|
s.entry_visa,
|
||
|
|
s.crime_form
|
||
|
|
FROM suspect_person_info s
|
||
|
|
INNER JOIN international_crime_arrest i
|
||
|
|
ON s.ica_key = i.ica_key
|
||
|
|
WHERE s.ica_key = #{icaKey}
|
||
|
|
</select>
|
||
|
|
</mapper>
|