导出优化,上传端代码

This commit is contained in:
2025-11-08 10:36:24 +08:00
parent 5ee83477e3
commit 7633e22d99
7 changed files with 865 additions and 55 deletions

View File

@@ -20,6 +20,12 @@ class SettlementDataService(BaseService[SettlementData]):
"""根据观测点ID获取沉降数据"""
return self.get_by_field(db, "point_id", point_id)
def get_by_point_ids(self, db: Session, point_ids: List[str]) -> List[SettlementData]:
"""根据观测点ID列表批量获取沉降数据"""
if not point_ids:
return []
return db.query(SettlementData).filter(SettlementData.point_id.in_(point_ids)).all()
def get_by_nyid(self, db: Session, nyid: str) -> List[SettlementData]:
"""根据期数ID获取沉降数据"""
return self.get_by_field(db, "NYID", nyid)