未知(继上次中断)
This commit is contained in:
@@ -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}%")]
|
||||
|
||||
Reference in New Issue
Block a user