csv만 업로드, csv 특수문자

This commit is contained in:
2025-10-29 11:53:03 +09:00
parent c27a20012a
commit 39593ab3bc
2 changed files with 15 additions and 5 deletions

View File

@@ -185,7 +185,8 @@ $(document).ready(function(){
//fnc_productUPGNEWList("","${product_mgmt_spec}","param_upg_no", "${upg_no}");
//fnc_datepick();
fnc_setFileDropZone("excelImportDropZone", "${objid}", "PART_EXCEL_IMPORT", "Part Excel Import Template", "setExcelFileArea",true,"fileDelete","/part/excelImportFileProc.do");
// CSV 파일만 업로드 가능하도록 설정 (2025-10-29)
fnc_setFileDropZone("excelImportDropZone", "${objid}", "PART_EXCEL_IMPORT", "Part Excel Import Template", "setExcelFileArea",true,"fileDelete","/part/excelImportFileProc.do", "csv");
fnc_setFileDropZone("partAttachFileDropZone", "${objid}", "PART_IMPORT_ATTACH", "Import Part Attach File", "setPartFileArea",false,null,"/part/partImportFileProc.do");
$("#templateDownload").click(function(){
@@ -939,7 +940,7 @@ function fn_save(){
<section>
<div class="plm_menu_name">
<h2><span>PART 및 구조등록 Excel/CSV upload</span></h2>
<h2><span>PART 및 구조등록 CSV upload</span></h2>
</div>
</section>
@@ -1094,10 +1095,10 @@ function fn_save(){
<div style="width:100%; display: inline-block; float:left;">
<div style=" margin: 0 8px;">
<div id="partExcelPopupFormWrap">
<div class="form_popup_title" style="position:relative;">&nbsp;&nbsp;&nbsp;Excel/CSV upload<!--<img src="/images/btnExcel.png" style="position:absolute; top:9px; right:135px;"/><span style="position:absolute; top:0px; right:10px; cursor:pointer;" id="templateDownload">Template Download</span>--></div>
<div class="form_popup_title" style="position:relative;">&nbsp;&nbsp;&nbsp;CSV upload<!--<img src="/images/btnExcel.png" style="position:absolute; top:9px; right:135px;"/><span style="position:absolute; top:0px; right:10px; cursor:pointer;" id="templateDownload">Template Download</span>--></div>
<div id="excelUploadPopupForm">
<div class="fileDnDWrap">
<div id="excelImportDropZone" class="dropzone" style="height:50px;">Drag & Drop 엑셀 템플릿</div>
<div id="excelImportDropZone" class="dropzone" style="height:50px;">Drag & Drop CSV 템플릿</div>
<div id="excelImportList">
<table id="excelImportTable" class="excelUploadPopupForm">
<thead>

View File

@@ -3159,7 +3159,16 @@ public class PartMngService extends BaseService {
try {
File csvFile = new File(path + "\\" + fileName);
br = new BufferedReader(new InputStreamReader(new FileInputStream(csvFile), "UTF-8"));
// UTF-8 BOM 처리를 위한 InputStreamReader 설정
FileInputStream fis = new FileInputStream(csvFile);
InputStreamReader isr = new InputStreamReader(fis, "UTF-8");
br = new BufferedReader(isr);
// UTF-8 BOM 제거 (EF BB BF)
br.mark(1);
if (br.read() != 0xFEFF) {
br.reset(); // BOM이 아니면 처음으로 되돌림
}
String line;
int rowIndex = 0;