Merge branch 'main' into V20251023001

This commit is contained in:
Johngreen
2025-10-29 12:34:12 +09:00
9 changed files with 92 additions and 45 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(){
@@ -256,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;
@@ -319,6 +320,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 +340,7 @@ $(document).ready(function(){
}
}
}
*/
,{name:"PART_TYPE" ,index:"PART_TYPE" , width:100, align:"center", hidden:false, sortable:false, editable: true
,edittype :"select"
,formatter :"select"
@@ -929,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>
@@ -1084,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

@@ -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){

View File

@@ -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(){
<label for="">공급업체</label>
</td>
<td class="input_sub_title" colspan="2">
<input type="text" name="MAKER" id="MAKER" value="${resultMap.MAKER}">
</td>
<!-- <td class="input_sub_title" colspan="2">
<select name="SUPPLY_CODE" id="SUPPLY_CODE" class="select2">
${code_map.SUPPLY_CODE}
</select>
</td>
</td> -->
<td class="input_title">
<label for="">범주 이름</label>

View File

@@ -357,11 +357,14 @@ function fn_overlapPartMng(){
<td class="input_title">
<label for="">공급업체</label>
</td>
<td class="input_sub_title" colspan="2">
<td class="input_sub_title" colspan="">
<input type="text" name="MAKER" id="MAKER" value="${resultMap.MAKER}">
</td>
<!-- <td class="input_sub_title" colspan="2">
<select name="SUPPLY_CODE" id="SUPPLY_CODE" class="select2">
${code_map.SUPPLY_CODE}
</select>
</td>
</td> -->
<td class="input_title">
<label for="">범주이름</label>

View File

@@ -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,
@@ -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' },

View File

@@ -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,
@@ -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' },

View File

@@ -834,23 +834,23 @@ function fn_excelExport(pGridObj,pFileName){
</c:forEach>
</c:when>
</c:choose>
<col width="120px" /> <!-- 품번 -->
<col width="150px" /> <!-- 품명 -->
<col width="200px" /> <!-- 품번 -->
<col width="200px" /> <!-- 품명 -->
<col width="35px" /> <!-- Qty -->
<col width="50px" /> <!-- P_Qty -->
<col width="30px" /> <!-- 3D -->
<col width="30px" /> <!-- 2D -->
<col width="30px" /> <!-- 2D PDF -->
<col width="100px" /> <!-- 재료 -->
<col width="130px" /> <!-- 열처리경도 -->
<col width="150px" /> <!-- 열처리방법 -->
<col width="150px" /> <!-- 표면처리 -->
<col width="100px" /> <!-- 공급업체 -->
<col width="90px" /> <!-- 재료 -->
<col width="90px" /> <!-- 열처리경도 -->
<col width="90px" /> <!-- 열처리방법 -->
<col width="90px" /> <!-- 표면처리 -->
<col width="90px" /> <!-- 공급업체 -->
<col width="80px" /> <!-- PART 타입 -->
<col width="60px" /> <!-- REVISION -->
<col width="70px" /> <!-- EO No -->
<col width="70px" /> <!-- EO Date -->
<col width="230px" /> <!-- REMARK -->
<col width="200px" /> <!-- REMARK -->
</colgroup>
<thead>
<tr class="plm_thead">
@@ -902,23 +902,23 @@ function fn_excelExport(pGridObj,pFileName){
</c:forEach>
</c:when>
</c:choose>
<col width="120px" /> <!-- 품번 -->
<col width="150px" /> <!-- 품명 -->
<col width="200px" /> <!-- 품번 -->
<col width="200px" /> <!-- 품명 -->
<col width="35px" /> <!-- Qty -->
<col width="50px" /> <!-- P_Qty -->
<col width="30px" /> <!-- 3D -->
<col width="30px" /> <!-- 2D -->
<col width="30px" /> <!-- 2D PDF -->
<col width="100px" /> <!-- 재료 -->
<col width="130px" /> <!-- 열처리경도 -->
<col width="150px" /> <!-- 열처리방법 -->
<col width="150px" /> <!-- 표면처리 -->
<col width="100px" /> <!-- 공급업체 -->
<col width="90px" /> <!-- 재료 -->
<col width="90px" /> <!-- 열처리경도 -->
<col width="90px" /> <!-- 열처리방법 -->
<col width="90px" /> <!-- 표면처리 -->
<col width="90px" /> <!-- 공급업체 -->
<col width="80px" /> <!-- PART 타입 -->
<col width="60px" /> <!-- REVISION -->
<col width="70px" /> <!-- EO No -->
<col width="70px" /> <!-- EO Date -->
<col width="230px" /> <!-- REMARK -->
<col width="200px" /> <!-- REMARK -->
</colgroup>
<c:choose>
<c:when test="${empty List}">
@@ -965,11 +965,11 @@ function fn_excelExport(pGridObj,pFileName){
<td><a href="#" class="File file_${item.FILE_3D_CNT eq 0?'empty_':''}icon" data-OBJID="${item.PART_OBJID}" data-docType="3D_CAD" data-docTypeName="3D CAD 첨부파일"></a></td>
<td><a href="#" class="File file_${item.FILE_2D_CNT eq 0?'empty_':''}icon" data-OBJID="${item.PART_OBJID}" data-docType="2D_DRAWING_CAD" data-docTypeName="2D(Drawing) CAD 첨부파일"></a></td>
<td><a href="#" class="File file_${item.FILE_PDF_CNT eq 0?'empty_':''}icon" data-OBJID="${item.PART_OBJID}" data-docType="2D_PDF_CAD" data-docTypeName="2D(PDF) CAD 첨부파일"></a></td>
<td title="${item.MATERIAL}" class="align_c">${item.MATERIAL}</td><!-- 재료 -->
<td title="${item.MATERIAL}" class="align_l">${item.MATERIAL}</td><!-- 재료 -->
<td title="${item.HEAT_TREATMENT_HARDNESS}" class="align_l" style="text-align: left; padding-left: 5px;">${item.HEAT_TREATMENT_HARDNESS}</td><!-- 열처리경도 -->
<td title="${item.HEAT_TREATMENT_METHOD}" class="align_l" style="text-align: left; padding-left: 5px;">${item.HEAT_TREATMENT_METHOD}</td><!-- 열처리방법 -->
<td title="${item.SURFACE_TREATMENT}" class="align_l" style="text-align: left; padding-left: 5px;">${item.SURFACE_TREATMENT}</td><!-- 표면처리 -->
<td title="${item.SUPPLY_NAME}" class="align_l" style="text-align: left; padding-left: 5px;">${item.SUPPLY_NAME}</td><!-- 공급업체 -->
<td title="${item.MAKER}" class="align_l" style="text-align: left; padding-left: 5px;">${item.MAKER}</td><!-- 공급업체 -->
<td title="${item.PART_TYPE_TITLE}" class="align_c">${item.PART_TYPE_TITLE}</td><!-- PART_TYPE -->
<td title="${item.REVISION}" class="align_c" style="text-align: left; padding-left: 5px;">${item.REVISION}</td><!-- REVISION -->
<td title="${item.EO_NO}" class="align_c" style="text-align: left; padding-left: 5px;">${item.EO_NO}</td><!-- EO_NO -->

View File

@@ -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()

View File

@@ -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);
@@ -3156,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;
@@ -3292,7 +3304,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 +3320,7 @@ public class PartMngService extends BaseService {
noteMsg += "공급업체 확인:" + supplier + ";";
}
}
*/
// Map에 데이터 저장
partMap.put("LEVEL", level); // 수준 값 (화면 표시용)
@@ -3317,7 +3333,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 +3656,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 +3672,7 @@ public class PartMngService extends BaseService {
noteMsg += "공급업체 확인:" + supplier + ";";
}
}
*/
// Map에 데이터 저장
partMap.put("PARENT_PART_NO", parentPartNo);
@@ -3664,7 +3684,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);