엑셀 다운로드 열너비 수정

main
이범준 7 months ago
parent 981aa805be
commit 73d3bd7b5a

@ -551,12 +551,4 @@ public class CmmnUtil {
dataObject.put("BARCODE1", barcode); 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;
}
} }

@ -23,7 +23,6 @@ import cokr.xit.base.docs.xls.XLSWriter;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper; import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController; 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.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
@ -111,7 +110,7 @@ public class Crdn02Controller extends ApplicationController {
if("xls".equals(query.getDownload())) { if("xls".equals(query.getDownload())) {
ArrayList<CellDef> cellDefs = fromJson(query.getCellDefs(), new TypeReference<ArrayList<CellDef>>() {}); ArrayList<CellDef> cellDefs = fromJson(query.getCellDefs(), new TypeReference<ArrayList<CellDef>>() {});
XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); XLSWriter xlsx = new XLSWriter().worksheet(0);
Format format = new Format(xlsx); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("검사자료 목록").value(center).merge(0, cellDefs.size()-1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("xlsView").addObject("download", xlsx.getDownloadable().setFilename("검사자료 목록.xlsx")) return new ModelAndView("xlsView").addObject("download", xlsx.getDownloadable().setFilename("검사자료 목록.xlsx"))
.addObject("downloadData", list).addObject("dataNames", cellDefs.stream().map(CellDef::getLabel).toList()); .addObject("downloadData", list).addObject("dataNames", cellDefs.stream().map(CellDef::getLabel).toList());
} }

@ -23,7 +23,6 @@ import cokr.xit.base.docs.xls.XLSWriter;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper; import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
@ -93,7 +92,7 @@ public class Crdn03Controller extends ApplicationController {
if("xls".equals(query.getDownload())) { if("xls".equals(query.getDownload())) {
ArrayList<CellDef> cellDefs = fromJson(query.getCellDefs(), new TypeReference<ArrayList<CellDef>>() {}); ArrayList<CellDef> cellDefs = fromJson(query.getCellDefs(), new TypeReference<ArrayList<CellDef>>() {});
XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); XLSWriter xlsx = new XLSWriter().worksheet(0);
Format format = new Format(xlsx); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("표지정보미확인자료 목록").value(center).merge(0, cellDefs.size()-1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView").addObject("download", xlsx.getDownloadable().setFilename("표지정보미확인자료 목록.xlsx")) return new ModelAndView("downloadView").addObject("download", xlsx.getDownloadable().setFilename("표지정보미확인자료 목록.xlsx"))
.addObject("downloadData", list).addObject("dataNames", cellDefs.stream().map(CellDef::getLabel).toList()); .addObject("downloadData", list).addObject("dataNames", cellDefs.stream().map(CellDef::getLabel).toList());
} }

@ -23,7 +23,6 @@ import cokr.xit.base.file.service.bean.FileBean;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper; import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController; 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.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
@ -121,7 +120,7 @@ public class Crdn06Controller extends ApplicationController {
cellDefs.add((new CellDef()).setLabel("사진2").setWidth(18).setField("CRDN_PHOTO_PATH2")); cellDefs.add((new CellDef()).setLabel("사진2").setWidth(18).setField("CRDN_PHOTO_PATH2"));
} }
XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); XLSWriter xlsx = new XLSWriter().worksheet(0);
Format format = new Format(xlsx); Format format = new Format(xlsx);
Comment comment = new Comment(xlsx); Comment comment = new Comment(xlsx);
@ -171,7 +170,11 @@ public class Crdn06Controller extends ApplicationController {
xlsx.cell(0, 0).value("단속자료 목록").value(center).merge(0, cellDefs.size()-1); 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(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.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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
ModelAndView mav = new ModelAndView("downloadView"); ModelAndView mav = new ModelAndView("downloadView");
mav.addObject("download", xlsx.getDownloadable().setFilename("단속자료 목록.xlsx")); mav.addObject("download", xlsx.getDownloadable().setFilename("단속자료 목록.xlsx"));
mav.addObject("downloadData", list); mav.addObject("downloadData", list);

@ -23,7 +23,6 @@ import cokr.xit.base.docs.xls.XLSWriter;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper; import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
@ -90,7 +89,7 @@ public class Crdn08Controller extends ApplicationController {
if("xls".equals(query.getDownload())) { if("xls".equals(query.getDownload())) {
ArrayList<CellDef> cellDefs = fromJson(query.getCellDefs(), new TypeReference<ArrayList<CellDef>>() {}); ArrayList<CellDef> cellDefs = fromJson(query.getCellDefs(), new TypeReference<ArrayList<CellDef>>() {});
XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); XLSWriter xlsx = new XLSWriter().worksheet(0);
Format format = new Format(xlsx); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("면제차량 목록").value(center).merge(0, cellDefs.size()-1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView").addObject("download", xlsx.getDownloadable().setFilename("면제차량 목록.xlsx")) return new ModelAndView("downloadView").addObject("download", xlsx.getDownloadable().setFilename("면제차량 목록.xlsx"))
.addObject("downloadData", list).addObject("dataNames", cellDefs.stream().map(CellDef::getLabel).toList()); .addObject("downloadData", list).addObject("dataNames", cellDefs.stream().map(CellDef::getLabel).toList());
} }

@ -27,7 +27,6 @@ import cokr.xit.base.file.service.bean.FileBean;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper; import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.Print; import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption; import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.hwp.format.CvlcptOrgn; import cokr.xit.fims.cmmn.hwp.format.CvlcptOrgn;
@ -132,7 +131,7 @@ public class Cvlc01Controller extends ApplicationController {
ArrayList<CellDef> cellDefs = fromJson(query.getCellDefs(), new TypeReference<ArrayList<CellDef>>() {}); ArrayList<CellDef> cellDefs = fromJson(query.getCellDefs(), new TypeReference<ArrayList<CellDef>>() {});
XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); XLSWriter xlsx = new XLSWriter().worksheet(0);
Format format = new Format(xlsx); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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(0, 0).value("민원접수자료 목록").value(center).merge(0, cellDefs.size()-1);
xlsx.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))); 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.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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
ModelAndView mav = new ModelAndView("downloadView"); ModelAndView mav = new ModelAndView("downloadView");
mav.addObject("download", xlsx.getDownloadable().setFilename("민원접수자료 목록.xlsx")); mav.addObject("download", xlsx.getDownloadable().setFilename("민원접수자료 목록.xlsx"));
mav.addObject("downloadData", list); mav.addObject("downloadData", list);

