This commit is contained in:
SunYF
2026-10-26 16:32:35 +08:00
parent 4b14f9540a
commit f86feb2271
99 changed files with 1652 additions and 521 deletions
+5
View File
@@ -62,7 +62,9 @@ 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.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))},
},
)
@@ -74,6 +76,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.MethodGet, Path: "/api/inbound/import-template", Handler: excelInboundImportTemplateHandler(ctx)},
// 入库库位联动:选物料后回填最近一次入库库位
{Method: http.MethodGet, Path: "/api/inbound/last-location", Handler: lastInboundLocationHandler(ctx)},
// 入库作废:填原因 + 回滚库存(结构件按批次、电气件按 SN 精确回滚)
@@ -170,6 +173,8 @@ func RegisterHandlers(server *rest.Server, ctx *svc.ServiceContext) {
{Method: http.MethodGet, Path: "/api/semi/query", Handler: querySemiHandler(ctx)},
// A2 半成品入库继承产线工单:前端凭工单号只读带出合同号(归属)
{Method: http.MethodGet, Path: "/api/workorder/contract", Handler: workOrderContractHandler(ctx)},
// B1 入库产品工号软校验:只判工单存在(不要求有合同号),红字不阻断
{Method: http.MethodGet, Path: "/api/workorder/exists", Handler: workOrderExistsHandler(ctx)},
},
)