From 1367287c9b6e56ba187eba9e5bc30eef4e744a5c Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期一, 13 一月 2025 23:51:01 +0800 Subject: [PATCH] 物料码信息添加联动 --- 代码管理/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