@ -24,7 +24,6 @@ import cokr.xit.base.file.service.bean.FileBean;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper; import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController; 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.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
@ -112,7 +111,7 @@ public class Cvlc02Controller extends ApplicationController {
cellDefs.add((new CellDef()).setLabel("사진2").setWidth(18).setField("CRDN_PHOTO_PATH2")); cellDefs.add((new CellDef()).setLabel("사진2").setWidth(18).setField("CRDN_PHOTO_PATH2"));
} }
XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); XLSWriter xlsx = new XLSWriter().worksheet(0);
Format format = new Format(xlsx); Format format = new Format(xlsx);
Comment comment = new Comment(xlsx); Comment comment = new Comment(xlsx);
@ -161,7 +160,10 @@ public class Cvlc02Controller extends ApplicationController {
xlsx.cell(0, 0).value("민원답변대상자료 목록").value(center).merge(0, cellDefs.size()-1); 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(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.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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
ModelAndView mav = new ModelAndView("downloadView"); ModelAndView mav = new ModelAndView("downloadView");
mav.addObject("download", xlsx.getDownloadable().setFilename("민원답변대상자료 목록.xlsx")); mav.addObject("download", xlsx.getDownloadable().setFilename("민원답변대상자료 목록.xlsx"));
mav.addObject("downloadData", list); mav.addObject("downloadData", list);

@ -23,7 +23,6 @@ import cokr.xit.base.docs.xls.XLSWriter;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper; import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController; 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.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
@ -95,7 +94,7 @@ public class Cvlc03Controller extends ApplicationController {
if("xls".equals(query.getDownload())) { if("xls".equals(query.getDownload())) {
ArrayList<CellDef> cellDefs = fromJson(query.getCellDefs(), new TypeReference<ArrayList<CellDef>>() {}); ArrayList<CellDef> cellDefs = fromJson(query.getCellDefs(), new TypeReference<ArrayList<CellDef>>() {});
XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); XLSWriter xlsx = new XLSWriter().worksheet(0);
Format format = new Format(xlsx); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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(0, 0).value("민원자료 목록").value(center).merge(0, cellDefs.size()-1);
xlsx.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))); 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.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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
ModelAndView mav = new ModelAndView("downloadView"); ModelAndView mav = new ModelAndView("downloadView");
mav.addObject("download", xlsx.getDownloadable().setFilename("민원자료 목록.xlsx")); mav.addObject("download", xlsx.getDownloadable().setFilename("민원자료 목록.xlsx"));
return mav.addObject("downloadData", list).addObject("dataNames", cellDefs.stream().map(CellDef::getLabel).toList()); return mav.addObject("downloadData", list).addObject("dataNames", cellDefs.stream().map(CellDef::getLabel).toList());

@ -20,7 +20,6 @@ import cokr.xit.base.docs.xls.Style;
import cokr.xit.base.docs.xls.XLSWriter; import cokr.xit.base.docs.xls.XLSWriter;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.web.ApplicationController; 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.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
@ -137,7 +136,7 @@ public class Epst02Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("우편통합 안내문").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("우편통합안내문" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("우편통합안내문" + "_목록_" + dateTime + ".xlsx"));
} }
@ -324,7 +326,7 @@ public class Epst02Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("우편통합 우편발송").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("우편통합우편발송" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("우편통합우편발송" + "_목록_" + dateTime + ".xlsx"));
} }
@ -402,7 +407,7 @@ public class Epst02Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("우편통합 발송상세").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("우편통합발송상세" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("우편통합발송상세" + "_목록_" + dateTime + ".xlsx"));
} }
@ -546,7 +554,7 @@ public class Epst02Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("우편통합 접수결과").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("우편통합접수결과" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("우편통합접수결과" + "_목록_" + dateTime + ".xlsx"));
} }

