Compare commits

...

1 Commits

View File

@@ -866,7 +866,7 @@ async def get_vehicle_base_test_by_type(type_num: int) -> dict | None:
# ─── tb_pending_detector ───────────────────────────────────────────
async def get_pending_detector_serial(dnt_id: int) -> str:
"""获取并清除待插入的车检器序列号(一次性消费)"""
"""获取待插入的车检器序列号"""
pool = await get_pool()
async with pool.acquire() as conn:
async with conn.cursor(aiomysql.DictCursor) as cur:
@@ -876,10 +876,5 @@ async def get_pending_detector_serial(dnt_id: int) -> str:
)
row = await cur.fetchone()
if row:
# 清除已消费的记录
await cur.execute(
"DELETE FROM tb_pending_detector WHERE dnt_id=%s",
(dnt_id,),
)
return row["detector_serial"] or ""
return ""