refactor : 단속테이블 변경

main
이범준 1 year ago
parent bad8f63a82
commit d2a2e25537

@ -6,7 +6,7 @@ DELETE FROM tb_ec_ctzn_sttemnt_detail;
DELETE FROM tb_ec_ctzn_sttemnt;
DELETE FROM tb_ec_ctzn_sttemnt_answer;
DELETE FROM tb_rt_reglt;
DELETE FROM tb_crdn;
DELETE FROM tb_rt_erpp;
DELETE FROM tb_payer;
DELETE FROM tb_rt_process_sttus_change_hist;
@ -28,7 +28,7 @@ select * from tb_ec_ctzn_sttemnt_answer;
/*--------------------------------*/
SELECT * FROM tb_rt_reglt;
SELECT * FROM tb_crdn;
SELECT * FROM tb_rt_erpp;
SELECT * FROM tb_payer;
SELECT * FROM tb_rt_process_sttus_change_hist;

@ -13,7 +13,7 @@ import kr.xit.fims.framework.biz.cmm.CmmFileDTO;
public interface RtCrackdownMgtMapper {
//-----------------------------------------------------
// 단속 : tb_rt_reglt
// 단속 : tb_crdn
//-----------------------------------------------------
List<RtDTO.Reglt> selectRtReglts(final Map<String,Object> paraMap, final RowBounds rowBounds);

@ -12,7 +12,7 @@ import kr.xit.fims.framework.core.utils.XitCmmnUtil;
public interface RtCrackdownMgtService {
//-----------------------------------------------------
// 단속 : tb_rt_reglt
// 단속 : tb_crdn
//-----------------------------------------------------
List<RtDTO.Reglt> findRtReglts(final Map<String,Object> paraMap, final RowBounds rowBounds);

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

@ -205,7 +205,7 @@
<insert id="insertRtRegltFromCtznStmt">
/* ec-ctzn-sttemnt-mysql-mapper|insertRtRegltFromCtznStmt-시민신고 단속 생성|julim */
INSERT INTO tb_rt_reglt (
INSERT INTO tb_crdn (
crdn_id
, sgg_cd
, sys_se_cd

@ -137,7 +137,7 @@
<insert id="insertRtRegltFromEcExtrRegltCntc">
/* ec-extrl-reglt-cntc-mysql-mapper|insertRtRegltFromEcExtrRegltCntc-외부연계 단속 자료 생성|julim */
INSERT INTO tb_rt_reglt (
INSERT INTO tb_crdn (
crdn_id
, sgg_cd
, sys_se_cd

@ -4,7 +4,7 @@
<mapper namespace="kr.xit.fims.biz.rt.dao.RtCrackdownMgtMapper">
<!-- *************************************************************************************************************
* tb_rt_reglt : 단속
* tb_crdn : 단속
************************************************************************************************************** -->
<sql id="sqlRtReglt">
SELECT trr.crdn_id
@ -47,7 +47,7 @@
, trr.rgtr
, trr.mdfcn_dt
, trr.mdfr
FROM tb_rt_reglt trr
FROM tb_crdn trr
</sql>
<!--
/* TODO : 차적조회를 안하고 바로 자료 전송 하여 rtpyr를 알수 없음
@ -106,7 +106,7 @@
<insert id="insertRtReglt">
/* rt-reglt-and-erpp-mysql-mapper|insertRtReglt-단속 정보 등록|julim */
insert into tb_rt_reglt(
insert into tb_crdn(
crdn_id
, sgg_cd
, sys_se_cd
@ -149,7 +149,7 @@
<update id="updateRtReglt">
/* rt-reglt-and-erpp-mysql-mapper|updateRtReglt-단속 정보 변경|julim */
UPDATE tb_rt_reglt
UPDATE tb_crdn
SET crdn_se_cd = IF(crdn_se_cd = #{crdnSeCd}, crdn_se_cd, #{crdnSeCd})
, crdn_inpt_se_cd = IF(crdn_inpt_se_cd = #{crdnInptSeCd}, crdn_inpt_se_cd, #{crdnInptSeCd})
, crdn_plc = IF(crdn_plc = #{crdnPlc}, crdn_plc, #{crdnPlc})
@ -169,7 +169,7 @@
<delete id="deleteRtReglt">
/* rt-reglt-and-erpp-mysql-mapper|deleteRtReglt-단속 정보 삭제|julim */
DELETE
FROM tb_rt_reglt
FROM tb_crdn
WHERE crdn_id = #{crdnId}
</delete>

Loading…
Cancel
Save