未知(继上次中断)

This commit is contained in:
Cheng Zhou
2026-02-04 10:52:34 +08:00
parent 8e258d21a7
commit 737f84bf54
99 changed files with 5497 additions and 2143 deletions
+5
View File
@@ -44,6 +44,7 @@ async def list_shipments(
db: AsyncSession,
study_id: uuid.UUID,
center_id: uuid.UUID | None = None,
center_ids: set[uuid.UUID] | None = None,
site_name: str | None = None,
tracking_no: str | None = None,
direction: str | None = None,
@@ -52,6 +53,10 @@ async def list_shipments(
limit: int = 100,
) -> Sequence[DrugShipment]:
stmt = select(DrugShipment).where(DrugShipment.study_id == study_id)
if center_ids is not None:
if not center_ids:
return []
stmt = stmt.where(DrugShipment.center_id.in_(center_ids))
if center_id:
stmt = stmt.where(DrugShipment.center_id == center_id)
if site_name: