2.2 KiB
2.2 KiB
ADDED Requirements
Requirement: Usage log requisition link fields
biz_production_material_usage SHALL 包含:
parent_usage_id— step_save 指向 manual_outusage_unitmaterial_type快照
步骤子表 biz_production_task_step_reagent / _consumable 保留 requisition_usage_id(指向 usage.id)。
Scenario: Step save links to manual out in unified usage table
- WHEN 步骤保存登记消耗
- THEN 写入 production_material_usage,parent_usage_id 指向同表 manual_out 行
Requirement: Requisition options API
系统 SHALL 提供:
GET /api/admin/web/admin/production-material-requisition-options
Query: materialType? (reagent|consumable), keyword?, limit?
返回 source_type=manual_out 记录,label 含批号/入库编号/领用人;materialType 过滤试剂或耗材。
Scenario: Reagent tab loads reagent requisitions only
- WHEN 生产工单步骤试剂 Tab 请求 materialType=reagent
- THEN 仅返回 material_type=reagent 的领用记录
Scenario: Consumable tab loads consumable requisitions only
- WHEN 耗材 Tab 请求 materialType=consumable
- THEN 仅返回耗材领用记录
Requirement: My production material requisition list API
系统 SHALL 提供:
GET /api/admin/web/admin/my-production-material-usages
Query: materialType?, changeType?, keyword?, startTime?, endTime?, page, pageSize
可见范围(与 QC 一致):
- manual_out:当前用户为 receiver
- step_save:当前用户为 create_by
Scenario: Single my menu with type filter
- WHEN 用户打开【我的物料领用记录】并筛选 materialType=consumable
- THEN 仅展示耗材相关领用与步骤登记
Scenario: Step registration visible in my list
- WHEN 用户在生产工单登记试剂消耗
- THEN my-production-material-usages 含该 step_save 行(material_type=reagent)
Requirement: Requisition child step usages API
GET /api/admin/web/admin/production-material-requisitions/{parentUsageId}/step-usages
返回 parent_usage_id 下所有 step_save 明细。
Scenario: Drill down step usages from requisition
- WHEN 查询某领用记录下钻
- THEN 返回关联生产步骤消耗列表