✅ 주요 개선사항: • 엘보 90도/45도 각도 표시 개선 (ELBOW 90° LR BW 형태) • RL/SL (Long/Short Radius) 표시 추가 • 엘보 서브타입 분류 로직 강화 (90DEG_LONG_RADIUS, 90DEG_SHORT_RADIUS) • REDUCING FLANGE 분류 개선 (RED 키워드 제거로 피팅 오분류 방지) • 구매신청 엑셀 중복 생성 문제 해결 🎯 분류기 개선: • fitting_classifier.py: 엘보 조합 키워드 우선 확인 로직 추가 • integrated_classifier.py: FITTING 키워드에서 RED 제거 • NewMaterialsPage.jsx: 엘보 상세 표시 로직 개선 📊 테스트 완료: • 엘보 각도 및 반경 정보 정확 표시 • REDUCING FLANGE → FLANGE 분류 확인 • 구매신청 엑셀 단일 생성 확인
This commit is contained in:
@@ -939,7 +939,8 @@ function App() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
)}
|
||||
{/* adminFeatures 조건문 닫기 */}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -620,10 +620,36 @@ const NewMaterialsPage = ({
|
||||
|
||||
displayType = nippleType;
|
||||
} else if (fittingType === 'ELBOW') {
|
||||
// 엘보: 각도와 연결 방식
|
||||
const angle = fittingSubtype === '90DEG' ? '90°' : fittingSubtype === '45DEG' ? '45°' : '';
|
||||
const connection = description.includes('SW') ? 'SW' : description.includes('BW') ? 'BW' : '';
|
||||
displayType = `ELBOW ${angle} ${connection}`.trim();
|
||||
// 엘보: 각도, 반경, 연결 방식 상세 표시
|
||||
let elbowDetails = [];
|
||||
|
||||
// 각도 정보 추출
|
||||
if (fittingSubtype.includes('90DEG') || description.includes('90') || description.includes('90°')) {
|
||||
elbowDetails.push('90°');
|
||||
} else if (fittingSubtype.includes('45DEG') || description.includes('45') || description.includes('45°')) {
|
||||
elbowDetails.push('45°');
|
||||
}
|
||||
|
||||
// 반경 정보 추출 (Long Radius / Short Radius)
|
||||
if (fittingSubtype.includes('LONG_RADIUS') || description.toUpperCase().includes('LR') || description.toUpperCase().includes('LONG RADIUS')) {
|
||||
elbowDetails.push('LR');
|
||||
} else if (fittingSubtype.includes('SHORT_RADIUS') || description.toUpperCase().includes('SR') || description.toUpperCase().includes('SHORT RADIUS')) {
|
||||
elbowDetails.push('SR');
|
||||
}
|
||||
|
||||
// 연결 방식
|
||||
if (description.includes('SW')) {
|
||||
elbowDetails.push('SW');
|
||||
} else if (description.includes('BW')) {
|
||||
elbowDetails.push('BW');
|
||||
}
|
||||
|
||||
// 기본값 설정 (각도가 없으면 90도로 가정)
|
||||
if (!elbowDetails.some(detail => detail.includes('°'))) {
|
||||
elbowDetails.unshift('90°');
|
||||
}
|
||||
|
||||
displayType = `ELBOW ${elbowDetails.join(' ')}`.trim();
|
||||
} else if (fittingType === 'TEE') {
|
||||
// 티: 타입과 연결 방식
|
||||
const teeType = fittingSubtype === 'EQUAL' ? 'EQ' : fittingSubtype === 'REDUCING' ? 'RED' : '';
|
||||
@@ -1493,12 +1519,8 @@ const NewMaterialsPage = ({
|
||||
const timestamp = new Date().toISOString().split('T')[0];
|
||||
const fileName = `${jobNo}_${selectedCategory}_${timestamp}.xlsx`;
|
||||
|
||||
// 기존 엑셀 내보내기 함수 사용
|
||||
await exportMaterialsToExcel(
|
||||
dataWithRequirements,
|
||||
fileName,
|
||||
userRequirements
|
||||
);
|
||||
// 엑셀 파일명 설정
|
||||
const excelFileName = fileName;
|
||||
|
||||
// 2단계: 생성된 엑셀을 서버에 업로드 (구매신청과 함께)
|
||||
// 서버에 구매신청 생성
|
||||
@@ -1583,7 +1605,7 @@ const NewMaterialsPage = ({
|
||||
// 실패해도 엑셀은 내보내기
|
||||
}
|
||||
|
||||
// 개선된 엑셀 내보내기 함수 사용
|
||||
// 엑셀 내보내기 (한 번만 실행)
|
||||
const additionalInfo = {
|
||||
filename: filename || bomName,
|
||||
jobNo: jobNo,
|
||||
@@ -1591,8 +1613,6 @@ const NewMaterialsPage = ({
|
||||
uploadDate: new Date().toLocaleDateString()
|
||||
};
|
||||
|
||||
const excelFileName = `${selectedCategory}_${jobNo || 'export'}_${new Date().toISOString().split('T')[0]}.xlsx`;
|
||||
|
||||
exportMaterialsToExcel(dataWithRequirements, excelFileName, additionalInfo);
|
||||
|
||||
console.log('✅ 엑셀 내보내기 성공');
|
||||
|
||||
Reference in New Issue
Block a user