From 4340c5fb44b9d95030bc1499b33c8edd91fd7b21 Mon Sep 17 00:00:00 2001 From: leebj Date: Fri, 20 Sep 2024 14:32:14 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BF=BC=EB=A6=AC=20=EB=B3=B5=EC=9B=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cokr/xit/cp/dao/CleanParkingMapper.java | 10 +- .../cokr/xit/fims/rent/dao/LsctMapper.java | 6 + .../xit/fims/rent/service/bean/LsctBean.java | 84 +------------- .../sql/mapper/cp/cleanParking-mapper.xml | 100 +---------------- .../sql/mapper/fims/rent/lsct-mapper.xml | 106 +++++++++++++++++- 5 files changed, 115 insertions(+), 191 deletions(-) diff --git a/src/main/java/cokr/xit/cp/dao/CleanParkingMapper.java b/src/main/java/cokr/xit/cp/dao/CleanParkingMapper.java index df78113d..08bb26a4 100644 --- a/src/main/java/cokr/xit/cp/dao/CleanParkingMapper.java +++ b/src/main/java/cokr/xit/cp/dao/CleanParkingMapper.java @@ -1,20 +1,12 @@ package cokr.xit.cp.dao; -import java.util.List; - import org.egovframe.rte.psl.dataaccess.mapper.Mapper; -import cokr.xit.cp.CleanParkingQuery; import cokr.xit.foundation.component.AbstractMapper; -import cokr.xit.foundation.data.DataObject; @Mapper("cleanParkingMapper") public interface CleanParkingMapper extends AbstractMapper { - /** - * @param req 클린파킹 대장 조회 조건 - * @return 클린파킹 대장 목록 - */ - List selectMainList(CleanParkingQuery req); + } \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/rent/dao/LsctMapper.java b/src/main/java/cokr/xit/fims/rent/dao/LsctMapper.java index 1eac1ea3..0badc891 100644 --- a/src/main/java/cokr/xit/fims/rent/dao/LsctMapper.java +++ b/src/main/java/cokr/xit/fims/rent/dao/LsctMapper.java @@ -23,6 +23,12 @@ import cokr.xit.foundation.data.DataObject; @Mapper("lsctMapper") public interface LsctMapper extends AbstractMapper { + /** + * @param req 연계 뷰 조회 조건 + * @return 연계 뷰 자료 목록 + */ + List selectMainList(RentQuery req); + /** * @param req 임대차계약 대장 조회 조건 * @return 임대차계약 대장 목록 diff --git a/src/main/java/cokr/xit/fims/rent/service/bean/LsctBean.java b/src/main/java/cokr/xit/fims/rent/service/bean/LsctBean.java index 7228fb6f..5e656883 100644 --- a/src/main/java/cokr/xit/fims/rent/service/bean/LsctBean.java +++ b/src/main/java/cokr/xit/fims/rent/service/bean/LsctBean.java @@ -5,19 +5,13 @@ import java.util.List; import javax.annotation.Resource; -import org.egovframe.rte.fdl.string.EgovStringUtil; import org.springframework.stereotype.Component; import cokr.xit.base.crypto.bean.XitAria; import cokr.xit.base.file.FileInfo; import cokr.xit.base.file.service.bean.FileBean; -import cokr.xit.cp.CleanParkingQuery; -import cokr.xit.cp.dao.CleanParkingMapper; import cokr.xit.fims.crdn.Crdn; -import cokr.xit.fims.crdn.dao.CrdnStngMapper; import cokr.xit.fims.crdn.service.bean.CrdnBean; -import cokr.xit.fims.mngt.VltnQuery; -import cokr.xit.fims.mngt.dao.VltnMapper; import cokr.xit.fims.payer.Payer; import cokr.xit.fims.payer.service.bean.PayerBean; import cokr.xit.fims.rent.Lsct; @@ -55,15 +49,6 @@ public class LsctBean extends AbstractBean { @Resource(name = "payerBean") private PayerBean payerBean; - @Resource(name = "cleanParkingMapper") - private CleanParkingMapper cleanParkingMapper; - - @Resource(name = "vltnMapper") - private VltnMapper vltnMapper; - - @Resource(name = "crdnStngMapper") - private CrdnStngMapper crdnStngMapper; - /**지정한 조건에 따라 단속 대장 목록을 조회하여 반환한다. * 통합플랫폼으로 사용하지 안을 경우 렌트 소스만 사용하기 위해서 TB_CRDN, TB_PAYER에 직접 등록한다. * @param req 임대차계약 대장 조회 조건 @@ -89,39 +74,7 @@ public class LsctBean extends AbstractBean { } // 연계 View 테이블 조회 - CleanParkingQuery cpQuery = new CleanParkingQuery(); - cpQuery.setSggCd(req.getSggCd()); - cpQuery.setTaskSeCd(req.getTaskSeCd()); - cpQuery.setSchCrdnYmdFrom(req.getSchCrdnYmdFrom()); - cpQuery.setSchCrdnYmdTo(req.getSchCrdnYmdTo()); - cpQuery.setSchVhrno(req.getSchVhrno()); - cpQuery.setOmJnos(req.getOmJnos()); - cpQuery.setOmJno(req.getOmJno()); - cpQuery.setSchEntNm(req.getSchEntNm()); - List mainList = cleanParkingMapper.selectMainList(cpQuery); - - for(DataObject main : mainList) { - VltnQuery vQuery = new VltnQuery() - .setVltnCd(EgovStringUtil.lPad(main.string("MM_LAWGB"), 2, '0')) - .setSggCd(main.string("MM_SGGCODE")) - .setTaskSeCd(main.string("MM_TASKGB")); - List list = vltnMapper.selectVltns(vQuery); - if(list != null && !list.isEmpty()) { - main.set("VLTN_ID", list.get(0).get("VLTN_ID")); - } else { - main.set("VLTN_ID", ""); - } - } - - for(DataObject main : mainList) { - String stdgNm = crdnStngMapper.selectStdgNm(main.string("MM_BDCODE")); - - if(stdgNm != null) { - main.set("CRDN_STDG_NM", stdgNm); - } else { - main.set("CRDN_STDG_NM", ""); - } - } + List mainList = lsctMapper.selectMainList(req); if (mainList.size() > 0) { for (int iLoop = 0; iLoop < mainList.size(); iLoop++) { @@ -318,40 +271,7 @@ public class LsctBean extends AbstractBean { } // 연계 View 테이블 조회 - CleanParkingQuery cpQuery = new CleanParkingQuery(); - cpQuery.setSggCd(req.getSggCd()); - cpQuery.setTaskSeCd(req.getTaskSeCd()); - cpQuery.setSchCrdnYmdFrom(req.getSchCrdnYmdFrom()); - cpQuery.setSchCrdnYmdTo(req.getSchCrdnYmdTo()); - cpQuery.setSchVhrno(req.getSchVhrno()); - cpQuery.setOmJnos(req.getOmJnos()); - cpQuery.setOmJno(req.getOmJno()); - cpQuery.setSchEntNm(req.getSchEntNm()); - List mainList = cleanParkingMapper.selectMainList(cpQuery); - - for(DataObject main : mainList) { - VltnQuery vQuery = new VltnQuery() - .setVltnCd(EgovStringUtil.lPad(main.string("MM_LAWGB"), 2, '0')) - .setSggCd(main.string("MM_SGGCODE")) - .setTaskSeCd(main.string("MM_TASKGB")); - List list = vltnMapper.selectVltns(vQuery); - if(list != null && !list.isEmpty()) { - main.set("VLTN_ID", list.get(0).get("VLTN_ID")); - } else { - main.set("VLTN_ID", ""); - } - } - - for(DataObject main : mainList) { - String stdgNm = crdnStngMapper.selectStdgNm(main.string("MM_BDCODE")); - - if(stdgNm != null) { - main.set("CRDN_STDG_NM", stdgNm); - } else { - main.set("CRDN_STDG_NM", ""); - } - } - + List mainList = lsctMapper.selectMainList(req); if (mainList.size() > 0) { for (int iLoop = 0; iLoop < mainList.size(); iLoop++) { diff --git a/src/main/resources/sql/mapper/cp/cleanParking-mapper.xml b/src/main/resources/sql/mapper/cp/cleanParking-mapper.xml index 8dd0ea1d..0b53ab7f 100644 --- a/src/main/resources/sql/mapper/cp/cleanParking-mapper.xml +++ b/src/main/resources/sql/mapper/cp/cleanParking-mapper.xml @@ -2,104 +2,6 @@ - + \ No newline at end of file diff --git a/src/main/resources/sql/mapper/fims/rent/lsct-mapper.xml b/src/main/resources/sql/mapper/fims/rent/lsct-mapper.xml index 40bbad0a..835a09f8 100644 --- a/src/main/resources/sql/mapper/fims/rent/lsct-mapper.xml +++ b/src/main/resources/sql/mapper/fims/rent/lsct-mapper.xml @@ -42,7 +42,111 @@ - +