提交
This commit is contained in:
1 parent
731bbf878a
commit
f4bbe3e06e
56 files changed
+13599
-11335
No files matched your search
@@ -718,6 +718,31 @@ async def qc_work_order_mine_tab_unfinished_counts(
|
||||
return error_response(400, str(e))
|
||||
|
||||
|
||||
@router.get("/qc-work-orders/by-sample")
|
||||
async def list_qc_work_orders_by_sample(
|
||||
sampleCode: str = Query(..., alias="sampleCode"),
|
||||
receptionSource: str = Query(..., alias="receptionSource"),
|
||||
db: Session = Depends(get_db),
|
||||
user: dict = Depends(
|
||||
require_any_menu_code("biz:qcWorkOrder:list", "biz:myQcTask:list")
|
||||
),
|
||||
):
|
||||
try:
|
||||
tenant_no = _get_tenant_no(db, user)
|
||||
items = wo_svc.list_work_orders_by_sample(
|
||||
db,
|
||||
sample_code=sampleCode,
|
||||
reception_source=receptionSource,
|
||||
tenant_no=tenant_no,
|
||||
user_info=user,
|
||||
)
|
||||
return success_response({"list": items})
|
||||
except PermissionError as e:
|
||||
return error_response(403, str(e))
|
||||
except Exception as e:
|
||||
return error_response(400, str(e))
|
||||
|
||||
|
||||
@router.get("/qc-work-orders/{work_order_id}")
|
||||
async def get_qc_work_order_detail(
|
||||
work_order_id: str,
|
||||
|
||||
Reference in new issue
Block a user