볼트 분류 개선 및 업로드 성능 최적화
- 볼트 길이 추출 로직 개선: '70.0000 LG' 형태 인식 추가 - 재질 중복 표시 수정: 'ASTM A193 ASTM A193 B7' → 'B7' - A193/A194 등급 추출 로직 개선: 'GR B7/2H' 형태 지원 - bolt_details 테이블에 pressure_rating 컬럼 추가 - 볼트 분류기 오분류 방지: 플랜지/피팅이 볼트로 분류되지 않도록 수정 - 업로드 성능 개선: 키워드 기반 빠른 분류기 선택 로직 추가 - 분류 키워드 대폭 확장: 피팅/파이프/플랜지 키워드 추가
This commit is contained in:
@@ -596,7 +596,21 @@ async def upload_file(
|
||||
|
||||
# GASKET 분류기 결과 구조에 맞게 데이터 추출
|
||||
gasket_type_info = gasket_info.get('gasket_type', {})
|
||||
material_info = gasket_info.get('material', {})
|
||||
gasket_material_info = gasket_info.get('gasket_material', {})
|
||||
pressure_info = gasket_info.get('pressure_rating', {})
|
||||
size_info = gasket_info.get('size_info', {})
|
||||
temp_info = gasket_info.get('temperature_info', {})
|
||||
|
||||
# SWG 상세 정보 추출
|
||||
swg_details = gasket_material_info.get('swg_details', {})
|
||||
additional_info = {
|
||||
"swg_details": swg_details,
|
||||
"face_type": swg_details.get('face_type', ''),
|
||||
"construction": swg_details.get('detailed_construction', ''),
|
||||
"filler": swg_details.get('filler', ''),
|
||||
"outer_ring": swg_details.get('outer_ring', ''),
|
||||
"inner_ring": swg_details.get('inner_ring', '')
|
||||
}
|
||||
|
||||
db.execute(gasket_insert_query, {
|
||||
"file_id": file_id,
|
||||
@@ -604,14 +618,14 @@ async def upload_file(
|
||||
"row_number": material_data["row_number"],
|
||||
"gasket_type": gasket_type_info.get('type', ''),
|
||||
"gasket_subtype": gasket_type_info.get('subtype', ''),
|
||||
"material_type": material_info.get('type', ''),
|
||||
"size_inches": material_data.get('size_spec', ''),
|
||||
"pressure_rating": gasket_info.get('pressure_rating', ''),
|
||||
"thickness": gasket_info.get('thickness', ''),
|
||||
"temperature_range": material_info.get('temperature_range', ''),
|
||||
"material_type": gasket_material_info.get('material', ''),
|
||||
"size_inches": material_data.get('main_nom', '') or material_data.get('size_spec', ''),
|
||||
"pressure_rating": pressure_info.get('rating', ''),
|
||||
"thickness": swg_details.get('thickness', None),
|
||||
"temperature_range": temp_info.get('range', ''),
|
||||
"fire_safe": gasket_info.get('fire_safe', False),
|
||||
"classification_confidence": confidence,
|
||||
"additional_info": json.dumps(gasket_info, ensure_ascii=False)
|
||||
"additional_info": json.dumps(additional_info, ensure_ascii=False)
|
||||
})
|
||||
|
||||
print(f"GASKET 상세정보 저장 완료: {material_data['original_description']}")
|
||||
|
||||
Reference in New Issue
Block a user