
--- src/main/java/com/takensoft/common/excel/service/ExcelCreateService.java
+++ src/main/java/com/takensoft/common/excel/service/ExcelCreateService.java
... | ... | @@ -16,6 +16,16 @@ |
16 | 16 |
import java.nio.file.Paths; |
17 | 17 |
import java.util.Base64; |
18 | 18 |
import java.util.List; |
19 |
+/** |
|
20 |
+ * @author takensoft |
|
21 |
+ * @since 2024.04.09 |
|
22 |
+ * @modification |
|
23 |
+ * since | author | description |
|
24 |
+ * 2024.05.30 | 박정하 | 최초 등록 |
|
25 |
+ * 2025.03.17 | 방선주 | 기업용 엑셀 다운로드 기능 삭제 |
|
26 |
+ * |
|
27 |
+ * 엑셀 생성 서비스 |
|
28 |
+ */ |
|
19 | 29 |
|
20 | 30 |
public class ExcelCreateService<T> { |
21 | 31 |
private Workbook workbook; |
... | ... | @@ -30,15 +40,24 @@ |
30 | 40 |
this.resource = ExcelRenderResourceFactory.prepareRenderResource(type); |
31 | 41 |
this.dataList = dataList; |
32 | 42 |
} |
33 |
- |
|
34 |
- // 헤더 스타일 |
|
43 |
+ /** |
|
44 |
+ * @param |
|
45 |
+ * @return CellStyle - 엑셀 셀 스타일 |
|
46 |
+ * |
|
47 |
+ * 헤더 스타일 |
|
48 |
+ */ |
|
35 | 49 |
private CellStyle theadStyle() { |
36 | 50 |
CellStyle headerCellStyle = tbodyStyle(); |
37 | 51 |
headerCellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
38 | 52 |
headerCellStyle.setFillPattern(FillPatternType.BRICKS); |
39 | 53 |
return headerCellStyle; |
40 | 54 |
} |
41 |
- // 내용 스타일 |
|
55 |
+ /** |
|
56 |
+ * @param |
|
57 |
+ * @return CellStyle - 엑셀 셀 스타일 |
|
58 |
+ * |
|
59 |
+ * 내용 스타일 |
|
60 |
+ */ |
|
42 | 61 |
private CellStyle tbodyStyle() { |
43 | 62 |
CellStyle bodyCellStyle = workbook.createCellStyle(); |
44 | 63 |
bodyCellStyle.setBorderLeft(BorderStyle.THIN); |
... | ... | @@ -48,7 +67,12 @@ |
48 | 67 |
bodyCellStyle.setWrapText(true); |
49 | 68 |
return bodyCellStyle; |
50 | 69 |
} |
51 |
- // 빈칸 스타일 |
|
70 |
+ /** |
|
71 |
+ * @param |
|
72 |
+ * @return CellStyle - 엑셀 셀 스타일 |
|
73 |
+ * |
|
74 |
+ * 빈칸 스타일 |
|
75 |
+ */ |
|
52 | 76 |
private CellStyle emptyStyle() { |
53 | 77 |
CellStyle emptyStyle = workbook.createCellStyle(); |
54 | 78 |
emptyStyle.setBorderLeft(BorderStyle.NONE); |
... | ... | @@ -58,7 +82,14 @@ |
58 | 82 |
return emptyStyle; |
59 | 83 |
} |
60 | 84 |
|
61 |
- // 세로 적재 테이블 그리기 |
|
85 |
+ /** |
|
86 |
+ * @param resource - 엑셀 렌더 리소스 |
|
87 |
+ * @param dataList - 엑셀 데이터 리스트 |
|
88 |
+ * @param rowIndex - 엑셀 행 인덱스 |
|
89 |
+ * @return CellStyle - 엑셀 셀 스타일 |
|
90 |
+ * |
|
91 |
+ * 세로 적재 테이블 그리기 |
|
92 |
+ */ |
|
62 | 93 |
public int createVertical(ExcelRenderResource resource, List<T> dataList, int rowIndex) throws NoSuchFieldException, IllegalAccessException { |
63 | 94 |
for (String dataFieldName : resource.getDataFieldNames()) { |
64 | 95 |
// tr |
... | ... | @@ -83,7 +114,14 @@ |
83 | 114 |
return rowIndex; |
84 | 115 |
} |
85 | 116 |
|
86 |
- // 가로 적재 테이블 그리기 |
|
117 |
+ /** |
|
118 |
+ * @param resource - 엑셀 렌더 리소스 |
|
119 |
+ * @param dataList - 엑셀 데이터 리스트 |
|
120 |
+ * @param rowIndex - 엑셀 행 인덱스 |
|
121 |
+ * @return int - 엑셀 행 인덱스 |
|
122 |
+ * |
|
123 |
+ * 가로 적재 테이블 그리기 |
|
124 |
+ */ |
|
87 | 125 |
public int createHorizontal(ExcelRenderResource resource, List<T> dataList, int rowIndex) throws NoSuchFieldException, IllegalAccessException { |
88 | 126 |
// tr |
89 | 127 |
Row row = sheet.createRow(rowIndex++); |
... | ... | @@ -111,8 +149,15 @@ |
111 | 149 |
|
112 | 150 |
return rowIndex; |
113 | 151 |
} |
114 |
- |
|
115 |
- // 세로형 가로 적재 테이블 그리기 |
|
152 |
+ |
|
153 |
+ /** |
|
154 |
+ * @param resource - 엑셀 렌더 리소스 |
|
155 |
+ * @param dataList - 엑셀 데이터 리스트 |
|
156 |
+ * @param rowIndex - 엑셀 행 인덱스 |
|
157 |
+ * @return int - 엑셀 행 인덱스 |
|
158 |
+ * |
|
159 |
+ * 세로형 가로 적재 테이블 그리기 |
|
160 |
+ */ |
|
116 | 161 |
public int createVH(ExcelRenderResource resource, List<T> dataList, int rowIndex) throws NoSuchFieldException, IllegalAccessException { |
117 | 162 |
for (T data : dataList) { |
118 | 163 |
for (String dataFieldName : resource.getDataFieldNames()) { |
... | ... | @@ -140,7 +185,12 @@ |
140 | 185 |
return rowIndex; |
141 | 186 |
} |
142 | 187 |
|
143 |
- // 구분선 |
|
188 |
+ /** |
|
189 |
+ * @param rowIndex - 엑셀 행 인덱스 |
|
190 |
+ * @return int - 엑셀 행 인덱스 |
|
191 |
+ * |
|
192 |
+ * 구분선 |
|
193 |
+ */ |
|
144 | 194 |
public int createHr(int rowIndex) { |
145 | 195 |
// tr |
146 | 196 |
Row row = sheet.createRow(rowIndex++); |
... | ... | @@ -150,7 +200,13 @@ |
150 | 200 |
return rowIndex; |
151 | 201 |
} |
152 | 202 |
|
153 |
- // 제목 |
|
203 |
+ /** |
|
204 |
+ * @param rowIndex - 엑셀 행 인덱스 |
|
205 |
+ * @param caption - 엑셀 캡션 |
|
206 |
+ * @return int - 엑셀 행 인덱스 |
|
207 |
+ * |
|
208 |
+ * 제목 |
|
209 |
+ */ |
|
154 | 210 |
public int createCaption(int rowIndex, String caption) { |
155 | 211 |
// tr |
156 | 212 |
Row row = sheet.createRow(rowIndex++); |
... | ... | @@ -160,7 +216,12 @@ |
160 | 216 |
return rowIndex; |
161 | 217 |
} |
162 | 218 |
|
163 |
- // 셀 내 데이터 입력 |
|
219 |
+ /** |
|
220 |
+ * @param cell - 엑셀 셀 |
|
221 |
+ * @param cellValue - 엑셀 셀 값 |
|
222 |
+ * |
|
223 |
+ * 셀 내 데이터 입력 |
|
224 |
+ */ |
|
164 | 225 |
private void setCellValue(Cell cell, Object cellValue) { |
165 | 226 |
if (cellValue instanceof Number) { |
166 | 227 |
Number numberValue = (Number) cellValue; |
... | ... | @@ -227,36 +288,13 @@ |
227 | 288 |
} |
228 | 289 |
} |
229 | 290 |
|
230 |
- // 세로 적재 테이블 그리기 (기업정보용) |
|
231 |
- public int createVerticalByEntInfo(ExcelRenderResource resource, List<T> dataList, int rowIndex) throws NoSuchFieldException, IllegalAccessException { |
|
232 |
- String isIvstDscsn = null; |
|
233 |
- for (String dataFieldName : resource.getDataFieldNames()) { |
|
234 |
- if (dataFieldName!= "isIvstDscsn" && dataFieldName != "mvnInten" && dataFieldName != "mouInten" && dataFieldName != "rmrk") { |
|
235 |
- rowIndex = createTableByEntInfo(resource, rowIndex, dataFieldName); |
|
236 |
- } |
|
237 |
- } |
|
238 |
- |
|
239 |
- rowIndex = createHr(rowIndex); // 구분선 |
|
240 |
- rowIndex = createCaption(rowIndex, "세부정보"); |
|
241 |
- |
|
242 |
- Field field = SuperClassReflectionUtil.getField(dataList.get(0).getClass(), ("isIvstDscsn")); |
|
243 |
- field.setAccessible(true); |
|
244 |
- isIvstDscsn = field.get(dataList.get(0)).toString(); |
|
245 |
- field.setAccessible(false); |
|
246 |
- |
|
247 |
- rowIndex = createTableByEntInfo(resource, rowIndex, "isIvstDscsn"); |
|
248 |
- if (isIvstDscsn == "Y") { |
|
249 |
- for (String dataFieldName : resource.getDataFieldNames()) { |
|
250 |
- if (dataFieldName == "mvnInten" || dataFieldName == "mouInten") { |
|
251 |
- rowIndex = createTableByEntInfo(resource, rowIndex, dataFieldName); |
|
252 |
- } |
|
253 |
- } |
|
254 |
- } |
|
255 |
- rowIndex = createTableByEntInfo(resource, rowIndex, "rmrk"); |
|
256 |
- |
|
257 |
- return rowIndex; |
|
258 |
- } |
|
259 |
- // 테이블 그리기 |
|
291 |
+ /** |
|
292 |
+ * @param resource - 엑셀 렌더 리소스 |
|
293 |
+ * @param rowIndex - 엑셀 행 인덱스 |
|
294 |
+ * @param dataFieldName - 엑셀 셀 값 |
|
295 |
+ * |
|
296 |
+ * 테이블 그리기 |
|
297 |
+ */ |
|
260 | 298 |
private int createTableByEntInfo(ExcelRenderResource resource, int rowIndex, String dataFieldName) throws NoSuchFieldException, IllegalAccessException { |
261 | 299 |
// tr |
262 | 300 |
Row row = sheet.createRow(rowIndex++); |
... | ... | @@ -275,35 +313,4 @@ |
275 | 313 |
return rowIndex; |
276 | 314 |
} |
277 | 315 |
|
278 |
- // 기업정보 전체 테이블 그리기 (기업정보용) |
|
279 |
- public int createByEntInfoAll(ExcelRenderResource resource, List<T> dataList, int rowIndex) throws NoSuchFieldException, IllegalAccessException { |
|
280 |
- // tr |
|
281 |
- Row row = sheet.createRow(rowIndex++); |
|
282 |
- |
|
283 |
- // th |
|
284 |
- int columnIndex = 0; |
|
285 |
- for (String dataFieldName : resource.getDataFieldNames()) { |
|
286 |
- Cell cell = row.createCell(columnIndex++); |
|
287 |
- String value = resource.getExcelHeaderName(dataFieldName); |
|
288 |
- cell.setCellValue(value); |
|
289 |
- cell.setCellStyle(theadStyle()); |
|
290 |
- } |
|
291 |
- |
|
292 |
- // td |
|
293 |
- for (T data : dataList) { |
|
294 |
- row = sheet.createRow(rowIndex++); |
|
295 |
- columnIndex = 0; |
|
296 |
- |
|
297 |
- for (String dataFieldName : resource.getDataFieldNames()) { |
|
298 |
- Cell cell = row.createCell(columnIndex++); |
|
299 |
- Field field = SuperClassReflectionUtil.getField(data.getClass(), (dataFieldName)); |
|
300 |
- field.setAccessible(true); |
|
301 |
- Object cellValue = field.get(data); |
|
302 |
- field.setAccessible(false); |
|
303 |
- setCellValue(cell, cellValue); |
|
304 |
- } |
|
305 |
- } |
|
306 |
- |
|
307 |
- return rowIndex; |
|
308 |
- } |
|
309 | 316 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/common/excel/service/ExcelService.java
+++ src/main/java/com/takensoft/common/excel/service/ExcelService.java
... | ... | @@ -1,19 +1,29 @@ |
1 | 1 |
package com.takensoft.common.excel.service; |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.cntnStats.dto.CntnStatsExcelDTO; |
4 |
-import com.takensoft.portal.entInfo.dto.BplcExcelDTO; |
|
5 |
-import com.takensoft.portal.entInfo.dto.EntInfoExcelDTO; |
|
6 |
-import com.takensoft.portal.ivstDscsn.dto.IvstDscsnExcelDTO; |
|
7 |
-import com.takensoft.portal.rvwMttr.dto.RvwMttrExcelDTO; |
|
8 |
-import com.takensoft.portal.rvwMttr.dto.RvwMttrPrgrsExcelDTO; |
|
9 | 4 |
|
10 | 5 |
import jakarta.servlet.http.HttpServletResponse; |
11 | 6 |
import java.util.List; |
12 | 7 |
|
8 |
+/** |
|
9 |
+ * @author takensoft |
|
10 |
+ * @since 2024.04.09 |
|
11 |
+ * @modification |
|
12 |
+ * since | author | description |
|
13 |
+ * 2024.05.30 | 박정하 | cntnStatsExcelDownload 등록 |
|
14 |
+ * 2025.03.14 | 방선주 | 코드 리펙토링 |
|
15 |
+ * |
|
16 |
+ * 엑셀 다운로드 서비스 인터페이스 |
|
17 |
+ */ |
|
18 |
+ |
|
13 | 19 |
public interface ExcelService { |
14 |
- void ivstDscsnExcelDownload(HttpServletResponse response, IvstDscsnExcelDTO ivstDscsn) throws Exception; |
|
15 |
- void rvwMttrExcelDownload(HttpServletResponse response, RvwMttrExcelDTO rvwMttr, List<RvwMttrPrgrsExcelDTO> prgrsList) throws Exception; |
|
16 |
- void entInfoExcelDownload(HttpServletResponse response, EntInfoExcelDTO entInfo, List<BplcExcelDTO> bplcList) throws Exception; |
|
20 |
+ /** |
|
21 |
+ * @param response - HTTP 응답 객체 |
|
22 |
+ * @param cntnStats - 게시판 접속 통계 목록 |
|
23 |
+ * @param chart - 차트 명 |
|
24 |
+ * @return int - 등록 성공 여부 |
|
25 |
+ * |
|
26 |
+ * 접속 통계 엑셀 다운로드 |
|
27 |
+ */ |
|
17 | 28 |
void cntnStatsExcelDownload(HttpServletResponse response, List<CntnStatsExcelDTO> cntnStats, String chart); |
18 |
- void entInfoExcelDownloadAll(HttpServletResponse response, List<EntInfoExcelDTO> entInfoList) throws Exception; |
|
19 | 29 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/common/excel/service/Impl/ExcelServiceImpl.java
+++ src/main/java/com/takensoft/common/excel/service/Impl/ExcelServiceImpl.java
... | ... | @@ -5,11 +5,6 @@ |
5 | 5 |
import com.takensoft.common.excel.resource.ExcelRenderResourceFactory; |
6 | 6 |
import com.takensoft.common.excel.service.ExcelCreateService; |
7 | 7 |
import com.takensoft.common.excel.service.ExcelService; |
8 |
-import com.takensoft.portal.entInfo.dto.BplcExcelDTO; |
|
9 |
-import com.takensoft.portal.entInfo.dto.EntInfoExcelDTO; |
|
10 |
-import com.takensoft.portal.ivstDscsn.dto.IvstDscsnExcelDTO; |
|
11 |
-import com.takensoft.portal.rvwMttr.dto.RvwMttrExcelDTO; |
|
12 |
-import com.takensoft.portal.rvwMttr.dto.RvwMttrPrgrsExcelDTO; |
|
13 | 8 |
import lombok.RequiredArgsConstructor; |
14 | 9 |
import org.apache.poi.ss.usermodel.Sheet; |
15 | 10 |
import org.apache.poi.ss.usermodel.Workbook; |
... | ... | @@ -34,94 +29,6 @@ |
34 | 29 |
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, String.format("attachment; filename=" + fileName + ".xlsx")); |
35 | 30 |
workbook.write(response.getOutputStream()); |
36 | 31 |
workbook.close(); |
37 |
- } |
|
38 |
- |
|
39 |
- // 투자상담 |
|
40 |
- @Override |
|
41 |
- public void ivstDscsnExcelDownload(HttpServletResponse response, IvstDscsnExcelDTO ivstDscsn) throws Exception { |
|
42 |
- // 기본 세팅 |
|
43 |
- Workbook workbook = new SXSSFWorkbook(); |
|
44 |
- Sheet sheet = workbook.createSheet(); |
|
45 |
- int rowIndex = 0; |
|
46 |
- |
|
47 |
- // 개별 설정 |
|
48 |
- ExcelRenderResource mainResource = ExcelRenderResourceFactory.prepareRenderResource(IvstDscsnExcelDTO.class); |
|
49 |
- List<IvstDscsnExcelDTO> mainDataList = new ArrayList<>(); |
|
50 |
- mainDataList.add(ivstDscsn); |
|
51 |
- |
|
52 |
- // 엑셀 그리기 |
|
53 |
- ExcelCreateService<IvstDscsnExcelDTO> mainExcel = new ExcelCreateService(workbook, sheet, mainDataList, mainDataList.getClass()); |
|
54 |
- mainExcel.createVertical(mainResource, mainDataList, rowIndex); |
|
55 |
- |
|
56 |
- // 엑셀 사이즈 지정 |
|
57 |
- sheetSize(sheet, 2); |
|
58 |
- |
|
59 |
- // 엑셀 파일 출력 |
|
60 |
- writeExcel(response, workbook, mainResource); |
|
61 |
- } |
|
62 |
- |
|
63 |
- // 검토사항 |
|
64 |
- @Override |
|
65 |
- public void rvwMttrExcelDownload(HttpServletResponse response, RvwMttrExcelDTO rvwMttr, List<RvwMttrPrgrsExcelDTO> prgrsList) throws Exception { |
|
66 |
- // 기본 세팅 |
|
67 |
- Workbook workbook = new SXSSFWorkbook(); |
|
68 |
- Sheet sheet = workbook.createSheet(); |
|
69 |
- int rowIndex = 0; |
|
70 |
- |
|
71 |
- // 개별 설정 |
|
72 |
- ExcelRenderResource mainResource = ExcelRenderResourceFactory.prepareRenderResource(RvwMttrExcelDTO.class); |
|
73 |
- List<RvwMttrExcelDTO> mainDataList = new ArrayList<>(); |
|
74 |
- mainDataList.add(rvwMttr); |
|
75 |
- |
|
76 |
- ExcelRenderResource prgrsResource = ExcelRenderResourceFactory.prepareRenderResource(RvwMttrPrgrsExcelDTO.class); |
|
77 |
- |
|
78 |
- // 엑셀 그리기 |
|
79 |
- ExcelCreateService<RvwMttrExcelDTO> mainExcel = new ExcelCreateService(workbook, sheet, mainDataList, mainDataList.getClass()); |
|
80 |
- rowIndex = mainExcel.createCaption(rowIndex, "기본정보"); |
|
81 |
- rowIndex = mainExcel.createVertical(mainResource, mainDataList, rowIndex); |
|
82 |
- |
|
83 |
- rowIndex = mainExcel.createHr(rowIndex); // 구분선 |
|
84 |
- rowIndex = mainExcel.createCaption(rowIndex, "진행단계 및 지원방안"); |
|
85 |
- ExcelCreateService<RvwMttrPrgrsExcelDTO> prgrsExcel = new ExcelCreateService(workbook, sheet, prgrsList, prgrsList.getClass()); |
|
86 |
- rowIndex = prgrsExcel.createVH(prgrsResource, prgrsList, rowIndex); |
|
87 |
- |
|
88 |
- // 엑셀 사이즈 지정 |
|
89 |
- sheetSize(sheet, 2); |
|
90 |
- |
|
91 |
- // 엑셀 파일 출력 |
|
92 |
- writeExcel(response, workbook, mainResource); |
|
93 |
- } |
|
94 |
- |
|
95 |
- // 기업정보 |
|
96 |
- @Override |
|
97 |
- public void entInfoExcelDownload(HttpServletResponse response, EntInfoExcelDTO entInfo, List<BplcExcelDTO> bplcList) throws Exception { |
|
98 |
- // 기본 세팅 |
|
99 |
- Workbook workbook = new SXSSFWorkbook(); |
|
100 |
- Sheet sheet = workbook.createSheet(); |
|
101 |
- int rowIndex = 0; |
|
102 |
- |
|
103 |
- // 개별 설정 |
|
104 |
- ExcelRenderResource mainResource = ExcelRenderResourceFactory.prepareRenderResource(EntInfoExcelDTO.class); |
|
105 |
- List<EntInfoExcelDTO> mainDataList = new ArrayList<>(); |
|
106 |
- mainDataList.add(entInfo); |
|
107 |
- |
|
108 |
- ExcelRenderResource bplcResource = ExcelRenderResourceFactory.prepareRenderResource(BplcExcelDTO.class); |
|
109 |
- |
|
110 |
- // 엑셀 그리기 |
|
111 |
- ExcelCreateService<EntInfoExcelDTO> mainExcel = new ExcelCreateService(workbook, sheet, mainDataList, mainDataList.getClass()); |
|
112 |
- rowIndex = mainExcel.createCaption(rowIndex, "기본정보"); |
|
113 |
- rowIndex = mainExcel.createVerticalByEntInfo(mainResource, mainDataList, rowIndex); |
|
114 |
- |
|
115 |
- rowIndex = mainExcel.createHr(rowIndex); // 구분선 |
|
116 |
- rowIndex = mainExcel.createCaption(rowIndex, "주요사업장"); |
|
117 |
- ExcelCreateService<BplcExcelDTO> bplcExcel = new ExcelCreateService(workbook, sheet, bplcList, bplcList.getClass()); |
|
118 |
- bplcExcel.createVertical(bplcResource, bplcList, rowIndex); |
|
119 |
- |
|
120 |
- // 엑셀 사이즈 지정 |
|
121 |
- sheetSize(sheet, 2); |
|
122 |
- |
|
123 |
- // 엑셀 파일 출력 |
|
124 |
- writeExcel(response, workbook, mainResource); |
|
125 | 32 |
} |
126 | 33 |
|
127 | 34 |
// 통계관리 |
... | ... | @@ -154,27 +61,7 @@ |
154 | 61 |
} |
155 | 62 |
} |
156 | 63 |
|
157 |
- // 기업정보 전체 다운로드 |
|
158 |
- public void entInfoExcelDownloadAll(HttpServletResponse response, List<EntInfoExcelDTO> mainDataList) throws Exception { |
|
159 |
- // 기본 세팅 |
|
160 |
- Workbook workbook = new SXSSFWorkbook(); |
|
161 |
- Sheet sheet = workbook.createSheet(); |
|
162 |
- int rowIndex = 0; |
|
163 | 64 |
|
164 |
- // 개별 설정 |
|
165 |
- ExcelRenderResource mainResource = ExcelRenderResourceFactory.prepareRenderResource(EntInfoExcelDTO.class); |
|
166 |
- |
|
167 |
- // 엑셀 그리기 |
|
168 |
- ExcelCreateService<EntInfoExcelDTO> mainExcel = new ExcelCreateService(workbook, sheet, mainDataList, mainDataList.getClass()); |
|
169 |
- mainExcel.createByEntInfoAll(mainResource, mainDataList, rowIndex); |
|
170 |
- |
|
171 |
- // 엑셀 사이즈 지정 |
|
172 |
- int cellNumber = mainResource.getDataFieldNames().size(); |
|
173 |
- sheetSize(sheet, cellNumber); |
|
174 |
- |
|
175 |
- // 엑셀 파일 출력 |
|
176 |
- writeExcel(response, workbook, mainResource); |
|
177 |
- } |
|
178 | 65 |
|
179 | 66 |
public void sheetSize(Sheet sheet, int cellNumber){ |
180 | 67 |
((SXSSFSheet)sheet).trackAllColumnsForAutoSizing(); |
--- src/main/java/com/takensoft/portal/entInfo/web/EntInfoController.java
+++ src/main/java/com/takensoft/portal/entInfo/web/EntInfoController.java
... | ... | @@ -1,24 +1,15 @@ |
1 | 1 |
package com.takensoft.portal.entInfo.web; |
2 | 2 |
|
3 | 3 |
import com.takensoft.common.excel.service.ExcelService; |
4 |
-import com.takensoft.common.exception.IdDuplicationException; |
|
5 | 4 |
import com.takensoft.common.message.MessageCode; |
6 |
-import com.takensoft.common.util.ResponseData; |
|
7 | 5 |
import com.takensoft.common.util.ResponseUtil; |
8 |
-import com.takensoft.portal.entInfo.dto.BplcExcelDTO; |
|
9 |
-import com.takensoft.portal.entInfo.dto.EntInfoExcelDTO; |
|
10 | 6 |
import com.takensoft.portal.entInfo.service.EntInfoService; |
11 | 7 |
import com.takensoft.portal.entInfo.vo.EntInfoVO; |
12 | 8 |
import lombok.RequiredArgsConstructor; |
13 |
-import org.springframework.http.HttpHeaders; |
|
14 |
-import org.springframework.http.HttpStatus; |
|
15 |
-import org.springframework.http.MediaType; |
|
16 | 9 |
import org.springframework.http.ResponseEntity; |
17 | 10 |
import org.springframework.web.bind.annotation.*; |
18 | 11 |
import org.springframework.web.multipart.MultipartFile; |
19 | 12 |
|
20 |
-import jakarta.servlet.http.HttpServletResponse; |
|
21 |
-import java.nio.charset.Charset; |
|
22 | 13 |
import java.util.*; |
23 | 14 |
/** |
24 | 15 |
* @author 박정하 |
... | ... | @@ -153,32 +144,4 @@ |
153 | 144 |
} |
154 | 145 |
} |
155 | 146 |
|
156 |
- /** |
|
157 |
- * @author 박정하 |
|
158 |
- * @since 2024.03.25 |
|
159 |
- * @param response, entInfo, bplcList |
|
160 |
- * @return |
|
161 |
- * @throws Exception |
|
162 |
- * |
|
163 |
- * 기업정보 엑셀 다운로드 |
|
164 |
- */ |
|
165 |
- @RequestMapping(path = "/excelDownload.json") |
|
166 |
- public void excelDownload(HttpServletResponse response, @RequestPart EntInfoExcelDTO entInfo, @RequestPart List<BplcExcelDTO> bplcList) throws Exception { |
|
167 |
- excelService.entInfoExcelDownload(response, entInfo, bplcList); |
|
168 |
- } |
|
169 |
- |
|
170 |
- /** |
|
171 |
- * @author 박정하 |
|
172 |
- * @since 2024.06.26 |
|
173 |
- * @param response, params |
|
174 |
- * @return |
|
175 |
- * @throws Exception |
|
176 |
- * |
|
177 |
- * 기업정보 전체 엑셀 다운로드 |
|
178 |
- */ |
|
179 |
- @RequestMapping(path = "/excelDownloadAll.json") |
|
180 |
- public void excelDownloadAll(HttpServletResponse response, @RequestBody HashMap<String, String> params) throws Exception { |
|
181 |
- List<EntInfoExcelDTO> entInfoList = entInfoService.excelDownloadAll(params); |
|
182 |
- excelService.entInfoExcelDownloadAll(response, entInfoList); |
|
183 |
- } |
|
184 | 147 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/portal/ivstDscsn/web/IvstDscsnController.java
+++ src/main/java/com/takensoft/portal/ivstDscsn/web/IvstDscsnController.java
... | ... | @@ -4,17 +4,14 @@ |
4 | 4 |
import com.takensoft.common.message.MessageCode; |
5 | 5 |
import com.takensoft.common.util.ResponseData; |
6 | 6 |
import com.takensoft.common.util.ResponseUtil; |
7 |
-import com.takensoft.portal.ivstDscsn.dto.IvstDscsnExcelDTO; |
|
8 | 7 |
import com.takensoft.portal.ivstDscsn.service.IvstDscsnService; |
9 | 8 |
import com.takensoft.portal.ivstDscsn.vo.IvstDscsnVO; |
10 | 9 |
import lombok.RequiredArgsConstructor; |
11 | 10 |
import org.springframework.http.HttpHeaders; |
12 |
-import org.springframework.http.HttpStatus; |
|
13 | 11 |
import org.springframework.http.MediaType; |
14 | 12 |
import org.springframework.http.ResponseEntity; |
15 | 13 |
import org.springframework.web.bind.annotation.*; |
16 | 14 |
|
17 |
-import jakarta.servlet.http.HttpServletResponse; |
|
18 | 15 |
import java.nio.charset.Charset; |
19 | 16 |
import java.util.*; |
20 | 17 |
/** |
... | ... | @@ -142,14 +139,4 @@ |
142 | 139 |
} |
143 | 140 |
} |
144 | 141 |
|
145 |
- /** |
|
146 |
- * @author 박정하 |
|
147 |
- * @since 2024.03.27 |
|
148 |
- * |
|
149 |
- * 투자상담 엑셀 다운로드 |
|
150 |
- */ |
|
151 |
- @RequestMapping(path = "/excelDownload.json") |
|
152 |
- public void excelDownload(HttpServletResponse response, @RequestBody IvstDscsnExcelDTO ivstDscsn) throws Exception { |
|
153 |
- excelService.ivstDscsnExcelDownload(response, ivstDscsn); |
|
154 |
- } |
|
155 | 142 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/portal/rvwMttr/web/RvwMttrController.java
+++ src/main/java/com/takensoft/portal/rvwMttr/web/RvwMttrController.java
... | ... | @@ -2,22 +2,15 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.common.excel.service.ExcelService; |
4 | 4 |
import com.takensoft.common.message.MessageCode; |
5 |
-import com.takensoft.common.util.ResponseData; |
|
6 | 5 |
import com.takensoft.common.util.ResponseUtil; |
7 |
-import com.takensoft.portal.rvwMttr.dto.RvwMttrExcelDTO; |
|
8 |
-import com.takensoft.portal.rvwMttr.dto.RvwMttrPrgrsExcelDTO; |
|
9 | 6 |
import com.takensoft.portal.rvwMttr.service.RvwMttrService; |
10 | 7 |
import com.takensoft.portal.rvwMttr.vo.RvwMttrVO; |
11 | 8 |
import lombok.RequiredArgsConstructor; |
12 |
-import org.springframework.http.HttpHeaders; |
|
13 |
-import org.springframework.http.HttpStatus; |
|
14 |
-import org.springframework.http.MediaType; |
|
9 |
+ |
|
15 | 10 |
import org.springframework.http.ResponseEntity; |
16 | 11 |
import org.springframework.web.bind.annotation.*; |
17 | 12 |
import org.springframework.web.multipart.MultipartFile; |
18 | 13 |
|
19 |
-import jakarta.servlet.http.HttpServletResponse; |
|
20 |
-import java.nio.charset.Charset; |
|
21 | 14 |
import java.util.*; |
22 | 15 |
/** |
23 | 16 |
* @author 박정하 |
... | ... | @@ -137,14 +130,4 @@ |
137 | 130 |
} |
138 | 131 |
} |
139 | 132 |
|
140 |
- /** |
|
141 |
- * @author 박정하 |
|
142 |
- * @since 2024.04.01 |
|
143 |
- * |
|
144 |
- * 검토사항 엑셀 다운로드 |
|
145 |
- */ |
|
146 |
- @RequestMapping(path = "/excelDownload.file") |
|
147 |
- public void excelDownload(HttpServletResponse response, @RequestPart RvwMttrExcelDTO rvwMttr, @RequestPart List<RvwMttrPrgrsExcelDTO> prgrsList) throws Exception { |
|
148 |
- excelService.rvwMttrExcelDownload(response, rvwMttr, prgrsList); |
|
149 |
- } |
|
150 | 133 |
}(파일 끝에 줄바꿈 문자 없음) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?