Files
shanxia2.0/backend/app/services/pl_inventory_link_read.py
T
wuzilongandCursor 10183dabc2 feat(backend): expose pound QR items on driver transport page
Enrich inventory links with business type/partner and attach
poundQrcodeItems for the public driver footer button.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:29:03 +08:00

34 lines
1.0 KiB
Python

"""构建运输-地磅出入库关联读模型(不含现场链接,现场链接见 pl_transport_site_link)。"""
from __future__ import annotations
from app.schemas.pl.transport import TransportInventoryLinkRead
def build_transport_inventory_link_read(
db: Session,
*,
plan_product_id: str,
product_name: str,
db_purchase_plan_id: str,
db_inventory_id: str,
batch_no: str,
plan_no: str,
stop_type: str | None = None,
stop_id: str | None = None,
business_type: str | None = None,
partner_company: str | None = None,
) -> TransportInventoryLinkRead:
del db # 现场链接已迁至 pl_transport_site_link
return TransportInventoryLinkRead(
plan_product_id=plan_product_id,
product_name=product_name,
db_purchase_plan_id=db_purchase_plan_id,
db_inventory_id=db_inventory_id,
batch_no=batch_no,
plan_no=plan_no,
stop_type=stop_type,
stop_id=stop_id,
business_type=business_type,
partner_company=partner_company,
)