1.通过accountid获取所有断面数据
This commit is contained in:
@@ -20,7 +20,10 @@ class SectionDataService(BaseService[SectionData]):
|
||||
"""根据断面ID获取断面数据"""
|
||||
sections = self.get_by_field(db, "section_id", section_id)
|
||||
return sections[0] if sections else None
|
||||
|
||||
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
|
||||
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