feat: 两库对等物料管理及产品工号贯通全流程

- 新增 MES 本地物料表及双向同步接口,WMS 物料变更自动同步
- 全流程新增产品工号字段,贯通入库/库存/出库/检验环节
- 工单管理支持多工单混产,移除单工单互斥限制
- 新增批次号/SN 字段支持质量检验联动 WMS 库存处置
- 修复权限规则,仅内置管理员账号不允许修改删除
- 工位终端新增 SN 扫码自动切换所属工单功能
This commit is contained in:
SunYF
2026-09-29 14:55:03 +08:00
parent a229b6727a
commit 76c9b6a7e2
103 changed files with 9412 additions and 1726 deletions
+12
View File
@@ -128,6 +128,18 @@ func (f LinePointFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, e
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.LinePointMutation", m)
}
// The MaterialFunc type is an adapter to allow the use of ordinary
// function as Material mutator.
type MaterialFunc func(context.Context, *ent.MaterialMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f MaterialFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.MaterialMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.MaterialMutation", m)
}
// The MaterialQtyReportFunc type is an adapter to allow the use of ordinary
// function as MaterialQtyReport mutator.
type MaterialQtyReportFunc func(context.Context, *ent.MaterialQtyReportMutation) (ent.Value, error)