1.修改get_all_section_by_account

This commit is contained in:
whm
2025-11-01 14:15:32 +08:00
parent 61be8f9243
commit 51068dc4e1
3 changed files with 5 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ class SectionDataService(BaseService[SectionData]):
def get_by_account_id(self, db: Session, account_id: str) -> Optional[SectionData]:
"""根据账号ID获取断面数据"""
accounts = self.get_by_field(db, "account_id", account_id)
return accounts[0] if accounts else None
return accounts if accounts else None
def get_by_number(self, db: Session, number: str) -> List[SectionData]:
"""根据桥梁墩(台)编号获取断面数据"""
return self.get_by_field(db, "number", number)