观测点接口逻辑完善
This commit is contained in:
@@ -53,6 +53,14 @@ class CheckpointService(BaseService[Checkpoint]):
|
||||
|
||||
for item_data in data:
|
||||
try:
|
||||
|
||||
# 判断断面id是否存在
|
||||
section = self.get_by_section_id(db, item_data.get('section_id'))
|
||||
if not section:
|
||||
logger.error(f"Section {item_data.get('section_id')} not found")
|
||||
raise Exception(f"Section {item_data.get('section_id')} not found")
|
||||
|
||||
|
||||
checkpoint = self.get_by_point_id(db, item_data.get('point_id'))
|
||||
if checkpoint:
|
||||
# 更新操作
|
||||
|
||||
Reference in New Issue
Block a user