增加断面字段
This commit is contained in:
@@ -12,4 +12,8 @@ class SectionData(Base):
|
||||
status = Column(String(100), nullable=False, comment="断面状态")
|
||||
number = Column(String(100), nullable=False, comment="所在桥梁墩(台)编号", index=True)
|
||||
transition_paragraph = Column(String(100), comment="过渡段")
|
||||
design_fill_height = Column(String(100), comment="设计填土高度")
|
||||
compression_layer_thickness = Column(String(100), comment="压实层厚度")
|
||||
treatment_depth = Column(String(100), comment="处理深度")
|
||||
foundation_treatment_method = Column(String(100), comment="地基处理方法")
|
||||
section_id = Column(String(100), nullable=False, comment="断面id", index=True)
|
||||
@@ -61,6 +61,10 @@ class SectionDataImportRequest(BaseModel):
|
||||
basic_types: Optional[str] = None
|
||||
height: Optional[str] = None
|
||||
transition_paragraph: Optional[str] = None
|
||||
design_fill_height: Optional[str] = None
|
||||
compression_layer_thickness: Optional[str] = None
|
||||
treatment_depth: Optional[str] = None
|
||||
foundation_treatment_method: Optional[str] = None
|
||||
|
||||
# 原始数据查询请求
|
||||
class OriginalDataQueryRequest(BaseModel):
|
||||
@@ -110,6 +114,10 @@ class SectionDataQueryRequest(BaseModel):
|
||||
basic_types: Optional[str] = None
|
||||
height: Optional[str] = None
|
||||
transition_paragraph: Optional[str] = None
|
||||
design_fill_height: Optional[str] = None
|
||||
compression_layer_thickness: Optional[str] = None
|
||||
treatment_depth: Optional[str] = None
|
||||
foundation_treatment_method: Optional[str] = None
|
||||
|
||||
# 水准数据查询请求
|
||||
class LevelDataQueryRequest(BaseModel):
|
||||
|
||||
@@ -76,6 +76,10 @@ class SectionDataService(BaseService[SectionData]):
|
||||
"status": section.status,
|
||||
"number": section.number,
|
||||
"transition_paragraph": section.transition_paragraph,
|
||||
"design_fill_height": section.design_fill_height,
|
||||
"compression_layer_thickness": section.compression_layer_thickness,
|
||||
"treatment_depth": section.treatment_depth,
|
||||
"foundation_treatment_method": section.foundation_treatment_method,
|
||||
"checkpoints": [
|
||||
{
|
||||
"id": cp.id,
|
||||
@@ -232,6 +236,10 @@ class SectionDataService(BaseService[SectionData]):
|
||||
section.status = item_data.get('status')
|
||||
section.number = item_data.get('number')
|
||||
section.transition_paragraph = item_data.get('transition_paragraph')
|
||||
section.design_fill_height = item_data.get('design_fill_height')
|
||||
section.compression_layer_thickness = item_data.get('compression_layer_thickness')
|
||||
section.treatment_depth = item_data.get('treatment_depth')
|
||||
section.foundation_treatment_method = item_data.get('foundation_treatment_method')
|
||||
logger.info(f"Updated section: {item_data.get('section_id')}")
|
||||
else:
|
||||
# 新增操作
|
||||
@@ -244,7 +252,11 @@ class SectionDataService(BaseService[SectionData]):
|
||||
height=item_data.get('height'),
|
||||
status=item_data.get('status'),
|
||||
number=item_data.get('number'),
|
||||
transition_paragraph=item_data.get('transition_paragraph')
|
||||
transition_paragraph=item_data.get('transition_paragraph'),
|
||||
design_fill_height=item_data.get('design_fill_height'),
|
||||
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')
|
||||
)
|
||||
db.add(section)
|
||||
logger.info(f"Created section: {item_data.get('section_id')}")
|
||||
|
||||
Reference in New Issue
Block a user