1.优化daily的数据结构
2.修改定时任务
This commit is contained in:
@@ -2,7 +2,8 @@ from datetime import datetime
|
||||
from typing import List, Dict
|
||||
import warnings
|
||||
import copy
|
||||
|
||||
from ..core.logging_config import get_logger
|
||||
logger = get_logger(__name__)
|
||||
class ConstructionMonitorUtils:
|
||||
def __init__(self):
|
||||
# 原始工况周期映射表(保持不变)
|
||||
@@ -155,6 +156,7 @@ class ConstructionMonitorUtils:
|
||||
f"【超期警报】测点{point_idx} 最新工况'{latest_condition}'({create_date})"
|
||||
f"已超期{abs(due_days)}天!基准工况:{base_condition},周期{period}天"
|
||||
)
|
||||
logger.warning(warn_msg)
|
||||
warnings.warn(warn_msg, UserWarning)
|
||||
elif start <= due_days <= end:
|
||||
item_copy["remaining"] = due_days
|
||||
|
||||
Reference in New Issue
Block a user