feat: 核心业务实体扩充(混产模板/产品BOM/试制记录)、WMS 库存检验增强与前端通用能力
- MES 新增实体:混产模板、产品BOM、产品工艺物料、试制记录(schema + ent 生成码 + logic/handler/前端页) - WMS 实体增强:检验记录、库存、半成品重构;新增序列号库存与短缺代报 - AGV 与产能:AGV 手动点位与链路、物料守卫、短缺预测、原因字典 - 前端通用能力:新增下一步引导组件 NextStepBar,统一帮助文档/布局/请求拦截与操作列 - 工位终端:界面与各 handler 调整(api/store/绑定/PLC/拧紧/上报等) - 配置与文档:更新 mes-api.yaml、WMS README 及案例/产线API/问题记录/项目说明/流程说明
This commit is contained in:
@@ -147,9 +147,11 @@ func RegisterHandlers(server *rest.Server, ctx *svc.ServiceContext) {
|
||||
{Method: http.MethodPost, Path: "/api/delivery/create", Handler: requirePerm(ctx, "call:manage", deliveryCreateHandler(ctx))},
|
||||
{Method: http.MethodPost, Path: "/api/delivery/cancel", Handler: requirePerm(ctx, "call:manage", deliveryCancelHandler(ctx))},
|
||||
{Method: http.MethodPost, Path: "/api/delivery/dispatch", Handler: requirePerm(ctx, "call:manage", deliveryDispatchHandler(ctx))},
|
||||
// WMS 代叫料(2026-11-05 拍板:与工位终端同一套叫料包逻辑)
|
||||
{Method: http.MethodPost, Path: "/api/call/create", Handler: requirePerm(ctx, "call:manage", callCreateProxyHandler(ctx))},
|
||||
{Method: http.MethodGet, Path: "/api/call/pool-raw", Handler: requirePerm(ctx, "call:view", callPoolRawProxyHandler(ctx))},
|
||||
// WMS 代叫料(2026-11-05 拍板:与工位终端同一套叫料包逻辑)
|
||||
{Method: http.MethodPost, Path: "/api/call/create", Handler: requirePerm(ctx, "call:manage", callCreateProxyHandler(ctx))},
|
||||
{Method: http.MethodGet, Path: "/api/call/pool-raw", Handler: requirePerm(ctx, "call:view", callPoolRawProxyHandler(ctx))},
|
||||
// 库管代工位补料申请(2026-11-14 用户第16条):只转发 MES 生成待审批补料单,WMS 不审批/不调额度
|
||||
{Method: http.MethodPost, Path: "/api/shortage/on-behalf", Handler: requirePerm(ctx, "call:manage", shortageOnBehalfHandler(ctx))},
|
||||
},
|
||||
)
|
||||
|
||||
@@ -224,13 +226,13 @@ func RegisterHandlers(server *rest.Server, ctx *svc.ServiceContext) {
|
||||
},
|
||||
)
|
||||
|
||||
// 半成品
|
||||
// 在制品
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{Method: http.MethodPost, Path: "/api/semi/inbound", Handler: semiInboundHandler(ctx)},
|
||||
{Method: http.MethodPost, Path: "/api/semi/outbound", Handler: semiOutboundHandler(ctx)},
|
||||
{Method: http.MethodGet, Path: "/api/semi/query", Handler: querySemiHandler(ctx)},
|
||||
// A2 半成品入库继承产线工单:前端凭工单号只读带出合同号(归属)
|
||||
// A2 在制品入库继承产线工单:前端凭工单号只读带出合同号(归属)
|
||||
{Method: http.MethodGet, Path: "/api/workorder/contract", Handler: workOrderContractHandler(ctx)},
|
||||
// B1 入库产品工号软校验:只判工单存在(不要求有合同号),红字不阻断
|
||||
{Method: http.MethodGet, Path: "/api/workorder/exists", Handler: workOrderExistsHandler(ctx)},
|
||||
@@ -241,6 +243,8 @@ func RegisterHandlers(server *rest.Server, ctx *svc.ServiceContext) {
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{Method: http.MethodPost, Path: "/api/finished/inbound", Handler: requirePerm(ctx, "wms.finished:edit", manualFinishedInboundHandler(ctx))},
|
||||
// 2026-11-13 拍板:扫 SN 反查 MES 工单(只读);MES 不可达直接 502,前端据此禁用入库。
|
||||
{Method: http.MethodGet, Path: "/api/finished/lookup", Handler: requirePerm(ctx, "wms.finished:edit", finishedLookupHandler(ctx))},
|
||||
// 今日成品入库记录(只读表:统一库存主表 category=3 当天,登录可查)
|
||||
{Method: http.MethodGet, Path: "/api/finished/inbound/today", Handler: finishedInboundTodayHandler(ctx)},
|
||||
},
|
||||
@@ -278,7 +282,7 @@ func RegisterHandlers(server *rest.Server, ctx *svc.ServiceContext) {
|
||||
},
|
||||
)
|
||||
|
||||
// 附件(下沉到各业务页内嵌使用:入库/物料/检验/半成品/出库)
|
||||
// 附件(下沉到各业务页内嵌使用:入库/物料/检验/在制品/出库)
|
||||
// 2026-10-28 生命周期重构:附件中心转纯查阅;删除/恢复/彻底清除唯一入口=数据归档页(attachment:manage);
|
||||
// 业务面板仅保留上传人本人「移除」误传附件(/remove,handler 内校验本人)。
|
||||
server.AddRoutes(
|
||||
@@ -397,6 +401,8 @@ func RegisterHandlers(server *rest.Server, ctx *svc.ServiceContext) {
|
||||
// 配送单送达回写(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))},
|
||||
// 成品序列号在库核验(MES「成品试验」登记前只读校验,另一代理已建 handler)
|
||||
{Method: http.MethodGet, Path: "/api/internal/inventory/sn-exists", Handler: wrapInternal(ctx)(inventorySnExistsInternalHandler(ctx))},
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user