1.补充数据加到error表中,推理的改回之前的
This commit is contained in:
@@ -65,7 +65,7 @@ class ConstructionMonitorUtils:
|
||||
return compatible_map
|
||||
|
||||
def get_due_data(self, input_data: List[List[Dict]], start: int = 0, end: int = 0, current_date: datetime = None) -> Dict[str, List[Dict]]:
|
||||
result = {"winter": [], "data": [], "error_data": []}
|
||||
result = {"winter": [], "data": [], "error_data": [], "error_linecodes": []}
|
||||
if not input_data:
|
||||
return result
|
||||
|
||||
@@ -139,12 +139,12 @@ class ConstructionMonitorUtils:
|
||||
continue
|
||||
|
||||
if not base_condition:
|
||||
# 当前为冬休且历史全是冬休 → 视为数据未补全,用 bu_all=-365 表示;remaining 保持原样不改
|
||||
# 当前为冬休或历史全是冬休 → 归入冬休;若本次是冬休且推不出,记入 error_linecodes 供写入 error_linecode 表
|
||||
result["winter"].append(item_copy)
|
||||
if latest_condition == "冬休":
|
||||
item_copy["bu_all"] = -365
|
||||
result["data"].append(item_copy)
|
||||
else:
|
||||
result["winter"].append(item_copy)
|
||||
linecode = latest_item.get("__linecode")
|
||||
if linecode and linecode not in result["error_linecodes"]:
|
||||
result["error_linecodes"].append(linecode)
|
||||
continue
|
||||
|
||||
# 核心修改:冬休回溯场景下调整测量间隔(基准周期)
|
||||
|
||||
Reference in New Issue
Block a user