From 4e7c8516c101ad3308cc067f70c0c7ca3b66ada4 Mon Sep 17 00:00:00 2001 From: jjh Date: Fri, 16 Feb 2024 18:44:18 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B0=A8=EC=84=B8=EB=8C=80=20=EC=84=B8?= =?UTF-8?q?=EC=99=B8=EC=88=98=EC=9E=85=20=EC=97=B0=EA=B3=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/fims/nxrp/NisIndivA01.java | 1 + .../cokr/xit/fims/nxrp/NisIndivQuery.java | 82 +++++++++++++++++++ .../xit/fims/nxrp/dao/NisIndivA01Mapper.java | 1 + .../fims/nxrp/service/NisIndivService.java | 2 - .../fims/nxrp/service/bean/NisIndivBean.java | 14 ++++ .../service/bean/NisIndivServiceBean.java | 2 - .../fims/nxrp/service/bean/NxrpMtchgBean.java | 7 +- .../xit/fims/sndb/dao/SndngDtlMapper.java | 8 +- .../fims/sndb/service/SndngDtlService.java | 8 +- .../xit/fims/sndb/service/bean/SndngBean.java | 6 +- .../fims/sndb/service/bean/SndngDtlBean.java | 14 +--- .../service/bean/SndngDtlServiceBean.java | 9 +- .../xit/fims/sndb/web/Sndb01Controller.java | 9 +- .../cokr/xit/fims/task/web/DpvController.java | 8 +- .../sql/mapper/fims/sndb/sndngDtl-mapper.xml | 30 ++++--- 15 files changed, 143 insertions(+), 58 deletions(-) diff --git a/src/main/java/cokr/xit/fims/nxrp/NisIndivA01.java b/src/main/java/cokr/xit/fims/nxrp/NisIndivA01.java index ee5e2705..951c80b0 100644 --- a/src/main/java/cokr/xit/fims/nxrp/NisIndivA01.java +++ b/src/main/java/cokr/xit/fims/nxrp/NisIndivA01.java @@ -11,6 +11,7 @@ import lombok.Setter; @Getter @Setter public class NisIndivA01 extends AbstractEntity { + /** * 일련번호 ID */ diff --git a/src/main/java/cokr/xit/fims/nxrp/NisIndivQuery.java b/src/main/java/cokr/xit/fims/nxrp/NisIndivQuery.java index 3ecadc1a..7a0dd5ad 100644 --- a/src/main/java/cokr/xit/fims/nxrp/NisIndivQuery.java +++ b/src/main/java/cokr/xit/fims/nxrp/NisIndivQuery.java @@ -16,4 +16,86 @@ public class NisIndivQuery extends QueryRequest { private static final long serialVersionUID = 1L; + // ID + private String[] crdnIds; // 단속 IDs + private String crdnId; // 단속 ID + private String[] levyIds; // 부과 IDs + private String levyId; // 부과 ID + private String[] sndngIds; // 발송 IDs + private String sndngId; // 발송 ID + private String[] sndngDtlIds; // 발송 상세 IDs + private String sndngDtlId; // 발송 상세 ID + + public String[] getCrdnIds() { + return ifEmpty(crdnIds, () -> null); + } + + public T setCrdnIds(String... crdnIds) { + this.crdnIds = crdnIds; + return self(); + } + + public String getCrdnId() { + return ifEmpty(crdnId, () -> null); + } + + public T setCrdnId(String crdnId) { + this.crdnId = crdnId; + return self(); + } + + public String[] getLevyIds() { + return ifEmpty(levyIds, () -> null); + } + + public T setLevyIds(String... levyIds) { + this.levyIds = levyIds; + return self(); + } + + public String getLevyId() { + return ifEmpty(levyId, () -> null); + } + + public T setLevyId(String levyId) { + this.levyId = levyId; + return self(); + } + + public String[] getSndngIds() { + return ifEmpty(sndngIds, () -> null); + } + + public T setSndngIds(String... sndngIds) { + this.sndngIds = sndngIds; + return self(); + } + + public String getSndngId() { + return ifEmpty(sndngId, () -> null); + } + + public T setSndngId(String sndngId) { + this.sndngId = sndngId; + return self(); + } + + public String[] getSndngDtlIds() { + return ifEmpty(sndngDtlIds, () -> null); + } + + public T setSndngDtlIds(String... sndngDtlIds) { + this.sndngDtlIds = sndngDtlIds; + return self(); + } + + public String getSndngDtlId() { + return ifEmpty(sndngDtlId, () -> null); + } + + public T setSndngDtlId(String sndngDtlId) { + this.sndngDtlId = sndngDtlId; + return self(); + } + } diff --git a/src/main/java/cokr/xit/fims/nxrp/dao/NisIndivA01Mapper.java b/src/main/java/cokr/xit/fims/nxrp/dao/NisIndivA01Mapper.java index 6a214ee0..cfb4631e 100644 --- a/src/main/java/cokr/xit/fims/nxrp/dao/NisIndivA01Mapper.java +++ b/src/main/java/cokr/xit/fims/nxrp/dao/NisIndivA01Mapper.java @@ -23,6 +23,7 @@ import cokr.xit.fims.nxrp.NisIndivQuery; */ @Mapper("nisIndivA01Mapper") public interface NisIndivA01Mapper extends AbstractMapper { + /**지정한 조건에 따라 과태료 대장 단속 정보 등록 목록을 조회하여 반환한다.
* @param req 과태료 대장 단속 정보 등록 조회 조건 * @return 과태료 대장 단속 정보 등록 목록 diff --git a/src/main/java/cokr/xit/fims/nxrp/service/NisIndivService.java b/src/main/java/cokr/xit/fims/nxrp/service/NisIndivService.java index c89bc950..2618557a 100644 --- a/src/main/java/cokr/xit/fims/nxrp/service/NisIndivService.java +++ b/src/main/java/cokr/xit/fims/nxrp/service/NisIndivService.java @@ -4,8 +4,6 @@ import java.util.List; import cokr.xit.foundation.data.DataObject; -import cokr.xit.fims.nxrp.NisIndivA02; -import cokr.xit.fims.nxrp.NisIndivA03; import cokr.xit.fims.nxrp.NisIndivQuery; /**과태료 대장 단속 정보 등록 관리 서비스 인터페이스. diff --git a/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivBean.java b/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivBean.java index 233d68b2..97b99204 100644 --- a/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivBean.java +++ b/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivBean.java @@ -16,6 +16,7 @@ import cokr.xit.fims.nxrp.NisIndivQuery; import cokr.xit.fims.nxrp.dao.NisIndivA01Mapper; import cokr.xit.fims.nxrp.dao.NisIndivA02Mapper; import cokr.xit.fims.nxrp.dao.NisIndivA03Mapper; +import cokr.xit.fims.sndb.dao.SndngDtlMapper; /**과태료 대장 단속 정보 등록 정보 관리 Bean * @@ -42,6 +43,10 @@ public class NisIndivBean extends AbstractComponent { @Resource(name = "nisIndivA03Mapper") private NisIndivA03Mapper nisIndivA03Mapper; + /** 발송 대장 정보 DAO */ + @Resource(name = "sndngDtlMapper") + private SndngDtlMapper sndngDtlMapper; + /**지정한 조건에 따라 과태료 대장 단속 정보 등록 목록을 조회하여 반환한다. * @param req 과태료 대장 단속 정보 등록 조회 조건 * @return 과태료 대장 단속 정보 등록 목록 @@ -70,6 +75,15 @@ public class NisIndivBean extends AbstractComponent { boolean rtnScs = false; // DB 처리 결과 String rtnMsg = "[F] "; // 처리 결과 메시지 + // 검색 조건 확인 + if (req.getSndngId() != null) { + // 발송상세 대상를 조회 +// List sndngDtlIds = sndngDtlMapper.selectSndngTrgtDtlIds(); + + } + + // 단속 자료 조회 + NisIndivA01 nisIndivA01 = new NisIndivA01(); rtnScs = nisIndivA01Mapper.insert(nisIndivA01); diff --git a/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivServiceBean.java b/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivServiceBean.java index 48882839..0e045df7 100644 --- a/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivServiceBean.java +++ b/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivServiceBean.java @@ -9,8 +9,6 @@ import org.springframework.stereotype.Service; import cokr.xit.foundation.component.AbstractServiceBean; import cokr.xit.foundation.data.DataObject; -import cokr.xit.fims.nxrp.NisIndivA02; -import cokr.xit.fims.nxrp.NisIndivA03; import cokr.xit.fims.nxrp.NisIndivQuery; import cokr.xit.fims.nxrp.service.NisIndivService; diff --git a/src/main/java/cokr/xit/fims/nxrp/service/bean/NxrpMtchgBean.java b/src/main/java/cokr/xit/fims/nxrp/service/bean/NxrpMtchgBean.java index c286a0ec..a21b36f5 100644 --- a/src/main/java/cokr/xit/fims/nxrp/service/bean/NxrpMtchgBean.java +++ b/src/main/java/cokr/xit/fims/nxrp/service/bean/NxrpMtchgBean.java @@ -11,6 +11,7 @@ import cokr.xit.foundation.data.DataObject; import cokr.xit.fims.nxrp.dao.NxrpMtchgMapper; import cokr.xit.fims.nxrp.NxrpMtchg; import cokr.xit.fims.nxrp.NxrpMtchgQuery; +import cokr.xit.fims.sndb.SndbQuery; import cokr.xit.fims.sndb.SndngDtl; import cokr.xit.fims.sndb.dao.SndngDtlMapper; import cokr.xit.fims.sndb.dao.SndngMapper; @@ -89,7 +90,11 @@ public class NxrpMtchgBean extends AbstractComponent { // 세외수입 연계관련 정보 확인 // 발송상세 대상를 조회 - List sndngDtlIds = sndngDtlMapper.selectSndngTrgtDtlIds(req.getSndngId()); + SndbQuery sndbQuery = new SndbQuery(); + sndbQuery.setSndngId(req.getSndngId()); + sndbQuery.setDelYN("N"); + + List sndngDtlIds = sndngDtlMapper.selectSndngTrgtDtlIds(sndbQuery); // 발송상세 대상 자료로 세외수입 매핑 내역 등록한다. for (int iLoop = 0; iLoop < sndngDtlIds.size(); iLoop++) { diff --git a/src/main/java/cokr/xit/fims/sndb/dao/SndngDtlMapper.java b/src/main/java/cokr/xit/fims/sndb/dao/SndngDtlMapper.java index 4d52e897..3101e769 100644 --- a/src/main/java/cokr/xit/fims/sndb/dao/SndngDtlMapper.java +++ b/src/main/java/cokr/xit/fims/sndb/dao/SndngDtlMapper.java @@ -54,13 +54,7 @@ public interface SndngDtlMapper extends AbstractMapper { * @param req 발송 상세 조회 조건 * @return 발송 상세 객체 목록 */ - List selectSndngTrgtDtlIds(String sndngId); - - /**발송 ID에 따라 단속 ID를 반환한다. - * @param req 발송 상세 조회 조건 - * @return 발송 상세 객체 목록 - */ - List selectSndngTrgtCrdnIds(String sndngId); + List selectSndngTrgtDtlIds(SndbQuery req); /** * @param req 발송 상세 조회 조건 diff --git a/src/main/java/cokr/xit/fims/sndb/service/SndngDtlService.java b/src/main/java/cokr/xit/fims/sndb/service/SndngDtlService.java index c1aaae41..c8ca68ab 100644 --- a/src/main/java/cokr/xit/fims/sndb/service/SndngDtlService.java +++ b/src/main/java/cokr/xit/fims/sndb/service/SndngDtlService.java @@ -36,13 +36,7 @@ public interface SndngDtlService { * @param req 발송 상세 조회 조건 * @return 발송 상세 객체 목록 */ - List getSndngTrgtDtlIds(String sndngId); - - /**발송 ID에 따라 단속 ID를 반환한다. - * @param req 발송 상세 조회 조건 - * @return 발송 상세 객체 목록 - */ - List getSndngTrgtCrdnIds(String sndngId); + List getSndngTrgtDtlIds(SndbQuery req); /**발송상세 정보를 등록한다. * @param sndngDtl 발송 상세 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 5836d1cc..cedc352c 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 @@ -1043,7 +1043,11 @@ public class SndngBean extends AbstractComponent { recevSubj3 = deptSggInfo.string("SGG_NM"); // 9. 전자우편 접수 상세 조회 - List sndngTrgts = sndngDtlMapper.selectSndngTrgtDtlIds(sndng.getSndngId()); + SndbQuery sndbQuery = new SndbQuery(); + sndbQuery.setSndngId(sndng.getSndngId()); + sndbQuery.setDelYN("N"); + + List sndngTrgts = sndngDtlMapper.selectSndngTrgtDtlIds(sndbQuery); for (int iLoop = 0; iLoop < sndngTrgts.size(); iLoop++) { // 전자우편 접수 상세 diff --git a/src/main/java/cokr/xit/fims/sndb/service/bean/SndngDtlBean.java b/src/main/java/cokr/xit/fims/sndb/service/bean/SndngDtlBean.java index 212290ac..75a06749 100644 --- a/src/main/java/cokr/xit/fims/sndb/service/bean/SndngDtlBean.java +++ b/src/main/java/cokr/xit/fims/sndb/service/bean/SndngDtlBean.java @@ -83,16 +83,8 @@ public class SndngDtlBean extends AbstractComponent { * @param req 발송 상세 조회 조건 * @return 발송 상세 객체 목록 */ - public List getSndngTrgtDtlIds(String sndngId) { - return sndngDtlMapper.selectSndngTrgtDtlIds(sndngId); - } - - /**발송 ID에 따라 단속 ID를 반환한다. - * @param req 발송 상세 조회 조건 - * @return 발송 상세 객체 목록 - */ - public List getSndngTrgtCrdnIds(String sndngId) { - return sndngDtlMapper.selectSndngTrgtCrdnIds(sndngId); + public List getSndngTrgtDtlIds(SndbQuery req) { + return sndngDtlMapper.selectSndngTrgtDtlIds(req); } /**발송 상세 정보를 등록한다. @@ -173,7 +165,7 @@ public class SndngDtlBean extends AbstractComponent { boolean rtnScs = false; // DB 처리 결과 String rtnMsg = "[F] "; // 처리 결과 메시지 - List sndngDtlList = sndngDtlMapper.selectSndngTrgtDtlIds(req.getSndngId()); + List sndngDtlList = sndngDtlMapper.selectSndngTrgtDtlIds(req); // 조회 건수 확인 if (sndngDtlList == null || sndngDtlList.size() < 1) { diff --git a/src/main/java/cokr/xit/fims/sndb/service/bean/SndngDtlServiceBean.java b/src/main/java/cokr/xit/fims/sndb/service/bean/SndngDtlServiceBean.java index a9ee76ce..cf7b30f5 100644 --- a/src/main/java/cokr/xit/fims/sndb/service/bean/SndngDtlServiceBean.java +++ b/src/main/java/cokr/xit/fims/sndb/service/bean/SndngDtlServiceBean.java @@ -46,13 +46,8 @@ public class SndngDtlServiceBean extends AbstractServiceBean implements SndngDtl } @Override - public List getSndngTrgtDtlIds(String sndngId) { - return sndngDtlBean.getSndngTrgtDtlIds(sndngId); - } - - @Override - public List getSndngTrgtCrdnIds(String sndngId) { - return sndngDtlBean.getSndngTrgtCrdnIds(sndngId); + public List getSndngTrgtDtlIds(SndbQuery req) { + return sndngDtlBean.getSndngTrgtDtlIds(req); } @Override diff --git a/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java b/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java index 8b900fb4..18b94410 100644 --- a/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java +++ b/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java @@ -1598,10 +1598,11 @@ public class Sndb01Controller extends ApplicationController { /** 사전통지서를 PDF 파일로 작성한다. * @return 사전통지서 PDF파일 */ - public ModelAndView makeAdvntcePdf(PrintOption printOption, String sndngId) { + public ModelAndView makeAdvntcePdf(PrintOption printOption, SndbQuery req) { + // ModelAndView mav = new ModelAndView("downloadView"); - List list = sndngDtlService.getSndngTrgtCrdnIds(sndngId); + List list = sndngDtlService.getSndngTrgtDtlIds(req); String[] crdnIds = new String[list.size()]; @@ -1619,10 +1620,10 @@ public class Sndb01Controller extends ApplicationController { /** 사전통지 정보로 txt파일,이미지파일을 생성하고 압축파일로 반환한다. * @return 사전통지서 압축파일 */ - public ModelAndView makeAdvntceOutsourcing(PrintOption printOption, String sndngId) { + public ModelAndView makeAdvntceOutsourcing(PrintOption printOption, SndbQuery req) { ModelAndView mav = new ModelAndView("downloadView"); - List list = sndngDtlService.getSndngTrgtCrdnIds(sndngId); + List list = sndngDtlService.getSndngTrgtDtlIds(req); String[] crdnIds = new String[list.size()]; diff --git a/src/main/java/cokr/xit/fims/task/web/DpvController.java b/src/main/java/cokr/xit/fims/task/web/DpvController.java index b622252f..47f8e13e 100644 --- a/src/main/java/cokr/xit/fims/task/web/DpvController.java +++ b/src/main/java/cokr/xit/fims/task/web/DpvController.java @@ -646,14 +646,14 @@ public class DpvController { @Override @RequestMapping(name="사전통지발송 현황 사전통지서 pdf 파일 생성", value=METHOD_URL.makeAdvntcePdf) - public ModelAndView makeAdvntcePdf(PrintOption printOption, String sndngId) { - return super.makeAdvntcePdf(printOption, sndngId); + public ModelAndView makeAdvntcePdf(PrintOption printOption, SndbQuery req) { + return super.makeAdvntcePdf(printOption, req); } @Override @RequestMapping(name="사전통지발송 현황 사전통지서 외주 파일 생성", value=METHOD_URL.makeAdvntceOutsourcing) - public ModelAndView makeAdvntceOutsourcing(PrintOption printOption, String sndngId) { - return super.makeAdvntceOutsourcing(printOption, sndngId); + public ModelAndView makeAdvntceOutsourcing(PrintOption printOption, SndbQuery req) { + return super.makeAdvntceOutsourcing(printOption, req); } @Override diff --git a/src/main/resources/sql/mapper/fims/sndb/sndngDtl-mapper.xml b/src/main/resources/sql/mapper/fims/sndb/sndngDtl-mapper.xml index 36664c62..564f77d4 100644 --- a/src/main/resources/sql/mapper/fims/sndb/sndngDtl-mapper.xml +++ b/src/main/resources/sql/mapper/fims/sndb/sndngDtl-mapper.xml @@ -276,19 +276,25 @@ - - - /* 발송 ID로 발송상세 ID를 가져오기(sndngDtlMapper.selectSndngTrgtDtlIds) */ + SELECT SNDNG_DTL_ID + , CRDN_ID + , SNDNG_DTL_STTS_CD FROM TB_SNDNG_DTL - WHERE SNDNG_ID = #{sndngId} - AND DEL_YN = 'N' + + + WHERE SNDNG_DTL_ID IN ( + #{sndngDtlId} + ) + + + WHERE SNDNG_ID = #{sndngId} + + + + AND SNDNG_DTL_STTS_CD = #{sndngDtlSttsCd} + + AND DEL_YN = 'N' ORDER BY SNDNG_DTL_ID