系统 SHALL 新建 biz_production_material_stock_batch,结构对齐 biz_qc_material_stock_batch,含 material_id → biz_production_material.id,快照含 material_type。
批次必填:stock_in_no(租户唯一)、stock_in_date、expire_date、catalog_no、batch_no、manufacturer、unit_price、amount、in_qty、remaining_qty。
biz_production_material.stock_qty = Σ 下属批次 remaining_qty。
系统 SHALL 新建 biz_production_material_usage 作为 唯一 变动流水表,对齐 QC usage 字段,并扩展生产域溯源:
| source_type | 说明 |
|---|---|
| manual_in | 入库 |
| manual_out | 领用出库 |
| step_save | 生产工单步骤登记 |
生产步骤字段:step_id、step_name、task_id、task_no;领用关联:parent_usage_id、receiver、purpose;批次快照字段同 QC。
SHALL NOT 继续使用 biz_consumable_stock_log / biz_reagent_stock_log 写入新流水。
【生产物料库】批次列表 Tab SHALL 调用 GET /production-material-batches,支持 keyword、materialId、materialType、status 筛选;一行 = 一条批次。
入库/批量入库、领用出库/批量出库 SHALL 按 batchId 操作,逻辑对齐 QC qc_material_stock_batch CRUD。