diff --git a/src/main/resources/sql/mapper/fims/cmmn/crdnSttsHstry-mapper.xml b/src/main/resources/sql/mapper/fims/cmmn/crdnSttsHstry-mapper.xml index de8ea805..bf892e59 100644 --- a/src/main/resources/sql/mapper/fims/cmmn/crdnSttsHstry-mapper.xml +++ b/src/main/resources/sql/mapper/fims/cmmn/crdnSttsHstry-mapper.xml @@ -62,7 +62,9 @@ /* 단속 상태 이력 등록(crdnSttsHstryMapper.insertCrdnSttsHstry) */ - SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(STTS_HSTRY_ID,5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID FROM TB_CRDN_STTS_HSTRY + SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(STTS_HSTRY_ID, 5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID + FROM TB_CRDN_STTS_HSTRY + WHERE STTS_HSTRY_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') INSERT INTO TB_CRDN_STTS_HSTRY ( diff --git a/src/main/resources/sql/mapper/fims/excl/excl01-mapper.xml b/src/main/resources/sql/mapper/fims/excl/excl01-mapper.xml index 1749597d..e41eb6b0 100644 --- a/src/main/resources/sql/mapper/fims/excl/excl01-mapper.xml +++ b/src/main/resources/sql/mapper/fims/excl/excl01-mapper.xml @@ -251,7 +251,9 @@ /* 부과제외 대장 등록(excl01Mapper.insertLevyExcl) */ - SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(LEVY_EXCL_ID,5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID FROM TB_LEVY_EXCL + SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(LEVY_EXCL_ID, 5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID + FROM TB_LEVY_EXCL + WHERE LEVY_EXCL_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') INSERT INTO TB_LEVY_EXCL ( diff --git a/src/main/resources/sql/mapper/fims/excl/excl02-mapper.xml b/src/main/resources/sql/mapper/fims/excl/excl02-mapper.xml index 5af0405a..0b3edec1 100644 --- a/src/main/resources/sql/mapper/fims/excl/excl02-mapper.xml +++ b/src/main/resources/sql/mapper/fims/excl/excl02-mapper.xml @@ -318,6 +318,9 @@ , B.ADDR /* 주소 */ , B.DTL_ADDR /* 상세 주소 */ , C.OPNN_ID /* 의견 ID */ + , (SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(RCPT_NO, 5)) + 1, 1) AS INT), 6, '0')) + FROM TB_OPNN_SBMSN + WHERE RCPT_NO LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') ) AS RCPT_NO /* 접수 번호 */ , AS TODAY /* 오늘 일자 */ FROM TB_CRDN A LEFT OUTER JOIN TB_PAYER B ON (A.RTPYR_ID = B.RTPYR_ID) @@ -327,7 +330,9 @@ /* 의견제출 대장 등록(excl02Mapper.insertOpnnSbmsn) */ - SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(OPNN_ID,5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID FROM TB_OPNN_SBMSN + SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(OPNN_ID, 5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID + FROM TB_OPNN_SBMSN + WHERE OPNN_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') INSERT INTO TB_OPNN_SBMSN ( diff --git a/src/main/resources/sql/mapper/fims/excl/excl03-mapper.xml b/src/main/resources/sql/mapper/fims/excl/excl03-mapper.xml index 0250e10c..7125eda3 100644 --- a/src/main/resources/sql/mapper/fims/excl/excl03-mapper.xml +++ b/src/main/resources/sql/mapper/fims/excl/excl03-mapper.xml @@ -140,7 +140,9 @@ /* 단속 재등록 등록(excl03Mapper.insertCrdnReReg) */ - SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(RE_REG_ID,5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID FROM TB_CRDN_RE_REG + SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(RE_REG_ID, 5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID + FROM TB_CRDN_RE_REG + WHERE RE_REG_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') INSERT INTO TB_CRDN_RE_REG ( RE_REG_ID /* 재등록 ID */