fix: 엑셀 파일 경로 구분자를 File.separator로 변경 (Linux 환경 FileNotFoundException 수정)

Windows 백슬래시(\) 하드코딩으로 Linux 환경에서 파일을 찾지 못하는 버그 수정
- 11개 파일, 15군데 path+"\\"+fileName → path + File.separator + fileName
- File import 누락된 4개 파일에 import 추가

Made-with: Cursor
This commit is contained in:
2026-03-03 13:41:21 +09:00
parent 2dc3f34b39
commit ea5c6d53a7
11 changed files with 19 additions and 15 deletions

View File

@@ -9,6 +9,7 @@
*/
package com.pms.ions.itemmgmt.service;
import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.Date;
@@ -155,7 +156,7 @@ public class BomService {
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);

View File

@@ -86,7 +86,7 @@ public class ExcelRegInvenService {
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
FormulaEvaluator formulaEval = workBook.getCreationHelper().createFormulaEvaluator();
XSSFSheet sheet = workBook.getSheetAt(0);

View File

@@ -9,6 +9,7 @@
*/
package com.pms.salesmgmt.service;
import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.Arrays;
@@ -1385,7 +1386,7 @@ public class SalesMngService {
HashMap fileMap = (HashMap)fileList.get(0);
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
/*
Workbook workBook = null;

View File

@@ -958,7 +958,7 @@ public class OrderMgmtService {
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
FormulaEvaluator formulaEval = workBook.getCreationHelper().createFormulaEvaluator();
XSSFSheet sheet = workBook.getSheetAt(0);
@@ -1189,7 +1189,7 @@ public class OrderMgmtService {
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);
HashMap partMap = new HashMap();

View File

@@ -975,7 +975,7 @@ public class OrderMngService {
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
FormulaEvaluator formulaEval = workBook.getCreationHelper().createFormulaEvaluator();
XSSFSheet sheet = workBook.getSheetAt(0);
@@ -1206,7 +1206,7 @@ public class OrderMngService {
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);
HashMap partMap = new HashMap();

View File

@@ -1498,7 +1498,7 @@ public class PartMgmtService {
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
FormulaEvaluator formulaEval = workBook.getCreationHelper().createFormulaEvaluator();
XSSFSheet sheet = workBook.getSheetAt(0);
@@ -2170,7 +2170,7 @@ public class PartMgmtService {
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);
HashMap partMap = new HashMap();

View File

@@ -1139,7 +1139,7 @@ public class PartService extends BaseService{
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);
@@ -1736,7 +1736,7 @@ public class PartService extends BaseService{
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);

View File

@@ -423,7 +423,7 @@ public class ProductMgmtService {
System.out.println("fileName ---------------->"+fileName);
System.out.println("fileName ---------------->"+fileName);
System.out.println("fileName ---------------->"+fileName);
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
FormulaEvaluator formulaEval = workBook.getCreationHelper().createFormulaEvaluator();
XSSFSheet sheet = workBook.getSheetAt(0);

View File

@@ -2788,7 +2788,7 @@ public class ProjectService {
int lastColumnIndex = 2;
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);

View File

@@ -1,5 +1,6 @@
package com.pms.utility;
import java.io.File;
import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.DriverManager;
@@ -58,7 +59,7 @@ public class WBSParsingUtil {
List resultList = new ArrayList();
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);
Connection conn = null;

View File

@@ -1,5 +1,6 @@
package com.pms.utility;
import java.io.File;
import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.DriverManager;
@@ -58,7 +59,7 @@ public class WBSTemplateParser {
List resultList = new ArrayList();
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);
Connection conn = null;