refactor(db)!: clean up business SQL access

- make realtime replacement and analysis result writes transactional\n- consolidate SCADA repositories and remove process-global project state\n- validate SCADA batches and use indexed GIS-backed business queries\n\nBREAKING CHANGE: remove the public analysis result writer and the pipeline-health network_name query parameter.
This commit is contained in:
2026-08-28 11:37:36 +08:00
parent b74799a39d
commit 9b095c7439
34 changed files with 859 additions and 921 deletions
+3 -3
View File
@@ -13,21 +13,21 @@ router = APIRouter()
@router.get("/network-schemas/scada-device", summary="获取 SCADA 设备结构")
async def get_scada_device_schema(
def get_scada_device_schema(
network: str = Query(..., description="管网名称(或数据库名称)"),
) -> dict[str, dict[str, Any]]:
return get_scada_info_schema(network)
@router.get("/scada-devices", summary="获取 SCADA 设备列表")
async def get_scada_devices(
def get_scada_devices(
network: str = Query(..., description="管网名称(或数据库名称)"),
) -> list[dict[str, Any]]:
return get_all_scada_info(network)
@router.get("/scada-devices/detail", summary="获取 SCADA 设备")
async def get_scada_device(
def get_scada_device(
network: str = Query(..., description="管网名称(或数据库名称)"),
device_id: str = Query(..., description="SCADA 设备 ID"),
) -> dict[str, Any]: