From 1d5cb3d03857145d6e8d440d633fd6e04faff148 Mon Sep 17 00:00:00 2001 From: jjh Date: Thu, 23 Nov 2023 13:18:13 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=84=EC=9E=90=EC=9A=B0=ED=8E=B8=20?= =?UTF-8?q?=EB=B0=9C=EC=86=A1=20-=20=EC=9E=90=EC=B9=98=EB=8B=A8=EC=B2=B4?= =?UTF-8?q?=20=EB=B0=8F=20=EB=B6=80=EC=84=9C=20=EC=A0=95=EB=B3=B4=EB=A5=BC?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/epst/dao/EpostRcptRegMapper.java | 9 ++-- .../epst/service/bean/EpostRcptRegBean.java | 8 ++-- .../xit/fims/sndb/service/bean/SndngBean.java | 45 ++++++++++++------- .../mapper/fims/epst/epostRcptReg-mapper.xml | 10 ++--- .../sql/mapper/fims/sndb/sndng-mapper.xml | 25 +++++++---- 5 files changed, 57 insertions(+), 40 deletions(-) diff --git a/src/main/java/cokr/xit/fims/epst/dao/EpostRcptRegMapper.java b/src/main/java/cokr/xit/fims/epst/dao/EpostRcptRegMapper.java index a19e5360..6a4d631e 100644 --- a/src/main/java/cokr/xit/fims/epst/dao/EpostRcptRegMapper.java +++ b/src/main/java/cokr/xit/fims/epst/dao/EpostRcptRegMapper.java @@ -169,9 +169,6 @@ public interface EpostRcptRegMapper extends AbstractMapper { return epostRcptDtl != null && deleteEpostRcptDtl(params().set("epostRcptDtl", epostRcptDtl)) == 1; } - - - /**지정한 조건에 따라 전자우편 접수 등록 목록을 조회하여 반환한다.
* @param req 전자우편 접수 등록 조회 조건 * @return 전자우편 접수 등록 목록 @@ -182,18 +179,18 @@ public interface EpostRcptRegMapper extends AbstractMapper { * @param req 전자우편 접수 등록 조회 조건 * @return 전자우편 접수 등록 목록 */ - int getEpostSenderDetailSeq(String sndngYmd); + int selectEpostSenderDetailSeq(String sndngYmd); /**
* @param req 전자우편 접수 등록 조회 조건 * @return 전자우편 접수 등록 목록 */ - String getEpostRgNo(String sggCd, String taskSeCd); + String selectEpostRgNo(String sggCd, String taskSeCd); /**
* @param req 전자우편 접수 등록 조회 조건 * @return 전자우편 접수 등록 목록 */ - DataObject getDeptSggInfo(String deptCd); + DataObject selectDeptSggInfo(String deptCd); } diff --git a/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptRegBean.java b/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptRegBean.java index 780c4061..ba11e7ce 100644 --- a/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptRegBean.java +++ b/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptRegBean.java @@ -149,7 +149,7 @@ public class EpostRcptRegBean extends AbstractComponent { * @return 전자우편 접수 등록 객체 목록 */ public int getEpostSenderDetailSeq(String sndngYmd) { - return epostRcptRegMapper.getEpostSenderDetailSeq(sndngYmd); + return epostRcptRegMapper.selectEpostSenderDetailSeq(sndngYmd); } /**등기 번호 @@ -157,7 +157,7 @@ public class EpostRcptRegBean extends AbstractComponent { * @return 전자우편 접수 등록 객체 목록 */ public String getEpostRgNo(String sggCd, String taskSeCd) { - return epostRcptRegMapper.getEpostRgNo(sggCd, taskSeCd); + return epostRcptRegMapper.selectEpostRgNo(sggCd, taskSeCd); } /** @@ -165,9 +165,7 @@ public class EpostRcptRegBean extends AbstractComponent { * @return 시군구 및 부서 정보 객체 */ public DataObject getDeptSggInfo(String deptCd) { - return epostRcptRegMapper.getDeptSggInfo(deptCd); + return epostRcptRegMapper.selectDeptSggInfo(deptCd); } - - } 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 656770ca..7560a45d 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 @@ -390,7 +390,7 @@ public class SndngBean extends AbstractComponent { // 1. 발송 대장 조회 DataObject sndngInfo = sndngMapper.selectSndngInfo(sndng.getSndngId()); /* - // 전자우편 발송 등록 전 자료 체크 + // 전자우편 발송 등록 전 오류 자료가 존재하는지 체크 //사진파일 체크 while not eof do begin @@ -701,7 +701,7 @@ public class SndngBean extends AbstractComponent { retSuccess = sndngMapper.updateEPostSndng(mdfcnSndng); // 전자우편 발송 내역 수정 if (!retSuccess) { - throw new RuntimeException("우편통합 발송 작업중 전자우편 상세 등록에 실패하였습니다."); // 예외를 발생시켜서 DB Rollback + throw new RuntimeException("우편통합 발송 작업중 발송 내역 수정에 실패하였습니다."); // 예외를 발생시켜서 DB Rollback } // 8. 전자우편 접수 상세 내역을 등록한다. @@ -741,11 +741,11 @@ public class SndngBean extends AbstractComponent { recevDocCd4 = "[" + "시세외" + "]" + sndngInfo.string("TXITM_NM"); // 문서종류4 recevDocCd5 = "영수필통지서"; // 문서종류5 } else { - recevDocCd1 = ""; // 문서종류1 - recevDocCd2 = ""; // 문서종류2 - recevDocCd3 = ""; // 문서종류3 - recevDocCd4 = ""; // 문서종류4 - recevDocCd5 = "영수필통지서"; // 문서종류5 + recevDocCd1 = ""; // 문서종류1 + recevDocCd2 = ""; // 문서종류2 + recevDocCd3 = ""; // 문서종류3 + recevDocCd4 = ""; // 문서종류4 + recevDocCd5 = "영수필통지서"; // 문서종류5 } // 과목명 @@ -820,9 +820,22 @@ public class SndngBean extends AbstractComponent { afterAdamt = 0; // 납기후 가산금 afterSumAmt = 0; // 납기후 합계 금액 } else { - afterPcptax = sndngDtlInfo.number("PCPTAX").intValue(); // 납기후 본세 - afterAdamt = sndngDtlInfo.number("DUDT_AFTR_AMT").intValue() - sndngDtlInfo.number("PCPTAX").intValue(); // 납기후 가산금 afterSumAmt = sndngDtlInfo.number("DUDT_AFTR_AMT").intValue(); // 납기후 금액 + if (afterSumAmt == 0) { // 납기후 금액이 0 이라면.. + afterPcptax = 0; + afterAdamt = 0; + afterSumAmt = 0; + } else { + afterPcptax = sndngDtlInfo.number("PCPTAX").intValue(); // 납기후 본세 + + if (afterSumAmt > afterPcptax) { // 납기후 금액이 본세보다 크다면.. + afterAdamt = sndngDtlInfo.number("DUDT_AFTR_AMT").intValue() - sndngDtlInfo.number("PCPTAX").intValue(); + } else if (afterSumAmt < afterPcptax) { // 납기후 금액이 본세보다 작다면 오류.. + throw new RuntimeException("우편통합 발송 작업중 납기후 금액이 본세보다 작은 자료가 발견되었습니다."); // 예외를 발생시켜서 DB Rollback + } else { + afterAdamt = 0; + } + } } } @@ -957,7 +970,7 @@ public class SndngBean extends AbstractComponent { epostRcptDtl.setRecevPayNumber2(""); // 납부번호2 } else { epostRcptDtl.setRecevPayNumber1(band1.substring(0, 17)); // 납부번호1 - epostRcptDtl.setRecevPayNumber2(band1.substring(18)); // 납부번호2 + epostRcptDtl.setRecevPayNumber2(band1.substring(17)); // 납부번호2 } // OCR0 epostRcptDtl.setRecevOcr0(band1); @@ -1018,11 +1031,11 @@ public class SndngBean extends AbstractComponent { // 차량번호 epostRcptDtl.setRecevCarNumber(sndngDtlInfo.string("VHRNO")); // 우편번호 - epostRcptDtl.setRecevCarOwnerZipcode(sndngDtlInfo.string("RTPYR_ZIP")); + epostRcptDtl.setRecevCarOwnerZipcode(sndngDtlInfo.string("ZIP")); // 주소(시, 구) - epostRcptDtl.setRecevCarOwnerAddr(sndngDtlInfo.string("RTPYR_ADDR")); + epostRcptDtl.setRecevCarOwnerAddr(sndngDtlInfo.string("ADDR")); // 상세주소 - epostRcptDtl.setRecevCarOwnerDetailaddr(sndngDtlInfo.string("RTPYR_DTL_ADDR")); + epostRcptDtl.setRecevCarOwnerDetailaddr(sndngDtlInfo.string("DTL_ADDR")); // 소유자명 epostRcptDtl.setRecevCarOwnerNm(sndngDtlInfo.string("RTPYR_NM")); // 주민번호(납부자 생년월일) @@ -1101,9 +1114,9 @@ public class SndngBean extends AbstractComponent { sndngDtl.setSndngDtlSttsCd("03"); // 발송 상세 상태 코드(FIM050) - 03 발송 sndngDtl.setRtpyrNm(sndngDtlInfo.string("RTPYR_NM")); // 납부자 명 sndngDtl.setRtpyrBrdt(sndngDtlInfo.string("RTPYR_BRDT")); // 납부자 생년월일 - sndngDtl.setRtpyrAddr(sndngDtlInfo.string("RTPYR_ADDR")); // 납부자 주소 - sndngDtl.setRtpyrDtlAddr(sndngDtlInfo.string("RTPYR_DTL_ADDR")); // 납부자 상세 주소 - sndngDtl.setRtpyrZip(sndngDtlInfo.string("RTPYR_ZIP")); // 납부자 우편번호 + sndngDtl.setRtpyrAddr(sndngDtlInfo.string("ADDR")); // 주소 + sndngDtl.setRtpyrDtlAddr(sndngDtlInfo.string("DTL_ADDR")); // 상세 주소 + sndngDtl.setRtpyrZip(sndngDtlInfo.string("ZIP")); // 우편번호 sndngDtl.setCrdnDt(sndngDtlInfo.string("CRDN_YMD_TM_MASK")); // 단속 일시 sndngDtl.setVhrno(sndngDtlInfo.string("VHRNO")); // 차량번호 sndngDtl.setCrdnStdgNm(sndngDtlInfo.string("CRDN_STDG_NM")); // 단속 법정동 diff --git a/src/main/resources/sql/mapper/fims/epst/epostRcptReg-mapper.xml b/src/main/resources/sql/mapper/fims/epst/epostRcptReg-mapper.xml index 55a23367..2fccb1a1 100644 --- a/src/main/resources/sql/mapper/fims/epst/epostRcptReg-mapper.xml +++ b/src/main/resources/sql/mapper/fims/epst/epostRcptReg-mapper.xml @@ -661,13 +661,13 @@ UPDATE TB_EPOST_RCPT_DTL SET WHERE CON_KEY LIKE CONCAT(#{conKey}, '%') - /* 전자우편 접수 상세 등기번호 조회(epostRcptRegMapper.selectEpostSenderDetailSeq) */ SELECT IFNULL(RIGHT(MAX(RGST_NMBR), 5), 0) AS RGST_NMBR FROM TB_EPOST_RCPT_DTL WHERE RGST_NMBR LIKE CONCAT(#{sndngYmd}, '%') - /* 전자우편 등기번호 조회(epostRcptRegMapper.selectEpostRgNo) */ SELECT RG_NO , RG_NO_NEXT FROM TB_EPOST_RG_NO @@ -676,7 +676,7 @@ UPDATE TB_EPOST_RCPT_DTL SET AND USE_PSBLTY_PSTN = 'Y' - /* 시군구 및 부서 정보 조회(epostRcptRegMapper.selectDeptSggInfo) */ SELECT DI.DEPT_CD , DI.DEPT_NM , DI.DEPT_TELNO @@ -714,8 +714,8 @@ UPDATE TB_EPOST_RCPT_DTL SET END AS INST_CHIEF_NM FROM TB_DEPT_INFO DI INNER JOIN TB_SGG_INFO SI ON (DI.SGG_CD = SI.SGG_CD AND DI.INST_CD = SI.INST_CD) - WHERE DEPT_CD = #{deptCd} - AND USE_YN = 'Y' + WHERE DI.DEPT_CD = #{deptCd} + AND DI.USE_YN = 'Y' diff --git a/src/main/resources/sql/mapper/fims/sndb/sndng-mapper.xml b/src/main/resources/sql/mapper/fims/sndb/sndng-mapper.xml index c744c4ee..9721d98e 100644 --- a/src/main/resources/sql/mapper/fims/sndb/sndng-mapper.xml +++ b/src/main/resources/sql/mapper/fims/sndb/sndng-mapper.xml @@ -868,6 +868,9 @@ , VI.VLTN_ID , VI.VLTN_CD , VI.VLTN_ARTCL + , VI.ACNTG_SE_NM + , VI.TXITM_NM + , VI.OPER_ITEM_NM , CC.CVLCPT_LINK_ID , CC.CVLCPT_RCPT_YMD , CC.CVLCPT_APLY_NO @@ -982,6 +985,7 @@ , (SELECT GET_CODE_NM('FIM051', SD.SNDNG_RCVMT_CD) FROM DUAL) AS SNDNG_RCVMT_NM , C.CRDN_ID , C.VHRNO + , C.CRDN_STDG_NM , C.CRDN_PLC , C.FFNLG_CRDN_AMT , C.CRDN_STTS_CD @@ -991,9 +995,9 @@ , P.RTPYR_NO , P.RTPYR_NM , P.RTPYR_BRDT - , P.RTPYR_ADDR - , P.RTPYR_DTL_ADDR - , P.RTPYR_ZIP + , P.ADDR + , P.DTL_ADDR + , P.ZIP , L.LEVY_ID , L.DEPT_CD , L.FYR @@ -1008,6 +1012,7 @@ , L.FRST_DUDT_YMD , L.DUDT_YMD , L.DUDT_AFTR_YMD + , L.FFNLG_AMT , L.LEVY_PCPTAX , L.LEVY_ADAMT , L.INSPY_INT @@ -1044,10 +1049,14 @@ , L.VR_ACTNO11 , L.LEVY_PCPTAX - L.RCVMT_PCPTAX - L.RDCAMT_PCPTAX AS PCPTAX , L.LEVY_ADAMT - L.RCVMT_ADAMT - L.RDCAMT_ADAMT AS ADAMT + , GET_MASK_DATE(L.LEVY_YMD, '.') AS LEVY_YMD_MASK + , GET_MASK_DATE(L.DUDT_YMD, '.') AS DUDT_YMD_MASK + , GET_MASK_DATE(L.DUDT_YMD, 'K') AS DUDT_YMD_MASK_KOR + , GET_MASK_DATE(L.DUDT_AFTR_YMD, '.') AS DUDT_AFTR_YMD_MASK FROM TB_SNDNG_DTL SD INNER JOIN TB_CRDN C ON (SD.CRDN_ID = C.CRDN_ID) INNER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID) - INNER JOIN TB_LEVY L ON (C.LEVY_ID = L.LEVY_ID AND L.DEL_YN = 'N') + INNER JOIN TB_LEVY L ON (C.CRDN_ID = L.CRDN_ID AND L.DEL_YN = 'N') WHERE SD.SNDNG_DTL_ID = #{sndngDtlId} @@ -1615,10 +1624,10 @@ /* 전자우편 발송 내역 수정(sndngMapper.updateEPostSndng) */ UPDATE TB_SNDNG - SET CON_KEY = #{sndngDtl.conKey} - , DIV_KB = #{sndngDtl.divKb} - , EPOST_NOTICE_ID = #{sndngDtl.epostNoticeId} - WHERE SNDNG_ID = #{sndngDtl.sndngDtlId} + SET CON_KEY = #{sndng.conKey} + , DIV_KB = #{sndng.divKb} + , EPOST_NOTICE_ID = #{sndng.epostNoticeId} + WHERE SNDNG_ID = #{sndng.sndngId} AND DEL_YN = 'N'