From 7b19c41a32015329c5f0be2015c9522988e5df8e Mon Sep 17 00:00:00 2001 From: leebj Date: Mon, 4 Nov 2024 09:19:28 +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=EB=B3=80=EA=B2=BD=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/fims/rent/RentQuery.java | 28 ++++++++++++++++++ .../xit/fims/rent/web/Rent04Controller.java | 29 ++++++++++--------- .../sql/mapper/fims/rent/lsctMpng-mapper.xml | 15 ++++++++++ 3 files changed, 58 insertions(+), 14 deletions(-) diff --git a/src/main/java/cokr/xit/fims/rent/RentQuery.java b/src/main/java/cokr/xit/fims/rent/RentQuery.java index bcae43a0..06784252 100644 --- a/src/main/java/cokr/xit/fims/rent/RentQuery.java +++ b/src/main/java/cokr/xit/fims/rent/RentQuery.java @@ -58,6 +58,9 @@ public class RentQuery extends CmmnQuery { private String callPurpose; // infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정, refresh 재조회). private String delRsn; // 삭제 사유 private String ffnlgSysInqYn; // 과태료 시스템 조회 여부 + private String hirerMpngYn; // 임차인 매핑 여부 + private String crdnDt; + private String epayno; private String cellDataDef; @@ -349,6 +352,31 @@ public class RentQuery extends CmmnQuery { public void setFfnlgSysInqYn(String ffnlgSysInqYn) { this.ffnlgSysInqYn = ffnlgSysInqYn; } + + public String getHirerMpngYn() { + return ifEmpty(hirerMpngYn, () -> null); + } + + public void setHirerMpngYn(String hirerMpngYn) { + this.hirerMpngYn = hirerMpngYn; + } + + public String getCrdnDt() { + return ifEmpty(crdnDt, () -> null); + } + + public void setCrdnDt(String crdnDt) { + this.crdnDt = crdnDt; + } + + public String getEpayno() { + return ifEmpty(epayno, () -> null); + } + + public void setEpayno(String epayno) { + this.epayno = epayno; + } + // ETC ///////////////////////////////////////////////////////////////////// public String getCellDataDef() { 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 8c53e4b2..f75eee6d 100644 --- a/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java +++ b/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java @@ -199,11 +199,10 @@ public class Rent04Controller extends ApplicationController { //D,G 컬럼 사용가능하면 if(useable) { RentQuery lsctQuery = new RentQuery(); - //매핑아이디 IS NOT NULL + lsctQuery.setHirerMpngYn("Y"); lsctQuery.setEntIds(entIds); lsctQuery.setSchVhrno(extractVhrno); - //lsctQuery.set(crdnDt.substring(0, 8)); //TODO:단속일자 - //lsctQuery.set(crdnDt.substring(8)); //TODO:단속시간 + lsctQuery.setCrdnDt(crdnDt); //TODO:과태료구분 searchResults = lsctMpngMapper.selectCrdnList(lsctQuery); @@ -216,9 +215,9 @@ public class Rent04Controller extends ApplicationController { //차량번호,단속일시로 찾지못하면 if(!find) { RentQuery lsctQuery = new RentQuery(); - //매핑아이디 IS NOT NULL + lsctQuery.setHirerMpngYn("Y"); lsctQuery.setEntIds(entIds); - //lsctQuery.set(epaynoColumn); //TODO:전자납부번호 + lsctQuery.setEpayno(epaynoColumn); searchResults = lsctMpngMapper.selectCrdnList(lsctQuery); @@ -228,15 +227,17 @@ public class Rent04Controller extends ApplicationController { } } - 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")); + if(find) { + resultRow.set("K", searchResult1.string("HIRER_NM")); + if(searchResult1.string("HIRER_SE_CD").equals("99")) { //TODO: 면허번호입력여부 + 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); } diff --git a/src/main/resources/sql/mapper/fims/rent/lsctMpng-mapper.xml b/src/main/resources/sql/mapper/fims/rent/lsctMpng-mapper.xml index b2748637..04f2001e 100644 --- a/src/main/resources/sql/mapper/fims/rent/lsctMpng-mapper.xml +++ b/src/main/resources/sql/mapper/fims/rent/lsctMpng-mapper.xml @@ -364,6 +364,21 @@ AND C.TASK_SE_CD = #{taskSeCd} + + AND LM.LSCT_MPNG_ID IS NOT NULL AND LM.LSCT_MPNG_ID != '' + + + AND L.ENT_ID IN ( + #{entId} + ) + + + AND CONCAT(L.CTRT_BGNG_YMD,L.CTRT_BGNG_TM) =]]> #{crdnDt} + AND CONCAT(L.CTRT_END_YMD,L.CTRT_END_TM) #{crdnDt} + + + AND LV.EPAYNO = #{epayno} + AND C.DEL_YN = 'N'