|
@@ -11,6 +11,7 @@ from httpx import AsyncClient, URL
|
|
|
from app.core.config import settings
|
|
|
from app.services.service import Service
|
|
|
from app.utils.date import get_time_str, TIME_FMT
|
|
|
+from app.utils.math import round_half_up
|
|
|
|
|
|
|
|
|
class Season(str, Enum):
|
|
@@ -127,7 +128,7 @@ class SpaceInfoService(Service):
|
|
|
else:
|
|
|
current_lower_target, current_upper_target = np.NAN, np.NAN
|
|
|
|
|
|
- return (current_lower_target + current_upper_target) / 2
|
|
|
+ return round_half_up((current_lower_target + current_upper_target) / 2, 2)
|
|
|
|
|
|
async def env_database_set(self, form: str, value: float) -> None:
|
|
|
url = self._base_url.join('duoduo-service/transfer/environment/hispoint/set')
|