feat: 实时数据持久化到计划/实绩 + 质量管理改版(钢卷信息+异常记录+继承)

- 在产计划持久化实时数据快照(run_data),物料跟踪每次轮询上报;生产完成写入实绩 process_data
- 实绩页点击行展开生产阶段数据 + 实时数据快照(测点列表)
- 质量管理默认进入异常管理,改为全宽:顶部选卷 + 钢卷信息(5列) + 异常记录表
- 异常记录新增「继承来源」列与「继承」按钮(从来源卷复制缺陷),进入即预置6行
- qc_defect 增加 inherit_source 字段

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 16:01:34 +08:00
parent 4567b87314
commit 649e667ad0
13 changed files with 139 additions and 40 deletions

View File

@@ -1,4 +1,4 @@
from sqlalchemy import Column, Integer, String, Float, DateTime, Text, ForeignKey, func
from sqlalchemy import Column, Integer, String, Float, DateTime, Text, ForeignKey, JSON, func
from app.database import Base
@@ -30,6 +30,7 @@ class ProductionRecord(Base):
length_per_ton = Column(Float, comment="吨钢长度 m/t")
offline_time = Column(DateTime, comment="下线时间")
status = Column(String(20), default="UNWEIGH", comment="状态: UNWEIGH/PRODUCT")
process_data = Column(JSON, comment="生产阶段实时数据快照")
# 兼容历史字段
shift_date = Column(DateTime)