feat: 核心业务实体扩充(混产模板/产品BOM/试制记录)、WMS 库存检验增强与前端通用能力
- MES 新增实体:混产模板、产品BOM、产品工艺物料、试制记录(schema + ent 生成码 + logic/handler/前端页) - WMS 实体增强:检验记录、库存、半成品重构;新增序列号库存与短缺代报 - AGV 与产能:AGV 手动点位与链路、物料守卫、短缺预测、原因字典 - 前端通用能力:新增下一步引导组件 NextStepBar,统一帮助文档/布局/请求拦截与操作列 - 工位终端:界面与各 handler 调整(api/store/绑定/PLC/拧紧/上报等) - 配置与文档:更新 mes-api.yaml、WMS README 及案例/产线API/问题记录/项目说明/流程说明
This commit is contained in:
@@ -236,6 +236,18 @@ func (f MaterialRequestFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Va
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.MaterialRequestMutation", m)
|
||||
}
|
||||
|
||||
// The MixProductionTemplateFunc type is an adapter to allow the use of ordinary
|
||||
// function as MixProductionTemplate mutator.
|
||||
type MixProductionTemplateFunc func(context.Context, *ent.MixProductionTemplateMutation) (ent.Value, error)
|
||||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f MixProductionTemplateFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
if mv, ok := m.(*ent.MixProductionTemplateMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.MixProductionTemplateMutation", m)
|
||||
}
|
||||
|
||||
// The PermissionFunc type is an adapter to allow the use of ordinary
|
||||
// function as Permission mutator.
|
||||
type PermissionFunc func(context.Context, *ent.PermissionMutation) (ent.Value, error)
|
||||
@@ -284,6 +296,18 @@ func (f ProcessStepFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value,
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ProcessStepMutation", m)
|
||||
}
|
||||
|
||||
// The ProductBOMFunc type is an adapter to allow the use of ordinary
|
||||
// function as ProductBOM mutator.
|
||||
type ProductBOMFunc func(context.Context, *ent.ProductBOMMutation) (ent.Value, error)
|
||||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f ProductBOMFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
if mv, ok := m.(*ent.ProductBOMMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ProductBOMMutation", m)
|
||||
}
|
||||
|
||||
// The ProductProcessFunc type is an adapter to allow the use of ordinary
|
||||
// function as ProductProcess mutator.
|
||||
type ProductProcessFunc func(context.Context, *ent.ProductProcessMutation) (ent.Value, error)
|
||||
@@ -308,6 +332,18 @@ func (f ProductProcessItemFunc) Mutate(ctx context.Context, m ent.Mutation) (ent
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ProductProcessItemMutation", m)
|
||||
}
|
||||
|
||||
// The ProductProcessMaterialFunc type is an adapter to allow the use of ordinary
|
||||
// function as ProductProcessMaterial mutator.
|
||||
type ProductProcessMaterialFunc func(context.Context, *ent.ProductProcessMaterialMutation) (ent.Value, error)
|
||||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f ProductProcessMaterialFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
if mv, ok := m.(*ent.ProductProcessMaterialMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ProductProcessMaterialMutation", m)
|
||||
}
|
||||
|
||||
// The RoleFunc type is an adapter to allow the use of ordinary
|
||||
// function as Role mutator.
|
||||
type RoleFunc func(context.Context, *ent.RoleMutation) (ent.Value, error)
|
||||
@@ -452,6 +488,18 @@ func (f TorqueRecordFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.TorqueRecordMutation", m)
|
||||
}
|
||||
|
||||
// The TrialRecordFunc type is an adapter to allow the use of ordinary
|
||||
// function as TrialRecord mutator.
|
||||
type TrialRecordFunc func(context.Context, *ent.TrialRecordMutation) (ent.Value, error)
|
||||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f TrialRecordFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
if mv, ok := m.(*ent.TrialRecordMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.TrialRecordMutation", m)
|
||||
}
|
||||
|
||||
// The UserFunc type is an adapter to allow the use of ordinary
|
||||
// function as User mutator.
|
||||
type UserFunc func(context.Context, *ent.UserMutation) (ent.Value, error)
|
||||
|
||||
Reference in New Issue
Block a user