1.工况推理额外加一个工况

2.不处理缺少剩余天数字段的数据
This commit is contained in:
whm
2025-11-23 14:18:25 +08:00
parent 48ec2347a1
commit b80bece123
2 changed files with 3 additions and 1 deletions

View File

@@ -44,6 +44,8 @@ class ConstructionMonitorUtils:
"轨道板(道床)铺设后第2至3个月": 30,
"轨道板(道床)铺设后3个月以后": 90,
"架桥机(运梁车) 首次通过后": 7,
"架桥机(运梁车) 首次通过前":1,
}
# 构建中英文括号+逗号兼容映射表
self.compatible_periods = self._build_compatible_brackets_map()

View File

@@ -301,7 +301,7 @@ def scheduled_get_max_nyid_by_point_id(start: int = 0,end: int = 0):
nyids = []
for d in data:
# 过滤无效数据(避免缺失关键字段报错)
if all(key in d for key in ['NYID', 'point_id']) and d.get('level_data') and d.get('account_data') and d.get('section_data'):
if all(key in d for key in ['NYID', 'point_id','remaining']) and d.get('level_data') and d.get('account_data') and d.get('section_data'):
if d['NYID'] in nyids:
continue
tem = {