From 9095b69c9f7f33aaa4b028bc351c4e4d53020b9a Mon Sep 17 00:00:00 2001 From: jjh Date: Fri, 6 Sep 2024 09:23:15 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=84=EB=8C=80=EA=B3=84=EC=95=BD=EC=84=9C?= =?UTF-8?q?=20=EA=B4=80=EB=A6=AC=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 | 9 +++++++++ .../xit/fims/rent/service/bean/LsctBean.java | 10 +++++++--- .../xit/fims/rent/web/Rent02Controller.java | 1 - .../sql/mapper/fims/rent/lsct-mapper.xml | 18 ++++++++++++------ 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/main/java/cokr/xit/fims/rent/RentQuery.java b/src/main/java/cokr/xit/fims/rent/RentQuery.java index f8fc50fa..54c496b7 100644 --- a/src/main/java/cokr/xit/fims/rent/RentQuery.java +++ b/src/main/java/cokr/xit/fims/rent/RentQuery.java @@ -37,6 +37,7 @@ public class RentQuery extends CmmnQuery { private String omJno; // 소유주 번호 private String[] rtpyrNos; // 납부자 번호s private String rtpyrNo; // 납부자 번호 + private String nxrpCrdnLinkYn; // 세외수입 단속 연계 여부 // ETC private String callPurpose; // infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정, refresh 재조회). @@ -186,6 +187,14 @@ public class RentQuery extends CmmnQuery { this.rtpyrNo = rtpyrNo; } + public String getNxrpCrdnLinkYn() { + return ifEmpty(nxrpCrdnLinkYn, () -> null); + } + + public void setNxrpCrdnLinkYn(String nxrpCrdnLinkYn) { + this.nxrpCrdnLinkYn = nxrpCrdnLinkYn; + } + // ETC ///////////////////////////////////////////////////////////////////// public String getCallPurpose() { return ifEmpty(callPurpose, () -> null); 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 cd21767e..61b31135 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 @@ -171,17 +171,21 @@ public class LsctBean extends AbstractBean { crdn.setMinusAmt(mainList.get(iLoop).number("MM_MINUS_KEUM").intValue()); // 감경 금액 crdn.setRcvmtAmt(mainList.get(iLoop).number("MM_SUKEUM").intValue()); // 수납 금액 crdn.setBfrCrdnId(mainList.get(iLoop).string("MM_PRECODE")); // 이전 단속 ID - crdn.setNxrpCrdnLinkYn(null); // 세외수입 단속 연계 여부 + crdn.setNxrpCrdnLinkYn(mainList.get(iLoop).string("NIS_LINK_YN")); // 세외수입 단속 연계 여부 crdn.setNxrpCrdnLinkUserId(null); // 세외수입 단속 연계 사용자 ID crdn.setNxrpCrdnLinkDt(null); // 세외수입 단속 연계 일시 - crdn.setNxrpAcbKey(null); // 세외수입 대장 키 + if (mainList.get(iLoop).string("MC_LVY_KEY").length() == 11) { // 세외수입 대장 키 + crdn.setNxrpAcbKey(mainList.get(iLoop).string("MC_LVY_KEY")); + } else { + crdn.setNxrpAcbKey(null); + } crdn.setDelYn("N"); // 삭제 여부 crdn.setCreatedAt(mainList.get(iLoop).string("MM_INDT")); crdn.setCreatedBy(mainList.get(iLoop).string("MM_INUSER")); int rtnNocs = lsctMapper.copyMainToCrdn(crdn); if (rtnNocs == 0) { - throw new RuntimeException("[F] 단속 대장 등록 작업에 실패하였습니다."); // 예외를 발생시켜서 DB Rollback + throw new RuntimeException("[F] 단속 대장 등록 작업에 실패하였습니다."); // 예외를 발생시켜서 DB Rollback } // 단속 부가 정보 Insert 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 4bf76554..aefcb3f3 100644 --- a/src/main/java/cokr/xit/fims/rent/web/Rent02Controller.java +++ b/src/main/java/cokr/xit/fims/rent/web/Rent02Controller.java @@ -22,7 +22,6 @@ import cokr.xit.fims.base.FimsUser; import cokr.xit.fims.cmmn.service.bean.StngBean; import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.StyleMaker; -import cokr.xit.fims.excl.LevyExclQuery; import cokr.xit.fims.rent.Lsct; import cokr.xit.fims.rent.RentQuery; import cokr.xit.fims.rent.service.HirerService; 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 75b82876..f8d766a3 100644 --- a/src/main/resources/sql/mapper/fims/rent/lsct-mapper.xml +++ b/src/main/resources/sql/mapper/fims/rent/lsct-mapper.xml @@ -51,19 +51,19 @@ , MM_DLGB , MM_INGB , MM_DATE - , (CASE WHEN LENGTH(MM_TIME) = 4 THEN CONCAT(MM_TIME, '00') - ELSE MM_TIME END) AS MM_TIME + , (CASE WHEN LENGTH(MM_TIME) = 4 THEN CONCAT(MM_TIME, '00') ELSE MM_TIME END) AS MM_TIME , MM_LAWGB , (SELECT VLTN_ID FROM TB_VLTN X WHERE X.VLTN_CD = LPAD(MM_LAWGB, 2, '0') - AND X.SGG_CD = MM_SGGCODE AND X.TASK_SE_CD = MM_TASKGB) AS VLTN_ID + AND X.SGG_CD = MM_SGGCODE + AND X.TASK_SE_CD = MM_TASKGB) AS VLTN_ID , MM_SGNM , MM_SGTEL , MM_SGCONT , MM_SGPOS , MM_BDCODE , (SELECT TRIM(CONCAT(X.EMD_NM, ' ', X.LI_NM)) FROM TB_STDG X - WHERE X.STDG_CD = MM_BDCODE) AS CRDN_STDG_NM + WHERE X.STDG_CD = MM_BDCODE) AS CRDN_STDG_NM , MM_GPS_X , MM_GPS_Y , MM_TRAC @@ -93,8 +93,7 @@ , MM_VIDEOFILENM , MM_SAFEZONE , MM_VIORCNT - , (CASE WHEN LENGTH(MM_TIME2) = 4 THEN CONCAT(MM_TIME2, '00') - ELSE MM_TIME2 END) AS MM_TIME2 + , (CASE WHEN LENGTH(MM_TIME2) = 4 THEN CONCAT(MM_TIME2, '00') ELSE MM_TIME2 END) AS MM_TIME2 , MM_CARNAME , MM_CARCOLOR , MM_CARFUEL @@ -117,6 +116,8 @@ , OM_INGB , OM_INDT , OM_BDCODE + , MC_LVY_KEY + , (CASE WHEN MC_LVY_KEY IS NOT NULL THEN 'Y' ELSE 'N' END) AS NIS_LINK_YN FROM VW_CP_MAIN @@ -322,6 +323,8 @@ , C.FFNLG_CRDN_AMT , C.CRDN_STTS_CD , (SELECT GET_CODE_NM('FIM010', C.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM + , C.NXRP_CRDN_LINK_YN + , C.NXRP_ACB_KEY , V.VLTN_ID , V.VLTN_CD , V.VLTN_ARTCL @@ -376,6 +379,9 @@ AND C.VHRNO = #{schVhrno} + + + AND C.NXRP_CRDN_LINK_YN = #{nxrpCrdnLinkYn} AND P.RTPYR_NO IN (