Merge pull request 'V20251023001' (#47) from V20251023001 into main

Reviewed-on: #47
This commit was merged in pull request #47.
This commit is contained in:
2025-10-31 02:17:31 +00:00
3 changed files with 18 additions and 15 deletions

View File

@@ -479,7 +479,7 @@ function fn_uploadDrawingFiles(files) {
msg += '- PDF: ' + filesByType['PDF'].length + '개';
Swal.fire({
title: '도면 업로드',
title: '도면 다증 업로드',
text: msg,
icon: 'question',
showCancelButton: true,
@@ -596,7 +596,7 @@ function fn_processDrawingUpload(bomObjId, filesByType) {
</c:choose>
</span>
<input type="button" value="Excel Download" class="plm_btns structure_btn" id="btnExcel" style="float:right;">
<input type="button" value="도면 업로드" class="plm_btns structure_btn" id="btnDrawingUpload" style="float:right; margin-right:5px;">
<input type="button" value="도면 다중 업로드" class="plm_btns structure_btn" id="btnDrawingUpload" style="float:right; margin-right:5px;">
<input type="file" id="drawingFiles" multiple style="display:none;" accept=".stp,.step,.dwg,.pdf">
</div>
<div id="structureGrid"></div>

View File

@@ -2267,23 +2267,25 @@ public class PartMngController {
continue;
}
// 파일명에서 품번 찾기 (파일명에 품번이 포함되어 있는 경우)
// 파일명에서 확장자 제거하여 품번 추출
String fileNameWithoutExt = originalFileName;
int lastDotIndex = originalFileName.lastIndexOf('.');
if(lastDotIndex > 0) {
fileNameWithoutExt = originalFileName.substring(0, lastDotIndex);
}
// 품번과 정확히 일치하는 경우만 매칭
String matchedPartNo = null;
System.out.println("품번 매칭 시작 - 파일명: " + originalFileName);
for(String partNo : partNoMap.keySet()) {
System.out.println(" 품번 확인: " + partNo + " -> " + (originalFileName.contains(partNo) ? "매칭!" : "미매칭"));
if(originalFileName.contains(partNo)) {
matchedPartNo = partNo;
System.out.println(" ✓ 품번 매칭 성공: " + partNo);
break;
}
}
if(matchedPartNo == null) {
System.out.println(" ✗ 품번 매칭 실패 - 파일명에서 품번을 찾을 수 없음");
System.out.println("품번 매칭 시작 - 파일명(확장자 제외): " + fileNameWithoutExt);
// 정확한 매칭 (품번과 파일명이 정확히 일치)
if(partNoMap.containsKey(fileNameWithoutExt)) {
matchedPartNo = fileNameWithoutExt;
System.out.println(" ✓ 품번 정확 매칭 성공: " + matchedPartNo);
}
if(matchedPartNo == null) {
System.out.println(" ✗ 품번 매칭 실패 - 파일명과 일치하는 품번이 없음");
notFoundCount++;
continue;
}

View File

@@ -2020,6 +2020,7 @@ SELECT T1.LEV, T1.BOM_REPORT_OBJID, T1.ROOT_PART_NO, T1.PATH, T1.LEAF, T2.*
-->
AND OBJID IN (SELECT NVL(LAST_PART_OBJID, PART_NO) FROM BOM_PART_QTY Q
WHERE BOM_REPORT_OBJID = #{SEARCH_BOM_OBJID}
AND (Q.STATUS IS NULL OR Q.STATUS NOT IN ('deleted', 'deleting'))
<if test="qtyObjId != null and qtyObjId != ''">
AND Q.CHILD_OBJID = #{qtyObjId}
</if>