未知(继上次中断)

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
@@ -48,6 +48,7 @@ async def list_contract_fees(
db: AsyncSession,
project_id: uuid.UUID,
center_id: uuid.UUID | None = None,
center_ids: set[uuid.UUID] | None = None,
q: str | None = None,
) -> Sequence[tuple[ContractFee, str, float, float, date | None, date | None]]:
paid_total = func.coalesce(
@@ -82,6 +83,10 @@ async def list_contract_fees(
if center_id:
stmt = stmt.where(ContractFee.center_id == center_id)
if center_ids is not None:
if not center_ids:
return []
stmt = stmt.where(ContractFee.center_id.in_(center_ids))
if q:
conditions = [Site.name.ilike(f"%{q}%")]