feat: Implement the PolyWeather dashboard including frontend components, data collection, analysis, and API endpoints.

This commit is contained in:
2569718930@qq.com
2026-03-10 04:45:40 +08:00
parent 020c62676e
commit aab4477ab3
24 changed files with 2835 additions and 524 deletions
+20
View File
@@ -0,0 +1,20 @@
import math
from typing import Optional, Union
Number = Union[int, float]
def wu_round(value: Optional[Number]) -> Optional[int]:
"""
WU 结算口径四舍五入(0.5 一律进位):
- 正数: floor(x + 0.5)
- 负数: ceil(x - 0.5)
"""
if value is None:
return None
x = float(value)
if x >= 0:
return int(math.floor(x + 0.5))
return int(math.ceil(x - 0.5))