From 346e7cb0994c37c7680b9743220d9a86932a589b Mon Sep 17 00:00:00 2001 From: jjh Date: Wed, 22 May 2024 15:20:04 +0900 Subject: [PATCH] =?UTF-8?q?ID=20=EC=B1=84=EB=B2=88=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/fims/excl/CrdnReReg.java | 6 +++ .../java/cokr/xit/fims/excl/LevyExcl.java | 6 +++ .../java/cokr/xit/fims/excl/OpnnSbmsn.java | 7 +++- .../sql/mapper/fims/excl/crdnReReg-mapper.xml | 6 +-- .../sql/mapper/fims/excl/levyExcl-mapper.xml | 41 +++++++++---------- .../mapper/fims/excl/opnnDlbrMbr-mapper.xml | 2 +- .../sql/mapper/fims/excl/opnnSbmsn-mapper.xml | 9 ++-- 7 files changed, 46 insertions(+), 31 deletions(-) diff --git a/src/main/java/cokr/xit/fims/excl/CrdnReReg.java b/src/main/java/cokr/xit/fims/excl/CrdnReReg.java index e9c86962..11fd9c3c 100644 --- a/src/main/java/cokr/xit/fims/excl/CrdnReReg.java +++ b/src/main/java/cokr/xit/fims/excl/CrdnReReg.java @@ -54,9 +54,15 @@ public class CrdnReReg extends AbstractEntity { */ private String delRsn; + // 추가 ///////////////////////////////////////////////////////////////////// /** * 재등록 Ids */ private String[] reRegIds; + /** + * 시군구 코드 + */ + private String sggCd; + } diff --git a/src/main/java/cokr/xit/fims/excl/LevyExcl.java b/src/main/java/cokr/xit/fims/excl/LevyExcl.java index 3f4789d2..3a38adfa 100644 --- a/src/main/java/cokr/xit/fims/excl/LevyExcl.java +++ b/src/main/java/cokr/xit/fims/excl/LevyExcl.java @@ -52,9 +52,15 @@ public class LevyExcl extends AbstractEntity { */ private String delRsn; + // 추가 ///////////////////////////////////////////////////////////////////// /** * 부과제외 Ids */ private String[] levyExclIds; + /** + * 시군구 코드 + */ + private String sggCd; + } diff --git a/src/main/java/cokr/xit/fims/excl/OpnnSbmsn.java b/src/main/java/cokr/xit/fims/excl/OpnnSbmsn.java index e8ffe9a3..59921b26 100644 --- a/src/main/java/cokr/xit/fims/excl/OpnnSbmsn.java +++ b/src/main/java/cokr/xit/fims/excl/OpnnSbmsn.java @@ -164,12 +164,17 @@ public class OpnnSbmsn extends AbstractEntity { */ private String delRsn; + // 추가 ///////////////////////////////////////////////////////////////////// /** * 의견 Ids */ private String[] opnnIds; - // 추가 ///////////////////////////////////////////////////////////////////// + /** + * 시군구 코드 + */ + private String sggCd; + /** * 단속(TB_CRDN) - 의견 제출 여부 */ diff --git a/src/main/resources/sql/mapper/fims/excl/crdnReReg-mapper.xml b/src/main/resources/sql/mapper/fims/excl/crdnReReg-mapper.xml index 01c1e12d..2f97d1fd 100644 --- a/src/main/resources/sql/mapper/fims/excl/crdnReReg-mapper.xml +++ b/src/main/resources/sql/mapper/fims/excl/crdnReReg-mapper.xml @@ -33,8 +33,6 @@ , CRR.DEL_YN , CRR.REG_DT , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = CRR.RGTR) AS RGTR_NM - , CRR.DEL_DT - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = CRR.DLTR) AS DLTR_NM , C.SGG_CD , C.TASK_SE_CD , (SELECT GET_CODE_NM('FIM054', C.TASK_SE_CD) FROM DUAL) AS TASK_SE_NM @@ -186,9 +184,9 @@ /* 단속 재등록 등록(crdnReRegMapper.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 + SELECT CONCAT(#{crdnReReg.sggCd}, DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(RE_REG_ID, 10)) + 1, 1) AS INT), 11, '0')) AS NEW_ID FROM TB_CRDN_RE_REG - WHERE RE_REG_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') + WHERE RE_REG_ID LIKE CONCAT(#{crdnReReg.sggCd}, DATE_FORMAT(CURRENT_DATE, '%Y'), '%') INSERT INTO TB_CRDN_RE_REG ( diff --git a/src/main/resources/sql/mapper/fims/excl/levyExcl-mapper.xml b/src/main/resources/sql/mapper/fims/excl/levyExcl-mapper.xml index 47cc4a01..841ae3e4 100644 --- a/src/main/resources/sql/mapper/fims/excl/levyExcl-mapper.xml +++ b/src/main/resources/sql/mapper/fims/excl/levyExcl-mapper.xml @@ -8,23 +8,23 @@ ============================ --> - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -224,9 +224,6 @@ AND LE.LEVY_EXCL_ID = #{levyExclId} - - - AND LE.DEL_YN = #{delYn} AND C.CRDN_ID = #{crdnId} @@ -238,9 +235,9 @@ /* 부과제외 대장 등록(levyExclMapper.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 + SELECT CONCAT(#{levyExcl.sggCd}, DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(LEVY_EXCL_ID, 10)) + 1, 1) AS INT), 11, '0')) AS NEW_ID FROM TB_LEVY_EXCL - WHERE LEVY_EXCL_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') + WHERE LEVY_EXCL_ID LIKE CONCAT(#{levyExcl.sggCd}, DATE_FORMAT(CURRENT_DATE, '%Y'), '%') INSERT INTO TB_LEVY_EXCL ( diff --git a/src/main/resources/sql/mapper/fims/excl/opnnDlbrMbr-mapper.xml b/src/main/resources/sql/mapper/fims/excl/opnnDlbrMbr-mapper.xml index 4ba58740..d22b3ff9 100644 --- a/src/main/resources/sql/mapper/fims/excl/opnnDlbrMbr-mapper.xml +++ b/src/main/resources/sql/mapper/fims/excl/opnnDlbrMbr-mapper.xml @@ -101,7 +101,7 @@ /* 의견제출 심의 회원 등록(opnnDlbrMbrMapper.insertOpnnDlbrMbr) */ - SELECT LPAD(CAST(IFNULL(MAX(MNG_ID) + 1, 1) AS INT), 10, '0') AS NEW_ID + SELECT LPAD(CAST(IFNULL(MAX(MNG_ID) + 1, 1) AS INT), 3, '0') AS NEW_ID FROM TB_OPNN_DLBR_MBR INSERT diff --git a/src/main/resources/sql/mapper/fims/excl/opnnSbmsn-mapper.xml b/src/main/resources/sql/mapper/fims/excl/opnnSbmsn-mapper.xml index 9204de40..498fd373 100644 --- a/src/main/resources/sql/mapper/fims/excl/opnnSbmsn-mapper.xml +++ b/src/main/resources/sql/mapper/fims/excl/opnnSbmsn-mapper.xml @@ -381,10 +381,13 @@ /* 의견제출 대장 등록(opnnSbmsnMapper.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 - , CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(RCPT_NO, 5)) + 1, 1) AS INT), 6, '0')) AS NEW_RCPT_NO + SELECT CONCAT(#{opnnSbmsn.sggCd}, DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(OPNN_ID, 10)) + 1, 1) AS INT), 11, '0')) AS NEW_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 OPNN_ID LIKE CONCAT(#{opnnSbmsn.sggCd}, DATE_FORMAT(CURRENT_DATE, '%Y'), '%') + AND RCPT_NO LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%')) AS NEW_RCPT_NO FROM TB_OPNN_SBMSN - WHERE OPNN_ID LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') + WHERE OPNN_ID LIKE CONCAT(#{opnnSbmsn.sggCd}, DATE_FORMAT(CURRENT_DATE, '%Y'), '%') INSERT INTO TB_OPNN_SBMSN (