feat: 多系统新增扫码中间件与 AGV 对接,优化拧紧与退库流程

新增扫码中间件支持网络型扫码枪键盘注入,AGV 对接从 WMS 迁至 MES 统一管理;新增拧紧不合格人工处置与 PLC 对账机制,优化退库单关联与工位终端功能,同时清理旧 AGV 任务表,完善数据库与配置项。
This commit is contained in:
SunYF
2026-10-14 17:24:59 +08:00
parent 8e6048c64b
commit f65a52d9e1
170 changed files with 15415 additions and 10572 deletions
+24
View File
@@ -8,6 +8,18 @@ import (
"fmt"
)
// The AgvTaskFunc type is an adapter to allow the use of ordinary
// function as AgvTask mutator.
type AgvTaskFunc func(context.Context, *ent.AgvTaskMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f AgvTaskFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.AgvTaskMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.AgvTaskMutation", m)
}
// The AlertFunc type is an adapter to allow the use of ordinary
// function as Alert mutator.
type AlertFunc func(context.Context, *ent.AlertMutation) (ent.Value, error)
@@ -56,6 +68,18 @@ func (f AttachmentFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value,
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.AttachmentMutation", m)
}
// The CallPoolFunc type is an adapter to allow the use of ordinary
// function as CallPool mutator.
type CallPoolFunc func(context.Context, *ent.CallPoolMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f CallPoolFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.CallPoolMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.CallPoolMutation", m)
}
// The DailyPlanFunc type is an adapter to allow the use of ordinary
// function as DailyPlan mutator.
type DailyPlanFunc func(context.Context, *ent.DailyPlanMutation) (ent.Value, error)