From c7b4238a54ce297066e689193fec7064e91ec5a9 Mon Sep 17 00:00:00 2001 From: hjjeong Date: Wed, 29 Oct 2025 11:11:21 +0900 Subject: [PATCH 1/3] =?UTF-8?q?part,=20bom=20=EA=B3=B5=EA=B8=89=EC=97=85?= =?UTF-8?q?=EC=B2=B4=20=EC=84=A0=ED=83=9D->=EC=9E=85=EB=A0=A5=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partMng/openBomReportExcelImportPopUp.jsp | 10 ++++++++ .../view/partMng/openPartExcelImportPopUp.jsp | 12 +++++++++- .../view/partMng/partMngDetailPopUp.jsp | 9 +++++--- .../WEB-INF/view/partMng/partMngFormPopUp.jsp | 7 ++++-- .../WEB-INF/view/partMng/partMngList.jsp | 2 +- .../WEB-INF/view/partMng/partMngTempList.jsp | 2 +- src/com/pms/mapper/partMng.xml | 2 +- src/com/pms/service/PartMngService.java | 23 ++++++++++++++----- 8 files changed, 52 insertions(+), 15 deletions(-) diff --git a/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp b/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp index 47bfa7c..e4331b5 100644 --- a/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp +++ b/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp @@ -319,6 +319,15 @@ $(document).ready(function(){ } } } + // 공급업체 - MAKER 컬럼으로 변경, 일반 텍스트 입력 (2025-10-29) + ,{name:"MAKER",index:"MAKER", width: 120, align:"center", hidden: false, sortable:false, editable:true + ,editoptions:{ + dataInit : function(e){ + e.style.fontSize = 13; + } + } + } + /* 이전 SUPPLY_CODE 셀렉트박스 방식 (주석처리) ,{name:"SUPPLY_CODE",index:"SUPPLY_CODE", width: 120, align:"center", hidden: false, sortable:false, editable:true ,edittype :"select" ,formatter :"select" @@ -330,6 +339,7 @@ $(document).ready(function(){ } } } + */ ,{name:"PART_TYPE" ,index:"PART_TYPE" , width:100, align:"center", hidden:false, sortable:false, editable: true ,edittype :"select" ,formatter :"select" diff --git a/WebContent/WEB-INF/view/partMng/openPartExcelImportPopUp.jsp b/WebContent/WEB-INF/view/partMng/openPartExcelImportPopUp.jsp index 358e148..a56c38e 100644 --- a/WebContent/WEB-INF/view/partMng/openPartExcelImportPopUp.jsp +++ b/WebContent/WEB-INF/view/partMng/openPartExcelImportPopUp.jsp @@ -103,6 +103,15 @@ $(document).ready(function(){ } } } + // 공급업체 - MAKER 컬럼으로 변경, 일반 텍스트 입력 (2025-10-29) + ,{name:"MAKER" ,index:"MAKER" , width:100, align:"center", hidden:false, sortable:false, editable: true + ,editoptions:{ + dataInit : function(e){ + e.style.fontSize = 13; + } + } + } + /* 이전 SUP_CODE 셀렉트박스 방식 (주석처리) ,{name:"SUP_CODE" ,index:"SUP_CODE" , width:100, align:"center", hidden:false, sortable:false, editable: true ,edittype :"select" ,formatter :"select" @@ -113,7 +122,8 @@ $(document).ready(function(){ e.style.fontSize = 13; } } - } + } + */ // ,{name:"SPEC",index:"SPEC", width: 150, align:"center", hidden: false, sortable:false, editable:true // ,editoptions:{ // dataInit : function(e){ diff --git a/WebContent/WEB-INF/view/partMng/partMngDetailPopUp.jsp b/WebContent/WEB-INF/view/partMng/partMngDetailPopUp.jsp index e25684b..76e613b 100644 --- a/WebContent/WEB-INF/view/partMng/partMngDetailPopUp.jsp +++ b/WebContent/WEB-INF/view/partMng/partMngDetailPopUp.jsp @@ -315,7 +315,7 @@ function fn_enableEdit(){ $('#HEAT_TREATMENT_HARDNESS').prop('readonly', false).prop('disabled', false); $('#HEAT_TREATMENT_METHOD').prop('readonly', false).prop('disabled', false); $('#SURFACE_TREATMENT').prop('readonly', false).prop('disabled', false); - $('#SUPPLY_CODE').prop('disabled', false); + $('#MAKER').prop('readonly', false).prop('disabled', false); $('#PART_TYPE').prop('disabled', false); $('#REMARK').prop('readonly', false).prop('disabled', false); @@ -347,7 +347,7 @@ function fn_save(){ HEAT_TREATMENT_HARDNESS: $('#HEAT_TREATMENT_HARDNESS').val(), HEAT_TREATMENT_METHOD: $('#HEAT_TREATMENT_METHOD').val(), SURFACE_TREATMENT: $('#SURFACE_TREATMENT').val(), - SUPPLY_CODE: $('#SUPPLY_CODE').val(), + MAKER: $('#MAKER').val(), PART_TYPE: $('#PART_TYPE').val(), REMARK: $('#REMARK').val() }; @@ -483,10 +483,13 @@ function fn_edit(){ + + + diff --git a/WebContent/WEB-INF/view/partMng/partMngFormPopUp.jsp b/WebContent/WEB-INF/view/partMng/partMngFormPopUp.jsp index c0fb2f4..c48dee6 100644 --- a/WebContent/WEB-INF/view/partMng/partMngFormPopUp.jsp +++ b/WebContent/WEB-INF/view/partMng/partMngFormPopUp.jsp @@ -357,11 +357,14 @@ function fn_overlapPartMng(){ - + + + + diff --git a/WebContent/WEB-INF/view/partMng/partMngList.jsp b/WebContent/WEB-INF/view/partMng/partMngList.jsp index 07e6a01..8d69036 100644 --- a/WebContent/WEB-INF/view/partMng/partMngList.jsp +++ b/WebContent/WEB-INF/view/partMng/partMngList.jsp @@ -179,7 +179,7 @@ String connector = person.getUserId(); {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '열처리경도', field : 'HEAT_TREATMENT_HARDNESS' }, {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '열처리방법', field : 'HEAT_TREATMENT_METHOD' }, {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '표면처리', field : 'SURFACE_TREATMENT' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '150', title : '공급업체', field : 'SUPPLY_NAME' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '150', title : '공급업체', field : 'MAKER' }, {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '범주 이름', field : 'PART_TYPE_TITLE' }, // {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '재질', field : 'MATERIAL' }, diff --git a/WebContent/WEB-INF/view/partMng/partMngTempList.jsp b/WebContent/WEB-INF/view/partMng/partMngTempList.jsp index d09ae82..edd2b87 100644 --- a/WebContent/WEB-INF/view/partMng/partMngTempList.jsp +++ b/WebContent/WEB-INF/view/partMng/partMngTempList.jsp @@ -171,7 +171,7 @@ ui-jqgrid tr.jqgrow td { {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '열처리경도', field : 'HEAT_TREATMENT_HARDNESS' }, {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '열처리방법', field : 'HEAT_TREATMENT_METHOD' }, {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '표면처리', field : 'SURFACE_TREATMENT' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '150', title : '공급업체', field : 'SUPPLY_NAME' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '150', title : '공급업체', field : 'MAKER' }, {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '범주 이름', field : 'PART_TYPE_TITLE' }, // {headerHozAlign : 'center', hozAlign : 'left', width : '190', title : '사양(규격)', field : 'SPEC' }, diff --git a/src/com/pms/mapper/partMng.xml b/src/com/pms/mapper/partMng.xml index 1d3ffcf..78ee0c2 100644 --- a/src/com/pms/mapper/partMng.xml +++ b/src/com/pms/mapper/partMng.xml @@ -2635,7 +2635,7 @@ SELECT T1.LEV, T1.BOM_REPORT_OBJID, T1.ROOT_PART_NO, T1.PATH, T1.LEAF, T2.* HEAT_TREATMENT_HARDNESS = #{HEAT_TREATMENT_HARDNESS}, HEAT_TREATMENT_METHOD = #{HEAT_TREATMENT_METHOD}, SURFACE_TREATMENT = #{SURFACE_TREATMENT}, - SUPPLY_CODE = #{SUPPLY_CODE}, + MAKER = #{MAKER}, PART_TYPE = #{PART_TYPE}, REMARK = #{REMARK}, EDIT_DATE = NOW() diff --git a/src/com/pms/service/PartMngService.java b/src/com/pms/service/PartMngService.java index f8b1eb9..696c78b 100644 --- a/src/com/pms/service/PartMngService.java +++ b/src/com/pms/service/PartMngService.java @@ -2933,9 +2933,11 @@ public class PartMngService extends BaseService { //MAKER // partMap.put("MAKER", getCellValue(row, columnIndex++, formatter, emptyColCnt)); - //공급업체 + //공급업체 - MAKER 컬럼에 텍스트로 저장 (2025-10-29) cellValue = getCellValue(row, columnIndex++, formatter, emptyColCnt); -// if(StringUtils.isBlank(cellValue)) emptyColCnt++; + partMap.put("MAKER", cellValue); // 공급업체명을 MAKER에 저장 + + /* 이전 공급업체 코드 조회 방식 (주석처리) partMap.put("SUP_CODE", columnIndex); if(!CommonUtils.isBlank(cellValue)){ sqlParamMap.clear(); @@ -2950,6 +2952,7 @@ public class PartMngService extends BaseService { setErrMapByExcel(resultColumn, resultList, partMap, true, "공급업체 확인:"+cellValue, cellValue); } } + */ //PART구분(부품유형) cellValue = getCellValue(row, columnIndex++, formatter, emptyColCnt); @@ -3292,7 +3295,10 @@ public class PartMngService extends BaseService { } } - // SUPPLY_CODE 코드 조회 (공급업체명 -> OBJID 변환) + // 공급업체 - MAKER 컬럼에 텍스트로 저장 (2025-10-29) + String makerValue = supplier; // 공급업체명을 그대로 사용 + + /* 이전 공급업체 코드 조회 방식 (주석처리) String supplyCode = ""; if(!StringUtils.isBlank(supplier)) { Map sqlParamMap = new HashMap(); @@ -3305,6 +3311,7 @@ public class PartMngService extends BaseService { noteMsg += "공급업체 확인:" + supplier + ";"; } } + */ // Map에 데이터 저장 partMap.put("LEVEL", level); // 수준 값 (화면 표시용) @@ -3317,7 +3324,7 @@ public class PartMngService extends BaseService { partMap.put("HEAT_TREATMENT_HARDNESS", heatTreatmentHardness); partMap.put("HEAT_TREATMENT_METHOD", heatTreatmentMethod); partMap.put("SURFACE_TREATMENT", surfaceTreatment); - partMap.put("SUPPLY_CODE", supplyCode); + partMap.put("MAKER", makerValue); // MAKER에 저장 partMap.put("PART_TYPE", partTypeCode); partMap.put("NOTE", noteMsg); @@ -3640,7 +3647,10 @@ public class PartMngService extends BaseService { } } - // SUPPLY_CODE 코드 조회 (공급업체명 -> OBJID 변환) + // 공급업체 - MAKER 컬럼에 텍스트로 저장 (2025-10-29) + String makerValue = supplier; // 공급업체명을 그대로 사용 + + /* 이전 공급업체 코드 조회 방식 (주석처리) String supplyCode = ""; if(!StringUtils.isBlank(supplier)) { Map sqlParamMap = new HashMap(); @@ -3653,6 +3663,7 @@ public class PartMngService extends BaseService { noteMsg += "공급업체 확인:" + supplier + ";"; } } + */ // Map에 데이터 저장 partMap.put("PARENT_PART_NO", parentPartNo); @@ -3664,7 +3675,7 @@ public class PartMngService extends BaseService { partMap.put("HEAT_TREATMENT_HARDNESS", heatHardness); partMap.put("HEAT_TREATMENT_METHOD", heatMethod); partMap.put("SURFACE_TREATMENT", surfaceTreatment); - partMap.put("SUPPLY_CODE", supplyCode); + partMap.put("MAKER", makerValue); // MAKER에 저장 partMap.put("PART_TYPE", partTypeCode); partMap.put("NOTE", noteMsg); From 39593ab3bc237d035dd3b8241e103ae44a055ef5 Mon Sep 17 00:00:00 2001 From: hjjeong Date: Wed, 29 Oct 2025 11:53:03 +0900 Subject: [PATCH 2/3] =?UTF-8?q?csv=EB=A7=8C=20=EC=97=85=EB=A1=9C=EB=93=9C,?= =?UTF-8?q?=20csv=20=ED=8A=B9=EC=88=98=EB=AC=B8=EC=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/partMng/openBomReportExcelImportPopUp.jsp | 9 +++++---- src/com/pms/service/PartMngService.java | 11 ++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp b/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp index e4331b5..e1df229 100644 --- a/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp +++ b/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp @@ -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(){
-

