From 2759fdeb774c7953f01d3a935bac03b7ac0fb08d Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Fri, 5 Jan 2024 14:10:27 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=A4=EB=9D=BC=ED=81=B4=20SQL=20=EC=A7=80?= =?UTF-8?q?=EC=9B=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../lntris/LntrisInterfaceApplication.java | 2 +- src/main/resources/intf-conf/lntris.conf | 1 + .../sql/mapper/lntris/lntris-A-mapper.xml | 13 ++- .../mapper/lntris/lntris-B01_03-mapper.xml | 40 +++++++-- .../mapper/lntris/lntris-B04_06-mapper.xml | 39 +++++++-- .../mapper/lntris/lntris-B07_09-mapper.xml | 39 +++++++-- .../mapper/lntris/lntris-B10_12-mapper.xml | 39 +++++++-- .../mapper/lntris/lntris-B13_16-mapper.xml | 52 +++++++++-- .../sql/mapper/lntris/lntris-D-mapper.xml | 87 +++++++++++-------- 10 files changed, 242 insertions(+), 72 deletions(-) diff --git a/pom.xml b/pom.xml index 0361cf1..c18ad8c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 2.7.16 + 2.7.18 diff --git a/src/main/java/cokr/xit/interfaces/lntris/LntrisInterfaceApplication.java b/src/main/java/cokr/xit/interfaces/lntris/LntrisInterfaceApplication.java index 51778cb..c7a82f9 100644 --- a/src/main/java/cokr/xit/interfaces/lntris/LntrisInterfaceApplication.java +++ b/src/main/java/cokr/xit/interfaces/lntris/LntrisInterfaceApplication.java @@ -18,7 +18,7 @@ public class LntrisInterfaceApplication extends FoundationApplication { public OpenAPI openAPI() { return new OpenAPI() .info(new Info() - .title("세외수입 연계시스템") + .title("지방 세외수입 연계 시스템") ); } } \ No newline at end of file diff --git a/src/main/resources/intf-conf/lntris.conf b/src/main/resources/intf-conf/lntris.conf index 622d658..f3a5c7b 100644 --- a/src/main/resources/intf-conf/lntris.conf +++ b/src/main/resources/intf-conf/lntris.conf @@ -1,5 +1,6 @@ { "useDatabase": false, /* 데이터베이스 사용여부 */ + "sendRequest": true, /* 연계 요청 여부 */ "locals": [ {"organization": "4060000", /* 지역 자치단체 코드(7자리) */ diff --git a/src/main/resources/sql/mapper/lntris/lntris-A-mapper.xml b/src/main/resources/sql/mapper/lntris/lntris-A-mapper.xml index 9a67941..cb91380 100644 --- a/src/main/resources/sql/mapper/lntris/lntris-A-mapper.xml +++ b/src/main/resources/sql/mapper/lntris/lntris-A-mapper.xml @@ -399,7 +399,7 @@ INSERT INTO TB_NIS_INDIV_A01 ( ) /* 과태료 대장 단속 정보 연계상태 수정(lntrisAMapper.updateA01Status) */ -UPDATE TB_NIS_INDIV_A01 A +UPDATE TB_NIS_INDIV_A01 A , ( SELECT #{a01.a01Id} A01_ID, #{a01.response.resVo1.linkMngKey} LINK_MNG_KEY, #{a01.response.linkRstCd} LINK_RST_CD, #{a01.response.linkRstMsg} LINK_RST_MSG ) B @@ -407,7 +407,16 @@ UPDATE TB_NIS_INDIV_A01 A , A.LINK_MNG_KEY = B.LINK_MNG_KEY , A.LINK_RST_CD = B.LINK_RST_CD , A.LINK_RST_MSG = B.LINK_RST_MSG - WHERE A.A01_ID = B.A01_ID + WHERE A.A01_ID = B.A01_ID +MERGE INTO TB_NIS_INDIV_A01 A USING + ( + SELECT #{a01.a01Id} A01_ID, #{a01.response.resVo1.linkMngKey} LINK_MNG_KEY, #{a01.response.linkRstCd} LINK_RST_CD, #{a01.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.A01_ID = B.A01_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_DT = + , A.LINK_MNG_KEY = B.LINK_MNG_KEY + , A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG diff --git a/src/main/resources/sql/mapper/lntris/lntris-B01_03-mapper.xml b/src/main/resources/sql/mapper/lntris/lntris-B01_03-mapper.xml index 6cfb74a..cb921a6 100644 --- a/src/main/resources/sql/mapper/lntris/lntris-B01_03-mapper.xml +++ b/src/main/resources/sql/mapper/lntris/lntris-B01_03-mapper.xml @@ -112,7 +112,7 @@ INSERT INTO TB_NIS_SPCL_B01 ( ) /* 체납상세세목정보_요청 연계상태 수정(lntrisB01_03Mapper.updateB01ReqStatus) */ -UPDATE TB_NIS_SPCL_B01 A +UPDATE TB_NIS_SPCL_B01 A , ( SELECT #{b01.b01Id} B01_ID, #{b01.response.linkRstCd} LINK_RST_CD, #{b01.response.linkRstMsg} LINK_RST_MSG ) B @@ -120,8 +120,16 @@ UPDATE TB_NIS_SPCL_B01 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B01_ID = B.B01_ID - + WHERE A.B01_ID = B.B01_ID +MERGE INTO TB_NIS_SPCL_B01 A USING + ( + SELECT #{b01.b01Id} B01_ID, #{b01.response.linkRstCd} LINK_RST_CD, #{b01.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B01_ID = B.B01_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} @@ -641,7 +649,7 @@ INSERT INTO TB_NIS_SPCL_B02 ( ) /* 수납 상세정보_요청 연계상태 수정(lntrisB01_03Mapper.updateB02ReqStatus) */ -UPDATE TB_NIS_SPCL_B02 A +UPDATE TB_NIS_SPCL_B02 A , ( SELECT #{b02.b02Id} B02_ID, #{b02.response.linkRstCd} LINK_RST_CD, #{b02.response.linkRstMsg} LINK_RST_MSG ) B @@ -649,7 +657,16 @@ UPDATE TB_NIS_SPCL_B02 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B02_ID = B.B02_ID + WHERE A.B02_ID = B.B02_ID +MERGE INTO TB_NIS_SPCL_B02 A USING + ( + SELECT #{b02.b02Id} B02_ID, #{b02.response.linkRstCd} LINK_RST_CD, #{b02.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B02_ID = B.B02_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} @@ -1069,7 +1086,7 @@ INSERT INTO TB_NIS_SPCL_B03 ( ) /* 결손 상세세목정보_요청 연계상태 수정(lntrisB01_03Mapper.updateB03ReqStatus) */ -UPDATE TB_NIS_SPCL_B03 A +UPDATE TB_NIS_SPCL_B03 A , ( SELECT #{b03.b03Id} B03_ID, #{b03.response.linkRstCd} LINK_RST_CD, #{b03.response.linkRstMsg} LINK_RST_MSG ) B @@ -1077,7 +1094,16 @@ UPDATE TB_NIS_SPCL_B03 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B03_ID = B.B03_ID + WHERE A.B03_ID = B.B03_ID +MERGE INTO TB_NIS_SPCL_B03 A USING + ( + SELECT #{b03.b03Id} B03_ID, #{b03.response.linkRstCd} LINK_RST_CD, #{b03.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B03_ID = B.B03_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} diff --git a/src/main/resources/sql/mapper/lntris/lntris-B04_06-mapper.xml b/src/main/resources/sql/mapper/lntris/lntris-B04_06-mapper.xml index 06de56f..422e374 100644 --- a/src/main/resources/sql/mapper/lntris/lntris-B04_06-mapper.xml +++ b/src/main/resources/sql/mapper/lntris/lntris-B04_06-mapper.xml @@ -103,7 +103,7 @@ INSERT INTO TB_NIS_SPCL_B04 ( ) /* 체납자독려정보_요청 연계상태 수정(lntrisB04_06Mapper.updateB04ReqStatus) */ -UPDATE TB_NIS_SPCL_B04 A +UPDATE TB_NIS_SPCL_B04 A , ( SELECT #{b04.b04Id} B04_ID, #{b04.response.linkRstCd} LINK_RST_CD, #{b04.response.linkRstMsg} LINK_RST_MSG ) B @@ -111,7 +111,16 @@ UPDATE TB_NIS_SPCL_B04 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B04_ID = B.B04_ID + WHERE A.B04_ID = B.B04_ID +MERGE INTO TB_NIS_SPCL_B04 A USING + ( + SELECT #{b04.b04Id} B04_ID, #{b04.response.linkRstCd} LINK_RST_CD, #{b04.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B04_ID = B.B04_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} @@ -267,7 +276,7 @@ INSERT INTO TB_NIS_SPCL_B05 ( ) /* 압류정보_요청 연계상태 수정(lntrisB04_06Mapper.updateB05ReqStatus) */ -UPDATE TB_NIS_SPCL_B05 A +UPDATE TB_NIS_SPCL_B05 A , ( SELECT #{b05.b05Id} B05_ID, #{b05.response.linkRstCd} LINK_RST_CD, #{b05.response.linkRstMsg} LINK_RST_MSG ) B @@ -275,7 +284,16 @@ UPDATE TB_NIS_SPCL_B05 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B05_ID = B.B05_ID + WHERE A.B05_ID = B.B05_ID +MERGE INTO TB_NIS_SPCL_B05 A USING + ( + SELECT #{b05.b05Id} B05_ID, #{b05.response.linkRstCd} LINK_RST_CD, #{b05.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B05_ID = B.B05_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} @@ -495,7 +513,7 @@ INSERT INTO TB_NIS_SPCL_B06 ( ) /* 압류시점 체납정보_요청 연계상태 수정(lntrisB04_06Mapper.updateB06ReqStatus) */ -UPDATE TB_NIS_SPCL_B06 A +UPDATE TB_NIS_SPCL_B06 A , ( SELECT #{b06.b06Id} B06_ID, #{b06.response.linkRstCd} LINK_RST_CD, #{b06.response.linkRstMsg} LINK_RST_MSG ) B @@ -503,7 +521,16 @@ UPDATE TB_NIS_SPCL_B06 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B06_ID = B.B06_ID + WHERE A.B06_ID = B.B06_ID +MERGE INTO TB_NIS_SPCL_B06 A USING + ( + SELECT #{b06.b06Id} B06_ID, #{b06.response.linkRstCd} LINK_RST_CD, #{b06.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B06_ID = B.B06_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} diff --git a/src/main/resources/sql/mapper/lntris/lntris-B07_09-mapper.xml b/src/main/resources/sql/mapper/lntris/lntris-B07_09-mapper.xml index 27acc69..c9c4c67 100644 --- a/src/main/resources/sql/mapper/lntris/lntris-B07_09-mapper.xml +++ b/src/main/resources/sql/mapper/lntris/lntris-B07_09-mapper.xml @@ -95,7 +95,7 @@ INSERT INTO TB_NIS_SPCL_B07 ( ) /* 과오납 상세정보 요청 연계상태 수정(lntrisB07_09Mapper.updateB07ReqStatus) */ -UPDATE TB_NIS_SPCL_B07 A +UPDATE TB_NIS_SPCL_B07 A , ( SELECT #{b07.b07Id} B07_ID, #{b07.response.linkRstCd} LINK_RST_CD, #{b07.response.linkRstMsg} LINK_RST_MSG ) B @@ -103,7 +103,16 @@ UPDATE TB_NIS_SPCL_B07 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B07_ID = B.B07_ID + WHERE A.B07_ID = B.B07_ID +MERGE INTO TB_NIS_SPCL_B07 A USING + ( + SELECT #{b07.b07Id} B07_ID, #{b07.response.linkRstCd} LINK_RST_CD, #{b07.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B07_ID = B.B07_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} @@ -303,7 +312,7 @@ INSERT INTO TB_NIS_SPCL_B08 ( ) /* 영치정보 요청 연계상태 수정(lntrisB07_09Mapper.updateB08ReqStatus) */ -UPDATE TB_NIS_SPCL_B08 A +UPDATE TB_NIS_SPCL_B08 A , ( SELECT #{b08.b08Id} B08_ID, #{b08.response.linkRstCd} LINK_RST_CD, #{b08.response.linkRstMsg} LINK_RST_MSG ) B @@ -311,7 +320,16 @@ UPDATE TB_NIS_SPCL_B08 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B08_ID = B.B08_ID + WHERE A.B08_ID = B.B08_ID +MERGE INTO TB_NIS_SPCL_B08 A USING + ( + SELECT #{b08.b08Id} B08_ID, #{b08.response.linkRstCd} LINK_RST_CD, #{b08.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B08_ID = B.B08_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} @@ -509,7 +527,7 @@ INSERT INTO TB_NIS_SPCL_B09 ( ) /* 고지발송정보 요청 연계상태 수정(lntrisB07_09Mapper.updateB09ReqStatus) */ -UPDATE TB_NIS_SPCL_B09 A +UPDATE TB_NIS_SPCL_B09 A , ( SELECT #{b09.b09Id} B09_ID, #{b09.response.linkRstCd} LINK_RST_CD, #{b09.response.linkRstMsg} LINK_RST_MSG ) B @@ -517,7 +535,16 @@ UPDATE TB_NIS_SPCL_B09 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B09_ID = B.B09_ID + WHERE A.B09_ID = B.B09_ID +MERGE INTO TB_NIS_SPCL_B09 A USING + ( + SELECT #{b09.b09Id} B09_ID, #{b09.response.linkRstCd} LINK_RST_CD, #{b09.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B09_ID = B.B09_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} diff --git a/src/main/resources/sql/mapper/lntris/lntris-B10_12-mapper.xml b/src/main/resources/sql/mapper/lntris/lntris-B10_12-mapper.xml index 1dbb20c..cb510fa 100644 --- a/src/main/resources/sql/mapper/lntris/lntris-B10_12-mapper.xml +++ b/src/main/resources/sql/mapper/lntris/lntris-B10_12-mapper.xml @@ -95,7 +95,7 @@ INSERT INTO TB_NIS_SPCL_B10 ( ) /* 우편발송결과정보 요청 연계상태 수정(lntrisB10_12Mapper.updateB10ReqStatus) */ -UPDATE TB_NIS_SPCL_B10 A +UPDATE TB_NIS_SPCL_B10 A , ( SELECT #{b10.b10Id} B10_ID, #{b10.response.linkRstCd} LINK_RST_CD, #{b10.response.linkRstMsg} LINK_RST_MSG ) B @@ -103,7 +103,16 @@ UPDATE TB_NIS_SPCL_B10 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B10_ID = B.B10_ID + WHERE A.B10_ID = B.B10_ID +MERGE INTO TB_NIS_SPCL_B10 A USING + ( + SELECT #{b10.b10Id} B10_ID, #{b10.response.linkRstCd} LINK_RST_CD, #{b10.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B10_ID = B.B10_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} @@ -325,7 +334,7 @@ INSERT INTO TB_NIS_SPCL_B11 ( ) /* 과태료대장 목록 요청 연계상태 수정(lntrisB10_12Mapper.updateB11ReqStatus) */ -UPDATE TB_NIS_SPCL_B11 A +UPDATE TB_NIS_SPCL_B11 A , ( SELECT #{b11.b11Id} B11_ID, #{b11.response.linkRstCd} LINK_RST_CD, #{b11.response.linkRstMsg} LINK_RST_MSG ) B @@ -333,7 +342,16 @@ UPDATE TB_NIS_SPCL_B11 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B11_ID = B.B11_ID + WHERE A.B11_ID = B.B11_ID +MERGE INTO TB_NIS_SPCL_B11 A USING + ( + SELECT #{b11.b11Id} B11_ID, #{b11.response.linkRstCd} LINK_RST_CD, #{b11.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B11_ID = B.B11_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} @@ -573,7 +591,7 @@ INSERT INTO TB_NIS_SPCL_B12 ( ) /* 과태료대장 상세 요청 연계상태 수정(lntrisB10_12Mapper.updateB12ReqStatus) */ -UPDATE TB_NIS_SPCL_B12 A +UPDATE TB_NIS_SPCL_B12 A , ( SELECT #{b12.b12Id} B12_ID, #{b12.response.linkRstCd} LINK_RST_CD, #{b12.response.linkRstMsg} LINK_RST_MSG ) B @@ -581,7 +599,16 @@ UPDATE TB_NIS_SPCL_B12 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B12_ID = B.B12_ID + WHERE A.B12_ID = B.B12_ID +MERGE INTO TB_NIS_SPCL_B12 A USING + ( + SELECT #{b12.b12Id} B12_ID, #{b12.response.linkRstCd} LINK_RST_CD, #{b12.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B12_ID = B.B12_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} diff --git a/src/main/resources/sql/mapper/lntris/lntris-B13_16-mapper.xml b/src/main/resources/sql/mapper/lntris/lntris-B13_16-mapper.xml index 8532376..66fd621 100644 --- a/src/main/resources/sql/mapper/lntris/lntris-B13_16-mapper.xml +++ b/src/main/resources/sql/mapper/lntris/lntris-B13_16-mapper.xml @@ -69,7 +69,7 @@ INSERT INTO TB_NIS_SPCL_B13 ( ) /* 주정차위반 과태료 대장 목록 요청 연계상태 수정(lntrisB13_16Mapper.updateB13ReqStatus) */ -UPDATE TB_NIS_SPCL_B13 A +UPDATE TB_NIS_SPCL_B13 A , ( SELECT #{b13.b13Id} B13_ID, #{b13.response.linkRstCd} LINK_RST_CD, #{b13.response.linkRstMsg} LINK_RST_MSG ) B @@ -77,7 +77,16 @@ UPDATE TB_NIS_SPCL_B13 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B13_ID = B.B13_ID + WHERE A.B13_ID = B.B13_ID +MERGE INTO TB_NIS_SPCL_B13 A USING + ( + SELECT #{b13.b13Id} B13_ID, #{b13.response.linkRstCd} LINK_RST_CD, #{b13.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B13_ID = B.B13_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} @@ -322,7 +331,7 @@ INSERT INTO TB_NIS_SPCL_B14 ( ) /* 주정차위반 과태료 대장 상세 요청 연계상태 수정(lntrisB13_16Mapper.updateB14ReqStatus) */ -UPDATE TB_NIS_SPCL_B14 A +UPDATE TB_NIS_SPCL_B14 A , ( SELECT #{b14.b14Id} B14_ID, #{b14.response.linkRstCd} LINK_RST_CD, #{b14.response.linkRstMsg} LINK_RST_MSG ) B @@ -330,7 +339,16 @@ UPDATE TB_NIS_SPCL_B14 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B14_ID = B.B14_ID + WHERE A.B14_ID = B.B14_ID +MERGE INTO TB_NIS_SPCL_B14 A USING + ( + SELECT #{b14.b14Id} B14_ID, #{b14.response.linkRstCd} LINK_RST_CD, #{b14.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B14_ID = B.B14_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} @@ -836,7 +854,7 @@ INSERT INTO TB_NIS_SPCL_B15 ( ) /* 전용차로위반 과태료 대장 목록 요청 연계상태 수정(lntrisB13_16Mapper.updateB15ReqStatus) */ -UPDATE TB_NIS_SPCL_B15 A +UPDATE TB_NIS_SPCL_B15 A , ( SELECT #{b15.b15Id} B15_ID, #{b15.response.linkRstCd} LINK_RST_CD, #{b15.response.linkRstMsg} LINK_RST_MSG ) B @@ -844,7 +862,16 @@ UPDATE TB_NIS_SPCL_B15 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B15_ID = B.B15_ID + WHERE A.B15_ID = B.B15_ID +MERGE INTO TB_NIS_SPCL_B15 A USING + ( + SELECT #{b15.b15Id} B15_ID, #{b15.response.linkRstCd} LINK_RST_CD, #{b15.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B (A.B15_ID = B.B15_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} @@ -1084,7 +1111,7 @@ INSERT INTO TB_NIS_SPCL_B16 ( ) /* 전용차로위반 과태료 대장 상세 요청 연계상태 수정(lntrisB13_16Mapper.updateB16ReqStatus) */ -UPDATE TB_NIS_SPCL_B16 A +UPDATE TB_NIS_SPCL_B16 A , ( SELECT #{b16.b16Id} B16_ID, #{b16.response.linkRstCd} LINK_RST_CD, #{b16.response.linkRstMsg} LINK_RST_MSG ) B @@ -1092,7 +1119,16 @@ UPDATE TB_NIS_SPCL_B16 A , A.LINK_RST_MSG = B.LINK_RST_MSG , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE A.B16_ID = B.B16_ID + WHERE A.B16_ID = B.B16_ID +MERGE INTO TB_NIS_SPCL_B16 A USING + ( + SELECT #{b16.b16Id} B16_ID, #{b16.response.linkRstCd} LINK_RST_CD, #{b16.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.B16_ID = B.B16_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG + , MDFCN_DT = + , MDFR = #{currentUser.id} diff --git a/src/main/resources/sql/mapper/lntris/lntris-D-mapper.xml b/src/main/resources/sql/mapper/lntris/lntris-D-mapper.xml index 532a881..29ab71b 100644 --- a/src/main/resources/sql/mapper/lntris/lntris-D-mapper.xml +++ b/src/main/resources/sql/mapper/lntris/lntris-D-mapper.xml @@ -387,7 +387,7 @@ INSERT INTO TB_NIS_INDIV_D01 ( ) /* 부과정보 연계상태 수정(lntrisDMapper.updateD01) */ -UPDATE TB_NIS_INDIV_D01 A +UPDATE TB_NIS_INDIV_D01 A , ( SELECT #{d01.d01Id} D01_ID, #{d01.response.resVo.linkMngKey} LINK_MNG_KEY, #{d01.response.resVo.linkRstCd} LINK_RST_CD, #{d01.response.resVo.linkRstMsg} LINK_RST_MSG ) B @@ -395,7 +395,16 @@ UPDATE TB_NIS_INDIV_D01 A , A.LINK_MNG_KEY = B.LINK_MNG_KEY , A.LINK_RST_CD = B.LINK_RST_CD , A.LINK_RST_MSG = B.LINK_RST_MSG - WHERE A.D01_ID = B.D01_ID + WHERE A.D01_ID = B.D01_ID +MERGE INTO TB_NIS_INDIV_D01 A USING + ( + SELECT #{d01.d01Id} D01_ID, #{d01.response.resVo.linkMngKey} LINK_MNG_KEY, #{d01.response.resVo.linkRstCd} LINK_RST_CD, #{d01.response.resVo.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.D01_ID = B.D01_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_DT = + , A.LINK_MNG_KEY = B.LINK_MNG_KEY + , A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG @@ -801,14 +810,22 @@ INSERT INTO TB_NIS_INDIV_D02 ( ) /* 부과수납 정보 연계상태 수정(lntrisDMapper.updateD02Status) */ -UPDATE TB_NIS_INDIV_D02 A +UPDATE TB_NIS_INDIV_D02 A , ( SELECT #{d02.d02Id} D02_ID, #{d02.response.linkRstCd} LINK_RST_CD, #{d02.response.linkRstMsg} LINK_RST_MSG ) B SET A.LINK_RST_DT = , A.LINK_RST_CD = B.LINK_RST_CD , A.LINK_RST_MSG = B.LINK_RST_MSG - WHERE A.D02_ID = B.D02_ID + WHERE A.D02_ID = B.D02_ID +MERGE INTO TB_NIS_INDIV_D02 A USING + ( + SELECT #{d02.d02Id} D02_ID, #{d02.response.linkRstCd} LINK_RST_CD, #{d02.response.linkRstMsg} LINK_RST_MSG FROM DUAL + ) B ON (A.D02_ID = B.D02_ID) + WHEN MATCHED THEN UPDATE + SET A.LINK_RST_DT = + , A.LINK_RST_CD = B.LINK_RST_CD + , A.LINK_RST_MSG = B.LINK_RST_MSG @@ -957,7 +974,7 @@ UPDATE TB_NIS_INDIV_D02 A WHERE TASK_APLCN_CD = '999' - + /* 부과결과정보 등록(lntrisDMapper.insertD03) */ @@ -1041,7 +1058,7 @@ INSERT INTO TB_NIS_INDIV_D03 ( , #{req.taxnNo} , #{req.untyTaxnNo} , #{req.dptCd} - , #{req.spclFisBizCd} + , #{req.spclFisBizCd} , #{req.fyr} , #{req.actSeCd} , #{req.rprsTxmCd} @@ -1587,35 +1604,35 @@ INSERT INTO TB_NIS_INDIV_D06 ( , MDFR ) VALUES ( #{d06.d06Id} - , #{req.sgbCd} - , #{req.sgbNm} - , #{req.linkMngKey} - , #{req.taxnNo} - , #{req.untyTaxnNo} - , #{req.dptCd} - , #{req.dptNm} - , #{req.spclFisBizCd} - , #{req.spclFisBizNm} - , #{req.fyr} - , #{req.actSeCd} - , #{req.actSeNm} - , #{req.rprsTxmCd} - , #{req.rprsTxmNm} - , #{req.operItemCd} - , #{req.operItemNm} - , #{req.lvyNo} - , #{req.itmNo} - , #{req.rdcYmd} - , #{req.rdcPctAmt} - , #{req.rdcAdtnAmt} - , #{req.rdcIntrAmt} - , #{req.rdcAmt} - , #{req.rdcRsnCn} - , #{req.rsveItem1} - , #{req.rsveItem2} - , #{req.rsveItem3} - , #{req.rsveItem4} - , #{req.rsveItem5} + , #{req.sgbCd} + , #{req.sgbNm} + , #{req.linkMngKey} + , #{req.taxnNo} + , #{req.untyTaxnNo} + , #{req.dptCd} + , #{req.dptNm} + , #{req.spclFisBizCd} + , #{req.spclFisBizNm} + , #{req.fyr} + , #{req.actSeCd} + , #{req.actSeNm} + , #{req.rprsTxmCd} + , #{req.rprsTxmNm} + , #{req.operItemCd} + , #{req.operItemNm} + , #{req.lvyNo} + , #{req.itmNo} + , #{req.rdcYmd} + , #{req.rdcPctAmt} + , #{req.rdcAdtnAmt} + , #{req.rdcIntrAmt} + , #{req.rdcAmt} + , #{req.rdcRsnCn} + , #{req.rsveItem1} + , #{req.rsveItem2} + , #{req.rsveItem3} + , #{req.rsveItem4} + , #{req.rsveItem5} , #{d06.linkRsltDt} , #{d06.response.resVo.linkRstCd} , #{d06.response.resVo.linkRstMsg}