feat(sensor): 同步监测点优化到客户版

This commit is contained in:
2026-08-04 14:55:37 +08:00
parent 4ced14ee04
commit 41bf5e9d92
10 changed files with 1473 additions and 669 deletions
+14
View File
@@ -80,6 +80,11 @@ def _sensor_points(
points.append(
{
"node_id": node_id,
"max_pipe_diameter": (
float(node["max_pipe_diameter"])
if node["max_pipe_diameter"] is not None
else None
),
"project_x": project_x,
"project_y": project_y,
"map_x": map_x,
@@ -92,6 +97,15 @@ def _sensor_points(
return points
def get_sensor_placement_candidate(
network: str,
node_id: str,
) -> dict[str, Any]:
"""Return the authoritative editable point data for one junction."""
return _sensor_points(network, _normalize_locations([node_id]))[0]
def validate_sensor_placement_nodes(
network: str,
sensor_location: list[str],