@ -20,7 +20,6 @@ import cokr.xit.base.docs.xls.Style;
import cokr.xit.base.docs.xls.XLSWriter; import cokr.xit.base.docs.xls.XLSWriter;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.web.ApplicationController; 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.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
@ -114,7 +113,7 @@ public class Excl01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("부과제외").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("부과제외" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("부과제외" + "_목록_" + dateTime + ".xlsx"));
} }

@ -25,7 +25,6 @@ import cokr.xit.base.file.service.FileService;
import cokr.xit.base.file.web.FileInfoFactory; import cokr.xit.base.file.web.FileInfoFactory;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.Print; import cokr.xit.fims.cmmn.Print;
import cokr.xit.fims.cmmn.PrintOption; import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.cmmn.hwp.format.DlbrDecsnList; import cokr.xit.fims.cmmn.hwp.format.DlbrDecsnList;
@ -137,7 +136,7 @@ public class Excl02Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("의견제출").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("의견제출" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("의견제출" + "_목록_" + dateTime + ".xlsx"));
} }

@ -21,7 +21,6 @@ import cokr.xit.base.docs.xls.Style;
import cokr.xit.base.docs.xls.XLSWriter; import cokr.xit.base.docs.xls.XLSWriter;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.web.ApplicationController; 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.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
@ -109,7 +108,7 @@ public class Excl03Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("단속 재등록").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("단속재등록" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("단속재등록" + "_목록_" + dateTime + ".xlsx"));
} }

@ -21,7 +21,6 @@ import cokr.xit.base.docs.xls.XLSWriter;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnQuery; import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.service.bean.StngBean; import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
@ -118,7 +117,7 @@ public class Levy01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("사전 감경부과 대상").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("사전감경부과대상" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("사전감경부과대상" + "_목록_" + dateTime + ".xlsx"));
} }
@ -267,7 +269,7 @@ public class Levy01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("부과").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("부과" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("부과" + "_목록_" + dateTime + ".xlsx"));
} }

@ -21,7 +21,6 @@ import cokr.xit.base.docs.xls.XLSWriter;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper; import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController; 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.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
@ -115,7 +114,7 @@ public class Levy02Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("과태료감경").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("과태료감경" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("과태료감경" + "_목록_" + dateTime + ".xlsx"));
} }

@ -20,7 +20,6 @@ import cokr.xit.base.docs.xls.Style;
import cokr.xit.base.docs.xls.XLSWriter; import cokr.xit.base.docs.xls.XLSWriter;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.web.ApplicationController; 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.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
@ -113,7 +112,7 @@ public class Rcvm01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("수납").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("수납" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("수납" + "_목록_" + dateTime + ".xlsx"));
} }

@ -18,7 +18,6 @@ import cokr.xit.base.docs.xls.Style;
import cokr.xit.base.docs.xls.XLSWriter; import cokr.xit.base.docs.xls.XLSWriter;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.web.ApplicationController; 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.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
@ -108,7 +107,7 @@ public class Rdca01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("감액").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("감액" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("감액" + "_목록_" + dateTime + ".xlsx"));
} }

