feat: 移除PDI和订单号字段,新增设备巡检模块
- 从物料跟踪页面移除订单号列和表单字段 - 从导航菜单移除PDI管理,添加设备巡检 - 新增InspectionLocation和InspectionRecord后端模型和API - 新增设备巡检前端页面(左侧点位列表,右侧设备和历史记录)
This commit is contained in:
28
backend/app/models/production.py
Normal file
28
backend/app/models/production.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from sqlalchemy import Column, Integer, String, Float, DateTime, Text, ForeignKey, func
|
||||
from app.database import Base
|
||||
|
||||
|
||||
class ProductionRecord(Base):
|
||||
"""生产实绩"""
|
||||
__tablename__ = "production_records"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
coil_no = Column(String(30), nullable=False, index=True)
|
||||
plan_id = Column(Integer, ForeignKey("production_plans.id"), nullable=True)
|
||||
shift = Column(String(10), comment="班次: 甲/乙/丙/丁")
|
||||
shift_date = Column(DateTime, comment="班期")
|
||||
start_time = Column(DateTime, comment="开始时间")
|
||||
end_time = Column(DateTime, comment="结束时间")
|
||||
process_length = Column(Float, comment="处理长度m")
|
||||
process_weight = Column(Float, comment="处理重量kg")
|
||||
avg_speed = Column(Float, comment="平均速度m/min")
|
||||
max_speed = Column(Float, comment="最大速度m/min")
|
||||
acid_consumption = Column(Float, comment="酸耗量L")
|
||||
inlet_thickness = Column(Float, comment="入口厚度mm")
|
||||
outlet_thickness = Column(Float, comment="出口厚度mm")
|
||||
inlet_width = Column(Float, comment="入口宽度mm")
|
||||
quality_grade = Column(String(10), comment="质量等级")
|
||||
operator = Column(String(50))
|
||||
remark = Column(Text)
|
||||
created_at = Column(DateTime, server_default=func.now())
|
||||
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())
|
||||
Reference in New Issue
Block a user