feat: 同步失败(SyncFailure)实体化与 ent 全量重生成

- 新增 SyncFailure 实体:MES/WMS 两端 schema 源 + ent 生成码(create/delete/query/update 及子包)
- ent 框架文件全量重生成:client/ent/hook/migrate/mutation/predicate/runtime/tx
- 清理旧代码生成入口:删除 schema/gen.go 与 schema/tools/generate.go
- 同步失败页面调整:MES/WMS SyncFailure.vue 接入新实体,MES 产品工艺页同步调整
- 主程序入口注册新实体:bj_power_mes.go / bj_power_wms.go,工作站 main.go 同步调整
- 更新文档:WMS README、案例、问题记录;刷新 MES/WMS 前端构建产物
This commit is contained in:
SunYF
2026-11-12 15:52:51 +08:00
parent 7b7d27d150
commit 7e8066ab66
45 changed files with 10797 additions and 105 deletions
+12
View File
@@ -416,6 +416,18 @@ func (f StepSignRecordFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Val
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.StepSignRecordMutation", m)
}
// The SyncFailureFunc type is an adapter to allow the use of ordinary
// function as SyncFailure mutator.
type SyncFailureFunc func(context.Context, *ent.SyncFailureMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f SyncFailureFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.SyncFailureMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.SyncFailureMutation", m)
}
// The SysConfigFunc type is an adapter to allow the use of ordinary
// function as SysConfig mutator.
type SysConfigFunc func(context.Context, *ent.SysConfigMutation) (ent.Value, error)