diff --git a/src/main/java/cokr/xit/fims/rent/Hirer.java b/src/main/java/cokr/xit/fims/rent/Hirer.java index f2d4e413..e85f66d6 100644 --- a/src/main/java/cokr/xit/fims/rent/Hirer.java +++ b/src/main/java/cokr/xit/fims/rent/Hirer.java @@ -19,6 +19,11 @@ public class Hirer extends AbstractEntity { */ private String hirerId; + /** + * 기업 ID + */ + private String entId; + /** * 자동차등록번호 */ diff --git a/src/main/java/cokr/xit/fims/rent/Lsct.java b/src/main/java/cokr/xit/fims/rent/Lsct.java index 6dcf1710..eba33e99 100644 --- a/src/main/java/cokr/xit/fims/rent/Lsct.java +++ b/src/main/java/cokr/xit/fims/rent/Lsct.java @@ -138,9 +138,9 @@ public class Lsct extends AbstractEntity { private String chgDmndIp; /** - * 변경 요청 수정 일시 + * 변경 요청 취소 일시 */ - private String chgDmndMdfcnDt; + private String chgDmndRtrcnDt; /** * 변경 요청 수정자 @@ -148,9 +148,9 @@ public class Lsct extends AbstractEntity { private String chgDmndMdfr; /** - * 변경 요청 수정 IP + * 변경 요청 취소 IP */ - private String chgDmndMdfcnIp; + private String chgDmndRtrcnIp; /** * 변경 승인 여부 @@ -187,4 +187,9 @@ public class Lsct extends AbstractEntity { */ private String delRsn; + /** + * 임대차계약 IDs + */ + private String[] lsctIds; + } 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 91921444..eefd0155 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 @@ -789,7 +789,6 @@ public class LsctBean extends AbstractBean { lsct.setLsctId(lsctAprv.getLsctId()); // 임대차계약 ID lsct.setChgDmndYn("Y"); // 변경 요청 여부 lsct.setChgDmndIp(local.getHostAddress()); // 변경 요청 IP - lsct.setChgDmndMdfcnIp(local.getHostAddress()); // 변경 요청 수정 IP rtnNocs = lsctMapper.updateLsctChgDmnd(lsct); if (rtnNocs < 1) { @@ -864,7 +863,7 @@ public class LsctBean extends AbstractBean { Lsct lsct = new Lsct(); lsct.setLsctId(lsctAprv.getLsctId()); // 임대차계약 ID lsct.setChgDmndYn("N"); // 변경 요청 여부 - lsct.setChgDmndMdfcnIp(local.getHostAddress()); // 변경 요청 수정 IP + lsct.setChgDmndRtrcnIp(local.getHostAddress()); // 변경 요청 수정 IP rtnNocs = lsctMapper.updateLsctChgDmnd(lsct); if (rtnNocs < 1) { diff --git a/src/main/java/cokr/xit/fims/rent/web/Rent02Controller.java b/src/main/java/cokr/xit/fims/rent/web/Rent02Controller.java index 992ec42e..06286959 100644 --- a/src/main/java/cokr/xit/fims/rent/web/Rent02Controller.java +++ b/src/main/java/cokr/xit/fims/rent/web/Rent02Controller.java @@ -107,13 +107,13 @@ public class Rent02Controller extends ApplicationController { RentQuery req = new RentQuery(); req.setUserId(fimsUser.getId()); - List entNolist = rentEntService.getUserRentEntMpngs(req); + List entRegNoList = rentEntService.getUserRentEntMpngs(req); return mav .addObject("pageName", "rent02010") // View(jsp)에서 사용할 id 뒤에 붙일 suffix .addObject("prefixUrl", CLASS_URL) // prefixUrl .addObject("userId", fimsUser.getId()) // 사용자 ID(USER_ID) - .addObject("entNoList", entNolist) // 임대업체 목록 + .addObject("entRegNoList", entRegNoList) // 임대업체 목록 ; } diff --git a/src/main/resources/sql/mapper/fims/rent/hirer-mapper.xml b/src/main/resources/sql/mapper/fims/rent/hirer-mapper.xml index 8654b88c..f8e9b335 100644 --- a/src/main/resources/sql/mapper/fims/rent/hirer-mapper.xml +++ b/src/main/resources/sql/mapper/fims/rent/hirer-mapper.xml @@ -9,6 +9,7 @@ + @@ -36,6 +37,7 @@ SELECT H.HIRER_ID + , H.ENT_ID , H.VHRNO , H.CTRT_BGNG_YMD , H.CTRT_BGNG_TM @@ -83,11 +85,27 @@ AND H.CTRT_END_YMD = #{schCtrtEndYmd} - AND H.VHRNO = #{schVhrno} + AND H.VHRNO = #{schVhrno} AND H.HIRER_REG_NO = #{schHirerRegNo} + + AND RE.ENT_REG_NO IN ( + #{schEntRegNo} + ) + + + AND RE.ENT_REG_NO = #{schEntRegNo} + + + AND H.ENT_ID IN ( + #{entId} + ) + + + AND H.ENT_ID = #{entId} + AND DEL_YN = 'N' @@ -104,6 +122,22 @@ AND H.HIRER_ID = #{hirerId} + + + AND H.ENT_ID IN ( + #{entId} + ) + + + AND H.ENT_ID = #{entId} + + + AND RE.ENT_REG_NO IN ( + #{schEntRegNo} + ) + + + AND RE.ENT_REG_NO = #{schEntRegNo} @@ -127,6 +161,7 @@ INSERT INTO TB_HIRER ( HIRER_ID + , ENT_ID , VHRNO , CTRT_BGNG_YMD , CTRT_BGNG_TM @@ -150,6 +185,7 @@ ) VALUES ( #{hirerId} + , #{entId} , #{vhrno} , #{ctrtBgngYmd} , #{ctrtBgngTm} 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 3711a71b..552ee256 100644 --- a/src/main/resources/sql/mapper/fims/rent/lsct-mapper.xml +++ b/src/main/resources/sql/mapper/fims/rent/lsct-mapper.xml @@ -24,9 +24,9 @@ - + - + @@ -388,9 +388,9 @@ , L.CHG_DMND_DT , L.CHG_DMND_RGTR , L.CHG_DMND_IP - , L.CHG_DMND_MDFCN_DT + , L.CHG_DMND_RTRCN_DT , L.CHG_DMND_MDFR - , L.CHG_DMND_MDFCN_IP + , L.CHG_DMND_RTRCN_IP , L.CHG_APRV_YN , L.CHG_APRV_DT , L.CHG_AUTZR @@ -475,9 +475,9 @@ , L.CHG_DMND_DT , L.CHG_DMND_RGTR , L.CHG_DMND_IP - , L.CHG_DMND_MDFCN_DT + , L.CHG_DMND_RTRCN_DT , L.CHG_DMND_MDFR - , L.CHG_DMND_MDFCN_IP + , L.CHG_DMND_RTRCN_IP , L.CHG_APRV_YN , L.CHG_APRV_DT , L.CHG_AUTZR @@ -605,9 +605,9 @@ , CHG_DMND_DT , CHG_DMND_RGTR , CHG_DMND_IP - , CHG_DMND_MDFCN_DT + , CHG_DMND_RTRCN_DT , CHG_DMND_MDFR - , CHG_DMND_MDFCN_IP + , CHG_DMND_RTRCN_IP , CHG_APRV_YN , CHG_APRV_DT , CHG_AUTZR @@ -635,9 +635,9 @@ , #{chgDmndDt} , #{chgDmndRgtr} , #{chgDmndIp} - , #{chgDmndMdfcnDt} + , #{chgDmndRtrcnDt} , #{chgDmndMdfr} - , #{chgDmndMdfcnIp} + , #{chgDmndRtrcnIp} , 'N' , #{chgAprvDt} , #{chgAutzr} @@ -664,9 +664,9 @@ , CHG_DMND_DT = #{chgDmndDt} , CHG_DMND_RGTR = #{chgDmndRgtr} , CHG_DMND_IP = #{chgDmndIp} - , CHG_DMND_MDFCN_DT = #{chgDmndMdfcnDt} + , CHG_DMND_RTRCN_DT = #{chgDmndRtrcnDt} , CHG_DMND_MDFR = #{chgDmndMdfr} - , CHG_DMND_MDFCN_IP = #{chgDmndMdfcnIp} + , CHG_DMND_RTRCN_IP = #{chgDmndRtrcnIp} , CHG_APRV_YN = #{chgAprvYn} , CHG_APRV_DT = #{chgAprvDt} , CHG_AUTZR = #{chgAutzr} @@ -680,21 +680,25 @@ /* 임대차계약 대장 수정(lsctMapper.updateLsctChgDmnd) */ UPDATE TB_LSCT - SET CHG_DMND_YN = #{chgDmndYn} - + SET CHG_DMND_YN = #{chgDmndYn} + , CHG_DMND_DT = + , CHG_DMND_RGTR = #{createdBy} + , CHG_DMND_IP = #{chgDmndIp} + , CHG_DMND_RTRCN_DT = NULL + , CHG_DMND_MDFR = NULL + , CHG_DMND_RTRCN_IP = NULL - - , CHG_DMND_RGTR = #{createdBy} + + , CHG_DMND_DT = NULL + , CHG_DMND_RGTR = NULL + , CHG_DMND_IP = NULL + , CHG_DMND_RTRCN_DT = + , CHG_DMND_MDFR = #{modifiedBy} + , CHG_DMND_RTRCN_IP = #{chgDmndRtrcnIp} - - , CHG_DMND_IP = #{chgDmndIp} - - , CHG_DMND_MDFCN_DT = - , CHG_DMND_MDFR = #{modifiedBy} - , CHG_DMND_MDFCN_IP = #{chgDmndMdfcnIp} - , MDFCN_DT = - , MDFR = #{modifiedBy} + , MDFCN_DT = + , MDFR = #{modifiedBy} WHERE LSCT_ID = #{lsctId} AND DEL_YN = 'N' diff --git a/src/main/resources/sql/mapper/fims/rent/rentEnt-mapper.xml b/src/main/resources/sql/mapper/fims/rent/rentEnt-mapper.xml index df9ec07f..8c619e36 100644 --- a/src/main/resources/sql/mapper/fims/rent/rentEnt-mapper.xml +++ b/src/main/resources/sql/mapper/fims/rent/rentEnt-mapper.xml @@ -59,8 +59,8 @@ AND RE.ENT_ID = #{entId} - - AND RE.ENT_REG_NO = #{schEntRegNo} + + AND RE.ENT_REG_NO= #{schEntRegNo} AND RE.ENT_NM LIKE CONCAT('%', #{schEntNm}, '%') @@ -80,7 +80,7 @@ AND RE.ENT_ID = #{entId} - + AND RE.ENT_REG_NO= #{schEntRegNo}