feat: 完成MES工位终端系统全量功能迭代

本次提交包含以下核心变更:
1. 新增按钮级权限控制框架与前端权限校验
2. 新增工位管理、工艺流程、巡检终端等核心业务模块
3. 完善用户体系,支持工位终端专属登录权限
4. 新增文件上传下载、报表查询等配套功能
5. 修复多系统兼容性与交互体验问题
6. 完成所有文档与配置项的规范化更新
This commit is contained in:
SunYF
2026-08-31 08:06:55 +08:00
parent dab03ac0cf
commit 4ec6784629
99 changed files with 17436 additions and 479 deletions
+48
View File
@@ -56,6 +56,18 @@ func (f EventLogFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, er
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.EventLogMutation", m)
}
// The InspectionRecordFunc type is an adapter to allow the use of ordinary
// function as InspectionRecord mutator.
type InspectionRecordFunc func(context.Context, *ent.InspectionRecordMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f InspectionRecordFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.InspectionRecordMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.InspectionRecordMutation", 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)
@@ -92,6 +104,18 @@ func (f PlcSendLogFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value,
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.PlcSendLogMutation", m)
}
// The ProcessFlowFunc type is an adapter to allow the use of ordinary
// function as ProcessFlow mutator.
type ProcessFlowFunc func(context.Context, *ent.ProcessFlowMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f ProcessFlowFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.ProcessFlowMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ProcessFlowMutation", 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)
@@ -152,6 +176,18 @@ func (f SemiFlowFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, er
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.SemiFlowMutation", m)
}
// The StationFunc type is an adapter to allow the use of ordinary
// function as Station mutator.
type StationFunc func(context.Context, *ent.StationMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f StationFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.StationMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.StationMutation", m)
}
// The StationProcessFunc type is an adapter to allow the use of ordinary
// function as StationProcess mutator.
type StationProcessFunc func(context.Context, *ent.StationProcessMutation) (ent.Value, error)
@@ -212,6 +248,18 @@ func (f UserFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error)
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.UserMutation", m)
}
// The UserStationFunc type is an adapter to allow the use of ordinary
// function as UserStation mutator.
type UserStationFunc func(context.Context, *ent.UserStationMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f UserStationFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.UserStationMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.UserStationMutation", m)
}
// The WorkOrderFunc type is an adapter to allow the use of ordinary
// function as WorkOrder mutator.
type WorkOrderFunc func(context.Context, *ent.WorkOrderMutation) (ent.Value, error)