1.新增通过断面id获取所有 的 测点数据
This commit is contained in:
@@ -8,9 +8,7 @@ class CheckpointService(BaseService[Checkpoint]):
|
||||
def __init__(self):
|
||||
super().__init__(Checkpoint)
|
||||
|
||||
def get_by_section_id(self, db: Session, section_id: str) -> List[Checkpoint]:
|
||||
"""根据断面ID获取观测点"""
|
||||
return self.get_by_field(db, "section_id", section_id)
|
||||
|
||||
|
||||
def get_by_point_id(self, db: Session, point_id: str) -> Optional[Checkpoint]:
|
||||
"""根据观测点ID获取观测点"""
|
||||
@@ -121,4 +119,8 @@ class CheckpointService(BaseService[Checkpoint]):
|
||||
}
|
||||
def get_by_nyid(self, db: Session, nyid: str) -> List[Checkpoint]:
|
||||
"""根据NYID获取所有相关的测点信息"""
|
||||
return self.get_by_field(db, "NYID", nyid)
|
||||
return self.get_by_field(db, "NYID", nyid)
|
||||
# 通过section_id获取所有观测点数据
|
||||
def get_by_section_id(self, db: Session, section_id: str) -> List[Checkpoint]:
|
||||
"""根据section_id获取所有相关的测点信息"""
|
||||
return self.get_by_field(db, "section_id", section_id)
|
||||
|
||||
Reference in New Issue
Block a user