导出接口

This commit is contained in:
lhx
2025-11-10 09:56:50 +08:00
parent 4ecc770d20
commit 3bd5885dce
6 changed files with 400 additions and 6 deletions

View File

@@ -124,3 +124,7 @@ class CheckpointService(BaseService[Checkpoint]):
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)
def get_by_section_ids(self, db: Session, section_ids: List[str]) -> List[Checkpoint]:
"""根据多个section_id批量获取观测点数据"""
return db.query(Checkpoint).filter(Checkpoint.section_id.in_(section_ids)).all()