feat: AGV点位锁与缓存迁移 + 工位终端去离线队列 + WMS出入库增强

【MES】
- AGV点位/线路点位/AGV任务/工单 ent schema 重构(全量重生成 ent 代码)
- 新增派车锁 agv_point_lock.go:目标点位占用即拒车,JBT21 库房接驳台卸货后保持锁定待库管手动解锁
- 新增进程内 TTL 缓存 cache.go,由 Redis 看板缓存迁移至内存(singleflight 防击穿,去除外部依赖)
- AGV 三段链安全机制、车辆状态/接驳台左右互换、补料损耗闭环完善
- 来料检/工序卡/工单/质检/日排产/AGV 前端与帮助文档更新
- 新增 migrations/、sql/ 目录

【WMS】
- 出库、Excel 导出、物料、路由处理增强
- 配置与 DB 初始化调整;基础数据/成品入库/入库前端调整

【工位终端】
- 移除离线同步队列(syncer 包、sync.go、SyncQueueDialog.vue),改为实时直连上报 MES(断网即失败报错),以本人身份操作
- 本地 SQLite 仅保留操作日志 + 内置账号 + 登录态;保留空闲自动登出

【文档】
- 删除 AGV海康litev1.5.md;案例.md 更新
This commit is contained in:
SunYF
2026-11-07 15:06:00 +08:00
parent 1d1dc1bdd8
commit 5e2640c13a
118 changed files with 4040 additions and 3594 deletions
+3
View File
@@ -62,6 +62,7 @@ func RegisterHandlers(server *rest.Server, ctx *svc.ServiceContext) {
{Method: http.MethodGet, Path: "/api/material/detail", Handler: getMaterialHandler(ctx)},
{Method: http.MethodGet, Path: "/api/material/export", Handler: requirePerm(ctx, "material:export", exportMaterialsHandler(ctx))},
{Method: http.MethodPost, Path: "/api/material/import", Handler: requirePerm(ctx, "material:import", excelMaterialImportHandler(ctx))},
{Method: http.MethodPost, Path: "/api/material/import/preview", Handler: requirePerm(ctx, "material:import", excelMaterialImportPreviewHandler(ctx))},
{Method: http.MethodGet, Path: "/api/material/import-template", Handler: requirePerm(ctx, "material:import", excelMaterialImportTemplateHandler(ctx))},
{Method: http.MethodPost, Path: "/api/material/toggle-status", Handler: requirePerm(ctx, "material:edit", toggleMaterialStatusHandler(ctx))},
{Method: http.MethodPost, Path: "/api/material/retry-sync", Handler: requirePerm(ctx, "material:edit", retryMaterialSyncHandler(ctx))},
@@ -76,6 +77,7 @@ func RegisterHandlers(server *rest.Server, ctx *svc.ServiceContext) {
{Method: http.MethodGet, Path: "/api/inbound/details", Handler: inboundDetailsHandler(ctx)},
{Method: http.MethodGet, Path: "/api/inbound/export", Handler: exportInboundHandler(ctx)},
{Method: http.MethodPost, Path: "/api/inbound/batch-excel", Handler: excelInboundHandler(ctx)},
{Method: http.MethodPost, Path: "/api/inbound/batch-excel/preview", Handler: excelInboundPreviewHandler(ctx)},
{Method: http.MethodGet, Path: "/api/inbound/import-template", Handler: excelInboundImportTemplateHandler(ctx)},
// 入库库位联动:选物料后回填最近一次入库库位
{Method: http.MethodGet, Path: "/api/inbound/last-location", Handler: lastInboundLocationHandler(ctx)},
@@ -372,6 +374,7 @@ func RegisterHandlers(server *rest.Server, ctx *svc.ServiceContext) {
{Method: http.MethodPost, Path: "/api/internal/outbound/delivered", Handler: wrapInternal(ctx)(markOutboundDeliveredHandler(ctx))},
// 配送单送达回写(2026-11-05 拍板:AGV 卸货放行后 MES 回写;配送单不存在时忽略,兼容旧链路)
{Method: http.MethodPost, Path: "/api/internal/delivery/delivered", Handler: wrapInternal(ctx)(deliveryDeliveredInternalHandler(ctx))},
{Method: http.MethodGet, Path: "/api/internal/delivery/status", Handler: wrapInternal(ctx)(deliveryStatusInternalHandler(ctx))},
},
)
}