From 53e7545183324fd59b36cba25efe0638f20fe8a6 Mon Sep 17 00:00:00 2001 From: leebj Date: Thu, 31 Oct 2024 17:32:06 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9C=84=ED=83=9D=EC=8A=A4=20=EB=82=A9?= =?UTF-8?q?=EB=B6=80=EC=9E=90=EC=A0=95=EB=B3=B4=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/rent/web/Rent04Controller.java | 104 ++++++------------ 1 file changed, 32 insertions(+), 72 deletions(-) diff --git a/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java b/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java index 91fa2463..8c53e4b2 100644 --- a/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java +++ b/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java @@ -30,10 +30,10 @@ import cokr.xit.base.web.ApplicationController; import cokr.xit.fims.base.FimsUser; import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.cmmn.xls.StyleMaker; -import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.dao.CrdnListMapper; import cokr.xit.fims.rent.RentQuery; import cokr.xit.fims.rent.dao.LsctMapper; +import cokr.xit.fims.rent.dao.LsctMpngMapper; import cokr.xit.fims.rent.dao.UserRentEntMpngMapper; import cokr.xit.foundation.data.DataObject; @@ -67,6 +67,9 @@ public class Rent04Controller extends ApplicationController { @Resource(name = "lsctMapper") private LsctMapper lsctMapper; + @Resource(name = "lsctMpngMapper") + private LsctMpngMapper lsctMpngMapper; + @Resource(name = "userRentEntMpngMapper") private UserRentEntMpngMapper userRentEntMpngMapper; @@ -190,93 +193,50 @@ public class Rent04Controller extends ApplicationController { List searchResults = null; DataObject searchResult1 = new DataObject(); - String foundType = ""; //HIRER,RTPYR - - if(foundType.equals("")) { - RentQuery lsctQuery = new RentQuery(); - lsctQuery.setEntIds(entIds); - lsctQuery.setEntIds("전자납부번호"); //TODO:전자납부번호 - searchResults = lsctMapper.selectLsctList(lsctQuery); - if(searchResults != null && !searchResults.isEmpty()) { - searchResult1 = searchResults.get(0); - foundType = "HIRER"; - } - } + boolean find = false; - if(foundType.equals("") && useable) { + //D,G 컬럼 사용가능하면 + if(useable) { RentQuery lsctQuery = new RentQuery(); + //매핑아이디 IS NOT NULL lsctQuery.setEntIds(entIds); lsctQuery.setSchVhrno(extractVhrno); - lsctQuery.setSchCtrtYmd(crdnDt.substring(0, 8)); - //TODO:단속시간 - //TODO:과태료구분 - searchResults = lsctMapper.selectLsctList(lsctQuery); - - if(searchResults != null && !searchResults.isEmpty()) { - searchResult1 = searchResults.get(0); - foundType = "HIRER"; - } - } - - - if(foundType.equals("")) { - CrdnQuery crdnQuery = new CrdnQuery(); - crdnQuery.setEpayno(epaynoColumn); - searchResults = crdnListMapper.selectCrackdownList(crdnQuery); - - if(searchResults != null && !searchResults.isEmpty()) { - searchResult1 = searchResults.get(0); - foundType = "RTPYR"; - } - } - - if(foundType.equals("") && useable) { - CrdnQuery crdnQuery = new CrdnQuery(); - crdnQuery.setVhrno(extractVhrno); - crdnQuery.setCrdnYmd(crdnDt.substring(0, 8)); - crdnQuery.setCrdnTm(crdnDt.substring(8)); + //lsctQuery.set(crdnDt.substring(0, 8)); //TODO:단속일자 + //lsctQuery.set(crdnDt.substring(8)); //TODO:단속시간 //TODO:과태료구분 - searchResults = crdnListMapper.selectCrackdownList(crdnQuery); + searchResults = lsctMpngMapper.selectCrdnList(lsctQuery); if(searchResults != null && !searchResults.isEmpty()) { searchResult1 = searchResults.get(0); - foundType = "RTPYR"; + find = true; } } + //차량번호,단속일시로 찾지못하면 + if(!find) { + RentQuery lsctQuery = new RentQuery(); + //매핑아이디 IS NOT NULL + lsctQuery.setEntIds(entIds); + //lsctQuery.set(epaynoColumn); //TODO:전자납부번호 + searchResults = lsctMpngMapper.selectCrdnList(lsctQuery); + if(searchResults != null && !searchResults.isEmpty()) { + searchResult1 = searchResults.get(0); + find = true; + } + } - if(foundType.equals("HIRER")) { - - resultRow.set("K", searchResult1.string("HIRER_NM")); - if(searchResult1.string("HIRER_SE_CD").equals("99")) { - resultRow.set("L", searchResult1.string("HIRER_REG_NO")); - } else { - resultRow.set("M", searchResult1.string("HIRER_REG_NO")); - } - resultRow.set("N", searchResult1.string("HIRER_ADDR")); - resultRow.set("O", searchResult1.string("HIRER_DTL_ADDR")); - resultRow.set("P", searchResult1.string("HIRER_ZIP")); - - } else if(foundType.equals("RTPYR")) { - - //납부자정보가 사용자기업정보가 아니면 - if(!entNms.contains(searchResult1.string("RTPYR_NM")) - && !entRegNos.contains(searchResult1.string("RTPYR_NO")) - ) { - resultRow.set("K", searchResult1.string("RTPYR_NM")); - if(searchResult1.string("RTPYR_SE_CD").equals("99")) { - resultRow.set("L", searchResult1.string("RTPYR_NO")); - } else { - resultRow.set("M", searchResult1.string("RTPYR_NO")); - } - resultRow.set("N", searchResult1.string("RTPYR_ADDR")); - resultRow.set("O", searchResult1.string("RTPYR_DTL_ADDR")); - resultRow.set("P", searchResult1.string("RTPYR_ZIP")); - } + resultRow.set("K", searchResult1.string("HIRER_NM")); + if(searchResult1.string("HIRER_SE_CD").equals("99")) { + resultRow.set("L", searchResult1.string("HIRER_REG_NO")); + } else { + resultRow.set("M", searchResult1.string("HIRER_REG_NO")); } + resultRow.set("N", searchResult1.string("HIRER_ADDR")); + resultRow.set("O", searchResult1.string("HIRER_DTL_ADDR")); + resultRow.set("P", searchResult1.string("HIRER_ZIP")); result.add(resultRow); }