From e45792a2d09f7f51f041c2ff2613d13f9a308c0c Mon Sep 17 00:00:00 2001 From: jjh Date: Tue, 19 Dec 2023 11:33:24 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B6=80=EA=B3=BC=20=EC=97=91=EC=85=80=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/epst/web/Epst02Controller.java | 7 +- .../cokr/xit/fims/levy/dao/LevyMapper.java | 8 + .../xit/fims/levy/service/bean/LevyBean.java | 33 ++- .../xit/fims/levy/web/Levy01Controller.java | 190 ++++++++++++++++- .../xit/fims/rcvm/web/Rcvm01Controller.java | 2 +- .../sql/mapper/fims/levy/levy-mapper.xml | 192 ++++++++---------- .../sql/mapper/fims/rcvm/rcvmt-mapper.xml | 2 +- .../WEB-INF/jsp/fims/epst/epst02010-main.jsp | 25 +-- .../WEB-INF/jsp/fims/epst/epst02030-main.jsp | 8 +- .../WEB-INF/jsp/fims/epst/epst02050-main.jsp | 68 +++---- .../WEB-INF/jsp/fims/levy/levy01010-main.jsp | 98 ++++++--- .../WEB-INF/jsp/fims/levy/levy01050-main.jsp | 127 +++++++----- .../WEB-INF/jsp/fims/rcvm/rcvm01020-info.jsp | 2 +- 13 files changed, 493 insertions(+), 269 deletions(-) diff --git a/src/main/java/cokr/xit/fims/epst/web/Epst02Controller.java b/src/main/java/cokr/xit/fims/epst/web/Epst02Controller.java index a06c6ace..0df7f554 100644 --- a/src/main/java/cokr/xit/fims/epst/web/Epst02Controller.java +++ b/src/main/java/cokr/xit/fims/epst/web/Epst02Controller.java @@ -517,13 +517,12 @@ public class Epst02Controller extends ApplicationController { .addObject("pageName", "epst02050") // View(jsp)에서 사용할 id 뒤에 붙일 suffix .addObject("infoPrefix", "epostRcptRslt") // prefix .addObject("sggCd", managedUser.getOrgID()) // 시군구 코드(SGG_CD) - .addObject("deptCd", managedUser.getDeptCode()) // 부서 코드(DEPT_CD) + .addObject("deptCd", deptInfo.string("DEPT_CD")) // 부서 코드 + .addObject("egpConOrg", deptInfo.string("EGP_CON_ORG")) // E그린 외부기관구분코드 .addObject("EGP002List", commonCodes.get("EGP002")) // 취급 구분(DIV_KB) .addObject("FIM054List", commonCodes.get("FIM054")) // 업무 구분 코드(TASK_SE_CD) .addObject("FIM082List", commonCodes.get("FIM082")) // 작업 코드 3(JOB_CD) - .addObject("pageDataName2", "Dept") // dataset2 부서 정보 - .addObject("deptInfo", json ? deptInfo : toJson(deptInfo)) // 부서 정보(TB_DEPT) - .addObject("pageDataName3", "SumAmt") // dataset3 합계 정보 + .addObject("pageDataName2", "SumAmt") // dataset3 합계 정보 ; } diff --git a/src/main/java/cokr/xit/fims/levy/dao/LevyMapper.java b/src/main/java/cokr/xit/fims/levy/dao/LevyMapper.java index b475ecbd..dcd0bb25 100644 --- a/src/main/java/cokr/xit/fims/levy/dao/LevyMapper.java +++ b/src/main/java/cokr/xit/fims/levy/dao/LevyMapper.java @@ -46,6 +46,14 @@ public interface LevyMapper extends AbstractMapper { * @return 부과 대장 객체 */ default DataObject selectLevyInfo(LevyQuery req) { + // 기본 정렬 + if (req.getUseYN() == null) { + req.setUseYN("Y"); + } + if (req.getOrderBy() == null) { + req.setOrderBy("L.LEVY_ID DESC"); + } + List levys = selectLevys(req); return !levys.isEmpty() ? levys.get(0) : null; diff --git a/src/main/java/cokr/xit/fims/levy/service/bean/LevyBean.java b/src/main/java/cokr/xit/fims/levy/service/bean/LevyBean.java index 757c5bcf..7859b75e 100644 --- a/src/main/java/cokr/xit/fims/levy/service/bean/LevyBean.java +++ b/src/main/java/cokr/xit/fims/levy/service/bean/LevyBean.java @@ -10,6 +10,7 @@ import org.springframework.stereotype.Component; import cokr.xit.foundation.AbstractComponent; import cokr.xit.foundation.data.DataObject; import cokr.xit.base.user.ManagedUser; +import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.cmmn.CrdnSttsHstry; import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean; import cokr.xit.fims.levy.Levy; @@ -42,11 +43,17 @@ public class LevyBean extends AbstractComponent { * @return 부과 대장 목록 */ public List getRductLevyTrgtList(LevyQuery req) { + // 삭제 여부 확인 if (req.getDelYN() == null) { req.setDelYN("N"); } + // 정렬 확인 if (req.getOrderBy() == null) { - req.setOrderBy("REG_DT"); + if (req.getBy() == null) { + req.setOrderBy("REG_DT"); + } else { + req.setOrderBy(CmmnUtil.convertCamelCaseToSnakeCase(req.getBy())); + } } return levyMapper.selectRductLevyTrgtList(req); @@ -57,11 +64,17 @@ public class LevyBean extends AbstractComponent { * @return 부과 대장 목록 */ public List getLevyList(LevyQuery req) { + // 삭제 여부 확인 if (req.getDelYN() == null) { req.setDelYN("N"); } + // 정렬 확인 if (req.getOrderBy() == null) { - req.setOrderBy("REG_DT"); + if (req.getBy() == null) { + req.setOrderBy("REG_DT"); + } else { + req.setOrderBy(CmmnUtil.convertCamelCaseToSnakeCase(req.getBy())); + } } return levyMapper.selectLevyList(req); @@ -72,6 +85,10 @@ public class LevyBean extends AbstractComponent { * @return 부과 대장 객체 목록 */ public List getLevys(LevyQuery req) { + // 삭제 여부 확인 + if (req.getDelYN() == null) { + req.setDelYN("N"); + } if (req.getOrderBy() == null) { req.setOrderBy("L.LEVY_ID DESC"); } @@ -104,7 +121,7 @@ public class LevyBean extends AbstractComponent { */ public String createRductLevyList(LevyQuery req) { // 변수 선언 - String rtnMsg = "[F] "; // 처리 결과 메시지 + String rtnMsg = "[F] "; // 처리 결과 메시지 // 최초 조회 List rductLevyTrgtList = levyMapper.selectRductLevyTrgtList(req); @@ -130,9 +147,9 @@ public class LevyBean extends AbstractComponent { Levy levy = new Levy(); levy.setCrdnId(rductLevyTrgtList.get(jLoop).string("CRDN_ID")); // 단속 ID - levy.setLevyYmd(req.getLevyYmd()); // 부과 일자 - levy.setFrstDudtYmd(req.getDudtYmd()); // 최초 납기 일자 - levy.setDudtYmd(req.getDudtYmd()); // 납기 일자 + levy.setLevyYmd(req.getLevyYmd()); // 부과 일자 + levy.setFrstDudtYmd(req.getDudtYmd()); // 최초 납기 일자 + levy.setDudtYmd(req.getDudtYmd()); // 납기 일자 rtnMsg = createRductLevy(levy); if (rtnMsg.contains("[F]")) { @@ -155,8 +172,8 @@ public class LevyBean extends AbstractComponent { */ public String createRductLevy(Levy levy) { // 변수 선언 - boolean rtnScs = false; // DB 처리 결과 - String rtnMsg = "[F] "; // 처리 결과 메시지 + boolean rtnScs = false; // DB 처리 결과 + String rtnMsg = "[F] "; // 처리 결과 메시지 // 사용자 정보 ManagedUser managedUser = (ManagedUser)currentUser().getUser(); diff --git a/src/main/java/cokr/xit/fims/levy/web/Levy01Controller.java b/src/main/java/cokr/xit/fims/levy/web/Levy01Controller.java index 43302019..f3b677b1 100644 --- a/src/main/java/cokr/xit/fims/levy/web/Levy01Controller.java +++ b/src/main/java/cokr/xit/fims/levy/web/Levy01Controller.java @@ -1,17 +1,23 @@ package cokr.xit.fims.levy.web; +import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.function.BiFunction; import javax.annotation.Resource; +import org.apache.poi.ss.usermodel.CellStyle; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.servlet.ModelAndView; import cokr.xit.base.code.CommonCode; +import cokr.xit.base.file.xls.XLSWriter; +import cokr.xit.base.file.xls.XLSWriter.Styler; import cokr.xit.base.user.ManagedUser; import cokr.xit.base.web.ApplicationController; import cokr.xit.fims.cmmn.CmmnQuery; +import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.cmmn.service.TaskService; import cokr.xit.fims.levy.Levy; import cokr.xit.fims.levy.LevyQuery; @@ -82,9 +88,80 @@ public class Levy01Controller extends ApplicationController { * } */ public ModelAndView getReductionLevyTargetList(LevyQuery req) { - List result = levyService.getRductLevyTrgtList(setFetchSize(req)); - - return setCollectionInfo(new ModelAndView("jsonView"), result, "rductLevyTrgt"); + if (!"xls".equals(req.getDownload())) { + List result = levyService.getRductLevyTrgtList(setFetchSize(req)); + return setCollectionInfo(new ModelAndView("jsonView"), result, "rductLevyTrgt"); + } else { + XLSWriter xlsx = new XLSWriter() + .setFilename("사전 감경부과 대상 목록.xlsx") + .worksheet(0); + + // CellStyle 지정은 여기에서.. + CellStyle center = xlsx.cellStyle(Styler.CENTER) // 가운데 정렬 + , numeric = xlsx.n_nn0() // 숫자 3자리 콤마(,) + , dateYMD = xlsx.yyyy_mm_dd() // 연월일 + , dateDT = xlsx.yyyy_mm_dd_hh_mm_ss(); // 연월일+시간 + + String[] excelTitle = req.getExcelTitle(); + List titles = new ArrayList(); + for (int iLoop = 0; iLoop < excelTitle.length; iLoop++) { + String item = excelTitle[iLoop]; + titles.add(item); + } + + int[] excelTitleWidth = req.getExcelTitleWidth(); + List widths = new ArrayList<>(); + for (int jLoop = 0; jLoop < excelTitleWidth.length; jLoop++) { + int item = excelTitleWidth[jLoop]; + widths.add(item); + } + + List headerStylers = CmmnUtil.makeHeadersByDiffrentWidths(widths, xlsx); + + xlsx.cell(0, 0) + .value("사전 감경부과 대상", XLSWriter.Styler.CENTER) + .merge(0, 12) + .cell(3, 0) + .rowValues(CmmnUtil.mergeListByIndex(titles, headerStylers)); + + List list = levyService.getRductLevyTrgtList(req.setFetchSize(0)); + + BiFunction getValue = (titleNm, nothing) -> { + switch (titleNm) { + case "업무구분" : return xlsx.style("TASK_SE_NM", center); + case "단속일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT); + case "차량번호" : return "VHRNO"; + case "법정동" : return "CRDN_STDG_NM"; + case "단속장소" : return "CRDN_PLC"; + case "위반항목" : return "VLTN_ARTCL"; + case "최초단속금액" : return xlsx.style("FFNLG_CRDN_AMT", numeric); + case "과태료금액" : return xlsx.style("FFNLG_AMT", numeric); + case "사전통지금액" : return xlsx.style("ADVNTCE_AMT", numeric); + case "처리상태" : return "CRDN_STTS_NM"; + case "민원신청번호" : return xlsx.style("CVLCPT_APLY_NO", center); + case "민원접수번호" : return xlsx.style("CVLCPT_RCPT_NO", center); + case "민원접수일자" : return xlsx.format(o -> xlsx.str2date(o.get("CVLCPT_RCPT_YMD"))).style(dateYMD); + case "민원전송결과" : return xlsx.style("CVLCPT_TRSM_NM", center); + case "납부자명" : return "RTPYR_NM"; + case "납부자생일" : return xlsx.style("RTPYR_BRDT_MASK", center); + case "우편번호" : return xlsx.style("ZIP", center); + case "주소" : return "ADDR"; + case "상세주소" : return "DTL_ADDR"; + case "등록일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT); + case "등록사용자" : return xlsx.style("RGTR_NM", center); + case "수정일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT); + case "수정사용자" : return xlsx.style("MDFR_NM", center); + } + + return ""; + }; + + xlsx.cell(4, 0) + .values(list, titles.stream().map((item) -> { return getValue.apply(item, null); }).toArray()); + + return new ModelAndView("xlsView") + .addObject("xls", xlsx); + } } /**감경 부과 대상 정보(info)를 반환한다. @@ -169,9 +246,110 @@ public class Levy01Controller extends ApplicationController { * } */ public ModelAndView getLevyList(LevyQuery req) { - List result = levyService.getLevyList(setFetchSize(req)); - - return setCollectionInfo(new ModelAndView("jsonView"), result, "levy"); + if (!"xls".equals(req.getDownload())) { + List result = levyService.getLevyList(setFetchSize(req)); + return setCollectionInfo(new ModelAndView("jsonView"), result, "levy"); + } else { + XLSWriter xlsx = new XLSWriter() + .setFilename("부과 목록.xlsx") + .worksheet(0); + + // CellStyle 지정은 여기에서.. + CellStyle center = xlsx.cellStyle(Styler.CENTER) // 가운데 정렬 + , numeric = xlsx.n_nn0() // 숫자 3자리 콤마(,) + , dateYMD = xlsx.yyyy_mm_dd() // 연월일 + , dateDT = xlsx.yyyy_mm_dd_hh_mm_ss(); // 연월일+시간 + + String[] excelTitle = req.getExcelTitle(); + List titles = new ArrayList(); + for (int iLoop = 0; iLoop < excelTitle.length; iLoop++) { + String item = excelTitle[iLoop]; + titles.add(item); + } + + int[] excelTitleWidth = req.getExcelTitleWidth(); + List widths = new ArrayList<>(); + for (int jLoop = 0; jLoop < excelTitleWidth.length; jLoop++) { + int item = excelTitleWidth[jLoop]; + widths.add(item); + } + + List headerStylers = CmmnUtil.makeHeadersByDiffrentWidths(widths, xlsx); + + xlsx.cell(0, 0) + .value("부과", XLSWriter.Styler.CENTER) + .merge(0, 15) + .cell(3, 0) + .rowValues(CmmnUtil.mergeListByIndex(titles, headerStylers)); + + List list = levyService.getLevyList(req.setFetchSize(0)); + + BiFunction getValue = (titleNm, nothing) -> { + switch (titleNm) { + case "업무구분" : return xlsx.style("TASK_SE_NM", center); + case "회계연도" : return xlsx.style("FYR", center); + case "회계코드" : return xlsx.style("ACNTG_SE_CD", center); + case "세목코드" : return xlsx.style("TXITM_CD", center); + case "세목명" : return xlsx.style("TXITM_NM", center); + case "부과번호" : return xlsx.style("LEVY_NO", center); + case "분납순번" : return xlsx.style("INSPY_SN", center); + case "부과구분" : return xlsx.style("LEVY_SE_NM", center); + case "통합구분" : return xlsx.style("UNTY_SE_NM", center); + case "감경구분" : return xlsx.style("RDUCT_SE_NM", center); + case "부과일자" : return xlsx.format(o -> xlsx.str2date(o.get("LEVY_YMD"))).style(dateYMD); + case "최초납기일자" : return xlsx.format(o -> xlsx.str2date(o.get("FRST_DUDT_YMD"))).style(dateYMD); + case "납기일자" : return xlsx.format(o -> xlsx.str2date(o.get("DUDT_YMD"))).style(dateYMD); + case "과태료금액" : return xlsx.style("FFNLG_AMT", numeric); + case "부과본세" : return xlsx.style("LEVY_PCPTAX", numeric); + case "부과가산금" : return xlsx.style("LEVY_ADAMT", numeric); + case "분납이자" : return xlsx.style("INSPY_INT", numeric); + case "수납본세" : return xlsx.style("RCVMT_PCPTAX", numeric); + case "수납가산금" : return xlsx.style("RCVMT_ADAMT", numeric); + case "감액본세" : return xlsx.style("RDCAMT_PCPTAX", numeric); + case "감액가산금" : return xlsx.style("RDCAMT_ADAMT", numeric); + case "합계금액" : return xlsx.style("SUM_AMT", numeric); + case "과세물건" : return "TXTN_THING"; + case "체납사유" : return "NPMNT_RSN_NM"; + case "수납일자" : return xlsx.format(o -> xlsx.str2date(o.get("RCVMT_YMD"))).style(dateYMD); + case "압류일자" : return xlsx.format(o -> xlsx.str2date(o.get("SZR_YMD"))).style(dateYMD); + case "압류물건" : return "SZR_THING"; + case "대체압류차량" : return "RPM_SZR_VHRNO"; + case "압류해제일자" : return xlsx.format(o -> xlsx.str2date(o.get("SZR_RMV_YMD"))).style(dateYMD); + case "전자납부번호" : return "EPAYNO_MASK"; + case "은행명" : return "BANK_NM"; + case "가상계좌번호" : return xlsx.style("VR_ACTNO", center); + case "은행명2" : return "BANK_NM2"; + case "가상계좌번호2" : return xlsx.style("VR_ACTNO2", center); + case "은행명3" : return "BANK_NM3"; + case "가상계좌번호3" : return xlsx.style("VR_ACTNO3", center); + case "단속일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT); + case "차량번호" : return "VHRNO"; + case "법정동" : return "CRDN_STDG_NM"; + case "단속장소" : return "CRDN_PLC"; + case "위반항목" : return "VLTN_ARTCL"; + case "최초단속금액" : return xlsx.style("FFNLG_CRDN_AMT", numeric); + case "처리상태" : return "CRDN_STTS_NM"; + case "납부자구분" : return xlsx.style("RTPYR_SE_NM", center); + case "납부자명" : return "RTPYR_NM"; + case "납부자생일" : return xlsx.style("RTPYR_BRDT_MASK", center); + case "우편번호" : return xlsx.style("ZIP", center); + case "주소" : return "ADDR"; + case "상세주소" : return "DTL_ADDR"; + case "등록일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT); + case "등록사용자" : return xlsx.style("RGTR_NM", center); + case "수정일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT); + case "수정사용자" : return xlsx.style("MDFR_NM", center); + } + + return ""; + }; + + xlsx.cell(4, 0) + .values(list, titles.stream().map((item) -> { return getValue.apply(item, null); }).toArray()); + + return new ModelAndView("xlsView") + .addObject("xls", xlsx); + } } /**부과 대장를 등록한다. diff --git a/src/main/java/cokr/xit/fims/rcvm/web/Rcvm01Controller.java b/src/main/java/cokr/xit/fims/rcvm/web/Rcvm01Controller.java index 74130a2b..eb4480a0 100644 --- a/src/main/java/cokr/xit/fims/rcvm/web/Rcvm01Controller.java +++ b/src/main/java/cokr/xit/fims/rcvm/web/Rcvm01Controller.java @@ -116,7 +116,7 @@ public class Rcvm01Controller extends ApplicationController { List headerStylers = CmmnUtil.makeHeadersByDiffrentWidths(widths, xlsx); xlsx.cell(0, 0) - .value("수납", center) + .value("수납", XLSWriter.Styler.CENTER) .merge(0, 10) .cell(3, 0) .rowValues(CmmnUtil.mergeListByIndex(titles, headerStylers)); diff --git a/src/main/resources/sql/mapper/fims/levy/levy-mapper.xml b/src/main/resources/sql/mapper/fims/levy/levy-mapper.xml index 0eaf2c82..780b361e 100644 --- a/src/main/resources/sql/mapper/fims/levy/levy-mapper.xml +++ b/src/main/resources/sql/mapper/fims/levy/levy-mapper.xml @@ -114,13 +114,13 @@ , C.RGTR /* 등록자 */ , C.MDFCN_DT /* 수정 일시 */ , C.MDFR /* 수정자 */ - , (SELECT GET_CODE_NM('FIM054', C.TASK_SE_CD) FROM DUAL) AS TASK_SE_NM /* 업무 구분 명 */ - , (SELECT GET_CODE_NM('FIM003', C.CRDN_INPT_SE_CD) FROM DUAL) AS CRDN_INPT_SE_NM /* 단속 입력 구분 명 */ - , (CONCAT(C.CRDN_YMD, C.CRDN_TM)) AS CRDN_YMD_TM /* 단속 일시 */ + , (CONCAT(C.CRDN_YMD, C.CRDN_TM)) AS CRDN_YMD_TM /* 단속 일시 */ , (SELECT GET_MASK_DATETIME(C.CRDN_YMD, '-', C.CRDN_TM, ':') FROM DUAL) AS CRDN_YMD_TM_MASK /* 단속 일시 마스크 */ - , (SELECT GET_CODE_NM('FIM010', C.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM /* 단속 상태 명 */ - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = C.RGTR) AS RGTR_NM /* 등록자 명 */ - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = C.MDFR) AS MDFR_NM /* 수정자 명 */ + , (SELECT GET_CODE_NM('FIM054', C.TASK_SE_CD) FROM DUAL) AS TASK_SE_NM /* 업무 구분 명 */ + , (SELECT GET_CODE_NM('FIM003', C.CRDN_INPT_SE_CD) FROM DUAL) AS CRDN_INPT_SE_NM /* 단속 입력 구분 명 */ + , (SELECT GET_CODE_NM('FIM010', C.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM /* 단속 상태 명 */ + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = C.RGTR) AS RGTR_NM /* 등록자 명 */ + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = C.MDFR) AS MDFR_NM /* 수정자 명 */ , V.VLTN_ID /* 위반 ID */ , V.VLTN_CD /* 위반 코드 */ , V.VLTN_ARTCL /* 위반 항목 */ @@ -133,25 +133,28 @@ , CC.CVLCPT_PRCS_CMPTN_DT /* 민원 처리 완료 일시 */ , CC.CVLCPT_TRSM_CD /* 민원 전송 코드 */ , CC.CVLCPT_TRSM_DT /* 민원 전송 일시 */ - , (SELECT GET_CODE_NM('FIM017', CC.CVLCPT_PRCS_CD) FROM DUAL) AS CVLCPT_PRCS_NM /* 민원 처리 명 */ - , (SELECT GET_CODE_NM('FIM018', CC.CVLCPT_TRSM_CD) FROM DUAL) AS CVLCPT_TRSM_NM /* 민원 전송 명 */ + , (SELECT GET_CODE_NM('FIM017', CC.CVLCPT_PRCS_CD) FROM DUAL) AS CVLCPT_PRCS_NM /* 민원 처리 명 */ + , (SELECT GET_CODE_NM('FIM018', CC.CVLCPT_TRSM_CD) FROM DUAL) AS CVLCPT_TRSM_NM /* 민원 전송 명 */ , P.RTPYR_ID /* 납부자 ID */ + , P.RTPYR_SE_CD /* 납부자 구분 코드 */ , P.RTPYR_NO /* 납부자 번호 */ , P.RTPYR_NM /* 납부자 명 */ , P.RTPYR_BRDT /* 납부자 생년월일 */ , P.ZIP /* 우편번호 */ , P.ADDR /* 주소 */ , P.DTL_ADDR /* 상세 주소 */ + , (SELECT GET_CODE_NM('FIM011', P.RTPYR_SE_CD) FROM DUAL) AS RTPYR_SE_NM /* 납부자 구분 명 */ + , (SELECT GET_BRDT_FORMAT(P.RTPYR_BRDT, '.') FROM DUAL) AS RTPYR_BRDT_MASK /* 납부자 생년월일 마스크 */ , L.LEVY_ID /* 부과 ID */ FROM TB_CRDN C INNER JOIN TB_VLTN V ON (C.VLTN_ID = V.VLTN_ID) LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_ID = CC.CVLCPT_LINK_ID AND C.CVLCPT_LINK_YN = 'Y' AND CC.DEL_YN = 'N') LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID) LEFT OUTER JOIN TB_LEVY L ON (C.CRDN_ID = L.CRDN_ID AND L.DEL_YN = 'N') - WHERE C.SGG_CD = #{sggCd} /* 시군구 코드 */ - AND C.TASK_SE_CD = #{taskSeCd} /* 업무 구분 코드 */ - AND C.CRDN_STTS_CD BETWEEN '21' AND '31' /* 단속 상태 코드 */ - AND C.RTPYR_ID IS NOT NULL /* 납부자 ID */ + WHERE C.SGG_CD = #{sggCd} /* 시군구 코드 */ + AND C.TASK_SE_CD = #{taskSeCd} /* 업무 구분 코드 */ + AND C.CRDN_STTS_CD BETWEEN '21' AND '31' /* 단속 상태 코드 */ + AND C.RTPYR_ID IS NOT NULL /* 납부자 ID */ AND (CC.CVLCPT_PRCS_CD IS NULL OR CC.CVLCPT_PRCS_CD ]]> '00') /* 민원 처리 코드 */ AND L.LEVY_ID IS NULL /* 부과 ID */ @@ -161,41 +164,41 @@ AND C.CRDN_YMD #{schCrdnYmdTo} /* 단속 일자 종료 */ - AND C.VHRNO = #{schVhrno} /* 차량번호 */ + AND C.VHRNO = #{schVhrno} /* 차량번호 */ - AND P.RTPYR_NM = #{schRtpyrNm} /* 납부자 명 */ + AND P.RTPYR_NM = #{schRtpyrNm} /* 납부자 명 */ - AND C.DEL_YN = 'N' /* 삭제 여부 */ + AND C.DEL_YN = 'N' /* 삭제 여부 */ - - - AND SUBSTR(C.REG_DT,1,8) = ]]> #{schDetailCrdnRegDtFrom} /* 등록 일자 시작 */ + + + AND SUBSTR(C.REG_DT,1,8) =]]> #{schRegDateFrom} /* 등록 일자 시작 */ - - AND SUBSTR(C.REG_DT,1,8) #{schDetailCrdnRegDtTo} /* 등록 일자 종료 */ + + AND SUBSTR(C.REG_DT,1,8) #{schRegDateTo} /* 등록 일자 종료 */ - - - AND SUBSTR(C.MDFCN_DT,1,8) = ]]> #{schDetailCrdnRegDtFrom} /* 수정 일자 시작 */ + + + AND SUBSTR(C.MDFCN_DT,1,8) =]]> #{schRegDateFrom} /* 수정 일자 시작 */ - - AND SUBSTR(C.MDFCN_DT,1,8) #{schDetailCrdnRegDtTo} /* 수정 일자 종료 */ + + AND SUBSTR(C.MDFCN_DT,1,8) #{schRegDateTo} /* 수정 일자 종료 */ - - - AND C.RGTR = #{schDetailCrdnRgtrCd} /* 등록자 코드 */ + + + AND C.RGTR = #{schRgtrCd} /* 등록자 코드 */ - - - AND C.MDFR = #{schDetailCrdnRgtrCd} /* 수정자 코드 */ + + + AND C.MDFR = #{schRgtrCd} /* 수정자 코드 */ @@ -316,6 +319,18 @@ , L.DEL_DT /* 삭제 일시 */ , L.DLTR /* 삭제자 */ , L.DEL_RSN /* 삭제 사유 */ + , (SELECT GET_CODE_NM('FIM074', L.ACNTG_SE_CD) FROM DUAL) AS ACNTG_SE_NM /* 회계 구분 명 */ + , (SELECT GET_CODE_NM('FIM075', L.TXITM_CD) FROM DUAL) AS TXITM_NM /* 세목 코드 명 */ + , (SELECT GET_CODE_NM('FIM077', L.SPCL_BIZ_CD) FROM DUAL) AS SPCL_BIZ_NM /* 특별회계 사업 코드 명 */ + , (SELECT GET_CODE_NM('FIM040', L.LEVY_SE_CD) FROM DUAL) AS LEVY_SE_NM /* 부과 구분 코드 */ + , (SELECT GET_CODE_NM('FIM072', L.UNTY_SE_CD) FROM DUAL) AS UNTY_SE_NM /* 통합 구분 코드 */ + , (SELECT GET_CODE_NM('FIM046', L.RDUCT_SE_CD) FROM DUAL) AS RDUCT_SE_NM /* 감경 구분 코드 */ + , (SELECT GET_MASK_EPAYNO(L.EPAYNO) FROM DUAL) AS EPAYNO_MASK /* 전자납부번호 마스크 */ + , (SELECT GET_CODE_NM('FIM043', L.NPMNT_RSN_CD) FROM DUAL) AS NPMNT_RSN_NM /* 체납 사유 명 */ + , (SELECT GET_CODE_NM('FIM045', L.PAY_MTHD_SE_CD) FROM DUAL) AS PAY_MTHD_SE_NM /* 납부 방법 구분 명 */ + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = L.RGTR) AS RGTR_NM /* 등록자 명 */ + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = L.MDFR) AS MDFR_NM /* 수정자 명 */ + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = L.DLTR) AS DLTR_NM /* 삭제자 명 */ , C.CRDN_ID /* 단속 ID */ , C.VHRNO /* 차량번호 */ , C.CRDN_STDG_NM /* 단속 법정동 명 */ @@ -324,6 +339,13 @@ , C.FFNLG_CRDN_AMT /* 과태료 단속 금액 */ , C.CRDN_STTS_CD /* 단속 상태 코드 */ , C.CRDN_STTS_CHG_DT /* 단속 상태 변경 일시 */ + , (CONCAT(C.CRDN_YMD, C.CRDN_TM)) AS CRDN_YMD_TM /* 단속 일시 */ + , (SELECT GET_CODE_NM('FIM054', C.TASK_SE_CD) FROM DUAL) AS TASK_SE_NM /* 업무 구분 명 */ + , (SELECT GET_CODE_NM('FIM010', C.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM /* 단속 상태 명 */ + , (SELECT GET_MASK_DATETIME(C.CRDN_YMD,'-',C.CRDN_TM,':') FROM DUAL) AS CRDN_YMD_TM_MASK /* 단속 일시 마스크 */ + , V.VLTN_ID /* 위반 ID */ + , V.VLTN_CD /* 위반 코드 */ + , V.VLTN_ARTCL /* 위반 항목 */ , P.RTPYR_ID /* 납부자 ID */ , P.RTPYR_SE_CD /* 납부자 구분 코드 */ , P.RTPYR_NO /* 납부자 번호 */ @@ -332,37 +354,23 @@ , P.ZIP /* 우편번호 */ , P.ADDR /* 주소 */ , P.DTL_ADDR /* 상세 주소 */ - , (SELECT GET_CODE_NM('FIM054', L.TASK_SE_CD) FROM DUAL) AS TASK_SE_NM /* 업무 구분 명 */ - , (SELECT GET_CODE_NM('FIM074', L.ACNTG_SE_CD) FROM DUAL) AS ACNTG_SE_NM /* 회계 구분 명 */ - , (SELECT GET_CODE_NM('FIM075', L.TXITM_CD) FROM DUAL) AS TXITM_NM /* 세목 코드 명 */ - , (SELECT GET_CODE_NM('FIM077', L.SPCL_BIZ_CD) FROM DUAL) AS SPCL_BIZ_NM /* 특별회계 사업 코드 명 */ - , (SELECT GET_CODE_NM('FIM040', L.LEVY_SE_CD) FROM DUAL) AS LEVY_SE_NM /* 부과 구분 코드 */ - , (SELECT GET_CODE_NM('FIM072', L.UNTY_SE_CD) FROM DUAL) AS UNTY_SE_NM /* 통합 구분 코드 */ - , (SELECT GET_CODE_NM('FIM046', L.RDUCT_SE_CD) FROM DUAL) AS RDUCT_SE_NM /* 감경 구분 코드 */ - , (SELECT GET_MASK_EPAYNO(L.EPAYNO) FROM DUAL) AS EPAYNO_MASK /* 전자납부번호 마스크 */ - , (SELECT GET_CODE_NM('FIM043', L.NPMNT_RSN_CD) FROM DUAL) AS NPMNT_RSN_NM /* 체납 사유 명 */ - , (SELECT GET_CODE_NM('FIM045', L.PAY_MTHD_SE_CD) FROM DUAL) AS PAY_MTHD_SE_NM /* 납부 방법 구분 명 */ - , (CONCAT(C.CRDN_YMD, C.CRDN_TM)) AS CRDN_YMD_TM /* 단속 일시 */ - , (SELECT GET_MASK_DATETIME(C.CRDN_YMD,'-',C.CRDN_TM,':') FROM DUAL) AS CRDN_YMD_TM_MASK /* 단속 일시 마스크 */ - , (SELECT GET_CODE_NM('FIM010', C.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM /* 단속 상태 명 */ - , (SELECT GET_CODE_NM('FIM011', P.RTPYR_SE_CD) FROM DUAL) AS RTPYR_SE_NM /* 납부자 구분 명 */ - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = L.RGTR) AS RGTR_NM /* 등록자 명 */ - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = L.MDFR) AS MDFR_NM /* 수정자 명 */ - , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = L.DLTR) AS DLTR_NM /* 삭제자 명 */ + , (SELECT GET_CODE_NM('FIM011', P.RTPYR_SE_CD) FROM DUAL) AS RTPYR_SE_NM /* 납부자 구분 명 */ + , (SELECT GET_BRDT_FORMAT(P.RTPYR_BRDT, '.') FROM DUAL) AS RTPYR_BRDT_MASK /* 납부자 생년월일 마스크 */ FROM TB_LEVY L - INNER JOIN TB_CRDN C ON (L.CRDN_ID = C.CRDN_ID) - LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID) + INNER JOIN TB_CRDN C ON (L.CRDN_ID = C.CRDN_ID) + INNER JOIN TB_VLTN V ON (C.VLTN_ID = V.VLTN_ID) + LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID) +