断面加账号id
This commit is contained in:
@@ -17,4 +17,5 @@ class SectionData(Base):
|
||||
treatment_depth = Column(String(100), comment="处理深度")
|
||||
foundation_treatment_method = Column(String(100), comment="地基处理方法")
|
||||
rock_mass_classification = Column(String(100), comment="围岩级别")
|
||||
account_id = Column(String(100), nullable=True, comment="账号id", index=True)
|
||||
section_id = Column(String(100), nullable=False, comment="断面id", index=True)
|
||||
@@ -65,6 +65,7 @@ class SectionDataImportRequest(BaseModel):
|
||||
treatment_depth: Optional[str] = None
|
||||
foundation_treatment_method: Optional[str] = None
|
||||
rock_mass_classification: Optional[str] = None
|
||||
account_id: Optional[str] = None
|
||||
|
||||
# 原始数据查询请求
|
||||
class OriginalDataQueryRequest(BaseModel):
|
||||
@@ -118,6 +119,7 @@ class SectionDataQueryRequest(BaseModel):
|
||||
treatment_depth: Optional[str] = None
|
||||
foundation_treatment_method: Optional[str] = None
|
||||
rock_mass_classification: Optional[str] = None
|
||||
account_id: Optional[str] = None
|
||||
|
||||
# 水准数据查询请求
|
||||
class LevelDataQueryRequest(BaseModel):
|
||||
|
||||
@@ -81,6 +81,7 @@ class SectionDataService(BaseService[SectionData]):
|
||||
"treatment_depth": section.treatment_depth,
|
||||
"foundation_treatment_method": section.foundation_treatment_method,
|
||||
"rock_mass_classification": section.rock_mass_classification,
|
||||
"account_id": section.account_id,
|
||||
"checkpoints": [
|
||||
{
|
||||
"id": cp.id,
|
||||
@@ -242,6 +243,7 @@ class SectionDataService(BaseService[SectionData]):
|
||||
section.treatment_depth = item_data.get('treatment_depth')
|
||||
section.foundation_treatment_method = item_data.get('foundation_treatment_method')
|
||||
section.rock_mass_classification = item_data.get('rock_mass_classification')
|
||||
section.account_id = item_data.get('account_id')
|
||||
logger.info(f"Updated section: {item_data.get('section_id')}")
|
||||
else:
|
||||
# 新增操作
|
||||
@@ -259,7 +261,8 @@ class SectionDataService(BaseService[SectionData]):
|
||||
compression_layer_thickness=item_data.get('compression_layer_thickness'),
|
||||
treatment_depth=item_data.get('treatment_depth'),
|
||||
foundation_treatment_method=item_data.get('foundation_treatment_method'),
|
||||
rock_mass_classification=item_data.get('rock_mass_classification')
|
||||
rock_mass_classification=item_data.get('rock_mass_classification'),
|
||||
account_id=item_data.get('account_id')
|
||||
)
|
||||
db.add(section)
|
||||
logger.info(f"Created section: {item_data.get('section_id')}")
|
||||
|
||||
Reference in New Issue
Block a user