|
|
@@ -47,8 +47,8 @@ def _as_dt(value) -> datetime:
|
|
|
|
|
|
|
|
|
def _json(row: dict) -> str:
|
|
|
- # The explanatory note goes to alarm_des, not to alarm_info_json.
|
|
|
- data = {key: value for key, value in row.items() if not key.startswith("_") and key != "模型预测参考"}
|
|
|
+ # The model-reference note is stored inside alarm_info_json (not alarm_des).
|
|
|
+ data = {key: value for key, value in row.items() if not key.startswith("_")}
|
|
|
return json.dumps(data, ensure_ascii=False, separators=(",", ":"), default=str)
|
|
|
|
|
|
|
|
|
@@ -56,9 +56,6 @@ def _targets(device_code: str, kind: str, row: dict) -> list[dict]:
|
|
|
level = row.get("压力阶段") if kind == "pressure" else row.get("振动阶段")
|
|
|
start, end = row.get("开始小时"), row.get("结束小时")
|
|
|
des = str(row.get("阶段触发依据") or "")
|
|
|
- note = row.get("模型预测参考")
|
|
|
- if note:
|
|
|
- des = f"{des};{note}"
|
|
|
des = des[:DES_MAX]
|
|
|
info = _json(row)
|
|
|
if kind == "pressure":
|