提交
This commit is contained in:
1 parent
575e63e7e8
commit
771f010a39
165 files changed
+67359
-21698
No files matched your search
@@ -118,6 +118,10 @@ async def list_collection_protocols(
|
||||
pageSize: int = Query(10, ge=1, le=100, alias="pageSize"),
|
||||
keyword: Optional[str] = None,
|
||||
protocolStatus: Optional[str] = Query(None, alias="protocolStatus"),
|
||||
createTimeStart: Optional[str] = Query(None, alias="createTimeStart"),
|
||||
createTimeEnd: Optional[str] = Query(None, alias="createTimeEnd"),
|
||||
sampleCollectTimeStart: Optional[str] = Query(None, alias="sampleCollectTimeStart"),
|
||||
sampleCollectTimeEnd: Optional[str] = Query(None, alias="sampleCollectTimeEnd"),
|
||||
user: dict = Depends(require_admin_or_super_admin),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
@@ -129,6 +133,10 @@ async def list_collection_protocols(
|
||||
page_size=pageSize,
|
||||
keyword=keyword,
|
||||
protocol_status=protocolStatus,
|
||||
create_time_start=createTimeStart,
|
||||
create_time_end=createTimeEnd,
|
||||
sample_collect_time_start=sampleCollectTimeStart,
|
||||
sample_collect_time_end=sampleCollectTimeEnd,
|
||||
tenant_no=tenant_no,
|
||||
scope_collector_user_id=current_user_id,
|
||||
user_info=user,
|
||||
@@ -427,6 +435,8 @@ async def list_payment_details(
|
||||
payStatus: str = Query("dfj", alias="payStatus"),
|
||||
keyword: str = Query("", alias="keyword"),
|
||||
transferType: str = Query("", alias="transferType"),
|
||||
installmentDueDateStart: Optional[str] = Query(None, alias="installmentDueDateStart"),
|
||||
installmentDueDateEnd: Optional[str] = Query(None, alias="installmentDueDateEnd"),
|
||||
user: dict = Depends(require_admin_or_super_admin),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
@@ -438,6 +448,8 @@ async def list_payment_details(
|
||||
pay_status=payStatus,
|
||||
keyword=keyword or None,
|
||||
transfer_type=transferType or None,
|
||||
installment_due_date_start=installmentDueDateStart,
|
||||
installment_due_date_end=installmentDueDateEnd,
|
||||
tenant_no=tenant_no,
|
||||
user_info=user,
|
||||
)
|
||||
@@ -552,11 +564,23 @@ async def post_submit_refund_finance_batch(
|
||||
async def list_receipt_confirm(
|
||||
page: int = Query(1, ge=1),
|
||||
pageSize: int = Query(10, ge=1, le=100, alias="pageSize"),
|
||||
keyword: Optional[str] = None,
|
||||
installmentDueDateStart: Optional[str] = Query(None, alias="installmentDueDateStart"),
|
||||
installmentDueDateEnd: Optional[str] = Query(None, alias="installmentDueDateEnd"),
|
||||
user: dict = Depends(require_admin_or_super_admin),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
tenant_no = _get_tenant_no(db, user)
|
||||
items, total = cp_svc.list_receipt_confirm_details(db, page=page, page_size=pageSize, tenant_no=tenant_no, user_info=user)
|
||||
items, total = cp_svc.list_receipt_confirm_details(
|
||||
db,
|
||||
page=page,
|
||||
page_size=pageSize,
|
||||
keyword=keyword or None,
|
||||
installment_due_date_start=installmentDueDateStart,
|
||||
installment_due_date_end=installmentDueDateEnd,
|
||||
tenant_no=tenant_no,
|
||||
user_info=user,
|
||||
)
|
||||
tp = cp_svc.total_pages(total, pageSize)
|
||||
return success_response({"list": items, "total": total, "page": page, "pageSize": pageSize, "totalPages": tp})
|
||||
|
||||
@@ -565,12 +589,22 @@ async def list_receipt_confirm(
|
||||
async def list_receipt_confirmed(
|
||||
page: int = Query(1, ge=1),
|
||||
pageSize: int = Query(10, ge=1, le=100, alias="pageSize"),
|
||||
keyword: Optional[str] = None,
|
||||
installmentDueDateStart: Optional[str] = Query(None, alias="installmentDueDateStart"),
|
||||
installmentDueDateEnd: Optional[str] = Query(None, alias="installmentDueDateEnd"),
|
||||
user: dict = Depends(require_admin_or_super_admin),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
tenant_no = _get_tenant_no(db, user)
|
||||
items, total = cp_svc.list_receipt_confirmed_details(
|
||||
db, page=page, page_size=pageSize, tenant_no=tenant_no, user_info=user
|
||||
db,
|
||||
page=page,
|
||||
page_size=pageSize,
|
||||
keyword=keyword or None,
|
||||
installment_due_date_start=installmentDueDateStart,
|
||||
installment_due_date_end=installmentDueDateEnd,
|
||||
tenant_no=tenant_no,
|
||||
user_info=user,
|
||||
)
|
||||
tp = cp_svc.total_pages(total, pageSize)
|
||||
return success_response({"list": items, "total": total, "page": page, "pageSize": pageSize, "totalPages": tp})
|
||||
@@ -623,11 +657,23 @@ async def post_receipt_confirm(
|
||||
async def list_refund_confirm(
|
||||
page: int = Query(1, ge=1),
|
||||
pageSize: int = Query(10, ge=1, le=100, alias="pageSize"),
|
||||
keyword: Optional[str] = None,
|
||||
installmentDueDateStart: Optional[str] = Query(None, alias="installmentDueDateStart"),
|
||||
installmentDueDateEnd: Optional[str] = Query(None, alias="installmentDueDateEnd"),
|
||||
user: dict = Depends(require_admin_or_super_admin),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
tenant_no = _get_tenant_no(db, user)
|
||||
items, total = cp_svc.list_refund_confirm_details(db, page=page, page_size=pageSize, tenant_no=tenant_no, user_info=user)
|
||||
items, total = cp_svc.list_refund_confirm_details(
|
||||
db,
|
||||
page=page,
|
||||
page_size=pageSize,
|
||||
keyword=keyword or None,
|
||||
installment_due_date_start=installmentDueDateStart,
|
||||
installment_due_date_end=installmentDueDateEnd,
|
||||
tenant_no=tenant_no,
|
||||
user_info=user,
|
||||
)
|
||||
tp = cp_svc.total_pages(total, pageSize)
|
||||
return success_response({"list": items, "total": total, "page": page, "pageSize": pageSize, "totalPages": tp})
|
||||
|
||||
@@ -636,12 +682,22 @@ async def list_refund_confirm(
|
||||
async def list_refund_confirmed(
|
||||
page: int = Query(1, ge=1),
|
||||
pageSize: int = Query(10, ge=1, le=100, alias="pageSize"),
|
||||
keyword: Optional[str] = None,
|
||||
installmentDueDateStart: Optional[str] = Query(None, alias="installmentDueDateStart"),
|
||||
installmentDueDateEnd: Optional[str] = Query(None, alias="installmentDueDateEnd"),
|
||||
user: dict = Depends(require_admin_or_super_admin),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
tenant_no = _get_tenant_no(db, user)
|
||||
items, total = cp_svc.list_refund_confirmed_details(
|
||||
db, page=page, page_size=pageSize, tenant_no=tenant_no, user_info=user
|
||||
db,
|
||||
page=page,
|
||||
page_size=pageSize,
|
||||
keyword=keyword or None,
|
||||
installment_due_date_start=installmentDueDateStart,
|
||||
installment_due_date_end=installmentDueDateEnd,
|
||||
tenant_no=tenant_no,
|
||||
user_info=user,
|
||||
)
|
||||
tp = cp_svc.total_pages(total, pageSize)
|
||||
return success_response({"list": items, "total": total, "page": page, "pageSize": pageSize, "totalPages": tp})
|
||||
@@ -680,6 +736,8 @@ async def list_storage_certs(
|
||||
pageSize: int = Query(10, ge=1, le=100, alias="pageSize"),
|
||||
keyword: Optional[str] = None,
|
||||
makeStatus: Optional[str] = Query(None, alias="makeStatus"),
|
||||
storageInDateStart: Optional[str] = Query(None, alias="storageInDateStart"),
|
||||
storageInDateEnd: Optional[str] = Query(None, alias="storageInDateEnd"),
|
||||
user: dict = Depends(require_admin_or_super_admin),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
@@ -689,6 +747,8 @@ async def list_storage_certs(
|
||||
tenant_no=tenant_no,
|
||||
keyword=keyword,
|
||||
make_status=makeStatus,
|
||||
storage_in_date_start=storageInDateStart,
|
||||
storage_in_date_end=storageInDateEnd,
|
||||
page=page,
|
||||
page_size=pageSize,
|
||||
user_info=user,
|
||||
@@ -707,6 +767,8 @@ async def list_fullmoon_todos(
|
||||
pageSize: int = Query(10, ge=1, le=100, alias="pageSize"),
|
||||
keyword: Optional[str] = None,
|
||||
todoStatus: Optional[str] = Query(None, alias="todoStatus"),
|
||||
fullmoonDateStart: Optional[str] = Query(None, alias="fullmoonDateStart"),
|
||||
fullmoonDateEnd: Optional[str] = Query(None, alias="fullmoonDateEnd"),
|
||||
user: dict = Depends(require_admin_or_super_admin),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
@@ -784,6 +846,15 @@ async def list_fullmoon_todos(
|
||||
ts = (ft.todo_status or "0") if ft else "0"
|
||||
if todoStatus and todoStatus.strip() and ts != todoStatus.strip():
|
||||
continue
|
||||
fm_start = (fullmoonDateStart or "").strip()[:10]
|
||||
fm_end = (fullmoonDateEnd or "").strip()[:10]
|
||||
if fm_start or fm_end:
|
||||
if not fullmoon_date_str:
|
||||
continue
|
||||
if fm_start and fullmoon_date_str < fm_start:
|
||||
continue
|
||||
if fm_end and fullmoon_date_str > fm_end:
|
||||
continue
|
||||
ft_dict = cp_svc._fullmoon_todo_to_dict(ft) if ft else dict(_empty_ft)
|
||||
items.append(
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user