|
|
@ -3,7 +3,7 @@
|
|
|
|
<mapper namespace="kr.xit.fims.biz.cmm.dao.FimsCrackdownMgtMapper">
|
|
|
|
<mapper namespace="kr.xit.fims.biz.cmm.dao.FimsCrackdownMgtMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<!-- *************************************************************************************************************
|
|
|
|
<!-- *************************************************************************************************************
|
|
|
|
* tb_rt_reglt : 단속
|
|
|
|
* tb_crdn : 단속
|
|
|
|
************************************************************************************************************** -->
|
|
|
|
************************************************************************************************************** -->
|
|
|
|
<sql id="sqlRtReglt">
|
|
|
|
<sql id="sqlRtReglt">
|
|
|
|
SELECT trr.crdn_id
|
|
|
|
SELECT trr.crdn_id
|
|
|
@ -62,13 +62,13 @@
|
|
|
|
, trp.stdg_cd -- 법정동 코드
|
|
|
|
, trp.stdg_cd -- 법정동 코드
|
|
|
|
, IF(trr.crdn_se_cd = '09', tecsd.violt_dtls_nm, teerc.violt_dtls_nm) AS violtDtlsNm -- 위반내용
|
|
|
|
, IF(trr.crdn_se_cd = '09', tecsd.violt_dtls_nm, teerc.violt_dtls_nm) AS violtDtlsNm -- 위반내용
|
|
|
|
, (SELECT COUNT(crdn_id)
|
|
|
|
, (SELECT COUNT(crdn_id)
|
|
|
|
FROM tb_rt_reglt tgt
|
|
|
|
FROM tb_crdn tgt
|
|
|
|
WHERE tgt.vhrno = trr.vhrno
|
|
|
|
WHERE tgt.vhrno = trr.vhrno
|
|
|
|
AND NOT NULLIF(trr.vhrno, '') IS NULL) AS vhrnoCnt
|
|
|
|
AND NOT NULLIF(trr.vhrno, '') IS NULL) AS vhrnoCnt
|
|
|
|
, (SELECT COUNT(cmplt_id)
|
|
|
|
, (SELECT COUNT(cmplt_id)
|
|
|
|
FROM tb_ec_ctzn_sttemnt_cmplt tgt
|
|
|
|
FROM tb_ec_ctzn_sttemnt_cmplt tgt
|
|
|
|
WHERE EXISTS(SELECT 1
|
|
|
|
WHERE EXISTS(SELECT 1
|
|
|
|
FROM tb_rt_reglt
|
|
|
|
FROM tb_crdn
|
|
|
|
WHERE tgt.crdn_id = crdn_id
|
|
|
|
WHERE tgt.crdn_id = crdn_id
|
|
|
|
AND NOT NULLIF(rtpyr_id, '') IS NULL
|
|
|
|
AND NOT NULLIF(rtpyr_id, '') IS NULL
|
|
|
|
AND rtpyr_id = trr.rtpyr_id
|
|
|
|
AND rtpyr_id = trr.rtpyr_id
|
|
|
@ -80,7 +80,7 @@
|
|
|
|
) AS minwonCnt
|
|
|
|
) AS minwonCnt
|
|
|
|
, trr.mdfcn_dt -- 최종처리일시
|
|
|
|
, trr.mdfcn_dt -- 최종처리일시
|
|
|
|
, trr.mdfr -- 최종 처리자
|
|
|
|
, trr.mdfr -- 최종 처리자
|
|
|
|
FROM tb_rt_reglt trr
|
|
|
|
FROM tb_crdn trr
|
|
|
|
LEFT JOIN tb_ec_extrl_reglt_cntc teerc
|
|
|
|
LEFT JOIN tb_ec_extrl_reglt_cntc teerc
|
|
|
|
ON trr.crdn_id = teerc.crdn_id
|
|
|
|
ON trr.crdn_id = teerc.crdn_id
|
|
|
|
LEFT JOIN tb_ec_ctzn_sttemnt_detail tecsd
|
|
|
|
LEFT JOIN tb_ec_ctzn_sttemnt_detail tecsd
|
|
|
@ -182,13 +182,13 @@
|
|
|
|
<select id="selectRegltSts" resultType="string">
|
|
|
|
<select id="selectRegltSts" resultType="string">
|
|
|
|
/* cmm-fims-crackdown-mysql-mapper|selectRegltSts-현재 단속 진행 상태 조회|julim */
|
|
|
|
/* cmm-fims-crackdown-mysql-mapper|selectRegltSts-현재 단속 진행 상태 조회|julim */
|
|
|
|
SELECT crdn_stts_cd
|
|
|
|
SELECT crdn_stts_cd
|
|
|
|
FROM tb_rt_reglt
|
|
|
|
FROM tb_crdn
|
|
|
|
WHERE crdn_id = #{crdnId}
|
|
|
|
WHERE crdn_id = #{crdnId}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateRtReglt">
|
|
|
|
<update id="updateRtReglt">
|
|
|
|
/* cmm-fims-crackdown-mysql-mapper|updateRtReglt-단속 정보 초기 자료 반영|julim */
|
|
|
|
/* cmm-fims-crackdown-mysql-mapper|updateRtReglt-단속 정보 초기 자료 반영|julim */
|
|
|
|
UPDATE tb_rt_reglt
|
|
|
|
UPDATE tb_crdn
|
|
|
|
SET crdn_se_cd = IF(crdn_se_cd = #{crdnSeCd}, crdn_se_cd, #{crdnSeCd})
|
|
|
|
SET crdn_se_cd = IF(crdn_se_cd = #{crdnSeCd}, crdn_se_cd, #{crdnSeCd})
|
|
|
|
, crdn_reg_se_cd = IF(crdn_reg_se_cd = #{crdnRegSeCd}, crdn_reg_se_cd, #{crdnRegSeCd})
|
|
|
|
, crdn_reg_se_cd = IF(crdn_reg_se_cd = #{crdnRegSeCd}, crdn_reg_se_cd, #{crdnRegSeCd})
|
|
|
|
, sys_se_cd = IF(sys_se_cd = #{sysSeCd}, sys_se_cd, #{sysSeCd})
|
|
|
|
, sys_se_cd = IF(sys_se_cd = #{sysSeCd}, sys_se_cd, #{sysSeCd})
|
|
|
@ -208,8 +208,6 @@
|
|
|
|
, violt_dtls_code = IF(violt_dtls_code = #{violtDtlsCode}, violt_dtls_code, #{violtDtlsCode})
|
|
|
|
, violt_dtls_code = IF(violt_dtls_code = #{violtDtlsCode}, violt_dtls_code, #{violtDtlsCode})
|
|
|
|
, crdn_stts_cd = IF(crdn_stts_cd = #{crdnSttsCd}, crdn_stts_cd, #{crdnSttsCd})
|
|
|
|
, crdn_stts_cd = IF(crdn_stts_cd = #{crdnSttsCd}, crdn_stts_cd, #{crdnSttsCd})
|
|
|
|
, rtpyr_id = IF(rtpyr_id = #{rtpyrId}, rtpyr_id, #{rtpyrId})
|
|
|
|
, rtpyr_id = IF(rtpyr_id = #{rtpyrId}, rtpyr_id, #{rtpyrId})
|
|
|
|
, enlight_process_de = IF(enlight_process_de = #{enlightProcessDe}, enlight_process_de, #{enlightProcessDe})
|
|
|
|
|
|
|
|
, enlight_resn_code = IF(enlight_resn_code = #{enlightResnCode}, enlight_resn_code, #{enlightResnCode})
|
|
|
|
|
|
|
|
, mdfcn_dt = DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
|
|
|
|
, mdfcn_dt = DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
|
|
|
|
, mdfr = #{mdfr}
|
|
|
|
, mdfr = #{mdfr}
|
|
|
|
WHERE crdn_id = #{crdnId}
|
|
|
|
WHERE crdn_id = #{crdnId}
|
|
|
@ -217,7 +215,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateProcessStsAndProcessDtRtReglt">
|
|
|
|
<update id="updateProcessStsAndProcessDtRtReglt">
|
|
|
|
/* cmm-fims-crackdown-mysql-mapper|updateProcessStsAndProcessDtRtReglt-단속 상태와 최종처리일 변경|julim */
|
|
|
|
/* cmm-fims-crackdown-mysql-mapper|updateProcessStsAndProcessDtRtReglt-단속 상태와 최종처리일 변경|julim */
|
|
|
|
UPDATE tb_rt_reglt
|
|
|
|
UPDATE tb_crdn
|
|
|
|
SET crdn_stts_cd = IF(crdn_stts_cd = #{crdnSttsCd}, crdn_stts_cd, #{crdnSttsCd})
|
|
|
|
SET crdn_stts_cd = IF(crdn_stts_cd = #{crdnSttsCd}, crdn_stts_cd, #{crdnSttsCd})
|
|
|
|
, mdfcn_dt = DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
|
|
|
|
, mdfcn_dt = DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
|
|
|
|
, mdfr = #{mdfr}
|
|
|
|
, mdfr = #{mdfr}
|
|
|
@ -436,7 +434,7 @@
|
|
|
|
WHERE gubun = #{gubun}
|
|
|
|
WHERE gubun = #{gubun}
|
|
|
|
<if test='gubun eq "0"'>
|
|
|
|
<if test='gubun eq "0"'>
|
|
|
|
AND EXISTS (SELECT 1
|
|
|
|
AND EXISTS (SELECT 1
|
|
|
|
FROM tb_rt_reglt
|
|
|
|
FROM tb_crdn
|
|
|
|
WHERE tecsc.crdn_id = crdn_id
|
|
|
|
WHERE tecsc.crdn_id = crdn_id
|
|
|
|
AND rtpyr_id = #{rtpyrId}
|
|
|
|
AND rtpyr_id = #{rtpyrId}
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -450,7 +448,7 @@
|
|
|
|
<select id="selectCrackdownVhrnoCnt" resultType="int">
|
|
|
|
<select id="selectCrackdownVhrnoCnt" resultType="int">
|
|
|
|
/* cmm-fims-crackdown-mysql-mapper|selectCrackdownVhrnoCnt-단속횟수 조회|julim */
|
|
|
|
/* cmm-fims-crackdown-mysql-mapper|selectCrackdownVhrnoCnt-단속횟수 조회|julim */
|
|
|
|
SELECT COUNT(crdn_id)
|
|
|
|
SELECT COUNT(crdn_id)
|
|
|
|
FROM tb_rt_reglt trr
|
|
|
|
FROM tb_crdn trr
|
|
|
|
WHERE trr.vhrno = #{vhrno}
|
|
|
|
WHERE trr.vhrno = #{vhrno}
|
|
|
|
AND NOT NULLIF(#{vhvle_no}, '') IS NULL
|
|
|
|
AND NOT NULLIF(#{vhvle_no}, '') IS NULL
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
@ -477,7 +475,7 @@
|
|
|
|
, '' AS vhrnoY -- 자동차등록번호판위치 Y축
|
|
|
|
, '' AS vhrnoY -- 자동차등록번호판위치 Y축
|
|
|
|
, trr.atch_file_cnt -- 사진갯수
|
|
|
|
, trr.atch_file_cnt -- 사진갯수
|
|
|
|
, 'jpg' AS fileExtsn -- 확장자
|
|
|
|
, 'jpg' AS fileExtsn -- 확장자
|
|
|
|
FROM tb_rt_reglt trr
|
|
|
|
FROM tb_crdn trr
|
|
|
|
JOIN tb_ec_extrl_reglt_cntc teerc
|
|
|
|
JOIN tb_ec_extrl_reglt_cntc teerc
|
|
|
|
ON trr.crdn_id = teerc.crdn_id
|
|
|
|
ON trr.crdn_id = teerc.crdn_id
|
|
|
|
WHERE trr.crdn_id = #{crdnId}
|
|
|
|
WHERE trr.crdn_id = #{crdnId}
|
|
|
|