From d93f48eae52dabfedc59a9dd97bbd4eea8750d42 Mon Sep 17 00:00:00 2001 From: jjh Date: Tue, 19 Dec 2023 09:37:13 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=91=EC=85=80=EC=A0=80=EC=9E=A5=20?= =?UTF-8?q?=EA=B0=80=EC=9A=B4=EB=8D=B0=20=EC=A0=95=EB=A0=AC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/epst/web/Epst02Controller.java | 69 ++++++++++--------- .../fims/excl/service/bean/CrdnReRegBean.java | 4 -- .../xit/fims/rcvm/service/bean/RcvmtBean.java | 11 ++- .../WEB-INF/jsp/fims/epst/epst02010-main.jsp | 29 +++----- .../WEB-INF/jsp/fims/epst/epst02030-main.jsp | 26 ++----- .../WEB-INF/jsp/fims/epst/epst02050-main.jsp | 23 ++----- .../WEB-INF/jsp/fims/rcvm/rcvm01010-main.jsp | 24 ++----- 7 files changed, 69 insertions(+), 117 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 215a0313..a06c6ace 100644 --- a/src/main/java/cokr/xit/fims/epst/web/Epst02Controller.java +++ b/src/main/java/cokr/xit/fims/epst/web/Epst02Controller.java @@ -124,7 +124,8 @@ public class Epst02Controller extends ApplicationController { .setFilename("우편통합 안내문 목록.xlsx") .worksheet(0); - CellStyle dateDT = xlsx.yyyy_mm_dd_hh_mm_ss(); // 연월일+시간 + CellStyle center = xlsx.cellStyle(Styler.CENTER) // 가운데 정렬 + , dateDT = xlsx.yyyy_mm_dd_hh_mm_ss(); // 연월일+시간 String[] excelTitle = req.getExcelTitle(); List titles = new ArrayList(); @@ -144,7 +145,7 @@ public class Epst02Controller extends ApplicationController { xlsx.cell(0, 0) .value("우편통합 안내문", XLSWriter.Styler.CENTER) - .merge(0, 8) + .merge(0, 9) .cell(3, 0) .rowValues(CmmnUtil.mergeListByIndex(titles, headerStylers)); @@ -152,15 +153,16 @@ public class Epst02Controller extends ApplicationController { BiFunction getValue = (titleNm, nothing) -> { switch (titleNm) { - 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.style("TASK_SE_NM", center); + case "발송구분" : return xlsx.style("SNDNG_SE_NM", center); + case "사용여부" : return xlsx.style("USE_YN_NM", 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 "TTL_NM"; + case "문구내용" : return "WORDS_CN"; 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.style("RGTR_NM", center); case "수정일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT); - case "수정사용자" : return xlsx.style("MDFR_NM", XLSWriter.Styler.CENTER); + case "수정사용자" : return xlsx.style("MDFR_NM", center); } return ""; @@ -309,7 +311,8 @@ public class Epst02Controller extends ApplicationController { .setFilename("우편통합 우편발송 목록.xlsx") .worksheet(0); - CellStyle numeric = xlsx.n_nn0() // 숫자 3자리 콤마(,) + CellStyle center = xlsx.cellStyle(Styler.CENTER) // 가운데 정렬 + , numeric = xlsx.n_nn0() // 숫자 3자리 콤마(,) , dateYMD = xlsx.yyyy_mm_dd() // 연월일 , dateDT = xlsx.yyyy_mm_dd_hh_mm_ss(); // 연월일+시간 @@ -340,14 +343,14 @@ public class Epst02Controller extends ApplicationController { BiFunction getValue = (titleNm, nothing) -> { switch (titleNm) { 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.style("JOB_CD", center); + case "취급구분" : return xlsx.style("DIV_KB_NM", 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("CON_KEY", center); case "발송건수" : return xlsx.style("RECEV_CNT", numeric); - case "우편처리상태" : return xlsx.style("POST_PRCS_STTS_NM", XLSWriter.Styler.CENTER); + case "우편처리상태" : return xlsx.style("POST_PRCS_STTS_NM", center); 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.style("RGTR_NM", center); } return ""; @@ -389,7 +392,8 @@ public class Epst02Controller extends ApplicationController { .setFilename("우편통합 발송상세 정보.xlsx") .worksheet(0); - CellStyle dateDT = xlsx.yyyy_mm_dd_hh_mm_ss(); // 연월일+시간 + CellStyle center = xlsx.cellStyle(Styler.CENTER) // 가운데 정렬 + , dateDT = xlsx.yyyy_mm_dd_hh_mm_ss(); // 연월일+시간 String[] excelTitle = req.getExcelTitle(); List titles = new ArrayList(); @@ -418,19 +422,19 @@ public class Epst02Controller extends ApplicationController { BiFunction getValue = (titleNm, nothing) -> { switch (titleNm) { case "등록일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT); - case "등기번호" : return xlsx.style("RGST_NMBR", XLSWriter.Styler.CENTER); - case "우편번호" : return xlsx.style("RECEV_CAR_OWNER_ZIPCODE", XLSWriter.Styler.CENTER); - case "수취인명" : return xlsx.style("RECEV_CAR_OWNER_NM", XLSWriter.Styler.LEFT); + case "등기번호" : return xlsx.style("RGST_NMBR", center); + case "우편번호" : return xlsx.style("RECEV_CAR_OWNER_ZIPCODE", center); + case "수취인명" : return "RECEV_CAR_OWNER_NM"; case "배달일시" : return xlsx.format(o -> xlsx.str2datetime(o.get("DELIV_YMD_TM"))).style(dateDT); - case "배달결과" : return xlsx.style("DELIVRSLTCD_NM", XLSWriter.Styler.CENTER); - case "수령인명" : return xlsx.style("SUBRECPRSNNM", XLSWriter.Styler.LEFT); - case "수령인관계" : return xlsx.style("RELRECPRSNCDNM", XLSWriter.Styler.LEFT); - case "미배달사유" : return xlsx.style("NONDELIVREASNCDNM", XLSWriter.Styler.LEFT); - case "주소" : return xlsx.style("RECEV_CAR_OWNER_ADDR", XLSWriter.Styler.LEFT); - case "상세주소" : return xlsx.style("RECEV_CAR_OWNER_DETAILADDR", XLSWriter.Styler.LEFT); - case "등록사용자" : return xlsx.style("RGTR_NM", XLSWriter.Styler.CENTER); + case "배달결과" : return xlsx.style("DELIVRSLTCD_NM", center); + case "수령인명" : return "SUBRECPRSNNM"; + case "수령인관계" : return "RELRECPRSNCDNM"; + case "미배달사유" : return "NONDELIVREASNCDNM"; + case "주소" : return "RECEV_CAR_OWNER_ADDR"; + case "상세주소" : return "RECEV_CAR_OWNER_DETAILADDR"; + 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", XLSWriter.Styler.CENTER); + case "수정사용자" : return xlsx.style("MDFR_NM", center); } return ""; @@ -543,7 +547,8 @@ public class Epst02Controller extends ApplicationController { .setFilename("우편통합 접수결과 목록.xlsx") .worksheet(0); - CellStyle numeric = xlsx.n_nn0() // 숫자 3자리 콤마(,) + CellStyle center = xlsx.cellStyle(Styler.CENTER) // 가운데 정렬 + , numeric = xlsx.n_nn0() // 숫자 3자리 콤마(,) , dateYMD = xlsx.yyyy_mm_dd() // 연월일 , dateDT = xlsx.yyyy_mm_dd_hh_mm_ss(); // 연월일+시간 @@ -573,18 +578,18 @@ public class Epst02Controller extends ApplicationController { BiFunction getValue = (titleNm, nothing) -> { switch (titleNm) { - 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.style("RELETCDATA", center); + case "우편물코드" : return xlsx.style("JOB_CD", center); + case "우편물종류" : return xlsx.style("JOB_CD3_NM", 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("DIV_KB_NM", 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); + case "등록사용자" : return xlsx.style("RGTR_NM", center); } return ""; 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 2a4f5da4..d1381eca 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 @@ -52,10 +52,6 @@ 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"); diff --git a/src/main/java/cokr/xit/fims/rcvm/service/bean/RcvmtBean.java b/src/main/java/cokr/xit/fims/rcvm/service/bean/RcvmtBean.java index 0d40640d..21b48b42 100644 --- a/src/main/java/cokr/xit/fims/rcvm/service/bean/RcvmtBean.java +++ b/src/main/java/cokr/xit/fims/rcvm/service/bean/RcvmtBean.java @@ -8,6 +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.cmmn.CrdnSttsHstry; import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean; import cokr.xit.fims.levy.Levy; @@ -49,8 +50,13 @@ public class RcvmtBean extends AbstractComponent { 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 rcvmtMapper.selectRcvmtList(req); @@ -61,6 +67,9 @@ public class RcvmtBean extends AbstractComponent { * @return 수납 대장 객체 목록 */ public List getRcvmts(RcvmtQuery req) { + if (req.getDelYN() == null) { + req.setDelYN("N"); + } if (req.getOrderBy() == null) { req.setOrderBy("R.RCVMT_ID DESC"); } 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 6a1f3905..35849a8c 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 @@ -153,6 +153,7 @@ 사용여부 최종사용일시 제목 + 문구내용 등록일시 등록사용자 수정일시 @@ -165,14 +166,13 @@ @@ -465,24 +465,11 @@ return; } - let excelTitle = []; - let excelTitleWidth = []; + let headerInfo = $("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)").getHeaderInfo(); - $("#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(); + ${pageName}Control.query.excelTitle = headerInfo.excelTitle; + ${pageName}Control.query.excelTitleWidth = headerInfo.excelTitleWidth; + ${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 0426e3e3..3c264e34 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 @@ -252,9 +252,7 @@