diff --git a/src/main/java/cokr/xit/fims/excl/web/Excl01Controller.java b/src/main/java/cokr/xit/fims/excl/web/Excl01Controller.java index f8bb2373..7f7d6c40 100644 --- a/src/main/java/cokr/xit/fims/excl/web/Excl01Controller.java +++ b/src/main/java/cokr/xit/fims/excl/web/Excl01Controller.java @@ -1,7 +1,6 @@ package cokr.xit.fims.excl.web; import java.text.SimpleDateFormat; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -11,8 +10,6 @@ import javax.annotation.Resource; import org.apache.poi.ss.usermodel.CellStyle; import org.springframework.web.servlet.ModelAndView; -import com.fasterxml.jackson.core.type.TypeReference; - import cokr.xit.base.code.CommonCode; import cokr.xit.base.file.xls.XLSWriter; import cokr.xit.base.file.xls.XLSWriter.CellDef; 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 8aa0ee05..2981f8e5 100644 --- a/src/main/java/cokr/xit/fims/excl/web/Excl02Controller.java +++ b/src/main/java/cokr/xit/fims/excl/web/Excl02Controller.java @@ -2,6 +2,7 @@ package cokr.xit.fims.excl.web; import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -11,8 +12,6 @@ import org.apache.poi.ss.usermodel.CellStyle; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; -import com.fasterxml.jackson.core.type.TypeReference; - import cokr.xit.base.code.CommonCode; import cokr.xit.base.file.FileInfo; import cokr.xit.base.file.service.FileService; @@ -114,7 +113,7 @@ public class Excl02Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("의견제출" + "_목록_" + dateTime + ".xlsx") @@ -128,48 +127,48 @@ public class Excl02Controller extends ApplicationController { List list = opnnSbmsnService.getOpnnSbmsnList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("접수번호", xlsx.style("RCPT_NO", center)) - , Map.entry("접수일자", xlsx.format(o -> xlsx.str2date(o.get("RCPT_YMD"))).style(dateYMD)) - , Map.entry("접수구분", xlsx.style("RCPT_SE_NM", center)) - , Map.entry("통보구분", xlsx.style("NTFCTN_SE_NM", center)) - , Map.entry("소유주관계", xlsx.style("OWNR_REL_NM", center)) - , Map.entry("진술자명", "STTR_NM") - , Map.entry("진술자생일", xlsx.style("STTR_BRDT_MASK", center)) - , Map.entry("우편번호", xlsx.style("STTR_ZIP", center)) - , Map.entry("진술자주소", "STTR_ADDR") - , Map.entry("진술자상세주소", "STTR_DADDR") - , Map.entry("의견제출상태", xlsx.style("OPNN_SBMSN_STTS_NM", center)) - , Map.entry("의견제출분류", "OPNN_SBMSN_SE_NM") - , Map.entry("의견제출요지", "OPNN_SBMSN_GIST") - , Map.entry("문서번호", "DOC_NO") - , Map.entry("답변일자", xlsx.format(o -> xlsx.str2date(o.get("ANS_YMD"))).style(dateYMD)) - , Map.entry("답변내용", "ANS_CN") - , Map.entry("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("납부자구분", xlsx.style("RTPYR_SE_NM", center)) - , Map.entry("납부자번호", xlsx.style("RTPYR_NO", center)) - , Map.entry("납부자명", "RTPYR_NM") - , Map.entry("단속법정동", xlsx.style("CRDN_STDG_NM", center)) - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("상세단속장소", "DTL_CRDN_PLC") - , Map.entry("위반항목", "VLTN_ARTCL") - , Map.entry("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)) - , Map.entry("과태료금액", xlsx.style("FFNLG_AMT", numeric)) - , Map.entry("처리상태", "CRDN_STTS_NM") - , Map.entry("단속특별구역", xlsx.style("CRDN_SPAREA_NM", center)) - , Map.entry("사용연료", xlsx.style("USE_FUEL_NM", center)) - , Map.entry("주차가능여부", xlsx.style("PARKNG_PSBLTY_RSLT_NM", center)) - , Map.entry("우편번호", xlsx.style("ZIP", center)) - , Map.entry("주소", "ADDR") - , Map.entry("상세주소", "DTL_ADDR") - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("접수번호", xlsx.style("RCPT_NO", center)); + valueMap.put("접수일자", xlsx.format(o -> xlsx.str2date(o.get("RCPT_YMD"))).style(dateYMD)); + valueMap.put("접수구분", xlsx.style("RCPT_SE_NM", center)); + valueMap.put("통보구분", xlsx.style("NTFCTN_SE_NM", center)); + valueMap.put("소유주관계", xlsx.style("OWNR_REL_NM", center)); + valueMap.put("진술자명", "STTR_NM"); + valueMap.put("진술자생일", xlsx.style("STTR_BRDT_MASK", center)); + valueMap.put("우편번호", xlsx.style("STTR_ZIP", center)); + valueMap.put("진술자주소", "STTR_ADDR"); + valueMap.put("진술자상세주소", "STTR_DADDR"); + valueMap.put("의견제출상태", xlsx.style("OPNN_SBMSN_STTS_NM", center)); + valueMap.put("의견제출분류", "OPNN_SBMSN_SE_NM"); + valueMap.put("의견제출요지", "OPNN_SBMSN_GIST"); + valueMap.put("문서번호", "DOC_NO"); + valueMap.put("답변일자", xlsx.format(o -> xlsx.str2date(o.get("ANS_YMD"))).style(dateYMD)); + valueMap.put("답변내용", "ANS_CN"); + valueMap.put("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("납부자구분", xlsx.style("RTPYR_SE_NM", center)); + valueMap.put("납부자번호", xlsx.style("RTPYR_NO", center)); + valueMap.put("납부자명", "RTPYR_NM"); + valueMap.put("단속법정동", xlsx.style("CRDN_STDG_NM", center)); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("상세단속장소", "DTL_CRDN_PLC"); + valueMap.put("위반항목", "VLTN_ARTCL"); + valueMap.put("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)); + valueMap.put("과태료금액", xlsx.style("FFNLG_AMT", numeric)); + valueMap.put("처리상태", "CRDN_STTS_NM"); + valueMap.put("단속특별구역", xlsx.style("CRDN_SPAREA_NM", center)); + valueMap.put("사용연료", xlsx.style("USE_FUEL_NM", center)); + valueMap.put("주차가능여부", xlsx.style("PARKNG_PSBLTY_RSLT_NM", center)); + valueMap.put("우편번호", xlsx.style("ZIP", center)); + valueMap.put("주소", "ADDR"); + valueMap.put("상세주소", "DTL_ADDR"); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("의견제출", center) 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 517f5690..89527128 100644 --- a/src/main/java/cokr/xit/fims/excl/web/Excl03Controller.java +++ b/src/main/java/cokr/xit/fims/excl/web/Excl03Controller.java @@ -1,7 +1,7 @@ package cokr.xit.fims.excl.web; import java.text.SimpleDateFormat; -import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -12,8 +12,6 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; -import com.fasterxml.jackson.core.type.TypeReference; - import cokr.xit.base.code.CommonCode; import cokr.xit.base.file.xls.XLSWriter; import cokr.xit.base.file.xls.XLSWriter.CellDef; @@ -100,7 +98,7 @@ public class Excl03Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("단속재등록" + "_목록_" + dateTime + ".xlsx") @@ -114,32 +112,32 @@ public class Excl03Controller extends ApplicationController { List list = crdnReRegService.getCrdnReRegList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("재등록일자", xlsx.format(o -> xlsx.str2date(o.get("RE_REG_YMD"))).style(dateYMD)) - , Map.entry("단속등록구분", xlsx.style("CRDN_REG_SE_NM", center)) - , Map.entry("기타내용", "ETC_CN") - , Map.entry("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("납부자구분", xlsx.style("RTPYR_SE_NM", center)) - , Map.entry("납부자번호", xlsx.style("RTPYR_NO", center)) - , Map.entry("납부자명", "RTPYR_NM") - , Map.entry("단속법정동", "CRDN_STDG_NM") - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("상세단속장소", "DTL_CRDN_PLC") - , Map.entry("위반항목", "VLTN_ARTCL") - , Map.entry("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)) - , Map.entry("처리상태", "CRDN_STTS_NM") - , Map.entry("단속특별구역", xlsx.style("CRDN_SPAREA_NM", center)) - , Map.entry("사용연료", xlsx.style("USE_FUEL_NM", center)) - , Map.entry("주차가능여부", xlsx.style("PARKNG_PSBLTY_RSLT_NM", center)) - , Map.entry("우편번호", xlsx.style("ZIP", center)) - , Map.entry("주소", "ADDR") - , Map.entry("상세주소", "DTL_ADDR") - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("재등록일자", xlsx.format(o -> xlsx.str2date(o.get("RE_REG_YMD"))).style(dateYMD)); + valueMap.put("단속등록구분", xlsx.style("CRDN_REG_SE_NM", center)); + valueMap.put("기타내용", "ETC_CN"); + valueMap.put("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("납부자구분", xlsx.style("RTPYR_SE_NM", center)); + valueMap.put("납부자번호", xlsx.style("RTPYR_NO", center)); + valueMap.put("납부자명", "RTPYR_NM"); + valueMap.put("단속법정동", "CRDN_STDG_NM"); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("상세단속장소", "DTL_CRDN_PLC"); + valueMap.put("위반항목", "VLTN_ARTCL"); + valueMap.put("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)); + valueMap.put("처리상태", "CRDN_STTS_NM"); + valueMap.put("단속특별구역", xlsx.style("CRDN_SPAREA_NM", center)); + valueMap.put("사용연료", xlsx.style("USE_FUEL_NM", center)); + valueMap.put("주차가능여부", xlsx.style("PARKNG_PSBLTY_RSLT_NM", center)); + valueMap.put("우편번호", xlsx.style("ZIP", center)); + valueMap.put("주소", "ADDR"); + valueMap.put("상세주소", "DTL_ADDR"); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("단속 재등록", center) 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 31f0949c..61432e0e 100644 --- a/src/main/java/cokr/xit/fims/levy/web/Levy01Controller.java +++ b/src/main/java/cokr/xit/fims/levy/web/Levy01Controller.java @@ -1,7 +1,7 @@ package cokr.xit.fims.levy.web; import java.text.SimpleDateFormat; -import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -10,8 +10,6 @@ import javax.annotation.Resource; import org.apache.poi.ss.usermodel.CellStyle; import org.springframework.web.servlet.ModelAndView; -import com.fasterxml.jackson.core.type.TypeReference; - import cokr.xit.base.code.CommonCode; import cokr.xit.base.file.xls.XLSWriter; import cokr.xit.base.file.xls.XLSWriter.CellDef; @@ -106,7 +104,7 @@ public class Levy01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("사전감경부과대상" + "_목록_" + dateTime + ".xlsx") @@ -119,33 +117,33 @@ public class Levy01Controller extends ApplicationController { List list = levyService.getRductLevyTrgtList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("법정동", "CRDN_STDG_NM") - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("위반항목", "VLTN_ARTCL") - , Map.entry("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)) - , Map.entry("과태료금액", xlsx.style("FFNLG_AMT", numeric)) - , Map.entry("사전통지금액", xlsx.style("ADVNTCE_AMT", numeric)) - , Map.entry("처리상태", "CRDN_STTS_NM") - , Map.entry("민원신청번호", xlsx.style("CVLCPT_APLY_NO", center)) - , Map.entry("민원접수번호", xlsx.style("CVLCPT_RCPT_NO", center)) - , Map.entry("민원접수일자", xlsx.format(o -> xlsx.str2date(o.get("CVLCPT_RCPT_YMD"))).style(dateYMD)) - , Map.entry("민원전송결과", xlsx.style("CVLCPT_TRSM_NM", center)) - , Map.entry("납부자구분", xlsx.style("RTPYR_SE_NM", center)) - , Map.entry("납부자번호", xlsx.style("RTPYR_NO", center)) - , Map.entry("납부자명", "RTPYR_NM") - , Map.entry("우편번호", xlsx.style("ZIP", center)) - , Map.entry("주소", "ADDR") - , Map.entry("상세주소", "DTL_ADDR") - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("법정동", "CRDN_STDG_NM"); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("위반항목", "VLTN_ARTCL"); + valueMap.put("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)); + valueMap.put("과태료금액", xlsx.style("FFNLG_AMT", numeric)); + valueMap.put("사전통지금액", xlsx.style("ADVNTCE_AMT", numeric)); + valueMap.put("처리상태", "CRDN_STTS_NM"); + valueMap.put("민원신청번호", xlsx.style("CVLCPT_APLY_NO", center)); + valueMap.put("민원접수번호", xlsx.style("CVLCPT_RCPT_NO", center)); + valueMap.put("민원접수일자", xlsx.format(o -> xlsx.str2date(o.get("CVLCPT_RCPT_YMD"))).style(dateYMD)); + valueMap.put("민원전송결과", xlsx.style("CVLCPT_TRSM_NM", center)); + valueMap.put("납부자구분", xlsx.style("RTPYR_SE_NM", center)); + valueMap.put("납부자번호", xlsx.style("RTPYR_NO", center)); + valueMap.put("납부자명", "RTPYR_NM"); + valueMap.put("우편번호", xlsx.style("ZIP", center)); + valueMap.put("주소", "ADDR"); + valueMap.put("상세주소", "DTL_ADDR"); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("사전 감경부과 대상", center) @@ -252,7 +250,7 @@ public class Levy01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("부과" + "_목록_" + dateTime + ".xlsx") @@ -265,62 +263,62 @@ public class Levy01Controller extends ApplicationController { List list = levyService.getLevyList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("회계연도", xlsx.style("FYR", center)) - , Map.entry("회계코드", xlsx.style("ACNTG_SE_CD", center)) - , Map.entry("세목코드", xlsx.style("TXITM_CD", center)) - , Map.entry("세목명", xlsx.style("TXITM_NM", center)) - , Map.entry("부과번호", xlsx.style("LEVY_NO", center)) - , Map.entry("분납순번", xlsx.style("INSPY_NO", center)) - , Map.entry("부과구분", xlsx.style("LEVY_SE_NM", center)) - , Map.entry("통합구분", xlsx.style("UNTY_SE_NM", center)) - , Map.entry("감경구분", xlsx.style("RDUCT_SE_NM", center)) - , Map.entry("부과일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_YMD"))).style(dateYMD)) - , Map.entry("최초납기일자", xlsx.format(o -> xlsx.str2date(o.get("FRST_DUDT_YMD"))).style(dateYMD)) - , Map.entry("납기일자", xlsx.format(o -> xlsx.str2date(o.get("DUDT_YMD"))).style(dateYMD)) - , Map.entry("과태료금액", xlsx.style("FFNLG_AMT", numeric)) - , Map.entry("부과본세", xlsx.style("LEVY_PCPTAX", numeric)) - , Map.entry("부과가산금", xlsx.style("LEVY_ADAMT", numeric)) - , Map.entry("분납이자", xlsx.style("INSPY_INT", numeric)) - , Map.entry("수납본세", xlsx.style("RCVMT_PCPTAX", numeric)) - , Map.entry("수납가산금", xlsx.style("RCVMT_ADAMT", numeric)) - , Map.entry("감액본세", xlsx.style("RDCAMT_PCPTAX", numeric)) - , Map.entry("감액가산금", xlsx.style("RDCAMT_ADAMT", numeric)) - , Map.entry("미납금액", xlsx.style("SUM_AMT", numeric)) - , Map.entry("과세물건", "TXTN_THING") - , Map.entry("체납사유", "NPMNT_RSN_NM") - , Map.entry("수납일자", xlsx.format(o -> xlsx.str2date(o.get("RCVMT_YMD"))).style(dateYMD)) - , Map.entry("압류일자", xlsx.format(o -> xlsx.str2date(o.get("SZR_YMD"))).style(dateYMD)) - , Map.entry("압류물건", "SZR_THING") - , Map.entry("대체압류차량", "RPM_SZR_VHRNO") - , Map.entry("압류해제일자", xlsx.format(o -> xlsx.str2date(o.get("SZR_RMV_YMD"))).style(dateYMD)) - , Map.entry("전자납부번호", "EPAYNO_MASK") - , Map.entry("은행명", "BANK_NM") - , Map.entry("가상계좌번호", xlsx.style("VR_ACTNO", center)) - , Map.entry("은행명2", "BANK_NM2") - , Map.entry("가상계좌번호2", xlsx.style("VR_ACTNO2", center)) - , Map.entry("은행명3", "BANK_NM3") - , Map.entry("가상계좌번호3", xlsx.style("VR_ACTNO3", center)) - , Map.entry("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("법정동", "CRDN_STDG_NM") - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("위반항목", "VLTN_ARTCL") - , Map.entry("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)) - , Map.entry("처리상태", "CRDN_STTS_NM") - , Map.entry("납부자구분", xlsx.style("RTPYR_SE_NM", center)) - , Map.entry("납부자번호", xlsx.style("RTPYR_NO", center)) - , Map.entry("납부자명", "RTPYR_NM") - , Map.entry("우편번호", xlsx.style("ZIP", center)) - , Map.entry("주소", "ADDR") - , Map.entry("상세주소", "DTL_ADDR") - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("회계연도", xlsx.style("FYR", center)); + valueMap.put("회계코드", xlsx.style("ACNTG_SE_CD", center)); + valueMap.put("세목코드", xlsx.style("TXITM_CD", center)); + valueMap.put("세목명", xlsx.style("TXITM_NM", center)); + valueMap.put("부과번호", xlsx.style("LEVY_NO", center)); + valueMap.put("분납순번", xlsx.style("INSPY_NO", center)); + valueMap.put("부과구분", xlsx.style("LEVY_SE_NM", center)); + valueMap.put("통합구분", xlsx.style("UNTY_SE_NM", center)); + valueMap.put("감경구분", xlsx.style("RDUCT_SE_NM", center)); + valueMap.put("부과일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_YMD"))).style(dateYMD)); + valueMap.put("최초납기일자", xlsx.format(o -> xlsx.str2date(o.get("FRST_DUDT_YMD"))).style(dateYMD)); + valueMap.put("납기일자", xlsx.format(o -> xlsx.str2date(o.get("DUDT_YMD"))).style(dateYMD)); + valueMap.put("과태료금액", xlsx.style("FFNLG_AMT", numeric)); + valueMap.put("부과본세", xlsx.style("LEVY_PCPTAX", numeric)); + valueMap.put("부과가산금", xlsx.style("LEVY_ADAMT", numeric)); + valueMap.put("분납이자", xlsx.style("INSPY_INT", numeric)); + valueMap.put("수납본세", xlsx.style("RCVMT_PCPTAX", numeric)); + valueMap.put("수납가산금", xlsx.style("RCVMT_ADAMT", numeric)); + valueMap.put("감액본세", xlsx.style("RDCAMT_PCPTAX", numeric)); + valueMap.put("감액가산금", xlsx.style("RDCAMT_ADAMT", numeric)); + valueMap.put("미납금액", xlsx.style("SUM_AMT", numeric)); + valueMap.put("과세물건", "TXTN_THING"); + valueMap.put("체납사유", "NPMNT_RSN_NM"); + valueMap.put("수납일자", xlsx.format(o -> xlsx.str2date(o.get("RCVMT_YMD"))).style(dateYMD)); + valueMap.put("압류일자", xlsx.format(o -> xlsx.str2date(o.get("SZR_YMD"))).style(dateYMD)); + valueMap.put("압류물건", "SZR_THING"); + valueMap.put("대체압류차량", "RPM_SZR_VHRNO"); + valueMap.put("압류해제일자", xlsx.format(o -> xlsx.str2date(o.get("SZR_RMV_YMD"))).style(dateYMD)); + valueMap.put("전자납부번호", "EPAYNO_MASK"); + valueMap.put("은행명", "BANK_NM"); + valueMap.put("가상계좌번호", xlsx.style("VR_ACTNO", center)); + valueMap.put("은행명2", "BANK_NM2"); + valueMap.put("가상계좌번호2", xlsx.style("VR_ACTNO2", center)); + valueMap.put("은행명3", "BANK_NM3"); + valueMap.put("가상계좌번호3", xlsx.style("VR_ACTNO3", center)); + valueMap.put("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("법정동", "CRDN_STDG_NM"); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("위반항목", "VLTN_ARTCL"); + valueMap.put("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)); + valueMap.put("처리상태", "CRDN_STTS_NM"); + valueMap.put("납부자구분", xlsx.style("RTPYR_SE_NM", center)); + valueMap.put("납부자번호", xlsx.style("RTPYR_NO", center)); + valueMap.put("납부자명", "RTPYR_NM"); + valueMap.put("우편번호", xlsx.style("ZIP", center)); + valueMap.put("주소", "ADDR"); + valueMap.put("상세주소", "DTL_ADDR"); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("부과", center) @@ -342,7 +340,6 @@ public class Levy01Controller extends ApplicationController { * "saved": 등록되었으면 true, 그렇지 않으면 false * } */ -// @PostMapping(name = "부과 대장 등록", value = "/010/create.do") public ModelAndView create(Levy levy) { boolean saved = levyService.create(levy); @@ -357,7 +354,6 @@ public class Levy01Controller extends ApplicationController { * "saved": 수정되었으면 true, 그렇지 않으면 false * } */ -// @PostMapping(name = "부과 대장 수정", value = "/010/update.do") public ModelAndView update(Levy levy) { boolean saved = levyService.update(levy); @@ -373,7 +369,6 @@ public class Levy01Controller extends ApplicationController { * "saved": 저장되었으면 true, 그렇지 않으면 false * } */ -// @PostMapping(name = "부과 대장 제거", value = "/010/remove.do") public ModelAndView remove(Levy levy) { boolean saved = levyService.remove(levy); diff --git a/src/main/java/cokr/xit/fims/levy/web/Levy02Controller.java b/src/main/java/cokr/xit/fims/levy/web/Levy02Controller.java index e17f37d0..afc2b2b1 100644 --- a/src/main/java/cokr/xit/fims/levy/web/Levy02Controller.java +++ b/src/main/java/cokr/xit/fims/levy/web/Levy02Controller.java @@ -1,7 +1,7 @@ package cokr.xit.fims.levy.web; import java.text.SimpleDateFormat; -import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -10,8 +10,6 @@ import javax.annotation.Resource; import org.apache.poi.ss.usermodel.CellStyle; import org.springframework.web.servlet.ModelAndView; -import com.fasterxml.jackson.core.type.TypeReference; - import cokr.xit.base.code.CommonCode; import cokr.xit.base.file.xls.XLSWriter; import cokr.xit.base.file.xls.XLSWriter.CellDef; @@ -107,10 +105,10 @@ public class Levy02Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() - .setFilename("부과제외" + "_목록_" + dateTime + ".xlsx") + .setFilename("과태료감경" + "_목록_" + dateTime + ".xlsx") .worksheet(0); // CellStyle 지정은 여기에서.. @@ -121,36 +119,36 @@ public class Levy02Controller extends ApplicationController { List list = rductService.getRductList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("감경일자", xlsx.format(o -> xlsx.str2date(o.get("RDUCT_YMD"))).style(dateYMD)) - , Map.entry("감경사유", "RDUCT_RSN_CD") - , Map.entry("기타내용", "ETC_CN") - , Map.entry("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("납부자구분", xlsx.style("RTPYR_SE_NM", center)) - , Map.entry("납부자번호", xlsx.style("RTPYR_NO", center)) - , Map.entry("납부자명", "RTPYR_NM") - , Map.entry("단속법정동", xlsx.style("CRDN_STDG_NM", center)) - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("상세단속장소", "DTL_CRDN_PLC") - , Map.entry("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)) - , Map.entry("감경금액", xlsx.style("RDUCT_AMT", numeric)) - , Map.entry("과태료금액", xlsx.style("FFNLG_AMT", numeric)) - , Map.entry("미납금액", xlsx.style("SUM_AMT", numeric)) - , Map.entry("처리상태", "CRDN_STTS_NM") - , Map.entry("단속특별구역", xlsx.style("CRDN_SPAREA_NM", center)) - , Map.entry("사용연료", xlsx.style("USE_FUEL_NM", center)) - , Map.entry("주차가능여부", xlsx.style("PARKNG_PSBLTY_RSLT_NM", center)) - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("감경일자", xlsx.format(o -> xlsx.str2date(o.get("RDUCT_YMD"))).style(dateYMD)); + valueMap.put("감경사유", "RDUCT_RSN_CD"); + valueMap.put("기타내용", "ETC_CN"); + valueMap.put("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("납부자구분", xlsx.style("RTPYR_SE_NM", center)); + valueMap.put("납부자번호", xlsx.style("RTPYR_NO", center)); + valueMap.put("납부자명", "RTPYR_NM"); + valueMap.put("단속법정동", xlsx.style("CRDN_STDG_NM", center)); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("상세단속장소", "DTL_CRDN_PLC"); + valueMap.put("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)); + valueMap.put("감경금액", xlsx.style("RDUCT_AMT", numeric)); + valueMap.put("과태료금액", xlsx.style("FFNLG_AMT", numeric)); + valueMap.put("미납금액", xlsx.style("SUM_AMT", numeric)); + valueMap.put("처리상태", "CRDN_STTS_NM"); + valueMap.put("단속특별구역", xlsx.style("CRDN_SPAREA_NM", center)); + valueMap.put("사용연료", xlsx.style("USE_FUEL_NM", center)); + valueMap.put("주차가능여부", xlsx.style("PARKNG_PSBLTY_RSLT_NM", center)); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) - .value("부과제외", center) + .value("과태료감경", center) .merge(0, cellDefs.size() - 1) .cell(3, 0) .rowValues(CellDef.header(cellDefs, () -> CmmnUtil.headerStyle(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 021a514d..f5150725 100644 --- a/src/main/java/cokr/xit/fims/rcvm/web/Rcvm01Controller.java +++ b/src/main/java/cokr/xit/fims/rcvm/web/Rcvm01Controller.java @@ -1,7 +1,7 @@ package cokr.xit.fims.rcvm.web; import java.text.SimpleDateFormat; -import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -10,8 +10,6 @@ import javax.annotation.Resource; import org.apache.poi.ss.usermodel.CellStyle; import org.springframework.web.servlet.ModelAndView; -import com.fasterxml.jackson.core.type.TypeReference; - import cokr.xit.base.code.CommonCode; import cokr.xit.base.file.xls.XLSWriter; import cokr.xit.base.file.xls.XLSWriter.CellDef; @@ -101,7 +99,7 @@ public class Rcvm01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("수납" + "_목록_" + dateTime + ".xlsx") @@ -114,51 +112,51 @@ public class Rcvm01Controller extends ApplicationController { List list = rcvmtService.getRcvmtList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("수납입력구분", xlsx.style("RCVMT_INPT_SE_NM", center)) - , Map.entry("수납취소", xlsx.style("RCVMT_RTRCN_NM", center)) - , Map.entry("회계연도", xlsx.style("FYR", center)) - , Map.entry("회계구분", xlsx.style("ACNTG_SE_CD", center)) - , Map.entry("세목코드", xlsx.style("TXITM_CD", center)) - , Map.entry("세목명", "TXITM_NM") - , Map.entry("부과번호", xlsx.style("LEVY_NO", center)) - , Map.entry("수납일련번호", xlsx.style("RCVMT_SN", center)) - , Map.entry("회계일자", xlsx.format(o -> xlsx.str2date(o.get("ACNTG_YMD"))).style(dateYMD)) - , Map.entry("소인일자", xlsx.format(o -> xlsx.str2date(o.get("PSTMRK_YMD"))).style(dateYMD)) - , Map.entry("수납일자", xlsx.format(o -> xlsx.str2date(o.get("RCVMT_YMD"))).style(dateYMD)) - , Map.entry("수납금액", xlsx.style("RCVMT_AMT", numeric)) - , Map.entry("수납본세", xlsx.style("RCVMT_PCPTAX", numeric)) - , Map.entry("수납가산금", xlsx.style("RCVMT_ADAMT", numeric)) - , Map.entry("수납이자", xlsx.style("RCVMT_INT", numeric)) - , Map.entry("수납은행", "RCVMT_BANK_NM") - , Map.entry("납부방법", "PAY_MTHD_SE_NM") - , Map.entry("수납구분", xlsx.style("RCVMT_SE_NM", center)) - , Map.entry("수납상태", xlsx.style("RCVMT_STTS_NM", center)) - , Map.entry("부과일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_YMD"))).style(dateYMD)) - , Map.entry("최초납기일자", xlsx.format(o -> xlsx.str2date(o.get("FRST_DUDT_YMD"))).style(dateYMD)) - , Map.entry("납기일자", xlsx.format(o -> xlsx.str2date(o.get("DUDT_YMD"))).style(dateYMD)) - , Map.entry("부과본세", xlsx.style("LEVY_PCPTAX", numeric)) - , Map.entry("부과가산금", xlsx.style("LEVY_ADAMT", numeric)) - , Map.entry("분납이자", xlsx.style("INSPY_INT", numeric)) - , Map.entry("압류일자", xlsx.format(o -> xlsx.str2date(o.get("SZR_YMD"))).style(dateYMD)) - , Map.entry("압류물건", "SZR_THING") - , Map.entry("대체압류차량", "RPM_SZR_VHRNO") - , Map.entry("압류해제일자", xlsx.format(o -> xlsx.str2date(o.get("SZR_RMV_YMD"))).style(dateYMD)) - , Map.entry("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("납부자구분", xlsx.style("RTPYR_SE_NM", center)) - , Map.entry("납부자번호", xlsx.style("RTPYR_NO", center)) - , Map.entry("납부자명", "RTPYR_NM") - , Map.entry("단속법정동", "CRDN_STDG_NM") - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("처리상태", "CRDN_STTS_NM") - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("수납입력구분", xlsx.style("RCVMT_INPT_SE_NM", center)); + valueMap.put("수납취소", xlsx.style("RCVMT_RTRCN_NM", center)); + valueMap.put("회계연도", xlsx.style("FYR", center)); + valueMap.put("회계구분", xlsx.style("ACNTG_SE_CD", center)); + valueMap.put("세목코드", xlsx.style("TXITM_CD", center)); + valueMap.put("세목명", "TXITM_NM"); + valueMap.put("부과번호", xlsx.style("LEVY_NO", center)); + valueMap.put("수납일련번호", xlsx.style("RCVMT_SN", center)); + valueMap.put("회계일자", xlsx.format(o -> xlsx.str2date(o.get("ACNTG_YMD"))).style(dateYMD)); + valueMap.put("소인일자", xlsx.format(o -> xlsx.str2date(o.get("PSTMRK_YMD"))).style(dateYMD)); + valueMap.put("수납일자", xlsx.format(o -> xlsx.str2date(o.get("RCVMT_YMD"))).style(dateYMD)); + valueMap.put("수납금액", xlsx.style("RCVMT_AMT", numeric)); + valueMap.put("수납본세", xlsx.style("RCVMT_PCPTAX", numeric)); + valueMap.put("수납가산금", xlsx.style("RCVMT_ADAMT", numeric)); + valueMap.put("수납이자", xlsx.style("RCVMT_INT", numeric)); + valueMap.put("수납은행", "RCVMT_BANK_NM"); + valueMap.put("납부방법", "PAY_MTHD_SE_NM"); + valueMap.put("수납구분", xlsx.style("RCVMT_SE_NM", center)); + valueMap.put("수납상태", xlsx.style("RCVMT_STTS_NM", center)); + valueMap.put("부과일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_YMD"))).style(dateYMD)); + valueMap.put("최초납기일자", xlsx.format(o -> xlsx.str2date(o.get("FRST_DUDT_YMD"))).style(dateYMD)); + valueMap.put("납기일자", xlsx.format(o -> xlsx.str2date(o.get("DUDT_YMD"))).style(dateYMD)); + valueMap.put("부과본세", xlsx.style("LEVY_PCPTAX", numeric)); + valueMap.put("부과가산금", xlsx.style("LEVY_ADAMT", numeric)); + valueMap.put("분납이자", xlsx.style("INSPY_INT", numeric)); + valueMap.put("압류일자", xlsx.format(o -> xlsx.str2date(o.get("SZR_YMD"))).style(dateYMD)); + valueMap.put("압류물건", "SZR_THING"); + valueMap.put("대체압류차량", "RPM_SZR_VHRNO"); + valueMap.put("압류해제일자", xlsx.format(o -> xlsx.str2date(o.get("SZR_RMV_YMD"))).style(dateYMD)); + valueMap.put("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("납부자구분", xlsx.style("RTPYR_SE_NM", center)); + valueMap.put("납부자번호", xlsx.style("RTPYR_NO", center)); + valueMap.put("납부자명", "RTPYR_NM"); + valueMap.put("단속법정동", "CRDN_STDG_NM"); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("처리상태", "CRDN_STTS_NM"); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("수납", center) diff --git a/src/main/java/cokr/xit/fims/rdca/web/Rdca01Controller.java b/src/main/java/cokr/xit/fims/rdca/web/Rdca01Controller.java index a915b117..c03c097b 100644 --- a/src/main/java/cokr/xit/fims/rdca/web/Rdca01Controller.java +++ b/src/main/java/cokr/xit/fims/rdca/web/Rdca01Controller.java @@ -1,7 +1,7 @@ package cokr.xit.fims.rdca.web; import java.text.SimpleDateFormat; -import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -10,8 +10,6 @@ import javax.annotation.Resource; import org.apache.poi.ss.usermodel.CellStyle; import org.springframework.web.servlet.ModelAndView; -import com.fasterxml.jackson.core.type.TypeReference; - import cokr.xit.base.code.CommonCode; import cokr.xit.base.file.xls.XLSWriter; import cokr.xit.base.file.xls.XLSWriter.CellDef; @@ -104,7 +102,7 @@ public class Rdca01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("감액" + "_목록_" + dateTime + ".xlsx") @@ -118,38 +116,38 @@ public class Rdca01Controller extends ApplicationController { List list = rdcamtService.getRdcamtList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("부과제외일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_EXCL_YMD"))).style(dateYMD)) - , Map.entry("부과제외구분", xlsx.style("LEVY_EXCL_SE_NM", center)) - , Map.entry("부과제외사유", "LEVY_EXCL_RSN_NM") - , Map.entry("기타내용", "ETC_CN") - , Map.entry("민원신청번호", xlsx.style("CVLCPT_APLY_NO", center)) - , Map.entry("민원접수번호", xlsx.style("CVLCPT_RCPT_NO", center)) - , Map.entry("민원접수일자", xlsx.format(o -> xlsx.str2date(o.get("CVLCPT_RCPT_YMD"))).style(dateYMD)) - , Map.entry("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("납부자구분", xlsx.style("RTPYR_SE_NM", center)) - , Map.entry("납부자번호", xlsx.style("RTPYR_NO", center)) - , Map.entry("납부자명", "RTPYR_NM") - , Map.entry("단속법정동", xlsx.style("CRDN_STDG_NM", center)) - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("상세단속장소", "DTL_CRDN_PLC") - , Map.entry("위반항목", "VLTN_ARTCL") - , Map.entry("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)) - , Map.entry("처리상태", "CRDN_STTS_NM") - , Map.entry("단속특별구역", xlsx.style("CRDN_SPAREA_NM", center)) - , Map.entry("사용연료", xlsx.style("USE_FUEL_NM", center)) - , Map.entry("주차가능여부", xlsx.style("PARKNG_PSBLTY_RSLT_NM", center)) - , Map.entry("우편번호", xlsx.style("ZIP", center)) - , Map.entry("주소", "ADDR") - , Map.entry("상세주소", "DTL_ADDR") - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("부과제외일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_EXCL_YMD"))).style(dateYMD)); + valueMap.put("부과제외구분", xlsx.style("LEVY_EXCL_SE_NM", center)); + valueMap.put("부과제외사유", "LEVY_EXCL_RSN_NM"); + valueMap.put("기타내용", "ETC_CN"); + valueMap.put("민원신청번호", xlsx.style("CVLCPT_APLY_NO", center)); + valueMap.put("민원접수번호", xlsx.style("CVLCPT_RCPT_NO", center)); + valueMap.put("민원접수일자", xlsx.format(o -> xlsx.str2date(o.get("CVLCPT_RCPT_YMD"))).style(dateYMD)); + valueMap.put("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("납부자구분", xlsx.style("RTPYR_SE_NM", center)); + valueMap.put("납부자번호", xlsx.style("RTPYR_NO", center)); + valueMap.put("납부자명", "RTPYR_NM"); + valueMap.put("단속법정동", xlsx.style("CRDN_STDG_NM", center)); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("상세단속장소", "DTL_CRDN_PLC"); + valueMap.put("위반항목", "VLTN_ARTCL"); + valueMap.put("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)); + valueMap.put("처리상태", "CRDN_STTS_NM"); + valueMap.put("단속특별구역", xlsx.style("CRDN_SPAREA_NM", center)); + valueMap.put("사용연료", xlsx.style("USE_FUEL_NM", center)); + valueMap.put("주차가능여부", xlsx.style("PARKNG_PSBLTY_RSLT_NM", center)); + valueMap.put("우편번호", xlsx.style("ZIP", center)); + valueMap.put("주소", "ADDR"); + valueMap.put("상세주소", "DTL_ADDR"); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("감액", center) diff --git a/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java b/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java index 238622b5..50ef263d 100644 --- a/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java +++ b/src/main/java/cokr/xit/fims/sndb/web/Sndb01Controller.java @@ -1,7 +1,7 @@ package cokr.xit.fims.sndb.web; import java.text.SimpleDateFormat; -import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -10,8 +10,6 @@ import javax.annotation.Resource; import org.apache.poi.ss.usermodel.CellStyle; import org.springframework.web.servlet.ModelAndView; -import com.fasterxml.jackson.core.type.TypeReference; - import cokr.xit.base.code.CommonCode; import cokr.xit.base.file.xls.XLSWriter; import cokr.xit.base.file.xls.XLSWriter.CellDef; @@ -166,7 +164,7 @@ public class Sndb01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("계고장발송대상" + "_목록_" + dateTime + ".xlsx") @@ -180,38 +178,38 @@ public class Sndb01Controller extends ApplicationController { List list = sndngService.getWrngTrgtList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("계고일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_EXCL_YMD"))).style(dateYMD)) - , Map.entry("계고사유", "LEVY_EXCL_RSN_NM") - , Map.entry("기타내용", "ETC_CN") - , Map.entry("민원신청번호", xlsx.style("CVLCPT_APLY_NO", center)) - , Map.entry("민원접수번호", xlsx.style("CVLCPT_RCPT_NO", center)) - , Map.entry("민원접수일자", xlsx.format(o -> xlsx.str2date(o.get("CVLCPT_RCPT_YMD"))).style(dateYMD)) - , Map.entry("민원처리담당자", xlsx.style("CVLCPT_PRCS_PIC_NM", center)) - , Map.entry("민원처리결과", xlsx.style("CVLCPT_PRCS_NM", center)) - , Map.entry("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("위반항목", "VLTN_ARTCL") - , Map.entry("단속법정동", "CRDN_STDG_NM") - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("상세단속장소", "DTL_CRDN_PLC") - , Map.entry("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)) - , Map.entry("처리상태", "CRDN_STTS_NM") - , Map.entry("납부자명", "RTPYR_NM") - , Map.entry("납부자생일", xlsx.style("RTPYR_BRDT_MASK", center)) - , Map.entry("우편번호", xlsx.style("ZIP", center)) - , Map.entry("주소", "ADDR") - , Map.entry("상세주소", "DTL_ADDR") - , Map.entry("단속특별구역", xlsx.style("CRDN_SPAREA_NM", center)) - , Map.entry("사용연료", xlsx.style("USE_FUEL_NM", center)) - , Map.entry("주차가능여부", xlsx.style("PARKNG_PSBLTY_RSLT_NM", center)) - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("계고일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_EXCL_YMD"))).style(dateYMD)); + valueMap.put("계고사유", "LEVY_EXCL_RSN_NM"); + valueMap.put("기타내용", "ETC_CN"); + valueMap.put("민원신청번호", xlsx.style("CVLCPT_APLY_NO", center)); + valueMap.put("민원접수번호", xlsx.style("CVLCPT_RCPT_NO", center)); + valueMap.put("민원접수일자", xlsx.format(o -> xlsx.str2date(o.get("CVLCPT_RCPT_YMD"))).style(dateYMD)); + valueMap.put("민원처리담당자", xlsx.style("CVLCPT_PRCS_PIC_NM", center)); + valueMap.put("민원처리결과", xlsx.style("CVLCPT_PRCS_NM", center)); + valueMap.put("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("위반항목", "VLTN_ARTCL"); + valueMap.put("단속법정동", "CRDN_STDG_NM"); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("상세단속장소", "DTL_CRDN_PLC"); + valueMap.put("단속금액", xlsx.style("FFNLG_CRDN_AMT", numeric)); + valueMap.put("처리상태", "CRDN_STTS_NM"); + valueMap.put("납부자명", "RTPYR_NM"); + valueMap.put("납부자생일", xlsx.style("RTPYR_BRDT_MASK", center)); + valueMap.put("우편번호", xlsx.style("ZIP", center)); + valueMap.put("주소", "ADDR"); + valueMap.put("상세주소", "DTL_ADDR"); + valueMap.put("단속특별구역", xlsx.style("CRDN_SPAREA_NM", center)); + valueMap.put("사용연료", xlsx.style("USE_FUEL_NM", center)); + valueMap.put("주차가능여부", xlsx.style("PARKNG_PSBLTY_RSLT_NM", center)); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("계고장 발송 대상", center) @@ -313,7 +311,7 @@ public class Sndb01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("계고장발송현황" + "_목록_" + dateTime + ".xlsx") @@ -327,22 +325,22 @@ public class Sndb01Controller extends ApplicationController { List list = sndngService.getWrngSndngList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("등록구분", xlsx.style("SNDNG_REG_SE_NM", center)) - , Map.entry("위반항목", "VLTN_ARTCL") - , Map.entry("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)) - , Map.entry("납기일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)) - , Map.entry("총건수", xlsx.style("TNOCS", numeric)) - , Map.entry("총금액", xlsx.style("GRAMT", numeric)) - , Map.entry("문서번호", "DOC_NO") - , Map.entry("제목", "TTL_NM") - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("등록구분", xlsx.style("SNDNG_REG_SE_NM", center)); + valueMap.put("위반항목", "VLTN_ARTCL"); + valueMap.put("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)); + valueMap.put("납기일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)); + valueMap.put("총건수", xlsx.style("TNOCS", numeric)); + valueMap.put("총금액", xlsx.style("GRAMT", numeric)); + valueMap.put("문서번호", "DOC_NO"); + valueMap.put("제목", "TTL_NM"); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("계고장 발송 현황", center) @@ -397,7 +395,7 @@ public class Sndb01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("계도장발송상세" + "_목록_" + dateTime + ".xlsx") @@ -411,31 +409,31 @@ public class Sndb01Controller extends ApplicationController { List list = sndngDtlService.getSndngDtlList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("발송상태", xlsx.style("SNDNG_DTL_STTS_NM", center)) - , Map.entry("등기번호", xlsx.style("RG_NO", center)) - , Map.entry("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)) - , Map.entry("납기일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)) - , Map.entry("성명", "RCPN_NM") - , Map.entry("우편번호", xlsx.style("RCPN_ZIP", center)) - , Map.entry("주소", "RCPN_ADDR") - , Map.entry("상세주소", "RCPN_DTL_ADDR") - , Map.entry("배달일자", xlsx.format(o -> xlsx.str2date(o.get("DLVR_YMD"))).style(dateYMD)) - , Map.entry("배달시각", xlsx.style("DLVR_TM", center)) - , Map.entry("미배달사유", "UNDLVR_RSN_NM") - , Map.entry("수령인", "ACTL_RCPN_NM") - , Map.entry("수령인관계", "RCPN_REL_NM") - , Map.entry("단속일시", xlsx.style("CRDN_DT", center)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("단속법정동", "CRDN_STDG_NM") - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("과태료금액", xlsx.style("FFNLG_AMT", numeric)) - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("발송상태", xlsx.style("SNDNG_DTL_STTS_NM", center)); + valueMap.put("등기번호", xlsx.style("RG_NO", center)); + valueMap.put("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)); + valueMap.put("납기일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)); + valueMap.put("성명", "RCPN_NM"); + valueMap.put("우편번호", xlsx.style("RCPN_ZIP", center)); + valueMap.put("주소", "RCPN_ADDR"); + valueMap.put("상세주소", "RCPN_DTL_ADDR"); + valueMap.put("배달일자", xlsx.format(o -> xlsx.str2date(o.get("DLVR_YMD"))).style(dateYMD)); + valueMap.put("배달시각", xlsx.style("DLVR_TM", center)); + valueMap.put("미배달사유", "UNDLVR_RSN_NM"); + valueMap.put("수령인", "ACTL_RCPN_NM"); + valueMap.put("수령인관계", "RCPN_REL_NM"); + valueMap.put("단속일시", xlsx.style("CRDN_DT", center)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("단속법정동", "CRDN_STDG_NM"); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("과태료금액", xlsx.style("FFNLG_AMT", numeric)); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("계도장 발송 상세", center) @@ -498,7 +496,7 @@ public class Sndb01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("사전통지발송대상" + "_목록_" + dateTime + ".xlsx") @@ -512,36 +510,36 @@ public class Sndb01Controller extends ApplicationController { List list = sndngService.getAdvntceTrgtList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("민원신청번호", xlsx.style("CVLCPT_APLY_NO", center)) - , Map.entry("민원접수번호", xlsx.style("CVLCPT_RCPT_NO", center)) - , Map.entry("민원접수일자", xlsx.format(o -> xlsx.str2date(o.get("CVLCPT_RCPT_YMD"))).style(dateYMD)) - , Map.entry("민원처리담당자", xlsx.style("CVLCPT_PRCS_PIC_NM", center)) - , Map.entry("민원처리결과", xlsx.style("CVLCPT_PRCS_NM", center)) - , Map.entry("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("위반항목", "VLTN_ARTCL") - , Map.entry("단속법정동", "CRDN_STDG_NM") - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("상세단속장소", "DTL_CRDN_PLC") - , Map.entry("과태료금액", xlsx.style("FFNLG_AMT", numeric)) - , Map.entry("사전통지금액", xlsx.style("ADVNTCE_AMT", numeric)) - , Map.entry("처리상태", "CRDN_STTS_NM") - , Map.entry("납부자명", "RTPYR_NM") - , Map.entry("납부자생일", xlsx.style("RTPYR_BRDT_MASK", center)) - , Map.entry("우편번호", xlsx.style("ZIP", center)) - , Map.entry("주소", "ADDR") - , Map.entry("상세주소", "DTL_ADDR") - , Map.entry("단속특별구역", xlsx.style("CRDN_SPAREA_NM", center)) - , Map.entry("사용연료", xlsx.style("USE_FUEL_NM", center)) - , Map.entry("주차가능여부", xlsx.style("PARKNG_PSBLTY_RSLT_NM", center)) - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("민원신청번호", xlsx.style("CVLCPT_APLY_NO", center)); + valueMap.put("민원접수번호", xlsx.style("CVLCPT_RCPT_NO", center)); + valueMap.put("민원접수일자", xlsx.format(o -> xlsx.str2date(o.get("CVLCPT_RCPT_YMD"))).style(dateYMD)); + valueMap.put("민원처리담당자", xlsx.style("CVLCPT_PRCS_PIC_NM", center)); + valueMap.put("민원처리결과", xlsx.style("CVLCPT_PRCS_NM", center)); + valueMap.put("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("위반항목", "VLTN_ARTCL"); + valueMap.put("단속법정동", "CRDN_STDG_NM"); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("상세단속장소", "DTL_CRDN_PLC"); + valueMap.put("과태료금액", xlsx.style("FFNLG_AMT", numeric)); + valueMap.put("사전통지금액", xlsx.style("ADVNTCE_AMT", numeric)); + valueMap.put("처리상태", "CRDN_STTS_NM"); + valueMap.put("납부자명", "RTPYR_NM"); + valueMap.put("납부자생일", xlsx.style("RTPYR_BRDT_MASK", center)); + valueMap.put("우편번호", xlsx.style("ZIP", center)); + valueMap.put("주소", "ADDR"); + valueMap.put("상세주소", "DTL_ADDR"); + valueMap.put("단속특별구역", xlsx.style("CRDN_SPAREA_NM", center)); + valueMap.put("사용연료", xlsx.style("USE_FUEL_NM", center)); + valueMap.put("주차가능여부", xlsx.style("PARKNG_PSBLTY_RSLT_NM", center)); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("사전통지 발송 대상", center) @@ -648,7 +646,7 @@ public class Sndb01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("사전통지발송현황" + "_목록_" + dateTime + ".xlsx") @@ -662,22 +660,22 @@ public class Sndb01Controller extends ApplicationController { List list = sndngService.getAdvntceSndngList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("등록구분", xlsx.style("SNDNG_REG_SE_NM", center)) - , Map.entry("위반항목", "VLTN_ARTCL") - , Map.entry("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)) - , Map.entry("납기일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)) - , Map.entry("총건수", xlsx.style("TNOCS", numeric)) - , Map.entry("총금액", xlsx.style("GRAMT", numeric)) - , Map.entry("문서번호", "DOC_NO") - , Map.entry("제목", "TTL_NM") - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("등록구분", xlsx.style("SNDNG_REG_SE_NM", center)); + valueMap.put("위반항목", "VLTN_ARTCL"); + valueMap.put("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)); + valueMap.put("납기일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)); + valueMap.put("총건수", xlsx.style("TNOCS", numeric)); + valueMap.put("총금액", xlsx.style("GRAMT", numeric)); + valueMap.put("문서번호", "DOC_NO"); + valueMap.put("제목", "TTL_NM"); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("사전통지 발송 현황", center) @@ -732,7 +730,7 @@ public class Sndb01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("사전통지발송상세" + "_목록_" + dateTime + ".xlsx") @@ -746,38 +744,38 @@ public class Sndb01Controller extends ApplicationController { List list = sndngDtlService.getSndngDtlList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("발송상태", xlsx.style("SNDNG_DTL_STTS_NM", center)) - , Map.entry("등기번호", xlsx.style("RG_NO", center)) - , Map.entry("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)) - , Map.entry("발송종료일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)) - , Map.entry("성명", "RCPN_NM") - , Map.entry("우편번호", xlsx.style("RCPN_ZIP", center)) - , Map.entry("주소", "RCPN_ADDR") - , Map.entry("상세주소", "RCPN_DTL_ADDR") - , Map.entry("배달일자", xlsx.format(o -> xlsx.str2date(o.get("DLVR_YMD"))).style(dateYMD)) - , Map.entry("배달시각", xlsx.style("DLVR_TM", center)) - , Map.entry("미배달사유", "UNDLVR_RSN_NM") - , Map.entry("수령인", "ACTL_RCPN_NM") - , Map.entry("수령인관계", "RCPN_REL_NM") - , Map.entry("단속일시", xlsx.style("CRDN_DT", center)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("단속법정동", "CRDN_STDG_NM") - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("회계연도", xlsx.style("FYR", center)) - , Map.entry("부과번호", xlsx.style("LEVY_NO", center)) - , Map.entry("부과일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_YMD"))).style(dateYMD)) - , Map.entry("납기일자", xlsx.format(o -> xlsx.str2date(o.get("DUDT_YMD"))).style(dateYMD)) - , Map.entry("과태료금액", xlsx.style("FFNLG_AMT", numeric)) - , Map.entry("본세", xlsx.style("PCPTAX", numeric)) - , Map.entry("가산금", xlsx.style("ADAMT", numeric)) - , Map.entry("미납금액", xlsx.style("SUM_AMT", numeric)) - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("발송상태", xlsx.style("SNDNG_DTL_STTS_NM", center)); + valueMap.put("등기번호", xlsx.style("RG_NO", center)); + valueMap.put("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)); + valueMap.put("발송종료일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)); + valueMap.put("성명", "RCPN_NM"); + valueMap.put("우편번호", xlsx.style("RCPN_ZIP", center)); + valueMap.put("주소", "RCPN_ADDR"); + valueMap.put("상세주소", "RCPN_DTL_ADDR"); + valueMap.put("배달일자", xlsx.format(o -> xlsx.str2date(o.get("DLVR_YMD"))).style(dateYMD)); + valueMap.put("배달시각", xlsx.style("DLVR_TM", center)); + valueMap.put("미배달사유", "UNDLVR_RSN_NM"); + valueMap.put("수령인", "ACTL_RCPN_NM"); + valueMap.put("수령인관계", "RCPN_REL_NM"); + valueMap.put("단속일시", xlsx.style("CRDN_DT", center)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("단속법정동", "CRDN_STDG_NM"); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("회계연도", xlsx.style("FYR", center)); + valueMap.put("부과번호", xlsx.style("LEVY_NO", center)); + valueMap.put("부과일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_YMD"))).style(dateYMD)); + valueMap.put("납기일자", xlsx.format(o -> xlsx.str2date(o.get("DUDT_YMD"))).style(dateYMD)); + valueMap.put("과태료금액", xlsx.style("FFNLG_AMT", numeric)); + valueMap.put("본세", xlsx.style("PCPTAX", numeric)); + valueMap.put("가산금", xlsx.style("ADAMT", numeric)); + valueMap.put("미납금액", xlsx.style("SUM_AMT", numeric)); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("사전통지 발송 상세", center) @@ -833,7 +831,7 @@ public class Sndb01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("고지서발송현황" + "_목록_" + dateTime + ".xlsx") @@ -847,22 +845,22 @@ public class Sndb01Controller extends ApplicationController { List list = sndngService.getSndngList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("등록구분", xlsx.style("SNDNG_REG_SE_NM", center)) - , Map.entry("위반항목", "VLTN_ARTCL") - , Map.entry("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)) - , Map.entry("납기일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)) - , Map.entry("총건수", xlsx.style("TNOCS", numeric)) - , Map.entry("총금액", xlsx.style("GRAMT", numeric)) - , Map.entry("문서번호", "DOC_NO") - , Map.entry("제목", "TTL_NM") - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("등록구분", xlsx.style("SNDNG_REG_SE_NM", center)); + valueMap.put("위반항목", "VLTN_ARTCL"); + valueMap.put("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)); + valueMap.put("납기일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)); + valueMap.put("총건수", xlsx.style("TNOCS", numeric)); + valueMap.put("총금액", xlsx.style("GRAMT", numeric)); + valueMap.put("문서번호", "DOC_NO"); + valueMap.put("제목", "TTL_NM"); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("고지서 발송 현황", center) @@ -917,7 +915,7 @@ public class Sndb01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("고지서발송상세" + "_목록_" + dateTime + ".xlsx") @@ -931,38 +929,38 @@ public class Sndb01Controller extends ApplicationController { List list = sndngDtlService.getSndngDtlList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("발송상태", xlsx.style("SNDNG_DTL_STTS_NM", center)) - , Map.entry("등기번호", xlsx.style("RG_NO", center)) - , Map.entry("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)) - , Map.entry("발송종료일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)) - , Map.entry("성명", "RCPN_NM") - , Map.entry("우편번호", xlsx.style("RCPN_ZIP", center)) - , Map.entry("주소", "RCPN_ADDR") - , Map.entry("상세주소", "RCPN_DTL_ADDR") - , Map.entry("배달일자", xlsx.format(o -> xlsx.str2date(o.get("DLVR_YMD"))).style(dateYMD)) - , Map.entry("배달시각", xlsx.style("DLVR_TM", center)) - , Map.entry("미배달사유", "UNDLVR_RSN_NM") - , Map.entry("수령인", "ACTL_RCPN_NM") - , Map.entry("수령인관계", "RCPN_REL_NM") - , Map.entry("단속일시", xlsx.style("CRDN_DT", center)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("단속법정동", "CRDN_STDG_NM") - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("회계연도", xlsx.style("FYR", center)) - , Map.entry("부과번호", xlsx.style("LEVY_NO", center)) - , Map.entry("부과일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_YMD"))).style(dateYMD)) - , Map.entry("납기일자", xlsx.format(o -> xlsx.str2date(o.get("DUDT_YMD"))).style(dateYMD)) - , Map.entry("과태료금액", xlsx.style("FFNLG_AMT", numeric)) - , Map.entry("본세", xlsx.style("PCPTAX", numeric)) - , Map.entry("가산금", xlsx.style("ADAMT", numeric)) - , Map.entry("미납금액", xlsx.style("SUM_AMT", numeric)) - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("발송상태", xlsx.style("SNDNG_DTL_STTS_NM", center)); + valueMap.put("등기번호", xlsx.style("RG_NO", center)); + valueMap.put("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)); + valueMap.put("발송종료일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)); + valueMap.put("성명", "RCPN_NM"); + valueMap.put("우편번호", xlsx.style("RCPN_ZIP", center)); + valueMap.put("주소", "RCPN_ADDR"); + valueMap.put("상세주소", "RCPN_DTL_ADDR"); + valueMap.put("배달일자", xlsx.format(o -> xlsx.str2date(o.get("DLVR_YMD"))).style(dateYMD)); + valueMap.put("배달시각", xlsx.style("DLVR_TM", center)); + valueMap.put("미배달사유", "UNDLVR_RSN_NM"); + valueMap.put("수령인", "ACTL_RCPN_NM"); + valueMap.put("수령인관계", "RCPN_REL_NM"); + valueMap.put("단속일시", xlsx.style("CRDN_DT", center)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("단속법정동", "CRDN_STDG_NM"); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("회계연도", xlsx.style("FYR", center)); + valueMap.put("부과번호", xlsx.style("LEVY_NO", center)); + valueMap.put("부과일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_YMD"))).style(dateYMD)); + valueMap.put("납기일자", xlsx.format(o -> xlsx.str2date(o.get("DUDT_YMD"))).style(dateYMD)); + valueMap.put("과태료금액", xlsx.style("FFNLG_AMT", numeric)); + valueMap.put("본세", xlsx.style("PCPTAX", numeric)); + valueMap.put("가산금", xlsx.style("ADAMT", numeric)); + valueMap.put("미납금액", xlsx.style("SUM_AMT", numeric)); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("고지서 발송 상세", center) @@ -1196,7 +1194,7 @@ public class Sndb01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("반송현황" + "_목록_" + dateTime + ".xlsx") @@ -1210,36 +1208,36 @@ public class Sndb01Controller extends ApplicationController { List list = sndngDtlService.getSndbkList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("고지번호", xlsx.style("GOJI_NO", center)) - , Map.entry("등기번호", xlsx.style("RG_NO", center)) - , Map.entry("배달일자", xlsx.format(o -> xlsx.str2date(o.get("DLVR_YMD"))).style(dateYMD)) - , Map.entry("배달시간", "DLVR_TM") - , Map.entry("미배달사유", "UNDLVR_RSN_NM") - , Map.entry("수령인", "ACTL_RCPN_NM") - , Map.entry("수령인관계", "RCPN_REL_NM") - , Map.entry("발송구분", xlsx.style("SNDNG_SE_NM", center)) - , Map.entry("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)) - , Map.entry("과태료금액", xlsx.style("FFNLG_AMT", numeric)) - , Map.entry("성명", "RCPN_NM") - , Map.entry("우편번호", xlsx.style("RCPN_ZIP", center)) - , Map.entry("주소", "RCPN_ADDR") - , Map.entry("상세주소", "RCPN_DTL_ADDR") - , Map.entry("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("납부자구분", xlsx.style("RTPYR_SE_NM", center)) - , Map.entry("납부자번호", xlsx.style("RTPYR_NO", center)) - , Map.entry("납부자명", "RTPYR_NM") - , Map.entry("단속법정동", xlsx.style("CRDN_STDG_NM", center)) - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("처리상태", "CRDN_STTS_NM") - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("고지번호", xlsx.style("GOJI_NO", center)); + valueMap.put("등기번호", xlsx.style("RG_NO", center)); + valueMap.put("배달일자", xlsx.format(o -> xlsx.str2date(o.get("DLVR_YMD"))).style(dateYMD)); + valueMap.put("배달시간", "DLVR_TM"); + valueMap.put("미배달사유", "UNDLVR_RSN_NM"); + valueMap.put("수령인", "ACTL_RCPN_NM"); + valueMap.put("수령인관계", "RCPN_REL_NM"); + valueMap.put("발송구분", xlsx.style("SNDNG_SE_NM", center)); + valueMap.put("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)); + valueMap.put("과태료금액", xlsx.style("FFNLG_AMT", numeric)); + valueMap.put("성명", "RCPN_NM"); + valueMap.put("우편번호", xlsx.style("RCPN_ZIP", center)); + valueMap.put("주소", "RCPN_ADDR"); + valueMap.put("상세주소", "RCPN_DTL_ADDR"); + valueMap.put("단속일시", xlsx.format(o -> xlsx.str2datetime(o.get("CRDN_YMD_TM"))).style(dateDT)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("납부자구분", xlsx.style("RTPYR_SE_NM", center)); + valueMap.put("납부자번호", xlsx.style("RTPYR_NO", center)); + valueMap.put("납부자명", "RTPYR_NM"); + valueMap.put("단속법정동", xlsx.style("CRDN_STDG_NM", center)); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("처리상태", "CRDN_STTS_NM"); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("반송현황", center) @@ -1295,7 +1293,7 @@ public class Sndb01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("공시송달현황" + "_목록_" + dateTime + ".xlsx") @@ -1309,20 +1307,20 @@ public class Sndb01Controller extends ApplicationController { List list = svbtcService.getSvbtcList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("업무구분", xlsx.style("TASK_SE_NM", center)) - , Map.entry("발송구분", xlsx.style("SNDNG_SE_NM", center)) - , Map.entry("공시송달일자", xlsx.format(o -> xlsx.str2date(o.get("SVBTC_YMD"))).style(dateYMD)) - , Map.entry("총건수", xlsx.style("TNOCS", numeric)) - , Map.entry("문서번호", "DOC_NO") - , Map.entry("제목", "TTL_NM") - , Map.entry("기타내용", "ETC_CN") - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("업무구분", xlsx.style("TASK_SE_NM", center)); + valueMap.put("발송구분", xlsx.style("SNDNG_SE_NM", center)); + valueMap.put("공시송달일자", xlsx.format(o -> xlsx.str2date(o.get("SVBTC_YMD"))).style(dateYMD)); + valueMap.put("총건수", xlsx.style("TNOCS", numeric)); + valueMap.put("문서번호", "DOC_NO"); + valueMap.put("제목", "TTL_NM"); + valueMap.put("기타내용", "ETC_CN"); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("공시송달현황", center) @@ -1377,7 +1375,7 @@ public class Sndb01Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("공시송달상세" + "_목록_" + dateTime + ".xlsx") @@ -1391,38 +1389,38 @@ public class Sndb01Controller extends ApplicationController { List list = svbtcService.getSvbtcDtlList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("발송상태", xlsx.style("SNDNG_DTL_STTS_NM", center)) - , Map.entry("공시송달일자", xlsx.format(o -> xlsx.str2date(o.get("SVBTC_YMD"))).style(dateYMD)) - , Map.entry("등기번호", xlsx.style("RG_NO", center)) - , Map.entry("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)) - , Map.entry("발송종료일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)) - , Map.entry("성명", "RCPN_NM") - , Map.entry("우편번호", xlsx.style("RCPN_ZIP", center)) - , Map.entry("주소", "RCPN_ADDR") - , Map.entry("상세주소", "RCPN_DTL_ADDR") - , Map.entry("배달일자", xlsx.format(o -> xlsx.str2date(o.get("DLVR_YMD"))).style(dateYMD)) - , Map.entry("배달시각", xlsx.style("DLVR_TM", center)) - , Map.entry("미배달사유", "UNDLVR_RSN_NM") - , Map.entry("수령인", "ACTL_RCPN_NM") - , Map.entry("수령인관계", "RCPN_REL_NM") - , Map.entry("단속일시", xlsx.style("CRDN_DT", center)) - , Map.entry("차량번호", "VHRNO") - , Map.entry("단속법정동", "CRDN_STDG_NM") - , Map.entry("단속장소", "CRDN_PLC") - , Map.entry("회계연도", xlsx.style("FYR", center)) - , Map.entry("부과번호", xlsx.style("LEVY_NO", center)) - , Map.entry("부과일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_YMD"))).style(dateYMD)) - , Map.entry("납기일자", xlsx.format(o -> xlsx.str2date(o.get("DUDT_YMD"))).style(dateYMD)) - , Map.entry("본세", xlsx.style("PCPTAX", numeric)) - , Map.entry("가산금", xlsx.style("ADAMT", numeric)) - , Map.entry("미납금액", xlsx.style("SUM_AMT", numeric)) - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("발송상태", xlsx.style("SNDNG_DTL_STTS_NM", center)); + valueMap.put("공시송달일자", xlsx.format(o -> xlsx.str2date(o.get("SVBTC_YMD"))).style(dateYMD)); + valueMap.put("등기번호", xlsx.style("RG_NO", center)); + valueMap.put("발송일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_YMD"))).style(dateYMD)); + valueMap.put("발송종료일자", xlsx.format(o -> xlsx.str2date(o.get("SNDNG_END_YMD"))).style(dateYMD)); + valueMap.put("성명", "RCPN_NM"); + valueMap.put("우편번호", xlsx.style("RCPN_ZIP", center)); + valueMap.put("주소", "RCPN_ADDR"); + valueMap.put("상세주소", "RCPN_DTL_ADDR"); + valueMap.put("배달일자", xlsx.format(o -> xlsx.str2date(o.get("DLVR_YMD"))).style(dateYMD)); + valueMap.put("배달시각", xlsx.style("DLVR_TM", center)); + valueMap.put("미배달사유", "UNDLVR_RSN_NM"); + valueMap.put("수령인", "ACTL_RCPN_NM"); + valueMap.put("수령인관계", "RCPN_REL_NM"); + valueMap.put("단속일시", xlsx.style("CRDN_DT", center)); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("단속법정동", "CRDN_STDG_NM"); + valueMap.put("단속장소", "CRDN_PLC"); + valueMap.put("회계연도", xlsx.style("FYR", center)); + valueMap.put("부과번호", xlsx.style("LEVY_NO", center)); + valueMap.put("부과일자", xlsx.format(o -> xlsx.str2date(o.get("LEVY_YMD"))).style(dateYMD)); + valueMap.put("납기일자", xlsx.format(o -> xlsx.str2date(o.get("DUDT_YMD"))).style(dateYMD)); + valueMap.put("본세", xlsx.style("PCPTAX", numeric)); + valueMap.put("가산금", xlsx.style("ADAMT", numeric)); + valueMap.put("미납금액", xlsx.style("SUM_AMT", numeric)); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("공시송달상세", center) diff --git a/src/main/java/cokr/xit/fims/sprt/web/Sprt04Controller.java b/src/main/java/cokr/xit/fims/sprt/web/Sprt04Controller.java index 5e899304..22098820 100644 --- a/src/main/java/cokr/xit/fims/sprt/web/Sprt04Controller.java +++ b/src/main/java/cokr/xit/fims/sprt/web/Sprt04Controller.java @@ -1,7 +1,7 @@ package cokr.xit.fims.sprt.web; import java.text.SimpleDateFormat; -import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -10,8 +10,6 @@ import javax.annotation.Resource; import org.apache.poi.ss.usermodel.CellStyle; import org.springframework.web.servlet.ModelAndView; -import com.fasterxml.jackson.core.type.TypeReference; - import cokr.xit.base.code.CommonCode; import cokr.xit.base.file.xls.XLSWriter; import cokr.xit.base.file.xls.XLSWriter.CellDef; @@ -101,7 +99,7 @@ public class Sprt04Controller extends ApplicationController { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); String dateTime = dateFormat.format(System.currentTimeMillis()); - ArrayList cellDefs = fromJson(req.getCellDefs(), new TypeReference>() {}); + List cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); XLSWriter xlsx = new XLSWriter() .setFilename("민원상담" + "_목록_" + dateTime + ".xlsx") @@ -114,21 +112,21 @@ public class Sprt04Controller extends ApplicationController { List list = sprt04Service.getCvlcptDscsnList(req.setFetchSize(0)); - CellDef.setValues(cellDefs, Map.ofEntries( - Map.entry("민원접수구분", xlsx.style("CVLCPT_RCPT_SE_NM", center)) - , Map.entry("상담일자", xlsx.format(o -> xlsx.str2date(o.get("DSCSN_YMD"))).style(dateYMD)) - , Map.entry("요일", xlsx.style("WEEK_NM", center)) - , Map.entry("성명", xlsx.style("CVLPR_NM", center)) - , Map.entry("연락처", xlsx.style("CVLPR_CTTPC", center)) - , Map.entry("상담내용", "DSCSN_CN") - , Map.entry("차량번호", "VHRNO") - , Map.entry("납부자번호", xlsx.style("RTPYR_NO", center)) - , Map.entry("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)) - , Map.entry("등록사용자", xlsx.style("RGTR_NM", center)) - , Map.entry("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)) - , Map.entry("수정사용자", xlsx.style("MDFR_NM", center)) - ) - ); + Map valueMap = new HashMap(); + valueMap.put("민원접수구분", xlsx.style("CVLCPT_RCPT_SE_NM", center)); + valueMap.put("상담일자", xlsx.format(o -> xlsx.str2date(o.get("DSCSN_YMD"))).style(dateYMD)); + valueMap.put("요일", xlsx.style("WEEK_NM", center)); + valueMap.put("성명", xlsx.style("CVLPR_NM", center)); + valueMap.put("연락처", xlsx.style("CVLPR_CTTPC", center)); + valueMap.put("상담내용", "DSCSN_CN"); + valueMap.put("차량번호", "VHRNO"); + valueMap.put("납부자번호", xlsx.style("RTPYR_NO", center)); + valueMap.put("등록일시", xlsx.format(o -> xlsx.str2datetime(o.get("REG_DT"))).style(dateDT)); + valueMap.put("등록사용자", xlsx.style("RGTR_NM", center)); + valueMap.put("수정일시", xlsx.format(o -> xlsx.str2datetime(o.get("MDFCN_DT"))).style(dateDT)); + valueMap.put("수정사용자", xlsx.style("MDFR_NM", center)); + + CellDef.setValues(cellDefs, valueMap); xlsx.cell(0, 0) .value("민원상담", center)