feat: 完成多模块迭代更新

- 新增过程巡检按步骤上报、数量不符上报、工位退料功能
- 增加工单工程编号三级归属字段
- 新增物料安全库存与缺货预警
- 新增附件管理、退库单管理模块
- 优化生产看板展示逻辑与前端页面文案
- 清理冗余的工艺路线相关代码与备份文件
This commit is contained in:
SunYF
2026-09-15 16:37:39 +08:00
parent 951f3dfecd
commit 4a5e2d7bac
494 changed files with 24702 additions and 139223 deletions
+12 -24
View File
@@ -116,6 +116,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 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)
// Mutate calls f(ctx, m).
func (f MaterialQtyReportFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.MaterialQtyReportMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.MaterialQtyReportMutation", m)
}
// The MaterialRequestFunc type is an adapter to allow the use of ordinary
// function as MaterialRequest mutator.
type MaterialRequestFunc func(context.Context, *ent.MaterialRequestMutation) (ent.Value, error)
@@ -176,18 +188,6 @@ func (f ProcessFlowFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value,
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ProcessFlowMutation", m)
}
// The ProcessRouteFunc type is an adapter to allow the use of ordinary
// function as ProcessRoute mutator.
type ProcessRouteFunc func(context.Context, *ent.ProcessRouteMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f ProcessRouteFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.ProcessRouteMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ProcessRouteMutation", m)
}
// The ProcessStepFunc type is an adapter to allow the use of ordinary
// function as ProcessStep mutator.
type ProcessStepFunc func(context.Context, *ent.ProcessStepMutation) (ent.Value, error)
@@ -224,18 +224,6 @@ func (f RoleFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error)
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.RoleMutation", m)
}
// The RouteSegmentFunc type is an adapter to allow the use of ordinary
// function as RouteSegment mutator.
type RouteSegmentFunc func(context.Context, *ent.RouteSegmentMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f RouteSegmentFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.RouteSegmentMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.RouteSegmentMutation", m)
}
// The ScanRecordFunc type is an adapter to allow the use of ordinary
// function as ScanRecord mutator.
type ScanRecordFunc func(context.Context, *ent.ScanRecordMutation) (ent.Value, error)