1.修改get_all_section_by_account
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user