You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

199 lines
11 KiB
MySQL

/**
INSERT INTO tb_elctrn_ntic_sndng
(`ELCTRN_NTIC_SNDNG_ID`, `SIGNGU_CODE`, `NHT_TMPLAT_ID`, `SNDNG_TY_CODE`, `SNDNG_CO`, `SNDNG_PROCESS_STTUS`, `SNDNG_DT`, `CLOS_DT`, `REGIST_DT`, `REGISTER`, `UPDT_DT`, `UPDUSR`, `error_cn`, `error_dtls`)
VALUES
('202400000001', '51110', 'JU001', '1', 1, '01', '20240805141253', '20240930235959', '2024-08-05 14:10:53', NULL, '2024-08-07 18:05:51', 'ENS_SYS', NULL, NULL);
INSERT INTO tb_elctrn_ntic_sndng_detail
(`ELCTRN_NTIC_SNDNG_DETAIL_ID`, `ELCTRN_NTIC_SNDNG_ID`, `SIGNGU_CODE`, `MAIN_CODE`, `IHIDNUM`, `CN_DETAIL`, `MOBILE_PAGE_CN`, `REGIST_DT`, `REGISTER`, `UPDT_DT`, `UPDUSR`, `external_document_uuid`)
VALUES
('51110202400335801001', '202400000001', '51110', '5111020240033580', 'RUNCNjEwM0JERENGMEMzNjRBOTAyMERERjg5MDFEODc=', NULL, '{"details":[{"title":"주정차 위반 과태료 사전통지서","item_type":"TEXT","elements":[""]},{"title":"단속사진","item_type":"IMAGE","print_type":"SLIDE","elements":[{"key":"사진0","value":"http://noparking.chuncheon.go.kr/ens/img/prnt?link=http://152.99.141.24:30001/JUCHA_PHOTO/DATA/IMAGE/51110/51110/2024/5111020240033580A.jpg","level":0},{"key":"사진1","value":"http://noparking.chuncheon.go.kr/ens/img/prnt?link=http://152.99.141.24:30001/JUCHA_PHOTO/DATA/IMAGE/51110/51110/2024/5111020240033580B.jpg","level":1},{"key":"사진2","value":"http://noparking.chuncheon.go.kr/ens/img/prnt?link=http://152.99.141.24:30001/JUCHA_PHOTO/DATA/IMAGE/51110/51110/2024/5111020240033580C.jpg","level":2},{"key":"사진3","value":"http://noparking.chuncheon.go.kr/ens/img/prnt?link=http://152.99.141.24:30001/JUCHA_PHOTO/DATA/IMAGE/51110/51110/2024/5111020240033580D.jpg","level":3}]},{"title":"위반내역","item_type":"KEY_VALUE","properties":{"hyperlink":["https://www.wetax.go.kr"],"style":{"highlight":{"562-245-79175307":{"use-clipboard":"true"}}}},"elements":[{"key":"차량번호","value":"56거4441","level":1},{"key":"성명","value":"김정우","level":1},{"key":"위반일시","value":"2024-08-04 10:37","level":1},{"key":"위반내용","value":"주정차금지 구역","level":1},{"key":"위반장소","value":"퇴계동 퇴계로 부근","level":1},{"key":"납부금액","value":"32,000원","level":1},{"key":"단속구분","value":"이동형CCTV 033-250-3194,3800","level":1},{"key":"가상계좌","value":"신한 : 56224579175307\\n농협 : 79027653322219\\n우리 : 73171602792160\\n하나 : 61809652351237","level":1},{"key":"자진납부 및 의견제출기한","value":"2024-09-04\\n위 납부 기한이 경과시에는 과태료 감경 혜택을 받으실 수 없습니다.","level":1},{"key":"위택스","value":"https://www.wetax.go.kr","level":1}]},{"title":"자동차 등록별 과태료 부과 및 감경기준","item_type":"TABLE","elements":{"head":["구분","승용\\\\n부과금액","승용\\\\n감경후금액","승합\\\\n부과금액","승합\\\\n감경후금액"],"rows":[["주정차금지구역\\\\n(어린이보호구역 내)","40,000원\\\\n(120,000원)","32,000원\\\\n(96,000원)","50,000원\\\\n(130,000원)","40,000원\\\\n(104,000원)"],["같은 장소 2시간 초과\\\\n(어린이보호구역 내)","50,000원\\\\n(130,000원)","40,000원\\\\n(104,000원)","60,000원\\\\n(140,000원)","48,000원\\\\n(112,000원)"]]}},{"title":"질서위반행위 규제법 시행령 규정 감경 대상","item_type":"TABLE","elements":{"head":["감경대상자","시행일 및 적용대상","감경율(%)","비고"],"rows":[["○ 국민기초생활 수급자\\\\n○ 한부모가족 보호대상자\\\\n○ 장애의 정도가 심한 장애인\\\\n○ 국가유공자(상이등급 3급 이상)\\\\n○ 미성년자","○ 시행일 : 2010년 1월 16일 부터\\\\n○ 적용 : 시행일 이후 단속된 차량","○ 과태료 부과금액의 50%","※ 자진 납부 시 추가감경 가능"]]}}]}', '2024-08-05 14:10:53', NULL, NULL, NULL, 'B-202408051411000827Wmtv000000001');
commit;
*/
select *
from tb_elctrn_ntic_sndng;
select *
from tb_elctrn_ntic_sndng_detail;
select *
from tb_ens_unity_sndng_mastr;
select *
from tb_ens_unity_sndng_detail;
select *
from tb_ens_ci;
select *
from tb_ens_tmplat_manage;
/** 접수 reset */
select * from tb_elctrn_ntic_sndng;
select * from tb_ens_unity_sndng_mastr;
select * from tb_ens_unity_sndng_detail;
select * from tb_ens_ci;
select * from tb_ens_sndng_mastr;
select * from tb_ens_ihidnum_manage;
select * from tb_ens_ci_manage;
select *
from tb_ens_ci_manage;
select *
from tb_ens_ihidnum_manage;
select *
from tb_ens_ci_manage;
select tecm.ci
from tb_ens_ihidnum_manage teim
LEFT join tb_ens_ci_manage tecm
ON teim.ihidnum_manage_id = tecm.ihidnum_manage_id
where teim.ihidnum = 'RUNCNjEwM0JERENGMEMzNjRBOTAyMERERjg5MDFEODc=';
SELECT tecm.ci
FROM tb_ens_ihidnum_manage teim
LEFT JOIN tb_ens_ci_manage tecm
ON teim.ihidnum_manage_id = tecm.ihidnum_manage_id
WHERE teim.ihidnum = '8312181157213';
SELECT teim.ihidnum_manage_id AS ihidnumManageId
, tecm.ci
FROM tb_ens_ihidnum_manage teim
LEFT JOIN tb_ens_ci_manage tecm
ON teim.ihidnum_manage_id = tecm.ihidnum_manage_id
WHERE teim.ihidnum = 'RUNCNjEwM0JERENGMEMzNjRBOTAyMERERjg5MDFEODc=';
SELECT tesm.sndng_mastr_id
, tesm.unity_sndng_mastr_id
, tesm.tmplat_id
, tesm.sndng_co
, tesm.try_seq
, tesm.sndng_process_sttus
, teusm.try1
, teusm.try2
, teusm.try3
, teusm.try_cnt
FROM tb_ens_sndng_mastr tesm
JOIN tb_ens_unity_sndng_mastr teusm
ON tesm.unity_sndng_mastr_id = teusm.unity_sndng_mastr_id
WHERE tesm.sndng_process_sttus IN ('send-ok', 'sending1', 'sending2')
AND tesm.signgu_code = '51110'
AND tesm.ffnlg_code = '11';
SELECT tekmd.document_binder_uuid
FROM tb_ens_sndng_mastr tesm
JOIN tb_ens_kakao_my_doc tekmd
ON tesm.sndng_mastr_id = tekmd.sndng_mastr_id
WHERE tesm.sndng_process_sttus IN ('send-ok', 'sending1', 'sending2')
AND tesm.unity_sndng_mastr_id = '3094'
AND NVL(tekmd.document_binder_uuid, '') != ''
AND tesm.signgu_code = '51110'
AND tesm.ffnlg_code = '11';
select * from ens_snd_mast;
select * from TB_ELCTRN_NTIC_SNDNG_RESULT;
select * from ENS_SND_DTL_KT_GBS;
select * from TB_ELCTRN_NTIC_SNDNG;
select * from TB_ELCTRN_NTIC_SNDNG_DETAIL;
SELECT signgu_code, /* 시군구코드 */
ffnlg_code, /* 과태료코드 */
client_id, /* nice client id */
client_secret, /* app security code */
product_id, /* 상품 코드 */
access_token, /* access token */
expires_in, /* access token 만료일시(초)*/
token_type, /* token type */
scope, /* token scope */
site_code, /* 공개키 사이트 코드 */
key_version, /* 공개키 버전 */
public_key, /* 공개키 */
TO_CHAR(TO_DATE(null, 'YYYYMMDDHH24MISS') - INTERVAL '1' HOUR, 'YYYYMMDDHH24MISS') AS validDtim, /* 공개키 만료일시 */
cur_symkey_version, /* 현재 대칭키 버전 */
TO_CHAR(TO_DATE('', 'YYYYMMDDHH24MISS') - INTERVAL '1' HOUR, 'YYYYMMDDHH24MISS') AS curSymkeyValidDtim, /* 현재 대칭키 만료일시 */
cur_symkey_key, /* 현재 대칭키 - key */
cur_symkey_iv, /* 현재 대칭키 - iv */
cur_symkey_hmac_key, /* 현재 대칭키 - hmac_key */
bef_symkey_version, /* 이전 대칭키 버전 */
bef_symkey_valid_dtim, /* 이전 대칭키 만료일시 */
bef_symkey_key, /* 이전 대칭키 - key */
bef_symkey_iv, /* 이전 대칭키 - iv */
bef_symkey_hmac_key /* 이전 대칭키 - hmac_key */
FROM tb_cmm_nice_instn_crtf_info;
-- WHERE signgu_code = #{signguCode}
-- AND ffnlg_code = #{ffnlgCode}
select * from tb_ens_rlaybsnm_manage;
SELECT signgu_code, /* 시군구코드 */
ffnlg_code, /* 과태료코드 */
signgu_nm, /* 시군구 명 */
ffnlg_nm, /* 과태료 명 */
kakao_client_id, /* 카카오 Client ID */
kakao_product_cd, /* 카카오 상품 코드 */
kakao_access_token, /* 카카오 access token */
kakao_contract_uuid, /* 카카오 contract uuid */
kakao_partner_rest_api_key, /* 카카오 partner key */
kakao_dealer_rest_api_key, /* 카카오 dealer key */
-- CASE WHEN #{profile} = 'prod' THEN kakao_prod_settle_id ELSE kakao_dev_settle_id END AS kakaoSettleId, /* 카카오 settle id */
kt_client_id, /* KT client id */
kt_client_tp, /* KT client tp */
kt_scope, /* KT scope */
kt_service_code, /* KT service code */
-- CASE WHEN #{profile} = 'prod' THEN kt_prod_client_id ELSE kt_dev_client_id END AS ktSvcClientId, /* KT client service ID */
-- CASE WHEN #{profile} = 'prod' THEN kt_prod_client_secret ELSE kt_dev_client_secret END AS ktSvcClientSecret, /* KT client service secret */
TO_DATE(updt_dt INTERVAL IF(#{profile} = 'prod', kt_prod_token_expires_in, kt_dev_token_expires_in) - 86400 SECOND)
END AS ktTokenExpiresIn, /* KT 토큰 유효기간 : (7775999)(90일) */
epost_service_key, /* epost service key */
pplus_api_key, /* postplus api key */
sender_nm, /* 발송인 명 */
sender_zip_no, /* 발송인 우편 번호 */
sender_addr, /* 발송인 주소 */
sender_detail_addr /* 발송인 상세 주소 */
FROM tb_ens_rlaybsnm_manage;
select updt_dt,kt_prod_token_expires_in,kt_dev_token_expires_in,
updt_dt + (
CASE
WHEN '' = 'prod' THEN kt_prod_token_expires_in
ELSE kt_dev_token_expires_in
END - 86400) / 86400
from tb_ens_rlaybsnm_manage;
SELECT tempm.sndng_detail_id
, tempm.sndng_se_code
, tempm.mobile_page_cn
, tekmd.signgu_code
, tekmd.ffnlg_code
FROM tb_ens_kakao_d10 tekmd
JOIN tb_ens_mobile_page_manage tempm
ON tekmd.sndng_detail_id = tempm.sndng_detail_id
WHERE tekmd.envelope_id = 'EVLP-01J5YX9QNMS3Y8D3QZTB51NMMN-00'
AND tekmd.external_id = '4413311202408230033';
UPDATE tb_ens_kt_gbs
SET mms_sndg_rslt_sqno = '#{mmsSndgRsltSqno} ' /* MMS 발송 결과 상태 순번 - 1:수신시, 2:발송시*/
, prcs_dt =' #{prcsDt} ' /* 처리일자 */
, mbl_bzowr_dvcd = '#{mblBzowrDvcd}' /* 모바일 사업자 구분 : 01:KT, 02:SKT, 03:LGT */
, rl_mms_sndg_telno = '#{rlMmsSndgTelno}' /* 실제 발송 번호 */
, mms_rslt_dvcd = '#{mmsRsltDvcd} ' /* 발송결과코드 */
--, mms_sndg_rslt_dvcd_msg = #{mmsRsltDvcdMsg} /* 발송결과코드 메세지 */
, mms_sndg_tmst = mms_sndg_tmst /* 발송 타임 스탬프 */
, mms_rcv_tmst = mms_rcv_tmst /* 수신 타임 스탬프 */
, mms_rdg_tmst = mms_rdg_tmst /* 열람 타임 스탬프 */
, updt_dt = sysdate
, updusr = 'api_inbound'
WHERE unity_sndng_detail_id = ''