feat: align surgery API with schemas and extend client tooling
- Refactor app API and schemas; adjust surgery pipeline, repository, and session manager. - Improve consumption TSV logging and consumable vision integration; trim voice resolution. - Add Baidu Face 1:N search script, .env.example entries, and client API integration doc. - Update demo client, staging checklist, surgery interface doc, and related tests; add sample face image. Made-with: Cursor
This commit is contained in:
@@ -11,7 +11,6 @@ from loguru import logger
|
||||
from app.config import Settings
|
||||
from app.services.voice_file_log import emit_voice_event
|
||||
from app.database import AsyncSessionLocal
|
||||
from app.db.models import VoiceConfirmationAudit
|
||||
from app.repositories.voice_audits import VoiceAuditRepository
|
||||
from app.services.audio_wav import WavDecodeError, wav_bytes_to_pcm16k_mono_s16le
|
||||
from app.services.baidu_speech import BaiduSpeechNotConfiguredError, BaiduSpeechService
|
||||
@@ -660,22 +659,6 @@ class VoiceConfirmationService:
|
||||
message="已确认并记一条消耗。",
|
||||
)
|
||||
|
||||
async def list_voice_audits_for_surgery(
|
||||
self,
|
||||
surgery_id: str,
|
||||
*,
|
||||
limit: int = 50,
|
||||
offset: int = 0,
|
||||
) -> tuple[list[VoiceConfirmationAudit], int]:
|
||||
"""从 `voice_confirmation_audits` 表分页读取,供内部查询与报表。"""
|
||||
async with AsyncSessionLocal() as session:
|
||||
return await self._audits.list_by_surgery(
|
||||
session,
|
||||
surgery_id,
|
||||
limit=limit,
|
||||
offset=offset,
|
||||
)
|
||||
|
||||
async def _persist_audit(
|
||||
self,
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user