From caa07e0b3ff3eb93081f4002cfe2763bab39409a Mon Sep 17 00:00:00 2001 From: xxq Date: Sat, 6 Jun 2026 19:33:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/rainfall_manager.py | 6 +++--- app/services/rainfall_grid_service.py | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/core/rainfall_manager.py b/app/core/rainfall_manager.py index 78028f8..8cbc364 100644 --- a/app/core/rainfall_manager.py +++ b/app/core/rainfall_manager.py @@ -86,10 +86,10 @@ class RainfallManager: query_time: 查询时间 max_id: 最大ID """ - from app.repositories.rainfall_repository import rainfall_repository - from app.services.rainfall_grid_service import rainfall_grid_service - try: + from app.repositories.rainfall_repository import rainfall_repository + from app.services.rainfall_grid_service import rainfall_grid_service + self.logger.info(f"开始生成降雨栅格,查询时间: {query_time}, ID: {max_id}") # 1. 查询雨量站点数据 diff --git a/app/services/rainfall_grid_service.py b/app/services/rainfall_grid_service.py index f84e06c..d935edf 100644 --- a/app/services/rainfall_grid_service.py +++ b/app/services/rainfall_grid_service.py @@ -368,8 +368,9 @@ class RainfallGridService: # 返回相对路径(相对于FILE_STORE_DIR),统一使用正斜杠 relative_path = os.path.join(grid_dir, 'grid.png').replace('\\', '/') - - self.logger.info(f"PNG图片已保存: {png_path.replace('\\', '/')}") + saved_path = png_path.replace('\\', '/') + + self.logger.info(f"PNG图片已保存: {saved_path}") return relative_path except Exception as e: