提交
This commit is contained in:
1 parent
6dc8cfb2c1
commit
d26fb23fcf
181 files changed
+25727
-24557
No files matched your search
@@ -1,6 +1,6 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException, status
|
||||
from fastapi import APIRouter, Depends, HTTPException, status, Query
|
||||
from sqlalchemy import or_
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
@@ -41,7 +41,7 @@ def _fill_offset_amounts(db: Session, tenant_no: str, rows, out_rows: List[Advan
|
||||
@router.get("/", response_model=ApiResponse[PagedData[AdvanceApplyOut]])
|
||||
def list_advances(
|
||||
page: int = 1,
|
||||
pageSize: int = 10,
|
||||
pageSize: int = Query(10, ge=1, le=500),
|
||||
status: Optional[str] = None,
|
||||
keyword: str = "",
|
||||
applicantId: Optional[str] = None,
|
||||
@@ -80,7 +80,7 @@ def list_advances(
|
||||
@router.get("/my", response_model=ApiResponse[PagedData[AdvanceApplyOut]])
|
||||
def my_advances(
|
||||
page: int = 1,
|
||||
pageSize: int = 10,
|
||||
pageSize: int = Query(10, ge=1, le=500),
|
||||
status: Optional[str] = None,
|
||||
keyword: str = "",
|
||||
applyDate: Optional[str] = None,
|
||||
@@ -140,7 +140,7 @@ def advance_status_counts(
|
||||
@router.get("/pending-approval", response_model=ApiResponse[PagedData[AdvanceApplyOut]])
|
||||
def pending_approval(
|
||||
page: int = 1,
|
||||
pageSize: int = 10,
|
||||
pageSize: int = Query(10, ge=1, le=500),
|
||||
keyword: str = "",
|
||||
applicantId: Optional[str] = None,
|
||||
applyDate: Optional[str] = None,
|
||||
@@ -180,7 +180,7 @@ def advance_pending_approval_stats(
|
||||
@router.get("/approved-by-me", response_model=ApiResponse[PagedData[AdvanceApplyOut]])
|
||||
def approved_by_me(
|
||||
page: int = 1,
|
||||
pageSize: int = 10,
|
||||
pageSize: int = Query(10, ge=1, le=500),
|
||||
keyword: str = "",
|
||||
applicantId: Optional[str] = None,
|
||||
applyDate: Optional[str] = None,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import mimetypes
|
||||
from typing import List, Optional, Set
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException, Request, status
|
||||
from fastapi import APIRouter, Depends, HTTPException, Request, status, Query
|
||||
from sqlalchemy.orm import Session
|
||||
from starlette.datastructures import UploadFile as StarletteUploadFile
|
||||
|
||||
@@ -27,7 +27,7 @@ def get_mine_wallet_summary(
|
||||
@router.get("/invoice-wallets", response_model=ApiResponse[PagedData[WalletSummaryOut]])
|
||||
def list_invoice_wallets(
|
||||
page: int = 1,
|
||||
pageSize: int = 10,
|
||||
pageSize: int = Query(10, ge=1, le=500),
|
||||
keyword: str = "",
|
||||
db: Session = Depends(get_db),
|
||||
user: BxUserContext = Depends(get_bx_current_user),
|
||||
@@ -42,7 +42,7 @@ def list_invoice_wallets(
|
||||
@router.get("/invoices", response_model=ApiResponse[PagedData[InvoiceOut]])
|
||||
def list_invoices(
|
||||
page: int = 1,
|
||||
pageSize: int = 10,
|
||||
pageSize: int = Query(10, ge=1, le=500),
|
||||
userId: Optional[str] = None,
|
||||
db: Session = Depends(get_db),
|
||||
user: BxUserContext = Depends(get_bx_current_user),
|
||||
|
||||
@@ -4,7 +4,7 @@ from datetime import datetime
|
||||
from typing import Any, List, Optional
|
||||
from urllib.parse import quote
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException, status
|
||||
from fastapi import APIRouter, Depends, HTTPException, status, Query
|
||||
from fastapi.responses import StreamingResponse
|
||||
from sqlalchemy import or_
|
||||
from sqlalchemy.orm import Session
|
||||
@@ -47,7 +47,7 @@ def _wrap_reimburse_rows(outs: List[ReimburseApplyOut]) -> List[dict]:
|
||||
@router.get("/pending", response_model=ApiResponse[PagedData[Any]])
|
||||
def list_pending_payments(
|
||||
page: int = 1,
|
||||
pageSize: int = 10,
|
||||
pageSize: int = Query(10, ge=1, le=500),
|
||||
keyword: str = "",
|
||||
applicantId: Optional[str] = None,
|
||||
applyDate: Optional[str] = None,
|
||||
@@ -94,7 +94,7 @@ def payment_finance_stats(
|
||||
@router.get("/processed", response_model=ApiResponse[PagedData[Any]])
|
||||
def list_processed_payments(
|
||||
page: int = 1,
|
||||
pageSize: int = 10,
|
||||
pageSize: int = Query(10, ge=1, le=500),
|
||||
keyword: str = "",
|
||||
applicantId: Optional[str] = None,
|
||||
applyDate: Optional[str] = None,
|
||||
@@ -197,7 +197,7 @@ def batch_offset(
|
||||
@router.get("/advance-issues", response_model=ApiResponse[PagedData[AdvanceIssueOut]])
|
||||
def list_advance_issues(
|
||||
page: int = 1,
|
||||
pageSize: int = 10,
|
||||
pageSize: int = Query(10, ge=1, le=500),
|
||||
issue_status: Optional[str] = None,
|
||||
keyword: str = "",
|
||||
applicantId: Optional[str] = None,
|
||||
|
||||
@@ -146,7 +146,7 @@ def import_reimburses(
|
||||
@router.get("/", response_model=ApiResponse[PagedData[ReimburseApplyOut]])
|
||||
def list_reimburses(
|
||||
page: int = 1,
|
||||
pageSize: int = 10,
|
||||
pageSize: int = Query(10, ge=1, le=500),
|
||||
status: Optional[str] = None,
|
||||
keyword: str = "",
|
||||
expense_id: Optional[str] = None,
|
||||
@@ -256,7 +256,7 @@ def reimburse_status_counts(
|
||||
@router.get("/pending-approval", response_model=ApiResponse[PagedData[ReimburseApplyOut]])
|
||||
def pending_approval(
|
||||
page: int = 1,
|
||||
pageSize: int = 10,
|
||||
pageSize: int = Query(10, ge=1, le=500),
|
||||
keyword: str = "",
|
||||
applicantId: Optional[str] = None,
|
||||
expenseName: Optional[str] = None,
|
||||
@@ -298,7 +298,7 @@ def pending_approval_stats(
|
||||
@router.get("/approved-by-me", response_model=ApiResponse[PagedData[ReimburseApplyOut]])
|
||||
def approved_by_me(
|
||||
page: int = 1,
|
||||
pageSize: int = 10,
|
||||
pageSize: int = Query(10, ge=1, le=500),
|
||||
keyword: str = "",
|
||||
applicantId: Optional[str] = None,
|
||||
expenseName: Optional[str] = None,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from typing import List
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException, status
|
||||
from fastapi import APIRouter, Depends, HTTPException, status, Query
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app.core.bx_auth import BxUserContext, get_bx_current_user
|
||||
@@ -21,7 +21,7 @@ router = APIRouter(prefix="/workflows", tags=["工作流配置"])
|
||||
@router.get("/", response_model=ApiResponse[PagedData[WorkflowDefOut]])
|
||||
def list_workflows(
|
||||
page: int = 1,
|
||||
pageSize: int = 10,
|
||||
pageSize: int = Query(10, ge=1, le=500),
|
||||
db: Session = Depends(get_db),
|
||||
user: BxUserContext = Depends(get_bx_current_user),
|
||||
):
|
||||
|
||||
Reference in new issue
Block a user