From ff53ba1216bb8d8b02178fa4d0ebae9d5ff563f7 Mon Sep 17 00:00:00 2001 From: jjh Date: Fri, 5 Jul 2024 10:28:19 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=A0=84=ED=86=B5=EC=A7=80=20?= =?UTF-8?q?=EC=9E=90=EB=A3=8C=20=EC=83=9D=EC=84=B1=EC=8B=9C=20=EB=8B=A8?= =?UTF-8?q?=EC=86=8D=20=ED=85=8C=EC=9D=B4=EB=B8=94=EC=97=90=20=EC=82=AC?= =?UTF-8?q?=EC=A0=84=ED=86=B5=EC=A7=80=20=EC=8B=9C=EC=9E=91=EC=9D=BC?= =?UTF-8?q?=EC=9E=90,=20=EC=82=AC=EC=A0=84=ED=86=B5=EC=A7=80=20=EC=A2=85?= =?UTF-8?q?=EB=A3=8C=EC=9D=BC=EC=9E=90=20=EB=B3=80=EA=B2=BD=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/crdn/dao/CrdnUpdtMapper.java | 10 +++++ .../xit/fims/sndb/service/bean/SndngBean.java | 38 ++++++++++++++----- .../sql/mapper/fims/crdn/crdn-updt-mapper.xml | 14 ++++++- 3 files changed, 51 insertions(+), 11 deletions(-) diff --git a/src/main/java/cokr/xit/fims/crdn/dao/CrdnUpdtMapper.java b/src/main/java/cokr/xit/fims/crdn/dao/CrdnUpdtMapper.java index 38c41a3c..261db1aa 100644 --- a/src/main/java/cokr/xit/fims/crdn/dao/CrdnUpdtMapper.java +++ b/src/main/java/cokr/xit/fims/crdn/dao/CrdnUpdtMapper.java @@ -80,6 +80,16 @@ public interface CrdnUpdtMapper extends AbstractMapper { */ int deleteCrdnPayer(Crdn crdn); + /** + * @param + * @return 저장된 정보수 + */ int updateNxrpCrdnLinkYn(Crdn crdn); + /** 단속 정보의 사전통지 일자를 변경한다. + * @param crdn 단속 대장 + * @return 저장된 정보수 + */ + int updateAdvntceYmd(Crdn crdn); + } diff --git a/src/main/java/cokr/xit/fims/sndb/service/bean/SndngBean.java b/src/main/java/cokr/xit/fims/sndb/service/bean/SndngBean.java index 865b08e1..54a466ff 100644 --- a/src/main/java/cokr/xit/fims/sndb/service/bean/SndngBean.java +++ b/src/main/java/cokr/xit/fims/sndb/service/bean/SndngBean.java @@ -17,6 +17,7 @@ import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.cmmn.CrdnSttsHstry; import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean; import cokr.xit.fims.crdn.Crdn; +import cokr.xit.fims.crdn.dao.CrdnUpdtMapper; import cokr.xit.fims.epst.EpostRcptDtl; import cokr.xit.fims.epst.EpostRcptReg; import cokr.xit.fims.epst.service.bean.EpostRcptDtlBean; @@ -24,7 +25,7 @@ import cokr.xit.fims.epst.service.bean.EpostRcptRegBean; import cokr.xit.fims.levy.Levy; import cokr.xit.fims.levy.service.bean.LevyBean; import cokr.xit.fims.mngt.VltnQuery; -import cokr.xit.fims.mngt.service.bean.VltnBean; +import cokr.xit.fims.mngt.dao.VltnMapper; import cokr.xit.fims.sndb.SndbQuery; import cokr.xit.fims.sndb.Sndng; import cokr.xit.fims.sndb.SndngDtl; @@ -54,17 +55,21 @@ public class SndngBean extends AbstractBean { @Resource(name = "sndngDtlMapper") private SndngDtlMapper sndngDtlMapper; - /** 단속 상태 이력 정보 Bean */ - @Resource(name = "crdnSttsHstryBean") - private CrdnSttsHstryBean crdnSttsHstryBean; - /** 사용자 정보 DAO */ @Resource(name="userBean") protected UserBean userBean; - /** 위반 정보 정보 Bean */ - @Resource(name = "vltnBean") - private VltnBean vltnBean; + /** 위반 정보 정보 DAO */ + @Resource(name = "vltnMapper") + private VltnMapper vltnMapper; + + /** 단속 정보 DAO */ + @Resource(name = "crdnUpdtMapper") + private CrdnUpdtMapper crdnUpdtMapper; + + /** 단속 상태 이력 정보 Bean */ + @Resource(name = "crdnSttsHstryBean") + private CrdnSttsHstryBean crdnSttsHstryBean; /** 부과 대장 정보 Bean */ @Resource(name = "levyBean") @@ -545,6 +550,21 @@ public class SndngBean extends AbstractBean { throw new RuntimeException("발송상세 등록에 실패하였습니다."); // 예외를 발생시켜서 DB Rollback } + // 단속 대장에 사전통지 일자를 수정한다. + Crdn crdn = new Crdn(); + crdn.setCrdnId(crdnPayerInfo.string("CRDN_ID")); + crdn.setSggCd(crdnPayerInfo.string("SGG_CD")); + crdn.setTaskSeCd(crdnPayerInfo.string("TASK_SE_CD")); + crdn.setAdvntceBgngYmd(sndng.getSndngYmd()); + crdn.setAdvntceDudtYmd(sndng.getSndngEndYmd()); + crdn.setDelYn("N"); + + // 단속(TB_CRDN) 대장을 수정한다. + rtnNocs = crdnUpdtMapper.updateAdvntceYmd(crdn); + if (rtnNocs != 1) { + throw new RuntimeException("단속 대장에 사전통지일자 수정에 실패하였습니다."); // 예외를 발생시켜서 DB Rollback + } + // 단속 상태 이력(TB_CRDN_STTS_HSTRY)을 등록하고, 단속(TB_CRDN) 대장의 단속상태코드를 수정한다. if ("21,22,23".contains(crdnPayerInfo.string("CRDN_STTS_CD"))) { CrdnSttsHstry crdnSttsHstry = new CrdnSttsHstry(); @@ -1040,7 +1060,7 @@ public class SndngBean extends AbstractBean { vltnQuery.setTaskSeCd(sndngInfo.string("TASK_SE_CD")); vltnQuery.setVltnId(sndngInfo.string("VLTN_ID")); } - DataObject vltnInfo = vltnBean.getVltnInfo(vltnQuery); + DataObject vltnInfo = vltnMapper.selectVltnInfo(vltnQuery); // 5. 전자우편 접수 내역을 등록한다. EpostRcptReg epostRcptReg = new EpostRcptReg(); diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn-updt-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn-updt-mapper.xml index 3b8c197b..057ba68b 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn-updt-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn-updt-mapper.xml @@ -160,7 +160,7 @@ AND DEL_YN = 'N' - /* 단속 부가 정보 삭제(crdnUpdtMapper.deleteCrdn) */ + /* 단속 부가 정보 삭제(crdnUpdtMapper.deleteCrdnAdi) */ UPDATE TB_CRDN_ADI SET DEL_YN = 'Y' , DEL_DT = @@ -172,7 +172,7 @@ AND DEL_YN = 'N' - /* 단속 정보 삭제(crdnUpdtMapper.deleteCrdn) */ + /* 단속 납부자 ID 삭제(crdnUpdtMapper.deleteCrdnPayer) */ UPDATE TB_CRDN SET RTPYR_ID = NULL , MDFCN_DT = @@ -194,4 +194,14 @@ AND DEL_YN = 'N' + /* 사전통지 일자 수정(crdnUpdtMapper.updateAdvntceYmd) */ + UPDATE TB_CRDN + SET ADVNTCE_BGNG_YMD = #{advntceBgngYmd} + , ADVNTCE_DUDT_YMD = #{advntceDudtYmd} + , MDFCN_DT = + , MDFR = #{modifiedBy} + WHERE CRDN_ID = #{crdnId} + AND DEL_YN = 'N' + + \ No newline at end of file