diff --git a/src/main/resources/sql/mapper/biz/cmm/cmm-fims-crackdown-mysql-mapper.xml b/src/main/resources/sql/mapper/biz/cmm/cmm-fims-crackdown-mysql-mapper.xml index a58619f8..cdd57aef 100644 --- a/src/main/resources/sql/mapper/biz/cmm/cmm-fims-crackdown-mysql-mapper.xml +++ b/src/main/resources/sql/mapper/biz/cmm/cmm-fims-crackdown-mysql-mapper.xml @@ -6,50 +6,50 @@ * tb_crdn : 단속 ************************************************************************************************************** --> - SELECT trr.crdn_id - , trr.rtpyr_id -- 납부자ID - , trr.sgg_cd -- 기관코드 - , trr.sys_se_cd -- 시스템코드 - , trr.crdn_se_cd -- 단속구분코드 - , trr.crdn_inpt_se_cd -- 입력구분코드 - , trr.crdn_ymd - , trr.crdn_bgng_tm -- 단속시작시간 - , trr.crdn_end_hr -- 단속종료시간 + SELECT tc.crdn_id + , tc.rtpyr_id -- 납부자ID + , tc.sgg_cd -- 기관코드 + , tc.sys_se_cd -- 시스템코드 + , tc.crdn_se_cd -- 단속구분코드 + , tc.crdn_inpt_se_cd -- 입력구분코드 + , tc.crdn_ymd + , tc.crdn_bgng_tm -- 단속시작시간 + , tc.crdn_end_hr -- 단속종료시간 , '' AS violt_lrg_code -- 위반 법규 코드 , '' AS violt_dtls_code -- 위반내역코드 , '' AS violt_dtls_etc_cn -- 위반내역 기타 내용 - , trr.crdn_plc -- 위반장소 - , trr.vltn_nmtm -- 위반횟수 - , trr.crdn_stdg_nm -- 위반법정동명 - , trr.gps_x - , trr.gps_y - , trr.towng_yn -- 견인여부 코드 - , trr.crdn_sn -- 스티커 번호 - , trr.atch_file_cnt -- 이미지매수 - , trr.minus_amt -- 감경금액 + , tc.crdn_plc -- 위반장소 + , tc.vltn_nmtm -- 위반횟수 + , tc.crdn_stdg_nm -- 위반법정동명 + , tc.gps_x + , tc.gps_y + , tc.towng_yn -- 견인여부 코드 + , tc.crdn_sn -- 스티커 번호 + , tc.atch_file_cnt -- 이미지매수 + , tc.minus_amt -- 감경금액 , 0 AS redution_aft_amount -- 감경후 금액 - , trr.rcvmt_amt -- 수납금액 + , tc.rcvmt_amt -- 수납금액 , 0 AS rdcamt -- 감액 - , trr.adtn_amt -- 가산금 - , trr.vhrno -- 차량번호 - , trr.vhcl_nm -- 차량명 - , trr.carmdl_clsf_nm -- 차종분류명 - , trr.carmdl_asort_nm -- 차종종별명 - , trr.ffnlg_carmdl_cd -- 과태료차종코드 - , trr.vin -- 차대번호 - , trr.etc_cn -- 특기사항 - , trr.crdn_sparea_cd -- 단속특별구역코드 - , trr.crdn_stts_cd - , trr.crdn_reg_se_cd -- 등록구분 - , CONCAT(trr.crdn_ymd, trr.crdn_bgng_tm) AS crdnYmdTime - , trr.reg_dt - , teerc.file_link_id -- CCTV data ID : 접수번호로 보여줄 것 - , tecs.cvlcpt_link_id - , tecs.cvlcpt_rcpt_no -- 접수번호 - , tecs.cvlcpt_rcpt_ymd -- 접수일자 - , tecs.cvlcpt_aplcnt_nm -- 신고자 - , tecs.cvlcpt_prcs_prnmnt_dt -- 처리기한 - , SUBSTR(tecs.cvlcpt_prcs_prnmnt_dt,1,8) AS cvlcpt_prcs_prnmnt_ymd + , tc.adtn_amt -- 가산금 + , tc.vhrno -- 차량번호 + , tc.vhcl_nm -- 차량명 + , tc.carmdl_clsf_nm -- 차종분류명 + , tc.carmdl_asort_nm -- 차종종별명 + , tc.ffnlg_carmdl_cd -- 과태료차종코드 + , tc.vin -- 차대번호 + , tc.etc_cn -- 특기사항 + , tc.crdn_sparea_cd -- 단속특별구역코드 + , tc.crdn_stts_cd + , tc.crdn_reg_se_cd -- 등록구분 + , CONCAT(tc.crdn_ymd, tc.crdn_bgng_tm) AS crdnYmdTime + , tc.reg_dt + , tcfl.file_link_id -- CCTV data ID : 접수번호로 보여줄 것 + , tcc.cvlcpt_link_id + , tcc.cvlcpt_rcpt_no -- 접수번호 + , tcc.cvlcpt_rcpt_ymd -- 접수일자 + , tcc.cvlcpt_aplcnt_nm -- 신고자 + , tcc.cvlcpt_prcs_prnmnt_dt -- 처리기한 + , SUBSTR(tcc.cvlcpt_prcs_prnmnt_dt,1,8) AS cvlcpt_prcs_prnmnt_ymd , tei.duty_id_v -- 담당자 , tei.pcd_tel_v -- 담당자 전화번호 , tre.erpp_id @@ -60,37 +60,37 @@ , trp.addr , trp.dtl_addr , trp.stdg_cd -- 법정동 코드 - , IF(trr.crdn_se_cd = '09', '', teerc.vltn_cn) AS vltnCn -- 위반내용 + , IF(tc.crdn_se_cd = '09', '', tcfl.vltn_cn) AS vltnCn -- 위반내용 , (SELECT COUNT(crdn_id) FROM tb_crdn tgt - WHERE tgt.vhrno = trr.vhrno - AND NOT NULLIF(trr.vhrno, '') IS NULL) AS vhrnoCnt + WHERE tgt.vhrno = tc.vhrno + AND NOT NULLIF(tc.vhrno, '') IS NULL) AS vhrnoCnt , (SELECT COUNT(cvlcpt_dscsn_id) FROM tb_cvlcpt_dscsn_cn tgt WHERE EXISTS(SELECT 1 FROM tb_crdn WHERE tgt.crdn_id = crdn_id AND NOT NULLIF(rtpyr_id, '') IS NULL - AND rtpyr_id = trr.rtpyr_id + AND rtpyr_id = tc.rtpyr_id ) OR ( - NOT NULLIF(trr.vhrno, '') IS NULL - AND tgt.vhrno = trr.vhrno + NOT NULLIF(tc.vhrno, '') IS NULL + AND tgt.vhrno = tc.vhrno ) ) AS minwonCnt - , trr.mdfcn_dt -- 최종처리일시 - , trr.mdfr -- 최종 처리자 - FROM tb_crdn trr - LEFT JOIN tb_crdn_file_link teerc - ON trr.link_id = teerc.file_link_id - LEFT JOIN tb_crdn_cvlcpt tecs - ON trr.link_id = tecs.cvlcpt_link_id + , tc.mdfcn_dt -- 최종처리일시 + , tc.mdfr -- 최종 처리자 + FROM tb_crdn tc + LEFT JOIN tb_crdn_file_link tcfl + ON tc.link_id = tcfl.file_link_id + LEFT JOIN tb_crdn_cvlcpt tcc + ON tc.link_id = tcc.cvlcpt_link_id LEFT JOIN tb_esb_interface tei - ON trr.link_id = tei.interface_seq_n + ON tc.link_id = tei.interface_seq_n LEFT JOIN tb_rt_erpp tre - ON trr.crdn_id = tre.crdn_id + ON tc.crdn_id = tre.crdn_id LEFT JOIN tb_payer trp - ON trr.rtpyr_id = trp.rtpyr_id + ON tc.rtpyr_id = trp.rtpyr_id @@ -102,46 +102,46 @@ - AND trr.crdn_stts_cd != '01' + AND tc.crdn_stts_cd != '01' - AND trr.crdn_stts_cd = #{crdnSttsCd} + AND tc.crdn_stts_cd = #{crdnSttsCd} - AND trr.crdn_ymd BETWEEN REPLACE(#{sch_date_from},'-','') AND REPLACE(#{sch_date_to},'-','') + AND tc.crdn_ymd BETWEEN REPLACE(#{sch_date_from},'-','') AND REPLACE(#{sch_date_to},'-','') - AND SUBSTR(trr.reg_dt,1,8) BETWEEN REPLACE(#{sch_date_from},'-','') AND REPLACE(#{sch_date_to},'-','') + AND SUBSTR(tc.reg_dt,1,8) BETWEEN REPLACE(#{sch_date_from},'-','') AND REPLACE(#{sch_date_to},'-','') - AND INSTR(trr.vhrno, #{vhrno}) > 0 + AND INSTR(tc.vhrno, #{vhrno}) > 0 - AND trr.sys_se_cd = #{sysSeCd} + AND tc.sys_se_cd = #{sysSeCd} - AND trr.crdn_se_cd = #{crdnSeCd} + AND tc.crdn_se_cd = #{crdnSeCd} - AND trr.crdn_reg_se_cd = #{crdnRegSeCd} + AND tc.crdn_reg_se_cd = #{crdnRegSeCd} - ORDER BY trr.sys_se_cd, trr.crdn_se_cd - , teerc.file_link_id - , trr.link_id - , trr.crdn_ymd, trr.vhrno, trr.crdn_bgng_tm + ORDER BY tc.sys_se_cd, tc.crdn_se_cd + , tcfl.file_link_id + , tc.link_id + , tc.crdn_ymd, tc.vhrno, tc.crdn_bgng_tm /* cmm-fims-crackdown-mysql-mapper|selectCrackdownVhrnoCnt-단속횟수 조회|julim */ SELECT COUNT(crdn_id) - FROM tb_crdn trr - WHERE trr.vhrno = #{vhrno} + FROM tb_crdn tc + WHERE tc.vhrno = #{vhrno} AND NOT NULLIF(#{vhvle_no}, '') IS NULL diff --git a/src/main/resources/sql/mapper/biz/ec/ec-ctzn-sttemnt-mysql-mapper.xml b/src/main/resources/sql/mapper/biz/ec/ec-ctzn-sttemnt-mysql-mapper.xml index 213c5a9f..397864c7 100644 --- a/src/main/resources/sql/mapper/biz/ec/ec-ctzn-sttemnt-mysql-mapper.xml +++ b/src/main/resources/sql/mapper/biz/ec/ec-ctzn-sttemnt-mysql-mapper.xml @@ -104,7 +104,7 @@ - AND tecs.cvlcpt_link_id = #{cvlcptLinkId} + AND tcc.cvlcpt_link_id = #{cvlcptLinkId} AND tc.crdn_id = #{crdnId} diff --git a/src/main/resources/sql/mapper/biz/rt/rt-reglt-and-erpp-mysql-mapper.xml b/src/main/resources/sql/mapper/biz/rt/rt-reglt-and-erpp-mysql-mapper.xml index 1ccfd1ff..1401f952 100644 --- a/src/main/resources/sql/mapper/biz/rt/rt-reglt-and-erpp-mysql-mapper.xml +++ b/src/main/resources/sql/mapper/biz/rt/rt-reglt-and-erpp-mysql-mapper.xml @@ -7,52 +7,52 @@ * tb_crdn : 단속 ************************************************************************************************************** --> - SELECT trr.crdn_id - , trr.rtpyr_id -- 납부자ID - , trr.sgg_cd -- 기관코드 - , trr.sys_se_cd -- 시스템코드 - , trr.crdn_se_cd -- 단속구분코드 - , trr.crdn_inpt_se_cd -- 입력구분코드 - , trr.crdn_ymd - , trr.crdn_bgng_tm -- 단속시작시간 - , trr.crdn_end_hr -- 단속종료시간 + SELECT tc.crdn_id + , tc.rtpyr_id -- 납부자ID + , tc.sgg_cd -- 기관코드 + , tc.sys_se_cd -- 시스템코드 + , tc.crdn_se_cd -- 단속구분코드 + , tc.crdn_inpt_se_cd -- 입력구분코드 + , tc.crdn_ymd + , tc.crdn_bgng_tm -- 단속시작시간 + , tc.crdn_end_hr -- 단속종료시간 , '' AS violt_lrg_code -- 위반 법규 코드 , '' AS violt_dtls_code -- 위반내역코드 , '' AS violt_dtls_etc_cn -- 위반내역 기타 내용 - , trr.crdn_plc -- 위반장소 - , trr.vltn_nmtm -- 위반횟수 - , trr.crdn_stdg_nm -- 위반법정코드 - , trr.gps_x - , trr.gps_y - , trr.towng_yn -- 견인여부 코드 - , trr.crdn_sn -- 스티커 번호 - , trr.atch_file_cnt -- 이미지매수 - , trr.minus_amt -- 감경금액 + , tc.crdn_plc -- 위반장소 + , tc.vltn_nmtm -- 위반횟수 + , tc.crdn_stdg_nm -- 위반법정코드 + , tc.gps_x + , tc.gps_y + , tc.towng_yn -- 견인여부 코드 + , tc.crdn_sn -- 스티커 번호 + , tc.atch_file_cnt -- 이미지매수 + , tc.minus_amt -- 감경금액 , 0 AS redution_aft_amount -- 감경후 금액 - , trr.rcvmt_amt -- 수납금액 + , tc.rcvmt_amt -- 수납금액 , 0 AS rdcamt -- 감액 - , trr.adtn_amt -- 가산금 - , trr.vhrno -- 차량번호 - , trr.vhcl_nm -- 차량명 - , trr.carmdl_clsf_nm -- 차종분류명 - , trr.carmdl_asort_nm -- 차종종별명 - , trr.ffnlg_carmdl_cd -- 과태료차종코드 - , trr.vin -- 차대번호 - , trr.etc_cn -- 특기사항 - , trr.crdn_sparea_cd -- 단속특별구역코드 - , trr.crdn_stts_cd - , trr.crdn_reg_se_cd - , CONCAT(trr.crdn_ymd, trr.crdn_bgng_tm) AS crdnYmdTime - , trr.reg_dt - , trr.rgtr - , trr.mdfcn_dt - , trr.mdfr - FROM tb_crdn trr + , tc.adtn_amt -- 가산금 + , tc.vhrno -- 차량번호 + , tc.vhcl_nm -- 차량명 + , tc.carmdl_clsf_nm -- 차종분류명 + , tc.carmdl_asort_nm -- 차종종별명 + , tc.ffnlg_carmdl_cd -- 과태료차종코드 + , tc.vin -- 차대번호 + , tc.etc_cn -- 특기사항 + , tc.crdn_sparea_cd -- 단속특별구역코드 + , tc.crdn_stts_cd + , tc.crdn_reg_se_cd + , CONCAT(tc.crdn_ymd, tc.crdn_bgng_tm) AS crdnYmdTime + , tc.reg_dt + , tc.rgtr + , tc.mdfcn_dt + , tc.mdfr + FROM tb_crdn tc @@ -62,46 +62,46 @@ - AND trr.crdn_ymd BETWEEN REPLACE(#{sch_date_from},'-','') AND REPLACE(#{sch_date_to},'-','') + AND tc.crdn_ymd BETWEEN REPLACE(#{sch_date_from},'-','') AND REPLACE(#{sch_date_to},'-','') - AND SUBSTR(trr.reg_dt,1,8) BETWEEN REPLACE(#{sch_date_from},'-','') AND REPLACE(#{sch_date_to},'-','') + AND SUBSTR(tc.reg_dt,1,8) BETWEEN REPLACE(#{sch_date_from},'-','') AND REPLACE(#{sch_date_to},'-','') - AND INSTR(trr.vhrno, #{vhrno}) > 0 + AND INSTR(tc.vhrno, #{vhrno}) > 0 - AND trr.sys_se_cd = #{sysSeCd} + AND tc.sys_se_cd = #{sysSeCd} - AND trr.crdn_se_cd = #{crdnSeCd} + AND tc.crdn_se_cd = #{crdnSeCd} - AND trr.crdn_reg_se_cd = #{crdnRegSeCd} + AND tc.crdn_reg_se_cd = #{crdnRegSeCd} - AND LENGTH(IFNULL(trr.ffnlg_carmdl_cd, '')) > 0 + AND LENGTH(IFNULL(tc.ffnlg_carmdl_cd, '')) > 0 - AND LENGTH(IFNULL(trr.ffnlg_carmdl_cd, '')) = 0 + AND LENGTH(IFNULL(tc.ffnlg_carmdl_cd, '')) = 0 - ORDER BY trr.sys_se_cd, trr.crdn_se_cd, trr.crdn_ymd, trr.vhrno, trr.crdn_bgng_tm + ORDER BY tc.sys_se_cd, tc.crdn_se_cd, tc.crdn_ymd, tc.vhrno, tc.crdn_bgng_tm @@ -280,7 +280,7 @@ , stdg_cd , dong_cd , mtn_se_cd - , mso + , mno , sno , spcl_dong , spcl_ho