feat: 移除工艺物料与混产模板实体、新增产线清线与 PLC 监控实时推送、看板双屏增强
- 移除实体:MES 删除 FlowMaterial(工艺物料)与 MixProductionTemplate(混产模板)全套(schema/ent 生成码/handler/logic),清理关联路由与种子 - 新增功能:产线清线(line_clearance handler + logic)、PLC 监控 WebSocket 实时推送(ws/plc_monitor_hub + handler) - 看板增强:新增管理屏与 KPI 组件(BoardManage/BoardKpi),调整演示屏 Mock 与各看板面板 - MES 完善:PLC 匹配/扭矩扫描/签收、工艺卡 PDF 与工单、AGV 链路、叫料/备料/在制品/短料预测等逻辑与前端调整 - 工位终端:删除离线面板 OfflinePanel,调整主界面/物料面板与 api/store/handler/路由 - WMS:AGV 托盘、物料与 MES 客户端调整及前端帮助/基础数据/叫料/托盘页 - 文档:更新产线API/客户问题/案例/部署手册/问题记录
This commit is contained in:
@@ -451,38 +451,6 @@ var (
|
||||
},
|
||||
},
|
||||
}
|
||||
// FlowMaterialColumns holds the columns for the "flow_material" table.
|
||||
FlowMaterialColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
{Name: "flow_id", Type: field.TypeInt, Comment: "所属工艺ID"},
|
||||
{Name: "material_code", Type: field.TypeString, Size: 64, Comment: "物料编码"},
|
||||
{Name: "material_name", Type: field.TypeString, Size: 128, Default: ""},
|
||||
{Name: "spec", Type: field.TypeString, Size: 128, Default: ""},
|
||||
{Name: "unit", Type: field.TypeString, Size: 16, Default: ""},
|
||||
{Name: "sn_mode", Type: field.TypeInt, Default: 2},
|
||||
{Name: "unit_qty", Type: field.TypeFloat64, Comment: "单台用量", Default: 0},
|
||||
{Name: "loss_rate", Type: field.TypeFloat64, Comment: "损耗率%(仅展示口径,不参与备料计算——R7 2026-11-03 拍板:备料量=工单需求×单台用量,损耗走补料审批)", Default: 0},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
}
|
||||
// FlowMaterialTable holds the schema information for the "flow_material" table.
|
||||
FlowMaterialTable = &schema.Table{
|
||||
Name: "flow_material",
|
||||
Comment: "FlowMaterial 工艺物料清单:一道工艺装什么料、单台用多少(备料/齐套校验的唯一源头)。",
|
||||
Columns: FlowMaterialColumns,
|
||||
PrimaryKey: []*schema.Column{FlowMaterialColumns[0]},
|
||||
Indexes: []*schema.Index{
|
||||
{
|
||||
Name: "flowmaterial_flow_id",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{FlowMaterialColumns[1]},
|
||||
},
|
||||
{
|
||||
Name: "flowmaterial_flow_id_material_code",
|
||||
Unique: true,
|
||||
Columns: []*schema.Column{FlowMaterialColumns[1], FlowMaterialColumns[2]},
|
||||
},
|
||||
},
|
||||
}
|
||||
// InspectionRecordColumns holds the columns for the "inspection_record" table.
|
||||
InspectionRecordColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
@@ -773,29 +741,6 @@ var (
|
||||
},
|
||||
},
|
||||
}
|
||||
// MixProductionTemplateColumns holds the columns for the "mix_production_template" table.
|
||||
MixProductionTemplateColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
{Name: "name", Type: field.TypeString, Size: 128, Comment: "模板名称"},
|
||||
{Name: "product_codes", Type: field.TypeString, Size: 2147483647, Comment: "可混产成品编码集合(逗号分隔)", Default: ""},
|
||||
{Name: "remark", Type: field.TypeString, Size: 255, Default: ""},
|
||||
{Name: "status", Type: field.TypeString, Size: 16, Comment: "ACTIVE/INACTIVE", Default: "ACTIVE"},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
}
|
||||
// MixProductionTemplateTable holds the schema information for the "mix_production_template" table.
|
||||
MixProductionTemplateTable = &schema.Table{
|
||||
Name: "mix_production_template",
|
||||
Comment: "MixProductionTemplate 混产模板:可混线生产的成品集合。",
|
||||
Columns: MixProductionTemplateColumns,
|
||||
PrimaryKey: []*schema.Column{MixProductionTemplateColumns[0]},
|
||||
Indexes: []*schema.Index{
|
||||
{
|
||||
Name: "mixproductiontemplate_name",
|
||||
Unique: true,
|
||||
Columns: []*schema.Column{MixProductionTemplateColumns[1]},
|
||||
},
|
||||
},
|
||||
}
|
||||
// PermissionColumns holds the columns for the "permission" table.
|
||||
PermissionColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
@@ -1742,14 +1687,12 @@ var (
|
||||
DailyPlanTable,
|
||||
DockTable,
|
||||
EventLogTable,
|
||||
FlowMaterialTable,
|
||||
InspectionRecordTable,
|
||||
LinePointTable,
|
||||
LossLedgersTable,
|
||||
MaterialsTable,
|
||||
MaterialQtyReportTable,
|
||||
MaterialRequestTable,
|
||||
MixProductionTemplateTable,
|
||||
PermissionTable,
|
||||
PlcSendLogTable,
|
||||
ProcessFlowTable,
|
||||
@@ -1818,9 +1761,6 @@ func init() {
|
||||
EventLogTable.Annotation = &entsql.Annotation{
|
||||
Table: "event_log",
|
||||
}
|
||||
FlowMaterialTable.Annotation = &entsql.Annotation{
|
||||
Table: "flow_material",
|
||||
}
|
||||
InspectionRecordTable.Annotation = &entsql.Annotation{
|
||||
Table: "inspection_record",
|
||||
}
|
||||
@@ -1839,9 +1779,6 @@ func init() {
|
||||
MaterialRequestTable.Annotation = &entsql.Annotation{
|
||||
Table: "material_request",
|
||||
}
|
||||
MixProductionTemplateTable.Annotation = &entsql.Annotation{
|
||||
Table: "mix_production_template",
|
||||
}
|
||||
PermissionTable.Annotation = &entsql.Annotation{
|
||||
Table: "permission",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user