feat: v2.0 — maintenance module, AI analysis, station power fix
- Add full 检修维护中心 (6.4): 3-type work orders (消缺/巡检/抄表), asset management, warehouse, work plans, billing settlement - Add AI智能分析 tab with LLM-powered diagnostics (StepFun + ZhipuAI) - Add AI模型配置 settings page (provider, temperature, prompts) - Fix station power accuracy: use API station total (station_power) instead of inverter-level computation — eliminates timing gaps - Add 7 new DB models, 4 new API routers, 5 new frontend pages - Migrations: 009 (maintenance expansion) + 010 (AI analysis) - Version bump: 1.6.1 → 2.0.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -87,6 +87,13 @@ class SungrowCollector(BaseCollector):
|
||||
ps_data = await self._get_station_data()
|
||||
if ps_data:
|
||||
data.update(ps_data)
|
||||
# Also store station-level power with a distinct data_type
|
||||
# so dashboard can read the API total directly instead of
|
||||
# computing from individual device readings.
|
||||
if "power" in ps_data:
|
||||
data["station_power"] = ps_data["power"]
|
||||
if "daily_energy" in ps_data:
|
||||
data["station_daily_energy"] = ps_data["daily_energy"]
|
||||
self.logger.info(
|
||||
"Station %s data: power=%.1f kW, daily=%.1f kWh",
|
||||
self._ps_id,
|
||||
|
||||
Reference in New Issue
Block a user