From 15be9cdba09e832452983ad3badf7e6cbefae57d Mon Sep 17 00:00:00 2001 From: xxyy <cathay_xy@163.com> Date: 星期五, 07 三月 2025 15:08:29 +0800 Subject: [PATCH] 增强业务扩展能力和错误处理逻辑 --- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs index 3ca6613..9f34503 100644 --- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs +++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs @@ -135,8 +135,15 @@ await DeleteTaskAsync(task.TaskId); await AddTaskHtyAsync(taskHty); }); - - _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { stock.PalletCode }); + try + { + _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { stock.PalletCode }); + } + catch (Exception ex) + { + LogFactory.GetLog("鍒犻櫎缂撳瓨澶辫触").Error(true, $"{stock.PalletCode}_鍒犻櫎缂撳瓨澶辫触锛屽紓甯镐俊鎭細{ex.Message}"); + _simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { stock.PalletCode }); + } return content.OK("浠诲姟瀹屾垚鎴愬姛", task.Remark); } -- Gitblit v1.9.3