From 2c0a8a35b32921f5d28ff7a20f5a8ec39b669490 Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 24 Feb 2026 17:46:53 +0900 Subject: [PATCH] =?UTF-8?q?[1375]=EC=9D=B8=EC=A6=9D=EC=9A=A9=EB=9F=89=20?= =?UTF-8?q?=EC=BF=BC=EB=A6=AC=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/biz/estimate/EstimateService.java | 4 + .../com/interplug/qcast/util/ExcelUtil.java | 6 +- .../mappers/estimate/estimateMapper.xml | 180 +++++++----------- 3 files changed, 78 insertions(+), 112 deletions(-) diff --git a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java index 762dd534..cc870e12 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -1824,6 +1824,10 @@ public class EstimateService { byte[] excelBytes = excelUtil.download(request, response, excelData, excelList, excelTemplateNam); + if (excelBytes == null || excelBytes.length == 0) { + throw new RuntimeException("Excel template processing returned empty result. Template: " + excelTemplateNam); + } + InputStream in = new ByteArrayInputStream(excelBytes); workbook = WorkbookFactory.create(in); // JXLS POI 엑셀로 재변환 diff --git a/src/main/java/com/interplug/qcast/util/ExcelUtil.java b/src/main/java/com/interplug/qcast/util/ExcelUtil.java index a725d097..44925563 100644 --- a/src/main/java/com/interplug/qcast/util/ExcelUtil.java +++ b/src/main/java/com/interplug/qcast/util/ExcelUtil.java @@ -69,7 +69,8 @@ public class ExcelUtil { excelBytes = byteArrayOutputStream.toByteArray(); } } catch (Exception e) { - log.debug(e.getMessage()); + log.error("ExcelUtil.download error: {}", e.getMessage(), e); + throw new RuntimeException("Excel template processing failed", e); } return excelBytes; @@ -118,7 +119,8 @@ public class ExcelUtil { JxlsHelper.getInstance().processTemplate(is, os, context); } } catch (Exception e) { - log.debug(e.getMessage()); + log.error("ExcelUtil.download error: {}", e.getMessage(), e); + throw new RuntimeException("Excel template processing failed", e); } } diff --git a/src/main/resources/mappers/estimate/estimateMapper.xml b/src/main/resources/mappers/estimate/estimateMapper.xml index fb721f5c..0ab01ebd 100644 --- a/src/main/resources/mappers/estimate/estimateMapper.xml +++ b/src/main/resources/mappers/estimate/estimateMapper.xml @@ -396,116 +396,76 @@ -- 2.47.2