diff --git a/src/main/resources/sql/mapper/fims/cmmn/link-mapper.xml b/src/main/resources/sql/mapper/fims/cmmn/link-mapper.xml index 1eea1d9a..1b68e5fd 100644 --- a/src/main/resources/sql/mapper/fims/cmmn/link-mapper.xml +++ b/src/main/resources/sql/mapper/fims/cmmn/link-mapper.xml @@ -8,7 +8,8 @@ SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(UNITY_SNDNG_MASTR_ID,5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID -FROM TB_CNTC_SNDNG_MASTR + FROM TB_CNTC_SNDNG_MASTR +WHERE UNITY_SNDNG_MASTR_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') INSERT INTO TB_CNTC_SNDNG_MASTR ( @@ -52,7 +53,8 @@ INSERT SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(UNITY_SNDNG_DETAIL_ID,5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID -FROM TB_CNTC_SNDNG_DETAIL + FROM TB_CNTC_SNDNG_DETAIL +WHERE UNITY_SNDNG_DETAIL_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') INSERT INTO TB_CNTC_SNDNG_DETAIL ( diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn-inst-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn-inst-mapper.xml index 4e4e096a..ec642853 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn-inst-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn-inst-mapper.xml @@ -8,7 +8,8 @@ SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(CRDN_ID,5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID -FROM TB_CRDN + FROM TB_CRDN +WHERE CRDN_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') INSERT INTO TB_CRDN ( CRDN_ID diff --git a/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml b/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml index fca288d6..a0603fab 100644 --- a/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml +++ b/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml @@ -648,7 +648,8 @@ SELECT CC.CVLCPT_LINK_ID /* 민원 연계 ID */ SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(CRDN_ID,5)) + 1, 1) AS INT), 16, '0')) AS NEW_ID -FROM TB_CRDN + FROM TB_CRDN +WHERE CRDN_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') INSERT INTO TB_CRDN ( diff --git a/src/main/resources/sql/mapper/fims/cvlc/saCvlcptIndviDmnd-mapper.xml b/src/main/resources/sql/mapper/fims/cvlc/saCvlcptIndviDmnd-mapper.xml index 7d93ef92..8864507b 100644 --- a/src/main/resources/sql/mapper/fims/cvlc/saCvlcptIndviDmnd-mapper.xml +++ b/src/main/resources/sql/mapper/fims/cvlc/saCvlcptIndviDmnd-mapper.xml @@ -34,7 +34,8 @@ SELECT SA.INDIV_ID SELECT CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(INDIV_ID, 5)) + 1, 1) AS INT), 26, '0')) AS NEW_ID -FROM TB_SA_CVLCPT_INDIV_DMND + FROM TB_SA_CVLCPT_INDIV_DMND +WHERE INDIV_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') /* 새올요청자료 등록(saCvlcptIndviDmndMapper.insertDmndDataInfo) */ INSERT