@ -26,7 +26,6 @@ import cokr.xit.base.file.service.bean.FileBean;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnQuery; import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.OtptStngQuery; import cokr.xit.fims.cmmn.OtptStngQuery;
import cokr.xit.fims.cmmn.OutsourcingStngQuery; import cokr.xit.fims.cmmn.OutsourcingStngQuery;
import cokr.xit.fims.cmmn.Print; import cokr.xit.fims.cmmn.Print;
@ -222,7 +221,7 @@ public class Sndb01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("계고장 발송 대상").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("계고장발송대상" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("계고장발송대상" + "_목록_" + dateTime + ".xlsx"));
} }
@ -373,7 +375,7 @@ public class Sndb01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("계고장 발송 현황").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("계고장발송현황" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("계고장발송현황" + "_목록_" + dateTime + ".xlsx"));
} }
@ -457,7 +462,7 @@ public class Sndb01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("계도장 발송 상세").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("계도장발송상세" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("계도장발송상세" + "_목록_" + dateTime + ".xlsx"));
} }
@ -555,7 +563,7 @@ public class Sndb01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("사전통지 발송 대상").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("사전통지발송대상" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("사전통지발송대상" + "_목록_" + dateTime + ".xlsx"));
} }
@ -707,7 +718,7 @@ public class Sndb01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("사전통지 발송 현황").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("사전통지발송현황" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("사전통지발송현황" + "_목록_" + dateTime + ".xlsx"));
} }
@ -791,7 +805,7 @@ public class Sndb01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("사전통지 발송 상세").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("사전통지발송상세" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("사전통지발송상세" + "_목록_" + dateTime + ".xlsx"));
} }
@ -889,7 +906,7 @@ public class Sndb01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("고지서 발송 현황").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("고지서발송현황" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("고지서발송현황" + "_목록_" + dateTime + ".xlsx"));
} }
@ -973,7 +993,7 @@ public class Sndb01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("고지서 발송 상세").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("고지서발송상세" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("고지서발송상세" + "_목록_" + dateTime + ".xlsx"));
} }
@ -1132,7 +1155,7 @@ public class Sndb01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("반송현황").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("반송현황" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("반송현황" + "_목록_" + dateTime + ".xlsx"));
} }
@ -1361,7 +1387,7 @@ public class Sndb01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("공시송달현황").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("공시송달현황" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("공시송달현황" + "_목록_" + dateTime + ".xlsx"));
} }
@ -1443,7 +1472,7 @@ public class Sndb01Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("공시송달상세").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("공시송달상세" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("공시송달상세" + "_목록_" + dateTime + ".xlsx"));
} }

@ -226,7 +226,7 @@ public class Sprt01Controller extends ApplicationController {
listForExcel = list; listForExcel = list;
} }
XLSWriter xlsx = new XLSWriter().worksheet(0).trackWidth(CmmnUtil.intArray(cellDefs.size())); XLSWriter xlsx = new XLSWriter().worksheet(0);
Format format = new Format(xlsx); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT));
@ -288,7 +288,10 @@ public class Sprt01Controller extends ApplicationController {
xlsx.cell(0, 0).value(fileName).value(center).merge(0, cellDefs.size()-1) xlsx.cell(0, 0).value(fileName).value(center).merge(0, cellDefs.size()-1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .cell(3, 0).rowValues(CellDef.header(cellDefs, () -> 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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView").addObject("download", xlsx.getDownloadable().setFilename(fileName+".xlsx")) return new ModelAndView("downloadView").addObject("download", xlsx.getDownloadable().setFilename(fileName+".xlsx"))
.addObject("downloadData", listForExcel).addObject("dataNames", cellDefs.stream().map(CellDef::getLabel).toList()); .addObject("downloadData", listForExcel).addObject("dataNames", cellDefs.stream().map(CellDef::getLabel).toList());
} }

@ -20,7 +20,6 @@ import cokr.xit.base.docs.xls.Style;
import cokr.xit.base.docs.xls.XLSWriter; import cokr.xit.base.docs.xls.XLSWriter;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.web.ApplicationController; 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.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker; import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker; import cokr.xit.fims.cmmn.xls.StyleMaker;
@ -113,7 +112,7 @@ public class Sprt04Controller extends ApplicationController {
List<CellDef> cellDefs = fromJson(req.getCellDefs(), CellDef.listType()); List<CellDef> 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); Format format = new Format(xlsx);
CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER)); CellStyle center = format.cellStyle(new Style().alignment(HorizontalAlignment.CENTER));
CellStyle left = format.cellStyle(new Style().alignment(HorizontalAlignment.LEFT)); 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) xlsx.cell(0, 0).value("민원상담").value(center).merge(0, cellDefs.size() - 1)
.cell(3, 0).rowValues(CellDef.header(cellDefs, () -> StyleMaker.headerStyle(xlsx))) .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())); .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<Integer> cellWidthInfo = cellDefs.stream().map(CellDef::getWidth).toList();
for(int i=0; i<cellWidthInfo.size();i++) {
xlsx.workbook().getSheetAt(0).setColumnWidth(i, cellWidthInfo.get(i)*256);
}
return new ModelAndView("downloadView") return new ModelAndView("downloadView")
.addObject("download", xlsx.getDownloadable().setFilename("민원상담" + "_목록_" + dateTime + ".xlsx")); .addObject("download", xlsx.getDownloadable().setFilename("민원상담" + "_목록_" + dateTime + ".xlsx"));
} }

Loading…
Cancel
Save