diff --git a/src/main/java/cokr/xit/fims/rent/dao/LsctMpngMapper.java b/src/main/java/cokr/xit/fims/rent/dao/LsctMpngMapper.java index f87d18da..1aa8be75 100644 --- a/src/main/java/cokr/xit/fims/rent/dao/LsctMpngMapper.java +++ b/src/main/java/cokr/xit/fims/rent/dao/LsctMpngMapper.java @@ -29,6 +29,8 @@ public interface LsctMpngMapper extends AbstractMapper { */ List selectFfnlgMainList(RentQuery req); + DataObject selectIsCrdnInfo(RentQuery req); + /**지정한 조건에 따라 단속 대장 목록을 조회하여 반환한다. * @param req 임대차계약 대장 조회 조건 * @return 연계 뷰 자료 목록 diff --git a/src/main/java/cokr/xit/fims/rent/service/bean/LsctMpngBean.java b/src/main/java/cokr/xit/fims/rent/service/bean/LsctMpngBean.java index 577e0598..6fa1abab 100644 --- a/src/main/java/cokr/xit/fims/rent/service/bean/LsctMpngBean.java +++ b/src/main/java/cokr/xit/fims/rent/service/bean/LsctMpngBean.java @@ -118,10 +118,10 @@ public class LsctMpngBean extends AbstractBean { rentQuery.setMmCode(mainList.get(iLoop).string("MM_CODE")); rentQuery.setTaskSeCd(mainList.get(iLoop).string("MM_TASKGB")); - DataObject crdnInfo = lsctMpngMapper.selectCrdnInfo(rentQuery); + DataObject isCrdnInfo = lsctMpngMapper.selectIsCrdnInfo(rentQuery); // 단속 정보가 존재하지 않는다면.. 해당 자료 insert - if (crdnInfo == null) { + if (isCrdnInfo == null) { // 납부자 정보 Payer payer = new Payer(); payer.setSggCd(mainList.get(iLoop).string("OM_SGGCODE")); // 시군구 코드 @@ -359,10 +359,10 @@ public class LsctMpngBean extends AbstractBean { // 단속 정보 Crdn crdn = new Crdn(); - crdn.setCrdnId(crdnInfo.string("CRDN_ID")); // CRDN_ID - crdn.setMmCode(crdnInfo.string("MM_CODE")); // MM_CODE - crdn.setSggCd(crdnInfo.string("SGG_CD")); // 시군구 코드 - crdn.setTaskSeCd(crdnInfo.string("TASK_SE_CD")); // 업무 구분 코드 + crdn.setCrdnId(isCrdnInfo.string("CRDN_ID")); // CRDN_ID + crdn.setSggCd(isCrdnInfo.string("SGG_CD")); // 시군구 코드 + crdn.setTaskSeCd(isCrdnInfo.string("TASK_SE_CD")); // 업무 구분 코드 + crdn.setMmCode(isCrdnInfo.string("MM_CODE")); // MM_CODE crdn.setCrdnRegSeCd(String.format("%02d", mainList.get(iLoop).number("MM_DLGB").intValue())); // 단속 등록 구분 코드 crdn.setCrdnInptSeCd(String.format("%02d", mainList.get(iLoop).number("MM_INGB").intValue())); // 단속 입력 구분 코드 crdn.setRtpyrId(result.getRtpyrId()); // 납부자 ID @@ -483,7 +483,24 @@ public class LsctMpngBean extends AbstractBean { req.setRtpyrNo(req.getSchEntRegNo()); } - return lsctMpngMapper.selectCrdnList(req); + // + List crdnList = lsctMpngMapper.selectCrdnList(req); + + if (crdnList != null) { + for (int iLoop = 0; iLoop < crdnList.size(); iLoop++) { + // 표출된 주민등록번호를 보정한다. + if ("01,02".contains(crdnList.get(iLoop).string("RTPYR_SE_CD"))) { + crdnList.get(iLoop).put("RTPYR_NO_MASK", crdnList.get(iLoop).string("RTPYR_BRDT")); + } else { + crdnList.get(iLoop).put("RTPYR_NO_MASK", crdnList.get(iLoop).string("RTPYR_NO")); + } + + crdnList.get(iLoop).remove("RTPYR_BRDT"); // 납부자 생년월일 + crdnList.get(iLoop).remove("RTPYR_NO"); // 납부자 번호 + } + } + + return crdnList; } /**지정한 조건에 따라 단속 대장 상세정보를 조회하여 반환한다. @@ -491,7 +508,20 @@ public class LsctMpngBean extends AbstractBean { * @return 단속, 임대차계약 대장 객체 */ public DataObject getCrdnInfo(RentQuery req) { - return lsctMpngMapper.selectCrdnInfo(req); + // + DataObject crdnInfo = lsctMpngMapper.selectCrdnInfo(req); + + // 표출된 주민등록번호를 보정한다. + if ("01,02".contains(crdnInfo.string("RTPYR_SE_CD"))) { + crdnInfo.put("RTPYR_NO_MASK", crdnInfo.string("RTPYR_BRDT")); + } else { + crdnInfo.put("RTPYR_NO_MASK", crdnInfo.string("RTPYR_NO")); + } + + crdnInfo.remove("RTPYR_BRDT"); // 납부자 생년월일 + crdnInfo.remove("RTPYR_NO"); // 납부자 번호 + + return crdnInfo; } /**지정한 조건에 따라 단속, 임대차계약 매핑 대장 목록을 조회하여 반환한다. 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 aebdc8d4..272e1ac8 100644 --- a/src/main/resources/sql/mapper/fims/rent/lsctMpng-mapper.xml +++ b/src/main/resources/sql/mapper/fims/rent/lsctMpng-mapper.xml @@ -152,6 +152,25 @@ + + SELECT C.CRDN_ID , C.SGG_CD @@ -174,7 +193,6 @@ , C.VHCL_NM , C.VHCL_COLR , C.FFNLG_CRDN_AMT - , C.FFNLG_AMT , C.ADVNTCE_BGNG_YMD , C.ADVNTCE_DUDT_YMD , C.ADVNTCE_AMT @@ -195,12 +213,85 @@ , (GET_CODE_NM('FIM011', P.RTPYR_SE_CD)) AS RTPYR_SE_NM , P.RTPYR_NO , P.RTPYR_NM + , P.RTPYR_BRDT , PA.ZIP , PA.ADDR , PA.DTL_ADDR + , LV.LEVY_YMD + , LV.FRST_DUDT_YMD + , LV.DUDT_YMD + , LV.FFNLG_AMT + , LV.LEVY_PCPTAX + , LV.LEVY_ADAMT + , LV.RCVMT_PCPTAX + , LV.RCVMT_ADAMT + , LV.RDAMT_PCPTAX + , LV.RDAMT_ADAMT + , LV.SUM_AMT + , LV.EPAYNO + , LV.BANK_NM + , LV.VR_ACTNO + , LV.BANK_NM2 + , LV.VR_ACTNO2 + , LV.BANK_NM3 + , LV.VR_ACTNO3 + , LV.BANK_NM4 + , LV.VR_ACTNO4 + , LV.BANK_NM5 + , LV.VR_ACTNO5 + , LV.BANK_NM6 + , LV.VR_ACTNO6 + , LV.BANK_NM7 + , LV.VR_ACTNO7 + , LV.BANK_NM8 + , LV.VR_ACTNO8 + , LV.BANK_NM9 + , LV.VR_ACTNO9 + , LV.BANK_NM10 + , LV.VR_ACTNO10 + , LV.BANK_NM11 + , LV.VR_ACTNO11 + , LV.BANK_NM12 + , LV.VR_ACTNO12 + , LV.BANK_NM13 + , LV.VR_ACTNO13 + , LV.BANK_NM14 + , LV.VR_ACTNO14 + , LV.BANK_NM15 + , LV.VR_ACTNO15 + , LV.BANK_NM16 + , LV.VR_ACTNO16 + , LV.BANK_NM17 + , LV.VR_ACTNO17 + , LV.BANK_NM18 + , LV.VR_ACTNO18 + , LV.BANK_NM19 + , LV.VR_ACTNO19 + , LV.BANK_NM20 + , LV.VR_ACTNO20 + , LM.LSCT_MPNG_ID + , LM.DMND_DT + , LM.CHG_APRV_STTS + , (GET_CODE_NM('FIM089', LM.CHG_APRV_STTS)) AS CHG_APRV_STTS_NM + , LM.CHG_APRV_DT + , (CONCAT(L.CTRT_BGNG_YMD, L.CTRT_BGNG_TM)) AS CTRT_BGNG_DT + , (CONCAT(L.CTRT_END_YMD, L.CTRT_END_TM)) AS CTRT_END_DT + , L.HIRER_SE_CD + , (GET_CODE_NM('FIM089', L.HIRER_SE_CD)) AS HIRER_SE_NM + , L.HIRER_REG_NO + , L.HIRER_NM + , RE.ENT_SE_CD + , (GET_CODE_NM('FIM088', RE.ENT_SE_CD)) AS ENT_SE_NM + , RE.ENT_NM + , RE.ENT_REG_NO + , RE.RPRSV_NM FROM TB_CRDN C - INNER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID) + LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID) LEFT OUTER JOIN TB_PAYER_ADDR PA ON (C.RTPYR_ID = PA.RTPYR_ID AND C.ADDR_SN = PA.ADDR_SN) + LEFT OUTER JOIN TB_LEVY LV ON (C.CRDN_ID = LV.CRDN_ID) + LEFT OUTER JOIN TB_LSCT_MPNG LM ON (C.CRDN_ID = LM.CRDN_ID AND LM.DEL_YN = 'N') + LEFT OUTER JOIN TB_LSCT L ON (LM.LSCT_ID = L.LSCT_ID AND L.DEL_YN = 'N') + LEFT OUTER JOIN TB_RENT_ENT RE ON (LM.ENT_ID = RE.ENT_ID AND RE.DEL_YN = 'N')