From 73d3bd7b5a4f9031150f56106961f4efbe82d4ec Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Tue, 23 Apr 2024 10:02:41 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=91=EC=85=80=20=EB=8B=A4=EC=9A=B4?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20=EC=97=B4=EB=84=88=EB=B9=84=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 --- .../java/cokr/xit/fims/cmmn/CmmnUtil.java | 8 -- .../xit/fims/crdn/web/Crdn02Controller.java | 8 +- .../xit/fims/crdn/web/Crdn03Controller.java | 8 +- .../xit/fims/crdn/web/Crdn06Controller.java | 9 ++- .../xit/fims/crdn/web/Crdn08Controller.java | 8 +- .../xit/fims/cvlc/web/Cvlc01Controller.java | 8 +- .../xit/fims/cvlc/web/Cvlc02Controller.java | 8 +- .../xit/fims/cvlc/web/Cvlc03Controller.java | 8 +- .../xit/fims/epst/web/Epst02Controller.java | 29 ++++--- .../xit/fims/excl/web/Excl01Controller.java | 8 +- .../xit/fims/excl/web/Excl02Controller.java | 8 +- .../xit/fims/excl/web/Excl03Controller.java | 8 +- .../xit/fims/levy/web/Levy01Controller.java | 15 ++-- .../xit/fims/levy/web/Levy02Controller.java | 8 +- .../xit/fims/rcvm/web/Rcvm01Controller.java | 8 +- .../xit/fims/rdca/web/Rdca01Controller.java | 8 +- .../xit/fims/sndb/web/Sndb01Controller.java | 78 +++++++++++++------ .../xit/fims/sprt/web/Sprt01Controller.java | 7 +- .../xit/fims/sprt/web/Sprt04Controller.java | 8 +- 19 files changed, 161 insertions(+), 89 deletions(-) diff --git a/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java b/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java index 458e9069..c5d096f9 100644 --- a/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java +++ b/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java @@ -551,12 +551,4 @@ public class CmmnUtil { dataObject.put("BARCODE1", barcode); } - public static int[] intArray(int len) { - int[] arr = new int[len]; - for(int i=0; i < len; i++) { - arr[i] = i; - } - return arr; - } - } \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn02Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn02Controller.java index e35cbe59..18fa2ea2 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn02Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn02Controller.java @@ -23,7 +23,6 @@ import cokr.xit.base.docs.xls.XLSWriter; import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.dao.UserMapper; import cokr.xit.base.web.ApplicationController; -import cokr.xit.fims.cmmn.CmmnUtil; import cokr.xit.fims.cmmn.service.bean.StngBean; import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.StyleMaker; @@ -111,7 +110,7 @@ public class Crdn02Controller extends ApplicationController { if("xls".equals(query.getDownload())) { ArrayList cellDefs = fromJson(query.getCellDefs(), new TypeReference>() {}); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -145,7 +144,10 @@ public class Crdn02Controller extends ApplicationController { xlsx.cell(0, 0).value("검사자료 목록").value(center).merge(0, cellDefs.size()-1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(query.getCellDefs(), new TypeReference>() {}); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -116,7 +115,10 @@ public class Crdn03Controller extends ApplicationController { xlsx.cell(0, 0).value("표지정보미확인자료 목록").value(center).merge(0, cellDefs.size()-1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i StyleMaker.headerStyle(xlsx))); xlsx.cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(query.getCellDefs(), new TypeReference>() {}); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -119,7 +118,10 @@ public class Crdn08Controller extends ApplicationController { xlsx.cell(0, 0).value("면제차량 목록").value(center).merge(0, cellDefs.size()-1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(query.getCellDefs(), new TypeReference>() {}); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -160,7 +159,10 @@ public class Cvlc01Controller extends ApplicationController { xlsx.cell(0, 0).value("민원접수자료 목록").value(center).merge(0, cellDefs.size()-1); xlsx.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))); xlsx.cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i StyleMaker.headerStyle(xlsx))); xlsx.cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(query.getCellDefs(), new TypeReference>() {}); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -125,7 +124,10 @@ public class Cvlc03Controller extends ApplicationController { xlsx.cell(0, 0).value("민원자료 목록").value(center).merge(0, cellDefs.size()-1); xlsx.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))); xlsx.cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -165,7 +164,10 @@ public class Epst02Controller extends ApplicationController { xlsx.cell(0, 0).value("우편통합 안내문").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -350,7 +352,10 @@ public class Epst02Controller extends ApplicationController { xlsx.cell(0, 0).value("우편통합 우편발송").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -433,7 +438,10 @@ public class Epst02Controller extends ApplicationController { xlsx.cell(0, 0).value("우편통합 발송상세").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -575,7 +583,10 @@ public class Epst02Controller extends ApplicationController { xlsx.cell(0, 0).value("우편통합 접수결과").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -160,7 +159,10 @@ public class Excl01Controller extends ApplicationController { xlsx.cell(0, 0).value("부과제외").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -193,7 +192,10 @@ public class Excl02Controller extends ApplicationController { xlsx.cell(0, 0).value("의견제출").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -149,7 +148,10 @@ public class Excl03Controller extends ApplicationController { xlsx.cell(0, 0).value("단속 재등록").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -159,7 +158,10 @@ public class Levy01Controller extends ApplicationController { xlsx.cell(0, 0).value("사전 감경부과 대상").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -337,7 +339,10 @@ public class Levy01Controller extends ApplicationController { xlsx.cell(0, 0).value("부과").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -156,7 +155,10 @@ public class Levy02Controller extends ApplicationController { xlsx.cell(0, 0).value("과태료감경").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -172,7 +171,10 @@ public class Rcvm01Controller extends ApplicationController { xlsx.cell(0, 0).value("수납").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -154,7 +153,10 @@ public class Rdca01Controller extends ApplicationController { xlsx.cell(0, 0).value("감액").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -268,7 +267,10 @@ public class Sndb01Controller extends ApplicationController { xlsx.cell(0, 0).value("계고장 발송 대상").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -403,7 +405,10 @@ public class Sndb01Controller extends ApplicationController { xlsx.cell(0, 0).value("계고장 발송 현황").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -496,7 +501,10 @@ public class Sndb01Controller extends ApplicationController { xlsx.cell(0, 0).value("계도장 발송 상세").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -599,7 +607,10 @@ public class Sndb01Controller extends ApplicationController { xlsx.cell(0, 0).value("사전통지 발송 대상").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -737,7 +748,10 @@ public class Sndb01Controller extends ApplicationController { xlsx.cell(0, 0).value("사전통지 발송 현황").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -837,7 +851,10 @@ public class Sndb01Controller extends ApplicationController { xlsx.cell(0, 0).value("사전통지 발송 상세").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -919,7 +936,10 @@ public class Sndb01Controller extends ApplicationController { xlsx.cell(0, 0).value("고지서 발송 현황").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -1019,7 +1039,10 @@ public class Sndb01Controller extends ApplicationController { xlsx.cell(0, 0).value("고지서 발송 상세").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -1176,7 +1199,10 @@ public class Sndb01Controller extends ApplicationController { xlsx.cell(0, 0).value("반송현황").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -1389,7 +1415,10 @@ public class Sndb01Controller extends ApplicationController { xlsx.cell(0, 0).value("공시송달현황").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -1489,7 +1518,10 @@ public class Sndb01Controller extends ApplicationController { xlsx.cell(0, 0).value("공시송달상세").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(listForExcel, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); - XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); + XLSWriter xlsx = new XLSWriter().worksheet(0); Format format = new Format(xlsx); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); @@ -142,7 +141,10 @@ public class Sprt04Controller extends ApplicationController { xlsx.cell(0, 0).value("민원상담").value(center).merge(0, cellDefs.size() - 1) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(4, 0).values(list, CellDef.values(cellDefs.stream().map(i -> {if(i.getValue() instanceof Format) {i.setField(null);}; return i;}).toList())); - xlsx.autoWidth(); + List cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList(); + for(int i=0; i