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)