PART 및 구조등록 Excel/CSV upload

+

PART 및 구조등록 CSV upload

@@ -1094,10 +1095,10 @@ function fn_save(){
-
   Excel/CSV upload
+
   CSV upload
-
Drag & Drop 엑셀 템플릿
+
Drag & Drop CSV 템플릿
diff --git a/src/com/pms/service/PartMngService.java b/src/com/pms/service/PartMngService.java index 696c78b..d495923 100644 --- a/src/com/pms/service/PartMngService.java +++ b/src/com/pms/service/PartMngService.java @@ -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; From 33f43277264546dfba270cfa68a51831ed2fae23 Mon Sep 17 00:00:00 2001 From: hjjeong Date: Wed, 29 Oct 2025 12:13:00 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=EC=BB=AC=EB=9F=BC=20=EB=84=88=EB=B9=84=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partMng/openBomReportExcelImportPopUp.jsp | 6 ++-- .../WEB-INF/view/partMng/partMngList.jsp | 4 +-- .../WEB-INF/view/partMng/partMngTempList.jsp | 4 +-- .../view/partMng/structureAscendingList.jsp | 36 +++++++++---------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp b/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp index e1df229..0428bf8 100644 --- a/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp +++ b/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp @@ -257,21 +257,21 @@ $(document).ready(function(){ } } } - ,{name:"PARENT_PART_NO",index:"PARENT_PART_NO", width: 140, align:"center", hidden: false, sortable:false, editable:true + ,{name:"PARENT_PART_NO",index:"PARENT_PART_NO", width: 200, align:"center", hidden: false, sortable:false, editable:true ,editoptions:{ dataInit : function(e){ e.style.fontSize = 13; } } } - ,{name:"PART_NO",index:"PART_NO", width: 140, align:"center", hidden: false, sortable:false, editable:true + ,{name:"PART_NO",index:"PART_NO", width: 200, align:"center", hidden: false, sortable:false, editable:true ,editoptions:{ dataInit : function(e){ e.style.fontSize = 13; } } } - ,{name:"PART_NAME",index:"PART_NAME", width: 200, align:"center", hidden: false, sortable:false, editable:true + ,{name:"PART_NAME",index:"PART_NAME", width: 250, align:"center", hidden: false, sortable:false, editable:true ,editoptions:{ dataInit : function(e){ e.style.fontSize = 13; diff --git a/WebContent/WEB-INF/view/partMng/partMngList.jsp b/WebContent/WEB-INF/view/partMng/partMngList.jsp index fb8e84e..2324081 100644 --- a/WebContent/WEB-INF/view/partMng/partMngList.jsp +++ b/WebContent/WEB-INF/view/partMng/partMngList.jsp @@ -139,14 +139,14 @@ String connector = person.getUserId(); }, */ //{headerHozAlign : 'center', hozAlign : 'left', width : '125', title : '모품번', field : 'PARENT_PART_INFO' }, - {headerHozAlign : 'center', hozAlign : 'left', width : '180', title : '품번', field : 'PART_NO', + {headerHozAlign : 'center', hozAlign : 'left', width : '200', title : '품번', field : 'PART_NO', formatter:fnc_createGridAnchorTag, cellClick:function(e, cell){ var objid = fnc_checkNull(cell.getData().OBJID); openPartMngPopup(objid); } }, - {headerHozAlign : 'center', hozAlign : 'left', width : '180', title : '품명', field : 'PART_NAME' }, + {headerHozAlign : 'center', hozAlign : 'left', /*width : '200',*/ title : '품명', field : 'PART_NAME' }, // {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '수량', field : 'BOM_QTY' }, //Q_QTY QTY QTY_P {headerHozAlign : 'center', hozAlign : 'center', width : '60', title : '3D', field : 'CU01_CNT', formatter:fnc_subInfoValueFormatter, diff --git a/WebContent/WEB-INF/view/partMng/partMngTempList.jsp b/WebContent/WEB-INF/view/partMng/partMngTempList.jsp index 1414cc4..291e6c1 100644 --- a/WebContent/WEB-INF/view/partMng/partMngTempList.jsp +++ b/WebContent/WEB-INF/view/partMng/partMngTempList.jsp @@ -131,14 +131,14 @@ ui-jqgrid tr.jqgrow td { // {headerHozAlign : 'center', hozAlign : 'center', width : '60', title : '순', field : 'RNUM' ,frozen:true}, // {headerHozAlign : 'center', hozAlign : 'left', width : '125', title : '모품번', field : 'PARENT_PART_INFO' ,frozen:true}, - {headerHozAlign : 'center', hozAlign : 'left', width : '180', title : '품번', field : 'PART_NO',frozen:true, + {headerHozAlign : 'center', hozAlign : 'left', width : '200', title : '품번', field : 'PART_NO',frozen:true, formatter:fnc_createGridAnchorTag, cellClick:function(e, cell){ var objid = fnc_checkNull(cell.getData().OBJID); openPartMngPopup(objid); } }, - {headerHozAlign : 'center', hozAlign : 'left', width : '180', title : '품명', field : 'PART_NAME' ,frozen:true}, + {headerHozAlign : 'center', hozAlign : 'left', /*width : '200',*/ title : '품명', field : 'PART_NAME' ,frozen:true}, // {headerHozAlign : 'center', hozAlign : 'center', width : '70', title : '수량', field : 'Q_QTY' }, {headerHozAlign : 'center', hozAlign : 'center', width : '60', title : '3D', field : 'CU01_CNT', formatter:fnc_subInfoValueFormatter, diff --git a/WebContent/WEB-INF/view/partMng/structureAscendingList.jsp b/WebContent/WEB-INF/view/partMng/structureAscendingList.jsp index 4630f29..78ecd16 100644 --- a/WebContent/WEB-INF/view/partMng/structureAscendingList.jsp +++ b/WebContent/WEB-INF/view/partMng/structureAscendingList.jsp @@ -834,23 +834,23 @@ function fn_excelExport(pGridObj,pFileName){ - - + + - - - - - + + + + + - + @@ -902,23 +902,23 @@ function fn_excelExport(pGridObj,pFileName){ - - + + - - - - - + + + + + - + @@ -965,11 +965,11 @@ function fn_excelExport(pGridObj,pFileName){ - + - +
${item.MATERIAL}${item.MATERIAL} ${item.HEAT_TREATMENT_HARDNESS} ${item.HEAT_TREATMENT_METHOD} ${item.SURFACE_TREATMENT}${item.SUPPLY_NAME}${item.MAKER} ${item.PART_TYPE_TITLE} ${item.REVISION} ${item.EO_NO}