From cebd0800e9b5e1a1055a48d5e52f3f8a85e8d82c Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 13 一月 2025 20:59:26 +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