feat: 日志管理 + 质保书生产过程数据图表
- 新增 PlanLog 模型与 /logs API;计划新增/移动/投入生产/生产完成/删除均记录 (时间/计划号/卷号/操作/状态变化/位置/操作人/说明) - 新增「日志管理」页面 + 路由 + 导航 - 质保书:把生产完成持久化的实时数据(process_data)按单位分组生成多组柱状图 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
19
backend/app/models/plan_log.py
Normal file
19
backend/app/models/plan_log.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from sqlalchemy import Column, Integer, String, DateTime, Text, func
|
||||
from app.database import Base
|
||||
|
||||
|
||||
class PlanLog(Base):
|
||||
"""计划操作/状态变更日志"""
|
||||
__tablename__ = "plan_logs"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
plan_id = Column(Integer, index=True, comment="计划id")
|
||||
plan_no = Column(String(30), index=True, comment="计划号")
|
||||
coil_no = Column(String(30), comment="冷卷号")
|
||||
action = Column(String(20), comment="操作: 新增/移动/投入生产/生产完成/删除")
|
||||
from_status = Column(String(20), comment="原状态")
|
||||
to_status = Column(String(20), comment="新状态")
|
||||
position = Column(String(40), comment="变化位置")
|
||||
operator = Column(String(50), comment="操作人")
|
||||
detail = Column(Text, comment="说明")
|
||||
created_at = Column(DateTime, server_default=func.now(), index=True)
|
||||
Reference in New Issue
Block a user