리비전 페이지 제거 및 트랜잭션 오류 임시 수정
Some checks failed
SonarQube Analysis / SonarQube Scan (push) Has been cancelled
Some checks failed
SonarQube Analysis / SonarQube Scan (push) Has been cancelled
- frontend/src/pages/revision/ 폴더 완전 삭제 - EnhancedRevisionPage.css 제거 - support_details 저장 시 트랜잭션 오류로 인해 임시로 상세 정보 저장 비활성화 - 리비전 기능 재설계 예정
This commit is contained in:
@@ -703,7 +703,8 @@ class PurchaseRequests(Base):
|
||||
category = Column(String(50))
|
||||
material_count = Column(Integer)
|
||||
excel_file_path = Column(String(500))
|
||||
requested_by = Column(Integer, ForeignKey("users.user_id"))
|
||||
requested_by = Column(Integer) # ForeignKey 제거
|
||||
requested_by_username = Column(String(100)) # 사용자명 직접 저장
|
||||
|
||||
# 시간 정보
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
@@ -711,7 +712,7 @@ class PurchaseRequests(Base):
|
||||
|
||||
# 관계 설정
|
||||
file = relationship("File")
|
||||
requested_by_user = relationship("User", foreign_keys=[requested_by])
|
||||
# requested_by_user relationship 제거
|
||||
|
||||
class Jobs(Base):
|
||||
__tablename__ = "jobs"
|
||||
@@ -765,7 +766,7 @@ class ExcelExports(Base):
|
||||
|
||||
# 관계 설정
|
||||
file = relationship("File")
|
||||
exported_by_user = relationship("User", foreign_keys=[exported_by])
|
||||
# exported_by_user relationship 제거
|
||||
|
||||
class UserActivityLogs(Base):
|
||||
__tablename__ = "user_activity_logs"
|
||||
@@ -777,7 +778,7 @@ class UserActivityLogs(Base):
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
|
||||
# 관계 설정
|
||||
user = relationship("User")
|
||||
# user relationship 제거
|
||||
|
||||
class ExcelExportHistory(Base):
|
||||
__tablename__ = "excel_export_history"
|
||||
@@ -785,12 +786,13 @@ class ExcelExportHistory(Base):
|
||||
export_id = Column(String(50), primary_key=True, index=True)
|
||||
file_id = Column(Integer, ForeignKey("files.id"))
|
||||
job_no = Column(String(50))
|
||||
exported_by = Column(Integer, ForeignKey("users.user_id"))
|
||||
exported_by = Column(Integer) # ForeignKey 제거
|
||||
exported_by_username = Column(String(100)) # 사용자명 직접 저장
|
||||
export_date = Column(DateTime, default=datetime.utcnow)
|
||||
|
||||
# 관계 설정
|
||||
file = relationship("File")
|
||||
exported_by_user = relationship("User", foreign_keys=[exported_by])
|
||||
# exported_by_user relationship 제거
|
||||
|
||||
class ExportedMaterials(Base):
|
||||
__tablename__ = "exported_materials"
|
||||
@@ -817,4 +819,67 @@ class PurchaseStatusHistory(Base):
|
||||
|
||||
# 관계 설정
|
||||
material = relationship("Material")
|
||||
changed_by_user = relationship("User", foreign_keys=[changed_by])
|
||||
# changed_by_user relationship 제거
|
||||
|
||||
|
||||
# ========== 간단한 리비전 관리 시스템 ==========
|
||||
|
||||
class SimpleRevisionComparison(Base):
|
||||
"""간단한 리비전 비교 결과 저장"""
|
||||
__tablename__ = "simple_revision_comparisons"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
job_no = Column(String(50), nullable=False, index=True)
|
||||
current_file_id = Column(Integer, ForeignKey("files.id"), nullable=False)
|
||||
previous_file_id = Column(Integer, ForeignKey("files.id"), nullable=False)
|
||||
category = Column(String(50), nullable=False) # 비교 대상 카테고리
|
||||
|
||||
# 비교 결과 통계
|
||||
added_count = Column(Integer, default=0)
|
||||
removed_count = Column(Integer, default=0)
|
||||
changed_count = Column(Integer, default=0)
|
||||
unchanged_count = Column(Integer, default=0)
|
||||
|
||||
# 구매 상태별 통계
|
||||
purchased_affected = Column(Integer, default=0)
|
||||
unpurchased_affected = Column(Integer, default=0)
|
||||
inventory_count = Column(Integer, default=0)
|
||||
|
||||
# 메타데이터
|
||||
comparison_data = Column(JSON) # 상세 비교 결과
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
created_by_username = Column(String(100))
|
||||
|
||||
# 관계 설정 (간단하게)
|
||||
current_file = relationship("File", foreign_keys=[current_file_id])
|
||||
previous_file = relationship("File", foreign_keys=[previous_file_id])
|
||||
|
||||
|
||||
class SimpleRevisionMaterial(Base):
|
||||
"""간단한 리비전 자재 변경 로그"""
|
||||
__tablename__ = "simple_revision_materials"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
comparison_id = Column(Integer, ForeignKey("simple_revision_comparisons.id"), nullable=False)
|
||||
material_id = Column(Integer, ForeignKey("materials.id"))
|
||||
change_type = Column(String(20), nullable=False) # 'added', 'removed', 'changed', 'quantity_changed'
|
||||
revision_action = Column(String(30)) # 'maintain', 'additional_purchase', 'inventory', 'delete', 'quantity_update'
|
||||
|
||||
# 수량 변경 정보
|
||||
quantity_before = Column(Numeric(10, 3))
|
||||
quantity_after = Column(Numeric(10, 3))
|
||||
quantity_difference = Column(Numeric(10, 3))
|
||||
purchase_status = Column(String(20)) # 'purchased', 'not_purchased'
|
||||
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
|
||||
# 관계 설정 (간단하게)
|
||||
comparison = relationship("SimpleRevisionComparison")
|
||||
material = relationship("Material")
|
||||
|
||||
|
||||
# ========== 간단한 리비전 시스템 완료 ==========
|
||||
# 나머지 복잡한 테이블들은 제거하고 필요시 추가
|
||||
|
||||
# 기존 복잡한 모델들 제거됨 (PipeLengthCalculation, MaterialPurchaseHistory 등)
|
||||
# 필요시 간단한 구조로 다시 추가 예정
|
||||
|
||||
Reference in New Issue
Block a user