From db9f0ae6caa7726da928f6fb07094b1c2ba2a83d Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 14 一月 2025 09:59:46 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs"
index 08ad5c7..bfebe8b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs"
@@ -35,14 +35,18 @@
                     DbType = DbType.SqlServer
                 });
 
-                //List<Dt_Warehouse> warehouses = sugarClient.Queryable<Dt_Warehouse>().ToList();
+                List<Dt_Warehouse> warehouses = sugarClient.Queryable<Dt_Warehouse>().ToList();
 
-                //_dbContext.Db.Deleteable<Dt_Warehouse>().ExecuteCommand();
+                _dbContext.Db.Deleteable<Dt_Warehouse>().ExecuteCommand();
 
-                //_dbContext.Db.Insertable(warehouses).ExecuteCommand();
+                _dbContext.Db.Insertable(warehouses).ExecuteCommand();
 
                 List<Dt_ApiInfo> apiInfos = _dbContext.Db.Queryable<Dt_ApiInfo>().ToList();
 
+                List<Dt_WarehouseDevice> warehouseDevices = _dbContext.Db.Queryable<Dt_WarehouseDevice>().ToList();
+
+                _cacheService.AddOrUpdate(nameof(Dt_WarehouseDevice), warehouseDevices);
+
                 _cacheService.AddOrUpdate(nameof(apiInfos), apiInfos);
             }
             catch (Exception ex)

--
Gitblit v1.9.3