From a2f31b3bfe247fb6d0b904b9981c57cd758730c4 Mon Sep 17 00:00:00 2001 From: wangfq Date: Mon, 15 Jun 2026 16:45:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20get=5Fpending=5Fdetector=5Fserial=20?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E5=88=A0=E9=99=A4=E8=AE=B0=E5=BD=95=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8D=20B2=20=E6=B6=88=E8=B4=B9=E5=90=8E=20B4=20?= =?UTF-8?q?=E6=8B=BF=E4=B8=8D=E5=88=B0=E5=BA=8F=E5=88=97=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/models.py b/src/models.py index 1afaf04..7c0a26c 100644 --- a/src/models.py +++ b/src/models.py @@ -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 ""