feat: 新增产品工艺管理与工序审核功能

- 新增产品工艺(product_process)及明细(product_process_item)数据模型
- 新增工序审核开关(need_audit)与审核角色(audit_role)字段
- 新增待审核签字页面与路由
- 优化 WMS/MES 接口交互,增加业务错误处理与友好提示
- 补充库存过滤逻辑,避免返回已出库 SN 数据
- 调整默认查询时间范围为近一个月,优化用户体验
This commit is contained in:
SunYF
2026-10-09 13:46:33 +08:00
parent e2f1dacf76
commit b032f47fc7
95 changed files with 10546 additions and 1457 deletions
+4
View File
@@ -1406,6 +1406,10 @@ func listStockBatchesInternalHandler(ctx *svc.ServiceContext) http.HandlerFunc {
inventory.MaterialCodeEQ(materialCode),
inventory.QuantityGT(0),
inventory.QualityStatusIn(QStatusPass, QStatusConcession),
// 仅「在库」可出库:SN 行出库走状态机(status 置「出库」)而 quantity 仍为 1,
// 缺此过滤会把已出库 SN 误返回,MES 自动备料逐颗尝试时第一颗即失败(AITEST 闭环实测缺陷)。
// 盘点冻结(锁定)行也不返回:与 stock/deduct 的冻结守卫口径一致,避免 MES 撞拦截。
inventory.StatusEQ("在库"),
)
if zc := strings.TrimSpace(r.URL.Query().Get("zoneCode")); zc != "" {
q = q.Where(inventory.ZoneCodeEQ(zc))