From 216b40b97d2df715f0abfc1bdfdce1c714c0db8f Mon Sep 17 00:00:00 2001 From: jjh Date: Fri, 4 Aug 2023 12:12:35 +0900 Subject: [PATCH] =?UTF-8?q?=EB=93=B1=EB=A1=9D=20=EC=8B=A4=ED=96=89?= =?UTF-8?q?=EC=8B=9C=20=EC=9D=B4=EB=AF=B8=20=EB=93=B1=EB=A1=9D=EB=90=9C=20?= =?UTF-8?q?=EC=9E=90=EB=A3=8C=EA=B0=80=20=EC=9E=88=EB=8A=94=EC=A7=80=20?= =?UTF-8?q?=ED=99=95=EC=9D=B8=ED=9B=84=20=EC=9E=90=EB=A3=8C=EA=B0=80=20?= =?UTF-8?q?=EC=A1=B4=EC=9E=AC=ED=95=98=EB=A9=B4=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EB=B0=9C=EC=83=9D=20=EA=B5=AC=EB=B6=84=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fims/excl/service/bean/Excl01ServiceBean.java | 12 +++++++++++- .../cokr/xit/fims/excl/service/bean/Excl02Bean.java | 1 + .../fims/excl/service/bean/Excl02ServiceBean.java | 13 +++++++++++-- .../sql/mapper/fims/excl/excl02-mapper.xml | 2 +- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/main/java/cokr/xit/fims/excl/service/bean/Excl01ServiceBean.java b/src/main/java/cokr/xit/fims/excl/service/bean/Excl01ServiceBean.java index e96321ae..53a3f86b 100644 --- a/src/main/java/cokr/xit/fims/excl/service/bean/Excl01ServiceBean.java +++ b/src/main/java/cokr/xit/fims/excl/service/bean/Excl01ServiceBean.java @@ -44,7 +44,17 @@ public class Excl01ServiceBean extends AbstractServiceBean implements Excl01Serv @Override public DataObject getInfo(Excl01Query req) { - return excl01Bean.getInfo(req); + DataObject levyExcl = excl01Bean.getInfo(req); + + // 등록으로 실행했는데 부과제외 ID가 존재한다면 이미 등록되었으므로 오류로 처리.. + if (req.getLevyExclId() == null) { + if (!levyExcl.string("LEVY_EXCL_ID").equals("")) { + // 예외를 발생시켜서 오류메세지를 보낸다.. + throw new RuntimeException("등록된 부과제외 정보가 있습니다."); + } + } + + return levyExcl; } @Override diff --git a/src/main/java/cokr/xit/fims/excl/service/bean/Excl02Bean.java b/src/main/java/cokr/xit/fims/excl/service/bean/Excl02Bean.java index 33072d47..df8da700 100644 --- a/src/main/java/cokr/xit/fims/excl/service/bean/Excl02Bean.java +++ b/src/main/java/cokr/xit/fims/excl/service/bean/Excl02Bean.java @@ -58,6 +58,7 @@ public class Excl02Bean extends AbstractComponent { DataObject dataCrdn = excl02Mapper.selectCrdn(req); // 등록(단속 조회) // 초기 데이터 설정 + dataCrdn.set("RCPT_NO", dataCrdn.get("NEW_RCPT_NO")); // 접수 번호 dataCrdn.set("RCPT_YMD", dataCrdn.get("TODAY")); // 접수 일자 return dataCrdn; diff --git a/src/main/java/cokr/xit/fims/excl/service/bean/Excl02ServiceBean.java b/src/main/java/cokr/xit/fims/excl/service/bean/Excl02ServiceBean.java index 5d03ed16..d4e69e35 100644 --- a/src/main/java/cokr/xit/fims/excl/service/bean/Excl02ServiceBean.java +++ b/src/main/java/cokr/xit/fims/excl/service/bean/Excl02ServiceBean.java @@ -1,6 +1,5 @@ package cokr.xit.fims.excl.service.bean; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -52,7 +51,17 @@ public class Excl02ServiceBean extends AbstractServiceBean implements Excl02Serv @Override public DataObject getInfo(Excl02Query req) { - return excl02Bean.getInfo(req); + DataObject opnnSbmsn = excl02Bean.getInfo(req); + + // 등록으로 실행했는데 의견제출 ID가 존재한다면 이미 등록되었으므로 오류로 처리.. + if (req.getOpnnId() == null) { + if (!opnnSbmsn.string("OPNN_ID").equals("")) { + // 예외를 발생시켜서 오류메세지를 보낸다.. + throw new RuntimeException("등록된 의견제출 정보가 있습니다."); + } + } + + return opnnSbmsn; } @Override 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 0b3edec1..a17b98a1 100644 --- a/src/main/resources/sql/mapper/fims/excl/excl02-mapper.xml +++ b/src/main/resources/sql/mapper/fims/excl/excl02-mapper.xml @@ -320,7 +320,7 @@ , 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 /* 접수 번호 */ + WHERE RCPT_NO LIKE CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), '%') ) AS NEW_RCPT_NO /* 접수 번호 */ , AS TODAY /* 오늘 일자 */ FROM TB_CRDN A LEFT OUTER JOIN TB_PAYER B ON (A.RTPYR_ID = B.RTPYR_ID)