From 68fe09fd26e2f0a1f9762750582328fdf79a0d23 Mon Sep 17 00:00:00 2001 From: jjh Date: Fri, 15 Dec 2023 16:00:53 +0900 Subject: [PATCH] =?UTF-8?q?1.=20=EB=B6=80=EA=B3=BC=EC=A0=9C=EC=99=B8=20-?= =?UTF-8?q?=20=EC=97=91=EC=85=80=20=EC=88=98=EC=A0=95.=202.=20=EB=B6=80?= =?UTF-8?q?=EA=B3=BC=EC=A0=9C=EC=99=B8=20-=20=EB=93=B1=EB=A1=9D=EC=9E=90?= =?UTF-8?q?=20=EA=B2=80=EC=83=89=20=EC=88=98=EC=A0=95.=203.=20=EC=9A=B0?= =?UTF-8?q?=ED=8E=B8=ED=86=B5=ED=95=A9=20-=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/cmmn/CmmnUtil.java | 19 +- .../fims/epst/service/bean/EpostGdccBean.java | 4 + .../epst/service/bean/EpostRcptDtlBean.java | 19 +- .../epst/service/bean/EpostRcptRegBean.java | 9 +- .../epst/service/bean/EpostRcptRsltBean.java | 19 +- .../xit/fims/epst/web/Epst02Controller.java | 229 ++++---- .../fims/excl/service/bean/CrdnReRegBean.java | 13 +- .../fims/excl/service/bean/LevyExclBean.java | 4 + .../fims/excl/service/bean/OpnnSbmsnBean.java | 13 +- .../xit/fims/excl/web/Excl02Controller.java | 81 ++- .../xit/fims/excl/web/Excl03Controller.java | 71 ++- .../sql/mapper/fims/epst/epostGdcc-mapper.xml | 24 +- .../mapper/fims/epst/epostRcptDtl-mapper.xml | 542 ++++++++++-------- .../mapper/fims/epst/epostRcptReg-mapper.xml | 352 ++++++------ .../sql/mapper/fims/excl/crdnReReg-mapper.xml | 32 +- .../sql/mapper/fims/excl/levyExcl-mapper.xml | 66 +-- .../sql/mapper/fims/excl/opnnSbmsn-mapper.xml | 32 +- .../WEB-INF/jsp/fims/epst/epst02010-main.jsp | 28 +- .../WEB-INF/jsp/fims/epst/epst02030-main.jsp | 27 +- .../WEB-INF/jsp/fims/epst/epst02050-main.jsp | 23 + .../WEB-INF/jsp/fims/excl/excl01010-main.jsp | 80 ++- .../WEB-INF/jsp/fims/excl/excl02010-main.jsp | 93 ++- .../WEB-INF/jsp/fims/excl/excl03010-main.jsp | 83 ++- 23 files changed, 1165 insertions(+), 698 deletions(-) diff --git a/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java b/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java index d2829692..fb0cc35d 100644 --- a/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java +++ b/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java @@ -30,6 +30,7 @@ import javax.imageio.ImageIO; import org.apache.commons.io.FilenameUtils; import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.ss.usermodel.Font; +import org.apache.poi.ss.usermodel.HorizontalAlignment; import cokr.xit.base.file.xls.XLSWriter; import cokr.xit.base.file.xls.XLSWriter.Styler; @@ -457,15 +458,16 @@ public class CmmnUtil { for(int i=0; i < widths.size(); i++) { if(headerWidthMap.get(widths.get(i)) == null) { headerWidthMap.put( - widths.get(i), + widths.get(i), new XLSWriter.Styler() - .width(widths.get(i)) - .foregroundColor(HSSFColor.HSSFColorPredefined.LIGHT_BLUE.getIndex()) - .configure(styler -> { - Font font = xlsxWriter.workbook().createFont(); - font.setColor(HSSFColor.HSSFColorPredefined.WHITE.getIndex()); - styler.font(font); - }) + .width(widths.get(i)) + .foregroundColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()) + .configure(styler -> { + Font font = xlsxWriter.workbook().createFont(); + font.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); + styler.font(font); + styler.alignment(HorizontalAlignment.CENTER); + }) ); } @@ -474,4 +476,5 @@ public class CmmnUtil { return result; } + } diff --git a/src/main/java/cokr/xit/fims/epst/service/bean/EpostGdccBean.java b/src/main/java/cokr/xit/fims/epst/service/bean/EpostGdccBean.java index 640d0ecf..2ffa453f 100644 --- a/src/main/java/cokr/xit/fims/epst/service/bean/EpostGdccBean.java +++ b/src/main/java/cokr/xit/fims/epst/service/bean/EpostGdccBean.java @@ -39,6 +39,10 @@ public class EpostGdccBean extends AbstractComponent { if (req.getUseYN() == null) { req.setUseYN("Y"); } + // 삭제 여부 확인 + if (req.getDelYN() == null) { + req.setDelYN("N"); + } // 정렬 확인 if (req.getOrderBy() == null) { if (req.getBy() == null) { diff --git a/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptDtlBean.java b/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptDtlBean.java index 8999bdbd..9c24aca6 100644 --- a/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptDtlBean.java +++ b/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptDtlBean.java @@ -8,7 +8,7 @@ import org.springframework.stereotype.Component; import cokr.xit.foundation.AbstractComponent; import cokr.xit.foundation.data.DataObject; - +import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.epst.EpostQuery; import cokr.xit.fims.epst.EpostRcptDtl; import cokr.xit.fims.epst.dao.EpostRcptDtlMapper; @@ -35,6 +35,23 @@ public class EpostRcptDtlBean extends AbstractComponent { * @return 전자우편 접수 상세 목록 */ public List getEpostRcptDtlList(EpostQuery req) { + // 사용 여부 확인 + if (req.getUseYN() == null) { + req.setUseYN("Y"); + } + // 삭제 여부 확인 + if (req.getDelYN() == null) { + req.setDelYN("N"); + } + // 정렬 확인 + if (req.getOrderBy() == null) { + if (req.getBy() == null) { + req.setOrderBy("REG_DT"); + } else { + req.setOrderBy(CmmnUtil.convertCamelCaseToSnakeCase(req.getBy())); + } + } + return epostRcptDtlMapper.selectEpostRcptDtlList(req); } diff --git a/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptRegBean.java b/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptRegBean.java index 050f69da..6788b856 100644 --- a/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptRegBean.java +++ b/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptRegBean.java @@ -35,9 +35,13 @@ public class EpostRcptRegBean extends AbstractComponent { * @return 전자우편 접수 등록 목록 */ public List getEpostRcptRegList(EpostQuery req) { + // 사용 여부 확인 + if (req.getUseYN() == null) { + req.setUseYN("Y"); + } // 삭제 여부 확인 - if (req.getDelYn() == null) { - req.setDelYn("N"); + if (req.getDelYN() == null) { + req.setDelYN("N"); } // 정렬 확인 if (req.getOrderBy() == null) { @@ -47,6 +51,7 @@ public class EpostRcptRegBean extends AbstractComponent { req.setOrderBy(CmmnUtil.convertCamelCaseToSnakeCase(req.getBy())); } } + return epostRcptRegMapper.selectEpostRcptRegList(req); } diff --git a/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptRsltBean.java b/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptRsltBean.java index 84913df5..4855446e 100644 --- a/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptRsltBean.java +++ b/src/main/java/cokr/xit/fims/epst/service/bean/EpostRcptRsltBean.java @@ -8,7 +8,7 @@ import org.springframework.stereotype.Component; import cokr.xit.foundation.AbstractComponent; import cokr.xit.foundation.data.DataObject; - +import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.epst.EpostQuery; import cokr.xit.fims.epst.EpostRcptRslt; import cokr.xit.fims.epst.dao.EpostRcptRsltMapper; @@ -35,6 +35,23 @@ public class EpostRcptRsltBean extends AbstractComponent { * @return 전자우편 접수 결과 목록 */ public List getEpostRcptRsltList(EpostQuery req) { + // 사용 여부 확인 + if (req.getUseYN() == null) { + req.setUseYN("Y"); + } + // 삭제 여부 확인 + if (req.getDelYN() == null) { + req.setDelYN("N"); + } + // 정렬 확인 + if (req.getOrderBy() == null) { + if (req.getBy() == null) { + req.setOrderBy("REG_DT"); + } else { + req.setOrderBy(CmmnUtil.convertCamelCaseToSnakeCase(req.getBy())); + } + } + return epostRcptRsltMapper.selectEpostRcptRsltList(req); } 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 18de8675..101d732b 100644 --- a/src/main/java/cokr/xit/fims/epst/web/Epst02Controller.java +++ b/src/main/java/cokr/xit/fims/epst/web/Epst02Controller.java @@ -1,7 +1,9 @@ package cokr.xit.fims.epst.web; +import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.function.BiFunction; import javax.annotation.Resource; @@ -13,9 +15,11 @@ 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.DeptService; import cokr.xit.fims.epst.EpostGdcc; import cokr.xit.fims.epst.EpostQuery; @@ -116,49 +120,56 @@ public class Epst02Controller extends ApplicationController { return setCollectionInfo(new ModelAndView("jsonView"), result, "epostGdcc"); } else { XLSWriter xlsx = new XLSWriter() - .setFilename("우편통합 안내문관리 목록.xlsx") + .setFilename("우편통합 안내문 목록.xlsx") .worksheet(0); - XLSWriter.Styler header = new XLSWriter.Styler() - .width(16) - .foregroundColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()) - .configure(styler -> { - Font font = xlsx.workbook().createFont(); - font.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); - styler.font(font); - styler.alignment(HorizontalAlignment.CENTER); - }); -/* - CellStyle numeric = xlsx.n_nn0() // 숫자 3자리 콤마(,) - , dateYMD = xlsx.yyyy_mm_dd() // 연월일 - , dateTM = xlsx.hh_mm_ss() // 시간 - , dateDT = xlsx.yyyy_mm_dd_hh_mm_ss(); // 연월일 시간 -*/ - CellStyle dateDT = xlsx.yyyy_mm_dd_hh_mm_ss(); // 연월일 시간 + CellStyle 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) + .value("우편통합 안내문", XLSWriter.Styler.CENTER) .merge(0, 8) .cell(3, 0) - .rowValues(List.of( - "업무구분", header, "발송구분", header, "사용여부", header, "최종사용일시", header, "제목", header - , "등록일시", header, "등록사용자", header, "수정일시", header, "수정사용자", header - )) - .cell(4, 0) - .values( epostGdccService.getEpostGdccList(req.setFetchSize(0)) - , xlsx.style("TASK_SE_NM", XLSWriter.Styler.CENTER) - , xlsx.style("SNDNG_SE_NM", XLSWriter.Styler.CENTER) - , xlsx.style("USE_YN_NM", XLSWriter.Styler.CENTER) - , xlsx.format(r -> xlsx.str2datetime(r.get("LAST_USE_DT"))).style(dateDT) - , xlsx.style("TTL_NM", XLSWriter.Styler.LEFT) - , xlsx.format(r -> xlsx.str2datetime(r.get("REG_DT"))).style(dateDT) - , xlsx.style("RGTR_NM", XLSWriter.Styler.LEFT) - , xlsx.format(r -> xlsx.str2datetime(r.get("MDFCN_DT"))).style(dateDT) - , xlsx.style("MDFR_NM", XLSWriter.Styler.LEFT) - ); + .rowValues(CmmnUtil.mergeListByIndex(titles, headerStylers)); + + List list = epostGdccService.getEpostGdccList(req.setFetchSize(0)); + + BiFunction getValue = (title1, noting) -> { + switch (title1) { + case "업무구분" : return xlsx.style("TASK_SE_NM", XLSWriter.Styler.CENTER); + case "발송구분" : return xlsx.style("SNDNG_SE_NM", XLSWriter.Styler.CENTER); + case "사용여부" : return xlsx.style("USE_YN_NM", XLSWriter.Styler.CENTER); + case "최종사용일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("LAST_USE_DT"))).style(dateDT); + case "제목" : return xlsx.style("TTL_NM", XLSWriter.Styler.LEFT); + case "등록일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT); + case "등록사용자" : return xlsx.style("RGTR_NM", XLSWriter.Styler.CENTER); + case "수정일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT); + case "수정사용자" : return xlsx.style("MDFR_NM", XLSWriter.Styler.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); + .addObject("xls", xlsx); } } @@ -299,44 +310,55 @@ public class Epst02Controller extends ApplicationController { .setFilename("우편통합 발송상태 목록.xlsx") .worksheet(0); - XLSWriter.Styler header = new XLSWriter.Styler() - .width(16) - .foregroundColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()) - .configure(styler -> { - Font font = xlsx.workbook().createFont(); - font.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); - styler.font(font); - styler.alignment(HorizontalAlignment.CENTER); - }); - CellStyle numeric = xlsx.n_nn0() // 숫자 3자리 콤마(,) , dateYMD = xlsx.yyyy_mm_dd() // 연월일 - , dateDT = xlsx.yyyy_mm_dd_hh_mm_ss(); // 연월일 시간 + , 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) + .value("우편통합 발송상태", XLSWriter.Styler.CENTER) .merge(0, 8) .cell(3, 0) - .rowValues(List.of( - "발송일자", header, "발송내역", header, "취급구분", header, "접수일자", header, "자료키", header - , "발송건수", header, "우편처리상태", header - , "등록일시", header, "등록사용자", header - )) - .cell(4, 0) - .values( epostRcptRegService.getEpostRcptRegList(req.setFetchSize(0)) - , xlsx.format(r -> xlsx.str2date(r.get("SEND_DATE"))).style(dateYMD) - , xlsx.style("JOB_CD", XLSWriter.Styler.CENTER) - , xlsx.style("DIV_KB_NM", XLSWriter.Styler.CENTER) - , xlsx.format(r -> xlsx.str2date(r.get("RCEPT_YMD"))).style(dateYMD) - , xlsx.style("CON_KEY", XLSWriter.Styler.CENTER) - , xlsx.style("RECEV_CNT", numeric) - , xlsx.style("POST_PRCS_STTS_NM", XLSWriter.Styler.CENTER) - , xlsx.format(r -> xlsx.str2datetime(r.get("REG_DT"))).style(dateDT) - , xlsx.style("RGTR_NM", XLSWriter.Styler.LEFT) - ); + .rowValues(CmmnUtil.mergeListByIndex(titles, headerStylers)); + + List list = epostRcptRegService.getEpostRcptRegList(req.setFetchSize(0)); + + BiFunction getValue = (title1, noting) -> { + switch (title1) { + case "발송일자" : return xlsx.format(o -> xlsx.str2date(o.get("SEND_DATE"))).style(dateYMD); + case "발송내역" : return xlsx.style("JOB_CD", XLSWriter.Styler.CENTER); + case "취급구분" : return xlsx.style("DIV_KB_NM", XLSWriter.Styler.CENTER); + case "접수일자" : return xlsx.format(o -> xlsx.str2date(o.get("RCEPT_YMD"))).style(dateYMD); + case "자료키" : return xlsx.style("CON_KEY", XLSWriter.Styler.CENTER); + case "발송건수" : return xlsx.style("RECEV_CNT", numeric); + case "우편처리상태" : return xlsx.style("POST_PRCS_STTS_NM", XLSWriter.Styler.CENTER); + case "등록일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT); + case "등록사용자" : return xlsx.style("RGTR_NM", XLSWriter.Styler.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); + .addObject("xls", xlsx); } } @@ -425,47 +447,58 @@ public class Epst02Controller extends ApplicationController { .setFilename("우편통합 접수결과 목록.xlsx") .worksheet(0); - XLSWriter.Styler header = new XLSWriter.Styler() - .width(16) - .foregroundColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()) - .configure(styler -> { - Font font = xlsx.workbook().createFont(); - font.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); - styler.font(font); - styler.alignment(HorizontalAlignment.CENTER); - }); - CellStyle numeric = xlsx.n_nn0() // 숫자 3자리 콤마(,) , dateYMD = xlsx.yyyy_mm_dd() // 연월일 - , dateDT = xlsx.yyyy_mm_dd_hh_mm_ss(); // 연월일 시간 + , 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) + .value("우편통합 접수결과", XLSWriter.Styler.CENTER) .merge(0, 11) .cell(3, 0) - .rowValues(List.of( - "발송자료키", header, "우편물코드", header, "우편물종류", header, "발송일자", header, "접수일자", header - , "취급구분", header, "발송건수", header, "결제금액", header, "제작수수료", header, "우편요금", header - , "등록일시", header, "등록사용자", header - )) - .cell(4, 0) - .values( epostRcptRsltService.getEpostRcptRsltList(req.setFetchSize(0)) - , xlsx.style("RELETCDATA", XLSWriter.Styler.CENTER) - , xlsx.style("JOB_CD", XLSWriter.Styler.CENTER) - , xlsx.style("JOB_CD3_NM", XLSWriter.Styler.CENTER) - , xlsx.format(r -> xlsx.str2date(r.get("EXTRI_REGYMD"))).style(dateYMD) - , xlsx.format(r -> xlsx.str2date(r.get("RCEPT_YMD"))).style(dateYMD) - , xlsx.style("DIV_KB_NM", XLSWriter.Styler.CENTER) - , xlsx.style("RCEPT_CNT", numeric) - , xlsx.style("RCEPT_AMT", numeric) - , xlsx.style("USEFEE_AMT", numeric) - , xlsx.style("TOTPOST_PRC", numeric) - , xlsx.format(r -> xlsx.str2datetime(r.get("REG_DT"))).style(dateDT) - , xlsx.style("RGTR_NM", XLSWriter.Styler.LEFT) - ); + .rowValues(CmmnUtil.mergeListByIndex(titles, headerStylers)); + + List list = epostRcptRsltService.getEpostRcptRsltList(req.setFetchSize(0)); + + BiFunction getValue = (title1, noting) -> { + switch (title1) { + case "발송자료키" : return xlsx.style("RELETCDATA", XLSWriter.Styler.CENTER); + case "우편물코드" : return xlsx.style("JOB_CD", XLSWriter.Styler.CENTER); + case "우편물종류" : return xlsx.style("JOB_CD3_NM", XLSWriter.Styler.CENTER); + case "발송일자" : return xlsx.format(r -> xlsx.str2date(r.get("EXTRI_REGYMD"))).style(dateYMD); + case "접수일자" : return xlsx.format(r -> xlsx.str2date(r.get("RCEPT_YMD"))).style(dateYMD); + case "취급구분" : return xlsx.style("DIV_KB_NM", XLSWriter.Styler.CENTER); + case "발송건수" : return xlsx.style("RCEPT_CNT", numeric); + case "결제금액" : return xlsx.style("RCEPT_AMT", numeric); + case "제작수수료" : return xlsx.style("USEFEE_AMT", numeric); + case "우편요금" : return xlsx.style("TOTPOST_PRC", numeric); + case "등록일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT); + case "등록사용자" : return xlsx.style("RGTR_NM", XLSWriter.Styler.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); + .addObject("xls", xlsx); } } diff --git a/src/main/java/cokr/xit/fims/excl/service/bean/CrdnReRegBean.java b/src/main/java/cokr/xit/fims/excl/service/bean/CrdnReRegBean.java index 965eadc5..2a4f5da4 100644 --- a/src/main/java/cokr/xit/fims/excl/service/bean/CrdnReRegBean.java +++ b/src/main/java/cokr/xit/fims/excl/service/bean/CrdnReRegBean.java @@ -13,6 +13,7 @@ import cokr.xit.base.file.FileInfo; import cokr.xit.base.file.service.FileQuery; import cokr.xit.base.file.service.bean.FileBean; import cokr.xit.base.file.web.FileInfoFactory; +import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.service.bean.CrdnBean; import cokr.xit.fims.excl.CrdnReReg; @@ -51,11 +52,21 @@ public class CrdnReRegBean extends AbstractComponent { * @return 단속 재등록 목록 */ public List getCrdnReRegList(LevyExclQuery req) { + // 사용 여부 확인 + if (req.getUseYN() == null) { + req.setUseYN("Y"); + } + // 삭제 여부 확인 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 crdnReRegMapper.selectCrdnReRegList(req); diff --git a/src/main/java/cokr/xit/fims/excl/service/bean/LevyExclBean.java b/src/main/java/cokr/xit/fims/excl/service/bean/LevyExclBean.java index 67cbf93c..dc4545e9 100644 --- a/src/main/java/cokr/xit/fims/excl/service/bean/LevyExclBean.java +++ b/src/main/java/cokr/xit/fims/excl/service/bean/LevyExclBean.java @@ -42,6 +42,10 @@ public class LevyExclBean extends AbstractComponent { * @return 부과제외 대장 목록 */ public List getLevyExclList(LevyExclQuery req) { + // 사용 여부 확인 + if (req.getUseYN() == null) { + req.setUseYN("Y"); + } // 삭제 여부 확인 if (req.getDelYN() == null) { req.setDelYN("N"); diff --git a/src/main/java/cokr/xit/fims/excl/service/bean/OpnnSbmsnBean.java b/src/main/java/cokr/xit/fims/excl/service/bean/OpnnSbmsnBean.java index e2acb3a2..35e6a69a 100644 --- a/src/main/java/cokr/xit/fims/excl/service/bean/OpnnSbmsnBean.java +++ b/src/main/java/cokr/xit/fims/excl/service/bean/OpnnSbmsnBean.java @@ -9,6 +9,7 @@ import org.springframework.stereotype.Component; import cokr.xit.base.file.FileInfo; import cokr.xit.base.file.service.FileQuery; import cokr.xit.base.file.service.bean.FileBean; +import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.cmmn.CrdnSttsHstry; import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean; import cokr.xit.fims.crdn.Crdn; @@ -55,11 +56,21 @@ public class OpnnSbmsnBean extends AbstractComponent { * @return 의견제출 대장 목록 */ public List getOpnnSbmsnList(LevyExclQuery req) { + // 사용 여부 확인 + if (req.getUseYN() == null) { + req.setUseYN("Y"); + } + // 삭제 여부 확인 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 opnnSbmsnMapper.selectOpnnSbmsnList(req); diff --git a/src/main/java/cokr/xit/fims/excl/web/Excl02Controller.java b/src/main/java/cokr/xit/fims/excl/web/Excl02Controller.java index 67bcc5eb..2348d61e 100644 --- a/src/main/java/cokr/xit/fims/excl/web/Excl02Controller.java +++ b/src/main/java/cokr/xit/fims/excl/web/Excl02Controller.java @@ -3,9 +3,11 @@ package cokr.xit.fims.excl.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.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; @@ -13,9 +15,12 @@ import cokr.xit.base.code.CommonCode; import cokr.xit.base.file.FileInfo; import cokr.xit.base.file.service.FileService; import cokr.xit.base.file.web.FileInfoFactory; +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.excl.OpnnSbmsn; +import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.excl.LevyExclQuery; import cokr.xit.fims.excl.service.OpnnSbmsnService; import cokr.xit.fims.sprt.PrintOption; @@ -94,9 +99,79 @@ public class Excl02Controller extends ApplicationController { * } */ public ModelAndView getOpinionSubmissionList(LevyExclQuery req) { - List result = opnnSbmsnService.getOpnnSbmsnList(setFetchSize(req)); - - return setCollectionInfo(new ModelAndView("jsonView"), result, "opnnSbmsn"); + if (!"xls".equals(req.getDownload())) { + List result = opnnSbmsnService.getOpnnSbmsnList(setFetchSize(req)); + return setCollectionInfo(new ModelAndView("jsonView"), result, "opnnSbmsn"); + } else { + XLSWriter xlsx = new XLSWriter() + .setFilename("의견제출 목록.xlsx") + .worksheet(0); + + CellStyle 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, 23) + .cell(3, 0) + .rowValues(CmmnUtil.mergeListByIndex(titles, headerStylers)); + + List list = opnnSbmsnService.getOpnnSbmsnList(req.setFetchSize(0)); + + BiFunction getValue = (title1, noting) -> { + switch (title1) { + case "업무구분" : return xlsx.style("TASK_SE_NM", XLSWriter.Styler.CENTER); + case "접수일자" : return xlsx.format(o -> xlsx.str2date(o.get("RCPT_YMD"))).style(dateYMD); + case "접수번호" : return xlsx.style("RCPT_NO", XLSWriter.Styler.CENTER); + case "접수구분" : return xlsx.style("RCPT_SE_NM", XLSWriter.Styler.CENTER); + case "통보구분" : return xlsx.style("NTFCTN_SE_NM", XLSWriter.Styler.CENTER); + case "진술자명" : return xlsx.style("STTR_NM", XLSWriter.Styler.LEFT); + case "의견제출상태" : return xlsx.style("OPNN_SBMSN_STTS_NM", XLSWriter.Styler.CENTER); + case "의견제출분류" : return xlsx.style("OPNN_SBMSN_SE_NM", XLSWriter.Styler.LEFT); + case "의견제출요지" : return xlsx.style("OPNN_SBMSN_GIST", XLSWriter.Styler.LEFT); + case "단속일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT); + case "차량번호" : return xlsx.style("VHRNO", XLSWriter.Styler.LEFT); + case "단속장소" : return xlsx.style("CRDN_PLC", XLSWriter.Styler.LEFT); + case "최초단속금액" : return xlsx.style("FFNLG_CRDN_AMT", numeric); + case "과태료금액" : return xlsx.style("FFNLG_AMT", numeric); + case "처리상태" : return xlsx.style("CRDN_STTS_NM", XLSWriter.Styler.LEFT); + case "문서번호" : return xlsx.style("DOC_NO", XLSWriter.Styler.LEFT); + case "답변일자" : return xlsx.format(o -> xlsx.str2date(o.get("ANS_YMD"))).style(dateYMD); + case "답변내용" : return xlsx.style("ANS_CN", XLSWriter.Styler.LEFT); + case "납부자명" : return xlsx.style("RTPYR_NM", XLSWriter.Styler.LEFT); + case "납부자생일" : return xlsx.format(o -> xlsx.str2date(o.get("RTPYR_BRDT"))).style(dateYMD); + case "등록일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT); + case "등록사용자" : return xlsx.style("RGTR_NM", XLSWriter.Styler.CENTER); + case "수정일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT); + case "수정사용자" : return xlsx.style("MDFR_NM", XLSWriter.Styler.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); + } } /**지정한 ID의 의견제출 정보를 반환한다. diff --git a/src/main/java/cokr/xit/fims/excl/web/Excl03Controller.java b/src/main/java/cokr/xit/fims/excl/web/Excl03Controller.java index 99a5df3d..74e667ba 100644 --- a/src/main/java/cokr/xit/fims/excl/web/Excl03Controller.java +++ b/src/main/java/cokr/xit/fims/excl/web/Excl03Controller.java @@ -1,20 +1,27 @@ package cokr.xit.fims.excl.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.bind.annotation.RequestMapping; 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.CmmnUtil; import cokr.xit.fims.excl.CrdnReReg; import cokr.xit.fims.excl.LevyExclQuery; import cokr.xit.fims.excl.service.CrdnReRegService; +import cokr.xit.foundation.data.DataObject; /**단속 재등록 서비스의 웹 컨트롤러 * @@ -77,9 +84,67 @@ public class Excl03Controller extends ApplicationController { */ @RequestMapping(name = "단속 재등록 리스트 조회", value = "/010/list.do") public ModelAndView getCrackdownReRegistrationList(LevyExclQuery req) { - List result = crdnReRegService.getCrdnReRegList(setFetchSize(req)); - - return setCollectionInfo(new ModelAndView("jsonView"), result, "crdnReReg"); + if (!"xls".equals(req.getDownload())) { + List result = crdnReRegService.getCrdnReRegList(setFetchSize(req)); + return setCollectionInfo(new ModelAndView("jsonView"), result, "crdnReReg"); + } else { + XLSWriter xlsx = new XLSWriter() + .setFilename("단속 재등록 목록.xlsx") + .worksheet(0); + + CellStyle 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, 11) + .cell(3, 0) + .rowValues(CmmnUtil.mergeListByIndex(titles, headerStylers)); + + List list = crdnReRegService.getCrdnReRegList(req.setFetchSize(0)); + + BiFunction getValue = (title1, noting) -> { + switch (title1) { + case "업무구분" : return xlsx.style("TASK_SE_NM", XLSWriter.Styler.CENTER); + case "재등록일자" : return xlsx.format(o -> xlsx.str2date(o.get("RE_REG_YMD"))).style(dateYMD); + case "단속등록구분" : return xlsx.style("CRDN_REG_SE_NM", XLSWriter.Styler.CENTER); + case "기타내용" : return xlsx.style("ETC_CN", XLSWriter.Styler.LEFT); + case "단속일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT); + case "차량번호" : return xlsx.style("VHRNO", XLSWriter.Styler.LEFT); + case "법정동" : return xlsx.style("CRDN_STDG_NM", XLSWriter.Styler.CENTER); + case "단속장소" : return xlsx.style("CRDN_PLC", XLSWriter.Styler.LEFT); + case "최초단속금액" : return xlsx.style("FFNLG_CRDN_AMT", numeric); + case "처리상태" : return xlsx.style("CRDN_STTS_NM", XLSWriter.Styler.LEFT); + case "등록일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT); + case "등록사용자" : return xlsx.style("RGTR_NM", XLSWriter.Styler.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/resources/sql/mapper/fims/epst/epostGdcc-mapper.xml b/src/main/resources/sql/mapper/fims/epst/epostGdcc-mapper.xml index b34b73c9..9418b5cd 100644 --- a/src/main/resources/sql/mapper/fims/epst/epostGdcc-mapper.xml +++ b/src/main/resources/sql/mapper/fims/epst/epostGdcc-mapper.xml @@ -136,18 +136,18 @@ INSERT INTO TB_EPOST_GDCC ( - GDCC_ID /* 안내문 ID */ - , SGG_CD /* 시군구 코드 */ - , TASK_SE_CD /* 업무 구분 코드 */ - , SNDNG_SE_CD /* 발송 구분 코드 */ - , TTL_NM /* 제목 명 */ - , WORDS_CN /* 문구 내용 */ - , LAST_USE_DT /* 최종 사용 일시 */ - , USE_YN /* 사용 여부 */ - , REG_DT /* 등록 일시 */ - , RGTR /* 등록자 */ - , MDFCN_DT /* 수정 일시 */ - , MDFR /* 수정자 */ + GDCC_ID /* 안내문 ID */ + , SGG_CD /* 시군구 코드 */ + , TASK_SE_CD /* 업무 구분 코드 */ + , SNDNG_SE_CD /* 발송 구분 코드 */ + , TTL_NM /* 제목 명 */ + , WORDS_CN /* 문구 내용 */ + , LAST_USE_DT /* 최종 사용 일시 */ + , USE_YN /* 사용 여부 */ + , REG_DT /* 등록 일시 */ + , RGTR /* 등록자 */ + , MDFCN_DT /* 수정 일시 */ + , MDFR /* 수정자 */ ) VALUES ( #{epostGdcc.gdccId} /* 안내문 ID */ diff --git a/src/main/resources/sql/mapper/fims/epst/epostRcptDtl-mapper.xml b/src/main/resources/sql/mapper/fims/epst/epostRcptDtl-mapper.xml index 9bf74012..17b6fdb2 100644 --- a/src/main/resources/sql/mapper/fims/epst/epostRcptDtl-mapper.xml +++ b/src/main/resources/sql/mapper/fims/epst/epostRcptDtl-mapper.xml @@ -33,6 +33,7 @@ + @@ -56,7 +57,6 @@ - @@ -84,7 +84,142 @@ - SELECT CON_KEY + SELECT ERD.CON_KEY + , ERD.RGST_NMBR + , ERD.RECEV_SEQ + , ERD.RECEV_CODE + , ERD.RECEV_BAR1D + , ERD.RECEV_BAR2D + , ERD.RECEV_BILL_NUMBER + , ERD.RECEV_DOC_CD1 + , ERD.RECEV_DOC_CD2 + , ERD.RECEV_DOC_CD3 + , ERD.RECEV_DOC_CD4 + , ERD.RECEV_DOC_CD5 + , ERD.RECEV_SUBJ1 + , ERD.RECEV_SUBJ2 + , ERD.RECEV_SUBJ3 + , ERD.RECEV_VIOLATE_DT + , ERD.RECEV_VIOLATE_DONG + , ERD.RECEV_VIOLATE_PLACE + , ERD.RECEV_LAWS + , ERD.RECEV_PAY_NUMBER1 + , ERD.RECEV_PAY_NUMBER2 + , ERD.RECEV_OCR0 + , ERD.RECEV_OCR1 + , ERD.RECEV_OCR2 + , ERD.RECEV_ONLINE_PAY_NUMBER + , ERD.VRACTNO + , ERD.RECEV_FINE_PRICE + , ERD.RECEV_PAY_PRICE + , ERD.RECEV_PAY_DT + , ERD.RECEV_PAY_IN_DATE + , ERD.RECEV_PAY_IN_PRICE + , ERD.RECEV_PAY_IN_ADD_PRICE + , ERD.RECEV_PAY_IN_DEFAULT_PRICE + , ERD.RECEV_PAY_OUT_DATE + , ERD.RECEV_PAY_OUT_PRICE + , ERD.RECEV_PAY_OUT_ADD_PRICE + , ERD.RECEV_PAY_OUT_DEFAULT_PRICE + , ERD.RECEV_CAR_NUMBER + , ERD.RECEV_CAR_OWNER_ZIPCODE + , ERD.RECEV_CAR_OWNER_ADDR + , ERD.RECEV_CAR_OWNER_DETAILADDR + , ERD.RECEV_CAR_OWNER_NM + , ERD.RECEV_CAR_OWNER_SSN + , ERD.RECEV_EVIDENCE_NUMBER + , ERD.RECEV_PHOTO_CNT + , ERD.RECEV_PHOTO_FILENAME1 + , ERD.RECEV_PHOTO_FILENAME2 + , ERD.RECEV_PHOTO_FILENAME3 + , ERD.RECEV_PHOTO_FILENAME4 + , ERD.VRACTNO2 + , ERD.VRACTNO3 + , ERD.VRACTNO4 + , ERD.VRACTNO5 + , ERD.VRACTNO6 + , ERD.VRACTNO7 + , ERD.VRACTNO8 + , ERD.VRACTNO9 + , ERD.VRACTNO10 + , ERD.VRACTNO11 + , ERD.DTL_VAR_DATA1 + , ERD.DTL_VAR_DATA2 + , ERD.DTL_VAR_DATA3 + , ERD.DTL_VAR_DATA4 + , ERD.DTL_VAR_DATA5 + , ERD.MAKE_RSLT_CD + , ERD.DLVR_RSLT_ID + , ERD.DEL_YN + , ERD.REG_DT + , ERD.RGTR + , ERD.MDFCN_DT + , ERD.MDFR + , ERD.DEL_DT + , ERD.DLTR + FROM TB_EPOST_RCPT_DTL ERD + + + + + + + + + /* 전자우편 접수 상세 등록(epostRcptDtlMapper.insertEpostRcptDtl) */ + INSERT + INTO TB_EPOST_RCPT_DTL ( + CON_KEY , RGST_NMBR , RECEV_SEQ , RECEV_CODE @@ -150,270 +285,167 @@ , DTL_VAR_DATA5 , MAKE_RSLT_CD , DLVR_RSLT_ID + , DEL_YN , REG_DT , RGTR - , DEL_YN , MDFCN_DT , MDFR - , DEL_DT - , DLTR - FROM TB_EPOST_RCPT_DTL - - - - - - - - - /* 전자우편 접수 상세 등록(epostRcptDtlMapper.insertEpostRcptDtl) */ -INSERT INTO TB_EPOST_RCPT_DTL ( - CON_KEY - , RGST_NMBR - , RECEV_SEQ - , RECEV_CODE - , RECEV_BAR1D - , RECEV_BAR2D - , RECEV_DOC_CD1 - , RECEV_DOC_CD2 - , RECEV_DOC_CD3 - , RECEV_DOC_CD4 - , RECEV_DOC_CD5 - , RECEV_SUBJ1 - , RECEV_SUBJ2 - , RECEV_SUBJ3 - , RECEV_VIOLATE_DT - , RECEV_VIOLATE_DONG - , RECEV_VIOLATE_PLACE - , RECEV_LAWS - , RECEV_PAY_NUMBER1 - , RECEV_PAY_NUMBER2 - , RECEV_OCR0 - , RECEV_OCR1 - , RECEV_OCR2 - , RECEV_ONLINE_PAY_NUMBER - , RECEV_FINE_PRICE - , RECEV_PAY_PRICE - , RECEV_PAY_DT - , RECEV_PAY_IN_DATE - , RECEV_PAY_IN_PRICE - , RECEV_PAY_IN_ADD_PRICE - , RECEV_PAY_IN_DEFAULT_PRICE - , RECEV_PAY_OUT_DATE - , RECEV_PAY_OUT_PRICE - , RECEV_PAY_OUT_ADD_PRICE - , RECEV_PAY_OUT_DEFAULT_PRICE - , RECEV_CAR_NUMBER - , RECEV_CAR_OWNER_ZIPCODE - , RECEV_CAR_OWNER_ADDR - , RECEV_CAR_OWNER_DETAILADDR - , RECEV_CAR_OWNER_NM - , RECEV_CAR_OWNER_SSN - , RECEV_EVIDENCE_NUMBER - , RECEV_PHOTO_CNT - , RECEV_PHOTO_FILENAME1 - , RECEV_PHOTO_FILENAME2 - , RECEV_PHOTO_FILENAME3 - , RECEV_PHOTO_FILENAME4 - , VRACTNO2 - , VRACTNO3 - , VRACTNO4 - , VRACTNO5 - , VRACTNO6 - , VRACTNO7 - , VRACTNO8 - , VRACTNO9 - , VRACTNO10 - , VRACTNO11 - , DLVR_RSLT_ID - , MAKE_RSLT_CD - , REG_DT - , RGTR - , RECEV_BILL_NUMBER - , VRACTNO - , DTL_VAR_DATA1 - , DTL_VAR_DATA2 - , DTL_VAR_DATA3 - , DTL_VAR_DATA4 - , DTL_VAR_DATA5 - , DEL_YN - , MDFCN_DT - , MDFR - , DEL_DT - , DLTR -) VALUES ( - #{epostRcptDtl.conKey} - , #{epostRcptDtl.rgstNmbr} - , #{epostRcptDtl.recevSeq} - , #{epostRcptDtl.recevCode} - , #{epostRcptDtl.recevBar1d} - , #{epostRcptDtl.recevBar2d} - , #{epostRcptDtl.recevDocCd1} - , #{epostRcptDtl.recevDocCd2} - , #{epostRcptDtl.recevDocCd3} - , #{epostRcptDtl.recevDocCd4} - , #{epostRcptDtl.recevDocCd5} - , #{epostRcptDtl.recevSubj1} - , #{epostRcptDtl.recevSubj2} - , #{epostRcptDtl.recevSubj3} - , #{epostRcptDtl.recevViolateDt} - , #{epostRcptDtl.recevViolateDong} - , #{epostRcptDtl.recevViolatePlace} - , #{epostRcptDtl.recevLaws} - , #{epostRcptDtl.recevPayNumber1} - , #{epostRcptDtl.recevPayNumber2} - , #{epostRcptDtl.recevOcr0} - , #{epostRcptDtl.recevOcr1} - , #{epostRcptDtl.recevOcr2} - , #{epostRcptDtl.recevOnlinePayNumber} - , #{epostRcptDtl.recevFinePrice} - , #{epostRcptDtl.recevPayPrice} - , #{epostRcptDtl.recevPayDt} - , #{epostRcptDtl.recevPayInDate} - , #{epostRcptDtl.recevPayInPrice} - , #{epostRcptDtl.recevPayInAddPrice} - , #{epostRcptDtl.recevPayInDefaultPrice} - , #{epostRcptDtl.recevPayOutDate} - , #{epostRcptDtl.recevPayOutPrice} - , #{epostRcptDtl.recevPayOutAddPrice} - , #{epostRcptDtl.recevPayOutDefaultPrice} - , #{epostRcptDtl.recevCarNumber} - , #{epostRcptDtl.recevCarOwnerZipcode} - , #{epostRcptDtl.recevCarOwnerAddr} - , #{epostRcptDtl.recevCarOwnerDetailaddr} - , #{epostRcptDtl.recevCarOwnerNm} - , #{epostRcptDtl.recevCarOwnerSsn} - , #{epostRcptDtl.recevEvidenceNumber} - , #{epostRcptDtl.recevPhotoCnt} - , #{epostRcptDtl.recevPhotoFilename1} - , #{epostRcptDtl.recevPhotoFilename2} - , #{epostRcptDtl.recevPhotoFilename3} - , #{epostRcptDtl.recevPhotoFilename4} - , #{epostRcptDtl.vractno2} - , #{epostRcptDtl.vractno3} - , #{epostRcptDtl.vractno4} - , #{epostRcptDtl.vractno5} - , #{epostRcptDtl.vractno6} - , #{epostRcptDtl.vractno7} - , #{epostRcptDtl.vractno8} - , #{epostRcptDtl.vractno9} - , #{epostRcptDtl.vractno10} - , #{epostRcptDtl.vractno11} - , #{epostRcptDtl.dlvrRsltId} - , #{epostRcptDtl.makeRsltCd} - , - , #{currentUser.id} - , #{epostRcptDtl.recevBillNumber} - , #{epostRcptDtl.vractno} - , #{epostRcptDtl.dtlVarData1} - , #{epostRcptDtl.dtlVarData2} - , #{epostRcptDtl.dtlVarData3} - , #{epostRcptDtl.dtlVarData4} - , #{epostRcptDtl.dtlVarData5} - , #{epostRcptDtl.delYn} - , - , #{currentUser.id} - , #{epostRcptDtl.removedAt} - , #{epostRcptDtl.removedBy} -) + ) VALUES ( + #{epostRcptDtl.conKey} + , #{epostRcptDtl.rgstNmbr} + , #{epostRcptDtl.recevSeq} + , #{epostRcptDtl.recevCode} + , #{epostRcptDtl.recevBar1d} + , #{epostRcptDtl.recevBar2d} + , #{epostRcptDtl.recevBillNumber} + , #{epostRcptDtl.recevDocCd1} + , #{epostRcptDtl.recevDocCd2} + , #{epostRcptDtl.recevDocCd3} + , #{epostRcptDtl.recevDocCd4} + , #{epostRcptDtl.recevDocCd5} + , #{epostRcptDtl.recevSubj1} + , #{epostRcptDtl.recevSubj2} + , #{epostRcptDtl.recevSubj3} + , #{epostRcptDtl.recevViolateDt} + , #{epostRcptDtl.recevViolateDong} + , #{epostRcptDtl.recevViolatePlace} + , #{epostRcptDtl.recevLaws} + , #{epostRcptDtl.recevPayNumber1} + , #{epostRcptDtl.recevPayNumber2} + , #{epostRcptDtl.recevOcr0} + , #{epostRcptDtl.recevOcr1} + , #{epostRcptDtl.recevOcr2} + , #{epostRcptDtl.recevOnlinePayNumber} + , #{epostRcptDtl.vractno} + , #{epostRcptDtl.recevFinePrice} + , #{epostRcptDtl.recevPayPrice} + , #{epostRcptDtl.recevPayDt} + , #{epostRcptDtl.recevPayInDate} + , #{epostRcptDtl.recevPayInPrice} + , #{epostRcptDtl.recevPayInAddPrice} + , #{epostRcptDtl.recevPayInDefaultPrice} + , #{epostRcptDtl.recevPayOutDate} + , #{epostRcptDtl.recevPayOutPrice} + , #{epostRcptDtl.recevPayOutAddPrice} + , #{epostRcptDtl.recevPayOutDefaultPrice} + , #{epostRcptDtl.recevCarNumber} + , #{epostRcptDtl.recevCarOwnerZipcode} + , #{epostRcptDtl.recevCarOwnerAddr} + , #{epostRcptDtl.recevCarOwnerDetailaddr} + , #{epostRcptDtl.recevCarOwnerNm} + , #{epostRcptDtl.recevCarOwnerSsn} + , #{epostRcptDtl.recevEvidenceNumber} + , #{epostRcptDtl.recevPhotoCnt} + , #{epostRcptDtl.recevPhotoFilename1} + , #{epostRcptDtl.recevPhotoFilename2} + , #{epostRcptDtl.recevPhotoFilename3} + , #{epostRcptDtl.recevPhotoFilename4} + , #{epostRcptDtl.vractno2} + , #{epostRcptDtl.vractno3} + , #{epostRcptDtl.vractno4} + , #{epostRcptDtl.vractno5} + , #{epostRcptDtl.vractno6} + , #{epostRcptDtl.vractno7} + , #{epostRcptDtl.vractno8} + , #{epostRcptDtl.vractno9} + , #{epostRcptDtl.vractno10} + , #{epostRcptDtl.vractno11} + , #{epostRcptDtl.dtlVarData1} + , #{epostRcptDtl.dtlVarData2} + , #{epostRcptDtl.dtlVarData3} + , #{epostRcptDtl.dtlVarData4} + , #{epostRcptDtl.dtlVarData5} + , #{epostRcptDtl.makeRsltCd} + , #{epostRcptDtl.dlvrRsltId} + , 'N' + , /* 등록 일시 */ + , #{epostRcptDtl.createdBy} /* 등록자 */ + , /* 수정 일시 */ + , #{epostRcptDtl.modifiedBy} /* 수정자 */ + ) /* 전자우편 접수 상세 수정(epostRcptDtlMapper.updateEpostRcptDtl) */ -UPDATE TB_EPOST_RCPT_DTL SET - RECEV_SEQ = #{epostRcptDtl.recevSeq} - , RECEV_CODE = #{epostRcptDtl.recevCode} - , RECEV_BAR1D = #{epostRcptDtl.recevBar1d} - , RECEV_BAR2D = #{epostRcptDtl.recevBar2d} - , RECEV_DOC_CD1 = #{epostRcptDtl.recevDocCd1} - , RECEV_DOC_CD2 = #{epostRcptDtl.recevDocCd2} - , RECEV_DOC_CD3 = #{epostRcptDtl.recevDocCd3} - , RECEV_DOC_CD4 = #{epostRcptDtl.recevDocCd4} - , RECEV_DOC_CD5 = #{epostRcptDtl.recevDocCd5} - , RECEV_SUBJ1 = #{epostRcptDtl.recevSubj1} - , RECEV_SUBJ2 = #{epostRcptDtl.recevSubj2} - , RECEV_SUBJ3 = #{epostRcptDtl.recevSubj3} - , RECEV_VIOLATE_DT = #{epostRcptDtl.recevViolateDt} - , RECEV_VIOLATE_DONG = #{epostRcptDtl.recevViolateDong} - , RECEV_VIOLATE_PLACE = #{epostRcptDtl.recevViolatePlace} - , RECEV_LAWS = #{epostRcptDtl.recevLaws} - , RECEV_PAY_NUMBER1 = #{epostRcptDtl.recevPayNumber1} - , RECEV_PAY_NUMBER2 = #{epostRcptDtl.recevPayNumber2} - , RECEV_OCR0 = #{epostRcptDtl.recevOcr0} - , RECEV_OCR1 = #{epostRcptDtl.recevOcr1} - , RECEV_OCR2 = #{epostRcptDtl.recevOcr2} - , RECEV_ONLINE_PAY_NUMBER = #{epostRcptDtl.recevOnlinePayNumber} - , RECEV_FINE_PRICE = #{epostRcptDtl.recevFinePrice} - , RECEV_PAY_PRICE = #{epostRcptDtl.recevPayPrice} - , RECEV_PAY_DT = #{epostRcptDtl.recevPayDt} - , RECEV_PAY_IN_DATE = #{epostRcptDtl.recevPayInDate} - , RECEV_PAY_IN_PRICE = #{epostRcptDtl.recevPayInPrice} - , RECEV_PAY_IN_ADD_PRICE = #{epostRcptDtl.recevPayInAddPrice} - , RECEV_PAY_IN_DEFAULT_PRICE = #{epostRcptDtl.recevPayInDefaultPrice} - , RECEV_PAY_OUT_DATE = #{epostRcptDtl.recevPayOutDate} - , RECEV_PAY_OUT_PRICE = #{epostRcptDtl.recevPayOutPrice} - , RECEV_PAY_OUT_ADD_PRICE = #{epostRcptDtl.recevPayOutAddPrice} - , RECEV_PAY_OUT_DEFAULT_PRICE = #{epostRcptDtl.recevPayOutDefaultPrice} - , RECEV_CAR_NUMBER = #{epostRcptDtl.recevCarNumber} - , RECEV_CAR_OWNER_ZIPCODE = #{epostRcptDtl.recevCarOwnerZipcode} - , RECEV_CAR_OWNER_ADDR = #{epostRcptDtl.recevCarOwnerAddr} - , RECEV_CAR_OWNER_DETAILADDR = #{epostRcptDtl.recevCarOwnerDetailaddr} - , RECEV_CAR_OWNER_NM = #{epostRcptDtl.recevCarOwnerNm} - , RECEV_CAR_OWNER_SSN = #{epostRcptDtl.recevCarOwnerSsn} - , RECEV_EVIDENCE_NUMBER = #{epostRcptDtl.recevEvidenceNumber} - , RECEV_PHOTO_CNT = #{epostRcptDtl.recevPhotoCnt} - , RECEV_PHOTO_FILENAME1 = #{epostRcptDtl.recevPhotoFilename1} - , RECEV_PHOTO_FILENAME2 = #{epostRcptDtl.recevPhotoFilename2} - , RECEV_PHOTO_FILENAME3 = #{epostRcptDtl.recevPhotoFilename3} - , RECEV_PHOTO_FILENAME4 = #{epostRcptDtl.recevPhotoFilename4} - , VRACTNO2 = #{epostRcptDtl.vractno2} - , VRACTNO3 = #{epostRcptDtl.vractno3} - , VRACTNO4 = #{epostRcptDtl.vractno4} - , VRACTNO5 = #{epostRcptDtl.vractno5} - , VRACTNO6 = #{epostRcptDtl.vractno6} - , VRACTNO7 = #{epostRcptDtl.vractno7} - , VRACTNO8 = #{epostRcptDtl.vractno8} - , VRACTNO9 = #{epostRcptDtl.vractno9} - , VRACTNO10 = #{epostRcptDtl.vractno10} - , VRACTNO11 = #{epostRcptDtl.vractno11} - , DLVR_RSLT_ID = #{epostRcptDtl.dlvrRsltId} - , MAKE_RSLT_CD = #{epostRcptDtl.makeRsltCd} - , RECEV_BILL_NUMBER = #{epostRcptDtl.recevBillNumber} - , VRACTNO = #{epostRcptDtl.vractno} - , DTL_VAR_DATA1 = #{epostRcptDtl.dtlVarData1} - , DTL_VAR_DATA2 = #{epostRcptDtl.dtlVarData2} - , DTL_VAR_DATA3 = #{epostRcptDtl.dtlVarData3} - , DTL_VAR_DATA4 = #{epostRcptDtl.dtlVarData4} - , DTL_VAR_DATA5 = #{epostRcptDtl.dtlVarData5} - , DEL_YN = #{epostRcptDtl.delYn} - , MDFCN_DT = - , MDFR = #{currentUser.id} - , DEL_DT = #{epostRcptDtl.removedAt} - , DLTR = #{epostRcptDtl.removedBy} - WHERE CON_KEY = #{epostRcptDtl.conKey} - AND RGST_NMBR = #{epostRcptDtl.rgstNmbr} + UPDATE TB_EPOST_RCPT_DTL + SET RECEV_SEQ = #{epostRcptDtl.recevSeq} + , RECEV_CODE = #{epostRcptDtl.recevCode} + , RECEV_BAR1D = #{epostRcptDtl.recevBar1d} + , RECEV_BAR2D = #{epostRcptDtl.recevBar2d} + , RECEV_BILL_NUMBER = #{epostRcptDtl.recevBillNumber} + , RECEV_DOC_CD1 = #{epostRcptDtl.recevDocCd1} + , RECEV_DOC_CD2 = #{epostRcptDtl.recevDocCd2} + , RECEV_DOC_CD3 = #{epostRcptDtl.recevDocCd3} + , RECEV_DOC_CD4 = #{epostRcptDtl.recevDocCd4} + , RECEV_DOC_CD5 = #{epostRcptDtl.recevDocCd5} + , RECEV_SUBJ1 = #{epostRcptDtl.recevSubj1} + , RECEV_SUBJ2 = #{epostRcptDtl.recevSubj2} + , RECEV_SUBJ3 = #{epostRcptDtl.recevSubj3} + , RECEV_VIOLATE_DT = #{epostRcptDtl.recevViolateDt} + , RECEV_VIOLATE_DONG = #{epostRcptDtl.recevViolateDong} + , RECEV_VIOLATE_PLACE = #{epostRcptDtl.recevViolatePlace} + , RECEV_LAWS = #{epostRcptDtl.recevLaws} + , RECEV_PAY_NUMBER1 = #{epostRcptDtl.recevPayNumber1} + , RECEV_PAY_NUMBER2 = #{epostRcptDtl.recevPayNumber2} + , RECEV_OCR0 = #{epostRcptDtl.recevOcr0} + , RECEV_OCR1 = #{epostRcptDtl.recevOcr1} + , RECEV_OCR2 = #{epostRcptDtl.recevOcr2} + , RECEV_ONLINE_PAY_NUMBER = #{epostRcptDtl.recevOnlinePayNumber} + , VRACTNO = #{epostRcptDtl.vractno} + , RECEV_FINE_PRICE = #{epostRcptDtl.recevFinePrice} + , RECEV_PAY_PRICE = #{epostRcptDtl.recevPayPrice} + , RECEV_PAY_DT = #{epostRcptDtl.recevPayDt} + , RECEV_PAY_IN_DATE = #{epostRcptDtl.recevPayInDate} + , RECEV_PAY_IN_PRICE = #{epostRcptDtl.recevPayInPrice} + , RECEV_PAY_IN_ADD_PRICE = #{epostRcptDtl.recevPayInAddPrice} + , RECEV_PAY_IN_DEFAULT_PRICE = #{epostRcptDtl.recevPayInDefaultPrice} + , RECEV_PAY_OUT_DATE = #{epostRcptDtl.recevPayOutDate} + , RECEV_PAY_OUT_PRICE = #{epostRcptDtl.recevPayOutPrice} + , RECEV_PAY_OUT_ADD_PRICE = #{epostRcptDtl.recevPayOutAddPrice} + , RECEV_PAY_OUT_DEFAULT_PRICE = #{epostRcptDtl.recevPayOutDefaultPrice} + , RECEV_CAR_NUMBER = #{epostRcptDtl.recevCarNumber} + , RECEV_CAR_OWNER_ZIPCODE = #{epostRcptDtl.recevCarOwnerZipcode} + , RECEV_CAR_OWNER_ADDR = #{epostRcptDtl.recevCarOwnerAddr} + , RECEV_CAR_OWNER_DETAILADDR = #{epostRcptDtl.recevCarOwnerDetailaddr} + , RECEV_CAR_OWNER_NM = #{epostRcptDtl.recevCarOwnerNm} + , RECEV_CAR_OWNER_SSN = #{epostRcptDtl.recevCarOwnerSsn} + , RECEV_EVIDENCE_NUMBER = #{epostRcptDtl.recevEvidenceNumber} + , RECEV_PHOTO_CNT = #{epostRcptDtl.recevPhotoCnt} + , RECEV_PHOTO_FILENAME1 = #{epostRcptDtl.recevPhotoFilename1} + , RECEV_PHOTO_FILENAME2 = #{epostRcptDtl.recevPhotoFilename2} + , RECEV_PHOTO_FILENAME3 = #{epostRcptDtl.recevPhotoFilename3} + , RECEV_PHOTO_FILENAME4 = #{epostRcptDtl.recevPhotoFilename4} + , VRACTNO2 = #{epostRcptDtl.vractno2} + , VRACTNO3 = #{epostRcptDtl.vractno3} + , VRACTNO4 = #{epostRcptDtl.vractno4} + , VRACTNO5 = #{epostRcptDtl.vractno5} + , VRACTNO6 = #{epostRcptDtl.vractno6} + , VRACTNO7 = #{epostRcptDtl.vractno7} + , VRACTNO8 = #{epostRcptDtl.vractno8} + , VRACTNO9 = #{epostRcptDtl.vractno9} + , VRACTNO10 = #{epostRcptDtl.vractno10} + , VRACTNO11 = #{epostRcptDtl.vractno11} + , DTL_VAR_DATA1 = #{epostRcptDtl.dtlVarData1} + , DTL_VAR_DATA2 = #{epostRcptDtl.dtlVarData2} + , DTL_VAR_DATA3 = #{epostRcptDtl.dtlVarData3} + , DTL_VAR_DATA4 = #{epostRcptDtl.dtlVarData4} + , DTL_VAR_DATA5 = #{epostRcptDtl.dtlVarData5} + , MAKE_RSLT_CD = #{epostRcptDtl.makeRsltCd} + , DLVR_RSLT_ID = #{epostRcptDtl.dlvrRsltId} + , MDFCN_DT = + , MDFR = #{currentUser.id} + WHERE CON_KEY = #{epostRcptDtl.conKey} + AND RGST_NMBR = #{epostRcptDtl.rgstNmbr} + AND DEL_YN = 'N' /* 전자우편 접수 상세 삭제(epostRcptDtlMapper.deleteEpostRcptDtl) */ - UPDATE TB_EPOST_RCPT_DTL SET - USE_YN = 'N' - , MDFCN_DT = - , MDFR = #{currentUser.id} - WHERE CON_KEY = #{epostRcptDtl.conKey} + UPDATE TB_EPOST_RCPT_DTL + SET DEL_YN = 'Y' /* 삭제 여부 */ + , DEL_DT = /* 삭제 일시 */ + , DLTR = #{epostRcptDtl.removedBy} /* 삭제자 */ + WHERE CON_KEY = #{epostRcptDtl.conKey} AND RGST_NMBR = #{epostRcptDtl.rgstNmbr} + AND DEL_YN = 'N' diff --git a/src/main/resources/sql/mapper/fims/epst/epostRcptReg-mapper.xml b/src/main/resources/sql/mapper/fims/epst/epostRcptReg-mapper.xml index f3f54c28..2aee0f38 100644 --- a/src/main/resources/sql/mapper/fims/epst/epostRcptReg-mapper.xml +++ b/src/main/resources/sql/mapper/fims/epst/epostRcptReg-mapper.xml @@ -9,10 +9,10 @@ - - + + @@ -64,7 +64,10 @@ SELECT ERR.CON_KEY + , ERR.CON_ORG + , ERR.SNDNG_ID , ERR.RCEPT_ID + , ERR.RCEPT_YMD , ERR.DATA_CD , ERR.DIV_KB , ERR.DFPAYYN @@ -105,16 +108,17 @@ , ERR.REG_VAR_DATA5 , ERR.JOB_CD , ERR.POST_PRCS_STTS_CD - , ERR.SNDNG_ID - , ERR.RCEPT_YMD , ERR.DEL_YN , ERR.REG_DT , ERR.RGTR + , ERR.MDFCN_DT + , ERR.MDFR , ERR.DEL_DT , ERR.DLTR , (SELECT GET_CODE_NM('EGP002', ERR.DIV_KB) FROM DUAL) AS DIV_KB_NM /* 취급 구분 명 */ , (SELECT GET_CODE_NM('EGP012', ERR.POST_PRCS_STTS_CD) FROM DUAL) AS POST_PRCS_STTS_NM /* 우편 처리 상태 명 */ , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = ERR.RGTR) AS RGTR_NM /* 등록자 명 */ + , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = ERR.MDFR) AS MDFR_NM /* 수정자 명 */ , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = ERR.DLTR) AS DLTR_NM /* 삭제자 명 */ FROM TB_EPOST_RCPT_REG ERR @@ -146,7 +150,7 @@ AND ERR.DEL_YN = 'N' - + AND SUBSTR(ERR.REG_DT,1,8) =]]> #{schRegDateFrom} /* 등록 일자 시작 */ @@ -204,171 +208,13 @@ - - -/* 전자우편 접수 등록 등록(epostRcptRegMapper.insertEpostRcptReg) */ -INSERT INTO TB_EPOST_RCPT_REG ( - CON_KEY - , RCEPT_ID - , DATA_CD - , DIV_KB - , DFPAYYN - , RCPT_KB - , SEAL_CD - , WORD_KB - , MAIL_CNT - , RECEV_CNT - , ENV_CD - , COLOR_YN - , MM_YN - , FLEX_CD - , DM_CNT - , SB_FG - , APVL_NB - , SEND_DATE - , SEND_TIME - , RELORSECT_CD - , RECEV_SENDER_ORG_CODE - , RECEV_SENDER_NM - , RECEV_SENDER_ZIPCODE - , RECEV_SENDER_ADDR - , RECEV_SENDER_DETAILADDR - , RECEV_SENDER_DEPART_TEL - , RECEV_SENDER_DEPART_NM - , RECEV_DIV_CD - , RECEV_PRINT_DT - , RECEV_PRINT_YEAR - , RECEV_PRINT_MONTH - , RECEV_PRINT_DAY - , RECEV_SENDER_FAX - , RECEV_SERDER_STAFF - , RECEV_SENDER_EMAIL - , REG_VAR_DATA1 - , REG_VAR_DATA2 - , REG_VAR_DATA3 - , REG_VAR_DATA4 - , REG_VAR_DATA5 - , SNDNG_ID - , JOB_CD - , POST_PRCS_STTS_CD - , RCEPT_YMD - , DEL_YN - , REG_DT - , RGTR - , DEL_DT - , DLTR -) VALUES ( - #{epostRcptReg.conKey} - , #{epostRcptReg.rceptId} - , #{epostRcptReg.dataCd} - , #{epostRcptReg.divKb} - , #{epostRcptReg.dfpayyn} - , #{epostRcptReg.rcptKb} - , #{epostRcptReg.sealCd} - , #{epostRcptReg.wordKb} - , #{epostRcptReg.mailCnt} - , #{epostRcptReg.recevCnt} - , #{epostRcptReg.envCd} - , #{epostRcptReg.colorYn} - , #{epostRcptReg.mmYn} - , #{epostRcptReg.flexCd} - , #{epostRcptReg.dmCnt} - , #{epostRcptReg.sbFg} - , #{epostRcptReg.apvlNb} - , #{epostRcptReg.sendDate} - , #{epostRcptReg.sendTime} - , #{epostRcptReg.relorsectCd} - , #{epostRcptReg.recevSenderOrgCode} - , #{epostRcptReg.recevSenderNm} - , #{epostRcptReg.recevSenderZipcode} - , #{epostRcptReg.recevSenderAddr} - , #{epostRcptReg.recevSenderDetailaddr} - , #{epostRcptReg.recevSenderDepartTel} - , #{epostRcptReg.recevSenderDepartNm} - , #{epostRcptReg.recevDivCd} - , #{epostRcptReg.recevPrintDt} - , #{epostRcptReg.recevPrintYear} - , #{epostRcptReg.recevPrintMonth} - , #{epostRcptReg.recevPrintDay} - , #{epostRcptReg.recevSenderFax} - , #{epostRcptReg.recevSerderStaff} - , #{epostRcptReg.recevSenderEmail} - , #{epostRcptReg.regVarData1} - , #{epostRcptReg.regVarData2} - , #{epostRcptReg.regVarData3} - , #{epostRcptReg.regVarData4} - , #{epostRcptReg.regVarData5} - , #{epostRcptReg.sndngId} - , #{epostRcptReg.jobCd} - , #{epostRcptReg.postPrcsSttsCd} - , #{epostRcptReg.rceptYmd} - , #{epostRcptReg.delYn} - , - , #{currentUser.id} - , #{epostRcptReg.removedAt} - , #{epostRcptReg.removedBy} -) - -/* 전자우편 접수 등록 수정(epostRcptRegMapper.updateEpostRcptReg) */ -UPDATE TB_EPOST_RCPT_REG SET - RCEPT_ID = #{epostRcptReg.rceptId} - , DATA_CD = #{epostRcptReg.dataCd} - , DIV_KB = #{epostRcptReg.divKb} - , DFPAYYN = #{epostRcptReg.dfpayyn} - , RCPT_KB = #{epostRcptReg.rcptKb} - , SEAL_CD = #{epostRcptReg.sealCd} - , WORD_KB = #{epostRcptReg.wordKb} - , MAIL_CNT = #{epostRcptReg.mailCnt} - , RECEV_CNT = #{epostRcptReg.recevCnt} - , ENV_CD = #{epostRcptReg.envCd} - , COLOR_YN = #{epostRcptReg.colorYn} - , MM_YN = #{epostRcptReg.mmYn} - , FLEX_CD = #{epostRcptReg.flexCd} - , DM_CNT = #{epostRcptReg.dmCnt} - , SB_FG = #{epostRcptReg.sbFg} - , APVL_NB = #{epostRcptReg.apvlNb} - , SEND_DATE = #{epostRcptReg.sendDate} - , SEND_TIME = #{epostRcptReg.sendTime} - , RELORSECT_CD = #{epostRcptReg.relorsectCd} - , RECEV_SENDER_ORG_CODE = #{epostRcptReg.recevSenderOrgCode} - , RECEV_SENDER_NM = #{epostRcptReg.recevSenderNm} - , RECEV_SENDER_ZIPCODE = #{epostRcptReg.recevSenderZipcode} - , RECEV_SENDER_ADDR = #{epostRcptReg.recevSenderAddr} - , RECEV_SENDER_DETAILADDR = #{epostRcptReg.recevSenderDetailaddr} - , RECEV_SENDER_DEPART_TEL = #{epostRcptReg.recevSenderDepartTel} - , RECEV_SENDER_DEPART_NM = #{epostRcptReg.recevSenderDepartNm} - , RECEV_DIV_CD = #{epostRcptReg.recevDivCd} - , RECEV_PRINT_DT = #{epostRcptReg.recevPrintDt} - , RECEV_PRINT_YEAR = #{epostRcptReg.recevPrintYear} - , RECEV_PRINT_MONTH = #{epostRcptReg.recevPrintMonth} - , RECEV_PRINT_DAY = #{epostRcptReg.recevPrintDay} - , RECEV_SENDER_FAX = #{epostRcptReg.recevSenderFax} - , RECEV_SERDER_STAFF = #{epostRcptReg.recevSerderStaff} - , RECEV_SENDER_EMAIL = #{epostRcptReg.recevSenderEmail} - , SNDNG_ID = #{epostRcptReg.sndngId} - , JOB_CD = #{epostRcptReg.jobCd} - , POST_PRCS_STTS_CD = #{epostRcptReg.postPrcsSttsCd} - , RCEPT_YMD = #{epostRcptReg.rceptYmd} - , DEL_YN = #{epostRcptReg.delYn} - , DEL_DT = #{epostRcptReg.removedAt} - , DLTR = #{epostRcptReg.removedBy} - , REG_VAR_DATA1 = #{epostRcptReg.regVarData1} - , REG_VAR_DATA2 = #{epostRcptReg.regVarData2} - , REG_VAR_DATA3 = #{epostRcptReg.regVarData3} - , REG_VAR_DATA4 = #{epostRcptReg.regVarData4} - , REG_VAR_DATA5 = #{epostRcptReg.regVarData5} - WHERE CON_KEY = #{epostRcptReg.conKey} - -/* 전자우편 접수 등록 삭제(epostRcptRegMapper.deleteEpostRcptReg) */ -UPDATE TB_EPOST_RCPT_REG SET - USE_YN = 'N' - , MDFCN_DT = - , MDFR = #{currentUser.id} - WHERE CON_KEY = #{epostRcptReg.conKey} + + /* 전자우편 접수 등록 등록(epostRcptRegMapper.insertEpostRcptReg) */ + INSERT + INTO TB_EPOST_RCPT_REG ( + CON_KEY + , CON_ORG + , SNDNG_ID + , RCEPT_ID + , RCEPT_YMD + , DATA_CD + , DIV_KB + , DFPAYYN + , RCPT_KB + , SEAL_CD + , WORD_KB + , MAIL_CNT + , RECEV_CNT + , ENV_CD + , COLOR_YN + , MM_YN + , FLEX_CD + , DM_CNT + , SB_FG + , APVL_NB + , SEND_DATE + , SEND_TIME + , RELORSECT_CD + , RECEV_SENDER_ORG_CODE + , RECEV_SENDER_NM + , RECEV_SENDER_ZIPCODE + , RECEV_SENDER_ADDR + , RECEV_SENDER_DETAILADDR + , RECEV_SENDER_DEPART_TEL + , RECEV_SENDER_DEPART_NM + , RECEV_DIV_CD + , RECEV_PRINT_DT + , RECEV_PRINT_YEAR + , RECEV_PRINT_MONTH + , RECEV_PRINT_DAY + , RECEV_SENDER_FAX + , RECEV_SERDER_STAFF + , RECEV_SENDER_EMAIL + , REG_VAR_DATA1 + , REG_VAR_DATA2 + , REG_VAR_DATA3 + , REG_VAR_DATA4 + , REG_VAR_DATA5 + , JOB_CD + , POST_PRCS_STTS_CD + , DEL_YN + , REG_DT + , RGTR + , MDFCN_DT + , MDFR + ) + VALUES ( + #{epostRcptReg.conKey} + , #{epostRcptReg.conOrg} + , #{epostRcptReg.sndngId} + , #{epostRcptReg.rceptId} + , #{epostRcptReg.rceptYmd} + , #{epostRcptReg.dataCd} + , #{epostRcptReg.divKb} + , #{epostRcptReg.dfpayyn} + , #{epostRcptReg.rcptKb} + , #{epostRcptReg.sealCd} + , #{epostRcptReg.wordKb} + , #{epostRcptReg.mailCnt} + , #{epostRcptReg.recevCnt} + , #{epostRcptReg.envCd} + , #{epostRcptReg.colorYn} + , #{epostRcptReg.mmYn} + , #{epostRcptReg.flexCd} + , #{epostRcptReg.dmCnt} + , #{epostRcptReg.sbFg} + , #{epostRcptReg.apvlNb} + , #{epostRcptReg.sendDate} + , #{epostRcptReg.sendTime} + , #{epostRcptReg.relorsectCd} + , #{epostRcptReg.recevSenderOrgCode} + , #{epostRcptReg.recevSenderNm} + , #{epostRcptReg.recevSenderZipcode} + , #{epostRcptReg.recevSenderAddr} + , #{epostRcptReg.recevSenderDetailaddr} + , #{epostRcptReg.recevSenderDepartTel} + , #{epostRcptReg.recevSenderDepartNm} + , #{epostRcptReg.recevDivCd} + , #{epostRcptReg.recevPrintDt} + , #{epostRcptReg.recevPrintYear} + , #{epostRcptReg.recevPrintMonth} + , #{epostRcptReg.recevPrintDay} + , #{epostRcptReg.recevSenderFax} + , #{epostRcptReg.recevSerderStaff} + , #{epostRcptReg.recevSenderEmail} + , #{epostRcptReg.regVarData1} + , #{epostRcptReg.regVarData2} + , #{epostRcptReg.regVarData3} + , #{epostRcptReg.regVarData4} + , #{epostRcptReg.regVarData5} + , #{epostRcptReg.jobCd} + , #{epostRcptReg.postPrcsSttsCd} + , 'N' + , + , #{epostRcptReg.createdBy} + , + , #{epostRcptReg.modifiedBy} + ) + + + /* 전자우편 접수 등록 수정(epostRcptRegMapper.updateEpostRcptReg) */ + UPDATE TB_EPOST_RCPT_REG + SET RCEPT_YMD = #{epostRcptReg.rceptYmd} + , CON_ORG = #{epostRcptReg.conOrg} + , RCEPT_ID = #{epostRcptReg.rceptId} + , DATA_CD = #{epostRcptReg.dataCd} + , DIV_KB = #{epostRcptReg.divKb} + , DFPAYYN = #{epostRcptReg.dfpayyn} + , RCPT_KB = #{epostRcptReg.rcptKb} + , SEAL_CD = #{epostRcptReg.sealCd} + , WORD_KB = #{epostRcptReg.wordKb} + , MAIL_CNT = #{epostRcptReg.mailCnt} + , RECEV_CNT = #{epostRcptReg.recevCnt} + , ENV_CD = #{epostRcptReg.envCd} + , COLOR_YN = #{epostRcptReg.colorYn} + , MM_YN = #{epostRcptReg.mmYn} + , FLEX_CD = #{epostRcptReg.flexCd} + , DM_CNT = #{epostRcptReg.dmCnt} + , SB_FG = #{epostRcptReg.sbFg} + , APVL_NB = #{epostRcptReg.apvlNb} + , SEND_DATE = #{epostRcptReg.sendDate} + , SEND_TIME = #{epostRcptReg.sendTime} + , RELORSECT_CD = #{epostRcptReg.relorsectCd} + , RECEV_SENDER_ORG_CODE = #{epostRcptReg.recevSenderOrgCode} + , RECEV_SENDER_NM = #{epostRcptReg.recevSenderNm} + , RECEV_SENDER_ZIPCODE = #{epostRcptReg.recevSenderZipcode} + , RECEV_SENDER_ADDR = #{epostRcptReg.recevSenderAddr} + , RECEV_SENDER_DETAILADDR = #{epostRcptReg.recevSenderDetailaddr} + , RECEV_SENDER_DEPART_TEL = #{epostRcptReg.recevSenderDepartTel} + , RECEV_SENDER_DEPART_NM = #{epostRcptReg.recevSenderDepartNm} + , RECEV_DIV_CD = #{epostRcptReg.recevDivCd} + , RECEV_PRINT_DT = #{epostRcptReg.recevPrintDt} + , RECEV_PRINT_YEAR = #{epostRcptReg.recevPrintYear} + , RECEV_PRINT_MONTH = #{epostRcptReg.recevPrintMonth} + , RECEV_PRINT_DAY = #{epostRcptReg.recevPrintDay} + , RECEV_SENDER_FAX = #{epostRcptReg.recevSenderFax} + , RECEV_SERDER_STAFF = #{epostRcptReg.recevSerderStaff} + , RECEV_SENDER_EMAIL = #{epostRcptReg.recevSenderEmail} + , REG_VAR_DATA1 = #{epostRcptReg.regVarData1} + , REG_VAR_DATA2 = #{epostRcptReg.regVarData2} + , REG_VAR_DATA3 = #{epostRcptReg.regVarData3} + , REG_VAR_DATA4 = #{epostRcptReg.regVarData4} + , REG_VAR_DATA5 = #{epostRcptReg.regVarData5} + , JOB_CD = #{epostRcptReg.jobCd} + , POST_PRCS_STTS_CD = #{epostRcptReg.postPrcsSttsCd} + , MDFCN_DT = + , MDFR = #{epostRcptReg.modifiedBy} + WHERE CON_KEY = #{epostRcptReg.conKey} + AND DEL_YN = 'N' + + + /* 전자우편 접수 등록 삭제(epostRcptRegMapper.deleteEpostRcptReg) */ + UPDATE TB_EPOST_RCPT_REG + SET DEL_YN = 'Y' /* 삭제 여부 */ + , DEL_DT = /* 삭제 일시 */ + , DLTR = #{epostRcptReg.removedBy} /* 삭제자 */ + WHERE CON_KEY = #{epostRcptReg.conKey} + AND DEL_YN = 'N' + + diff --git a/src/main/resources/sql/mapper/fims/excl/crdnReReg-mapper.xml b/src/main/resources/sql/mapper/fims/excl/crdnReReg-mapper.xml index 2fd3f935..25803777 100644 --- a/src/main/resources/sql/mapper/fims/excl/crdnReReg-mapper.xml +++ b/src/main/resources/sql/mapper/fims/excl/crdnReReg-mapper.xml @@ -89,34 +89,34 @@ AND C.DEL_YN = 'N' /* 단속 삭제 여부 */ - - - AND SUBSTR(CRR.REG_DT,1,8) =]]> #{schDetailRegDtFrom} /* 등록 일자 시작 */ + + + AND SUBSTR(CRR.REG_DT,1,8) =]]> #{schRegDateFrom} /* 등록 일자 시작 */ - - AND SUBSTR(CRR.REG_DT,1,8) #{schDetailRegDtTo} /* 등록 일자 종료 */ + + AND SUBSTR(CRR.REG_DT,1,8) #{schRegDateTo} /* 등록 일자 종료 */ - - - AND SUBSTR(CRR.MDFCN_DT,1,8) =]]> #{schDetailRegDtFrom} /* 수정 일자 시작 */ + + + AND SUBSTR(CRR.MDFCN_DT,1,8) =]]> #{schRegDateFrom} /* 수정 일자 시작 */ - - AND SUBSTR(CRR.MDFCN_DT,1,8) #{schDetailRegDtTo} /* 수정 일자 종료 */ + + AND SUBSTR(CRR.MDFCN_DT,1,8) #{schRegDateTo} /* 수정 일자 종료 */ - - - AND CRR.RGTR = #{schDetailRgtrCd} /* 등록자 코드 */ + + + AND CRR.RGTR = #{schRgtrCd} /* 등록자 코드 */ - - - AND CRR.MDFR = #{schDetailRgtrCd} /* 수정자 코드 */ + + + AND CRR.MDFR = #{schRgtrCd} /* 수정자 코드 */ diff --git a/src/main/resources/sql/mapper/fims/excl/levyExcl-mapper.xml b/src/main/resources/sql/mapper/fims/excl/levyExcl-mapper.xml index 42a8049c..52bd03ad 100644 --- a/src/main/resources/sql/mapper/fims/excl/levyExcl-mapper.xml +++ b/src/main/resources/sql/mapper/fims/excl/levyExcl-mapper.xml @@ -128,68 +128,34 @@ AND C.DEL_YN = 'N' /* 단속 삭제 여부 */ - - - AND SUBSTR(LE.REG_DT,1,8) =]]> #{schDetailRegDtFrom} /* 등록 일자 시작 */ + + + AND SUBSTR(LE.REG_DT,1,8) =]]> #{schRegDateFrom} /* 등록 일자 시작 */ - - AND SUBSTR(LE.REG_DT,1,8) #{schDetailRegDtTo} /* 등록 일자 종료 */ + + AND SUBSTR(LE.REG_DT,1,8) #{schRegDateTo} /* 등록 일자 종료 */ - - - AND SUBSTR(LE.MDFCN_DT,1,8) =]]> #{schDetailRegDtFrom} /* 수정 일자 시작 */ + + + AND SUBSTR(LE.MDFCN_DT,1,8) =]]> #{schRegDateFrom} /* 수정 일자 시작 */ - - AND SUBSTR(LE.MDFCN_DT,1,8) #{schDetailRegDtTo} /* 수정 일자 종료 */ + + AND SUBSTR(LE.MDFCN_DT,1,8) #{schRegDateTo} /* 수정 일자 종료 */ - - - AND LE.RGTR = #{schDetailRgtrCd} /* 등록자 코드 */ + + + AND LE.RGTR = #{schRgtrCd} /* 등록자 코드 */ - - - AND LE.MDFR = #{schDetailRgtrCd} /* 수정자 코드 */ - - - - - - - - - AND SUBSTR(C.REG_DT,1,8) =]]> #{schDetailCrdnRegDtFrom} /* 단속 등록 일자 시작 */ - - - AND SUBSTR(C.REG_DT,1,8) #{schDetailCrdnRegDtTo} /* 단속 등록 일자 종료 */ - - - - - AND SUBSTR(C.MDFCN_DT,1,8) =]]> #{schDetailCrdnRegDtFrom} /* 단속 수정 일자 시작 */ - - - AND SUBSTR(C.MDFCN_DT,1,8) #{schDetailCrdnRegDtTo} /* 단속 수정 일자 종료 */ - - - - - - - - - AND C.RGTR = #{schDetailCrdnRgtrCd} /* 단속 등록자 코드 */ - - - - - AND C.MDFR = #{schDetailCrdnRgtrCd} /* 단속 수정자 코드 */ + + + AND LE.MDFR = #{schRgtrCd} /* 수정자 코드 */ diff --git a/src/main/resources/sql/mapper/fims/excl/opnnSbmsn-mapper.xml b/src/main/resources/sql/mapper/fims/excl/opnnSbmsn-mapper.xml index 3c097524..b63c2e73 100644 --- a/src/main/resources/sql/mapper/fims/excl/opnnSbmsn-mapper.xml +++ b/src/main/resources/sql/mapper/fims/excl/opnnSbmsn-mapper.xml @@ -168,34 +168,34 @@ AND C.DEL_YN = 'N' /* 단속 삭제 여부 */ - - - AND SUBSTR(OS.REG_DT,1,8) =]]> #{schDetailRegDtFrom} /* 등록 일자 시작 */ + + + AND SUBSTR(OS.REG_DT,1,8) =]]> #{schRegDateFrom} /* 등록 일자 시작 */ - - AND SUBSTR(OS.REG_DT,1,8) #{schDetailRegDtTo} /* 등록 일자 종료 */ + + AND SUBSTR(OS.REG_DT,1,8) #{schRegDateTo} /* 등록 일자 종료 */ - - - AND SUBSTR(OS.MDFCN_DT,1,8) =]]> #{schDetailRegDtFrom} /* 수정 일자 시작 */ + + + AND SUBSTR(OS.MDFCN_DT,1,8) =]]> #{schRegDateFrom} /* 수정 일자 시작 */ - - AND SUBSTR(OS.MDFCN_DT,1,8) #{schDetailRegDtTo} /* 수정 일자 종료 */ + + AND SUBSTR(OS.MDFCN_DT,1,8) #{schRegDateTo} /* 수정 일자 종료 */ - - - AND OS.RGTR = #{schDetailRgtrCd} /* 등록자 코드 */ + + + AND OS.RGTR = #{schRgtrCd} /* 등록자 코드 */ - - - AND OS.MDFR = #{schDetailRgtrCd} /* 수정자 코드 */ + + + AND OS.MDFR = #{schRgtrCd} /* 수정자 코드 */ diff --git a/src/main/webapp/WEB-INF/jsp/fims/epst/epst02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/epst/epst02010-main.jsp index 5a804c8c..1dd342ce 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/epst/epst02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/epst/epst02010-main.jsp @@ -147,11 +147,9 @@ NO. - - - + 업무구분 - 발송구분 + 발송구분 사용여부 최종사용일시 제목 @@ -459,6 +457,28 @@ // 엑셀 버튼 이벤트 fnExcel${pageName} = () => { + if (${pageName}Control.dataset.empty) { + alert("조회된 자료가 없습니다."); + return; + } + + let excelTitle = []; + let excelTitleWidth = []; + + $("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)").each(function() { + let title = $(this).text(); + + if (title != "" ) { + excelTitle.push(title); + + let titleWidth = Math.ceil($(this).outerWidth() / 10) + 2; + excelTitleWidth.push(titleWidth); + } + }); + + ${pageName}Control.query.excelTitle = excelTitle.join(","); + ${pageName}Control.query.excelTitleWidth = excelTitleWidth.join(","); + ${pageName}Control.download(); } diff --git a/src/main/webapp/WEB-INF/jsp/fims/epst/epst02030-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/epst/epst02030-main.jsp index a5cc3e1f..ecacf436 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/epst/epst02030-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/epst/epst02030-main.jsp @@ -234,9 +234,7 @@ NO. - - - + 발송일자 발송내역 취급구분 @@ -564,6 +562,29 @@ // 엑셀 버튼 이벤트 fnExcel${pageName} = () => { + if (${pageName}Control.dataset.empty) { + alert("조회된 자료가 없습니다."); + return; + } + + let excelTitle = []; + let excelTitleWidth = []; + + $("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)").each(function() { + let title = $(this).text(); + + if (title != "" ) { + excelTitle.push(title); + + let titleWidth = Math.ceil($(this).outerWidth() / 10) + 2; + + excelTitleWidth.push(titleWidth); + } + }); + + ${pageName}Control.query.excelTitle = excelTitle.join(","); + ${pageName}Control.query.excelTitleWidth = excelTitleWidth.join(","); + ${pageName}Control.download(); } diff --git a/src/main/webapp/WEB-INF/jsp/fims/epst/epst02050-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/epst/epst02050-main.jsp index 33358d08..9c2c2bf8 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/epst/epst02050-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/epst/epst02050-main.jsp @@ -481,6 +481,29 @@ // 엑셀 버튼 이벤트 fnExcel${pageName} = () => { + if (${pageName}Control.dataset.empty) { + alert("조회된 자료가 없습니다."); + return; + } + + let excelTitle = []; + let excelTitleWidth = []; + + $("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)").each(function() { + let title = $(this).text(); + + if (title != "" ) { + excelTitle.push(title); + + let titleWidth = Math.ceil($(this).outerWidth() / 10) + 2; + + excelTitleWidth.push(titleWidth); + } + }); + + ${pageName}Control.query.excelTitle = excelTitle.join(","); + ${pageName}Control.query.excelTitleWidth = excelTitleWidth.join(","); + ${pageName}Control.download(); } diff --git a/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp index 114b1e87..8e3d5a4c 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp @@ -133,27 +133,28 @@
- - + ~ - +
- - + + @@ -195,9 +196,7 @@ NO. - - - + 업무구분 부과제외일자 부과제외구분 @@ -226,9 +225,7 @@