From 844c7c3ce2c39139490a6ecb0f35170f6cade290 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期二, 28 四月 2026 16:31:54 +0800
Subject: [PATCH] 1

---
 WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
index aa230b4..c9a0485 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
@@ -45,12 +45,16 @@
                 if (task != null)
                 {
                     //PushTasksToWCS(new List<Dt_Task> { task });
+                    _hubContext.Clients.All.SendAsync("ReceiveMessage", $"璇ユ墭鐩榹palletCode}宸茬敓鎴愪换鍔�");
+
                     return WebResponseContent.Instance.Error($"璇ユ墭鐩榹palletCode}宸茬敓鎴愪换鍔�");
                 }
                 Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First();
 
                 if (stockInfo == null)
                 {
+                    _hubContext.Clients.All.SendAsync("ReceiveMessage", $"鏈壘鍒扮粍鐩樹俊鎭�");
+
                     return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�");
                 }
                 if (stockInfo.StockStatus == StockStatusEmun.鍚堟墭鍑哄簱瀹屾垚.ObjToInt())
@@ -59,6 +63,8 @@
                 }
                 if (stockInfo.StockStatus == StockStatusEmun.鐩樼偣鍑哄簱瀹屾垚.ObjToInt())
                 {
+                    _hubContext.Clients.All.SendAsync("ReceiveMessage", $"璇ユ墭鐩榹palletCode}宸茬敓鎴愪换鍔�");
+
                     return WebResponseContent.Instance.Error($"璇ユ墭鐩榹palletCode}鏈洏鐐�");
                 }
                 ///鍒ゆ柇鏄惁瀛樺湪鍥炲簱鍗�,杩涜鍥炲師搴撲綅閫昏緫
@@ -70,6 +76,8 @@
                     Dt_LocationInfo locationInfo1 = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == returnOrder.LocationCode);
                     if (locationInfo1 == null)
                     {
+                        _hubContext.Clients.All.SendAsync("ReceiveMessage", $"鍥炲簱鍗曚腑璇ュ簱浣峽returnOrder.LocationCode}鏈壘鍒�");
+
                         return WebResponseContent.Instance.Error($"鍥炲簱鍗曚腑璇ュ簱浣峽returnOrder.LocationCode}鏈壘鍒�");
                     }
                     returnRoadwayInfo = _basicRepository.RoadwayInfoRepository.QueryFirst(x => x.RoadwayNo == locationInfo1.RoadwayNo);
@@ -77,22 +85,30 @@
 
                 if (Repository.QueryFirst(x => x.SourceAddress == (returnRoadwayInfo.InStationCode != null ? returnRoadwayInfo.InStationCode : stationCode) && x.TaskStatus == TaskStatusEnum.New.ObjToInt()) != null)
                 {
+                    _hubContext.Clients.All.SendAsync("ReceiveMessage", $"璇ョ珯鐐瑰凡鏈夋湭鎵ц鐨勪换鍔�");
+
                     return WebResponseContent.Instance.Error($"璇ョ珯鐐瑰凡鏈夋湭鎵ц鐨勪换鍔�");
                 }
 
                 var details = stockInfo.Details.FirstOrDefault();
                 if (!string.IsNullOrEmpty(stockInfo.LocationCode))
                 {
+                    _hubContext.Clients.All.SendAsync("ReceiveMessage", $"璇ユ墭鐩樺凡缁戝畾璐т綅");
+
                     return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡缁戝畾璐т綅");
                 }
                 Dt_RoadwayInfo roadwayInfo = _basicRepository.RoadwayInfoRepository.QueryFirst(x => x.InStationCode == (returnRoadwayInfo.InStationCode != null ? returnRoadwayInfo.InStationCode : stationCode));
                 if (roadwayInfo == null)
                 {
+                    _hubContext.Clients.All.SendAsync("ReceiveMessage", $"鏈壘鍒拌鍏ュ簱绔欏彴鍦板潃");
+
                     return WebResponseContent.Instance.Error($"鏈壘鍒拌鍏ュ簱绔欏彴鍦板潃");
                 }
                 Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == roadwayInfo.RoadwayNo);
                 if (warehouse == null)
                 {
+                    _hubContext.Clients.All.SendAsync("ReceiveMessage", $"鏈壘鍒拌浠撳簱");
+
                     return WebResponseContent.Instance.Error("鏈壘鍒拌浠撳簱");
                 }
                 Dt_LocationInfo? locationInfo = new Dt_LocationInfo();
@@ -101,6 +117,8 @@
                     locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == returnOrder.LocationCode);
                     if (locationInfo.LocationStatus != LocationStatusEnum.Lock.ObjToInt() || locationInfo.EnableStatus == EnableStatusEnum.Disable.ObjToInt() || locationInfo.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt())
                     {
+                        _hubContext.Clients.All.SendAsync("ReceiveMessage", $"璇ュ洖搴撳崟璐т綅{locationInfo.LocationCode}闈為攣瀹氱姸鎬佹垨璐т綅鍚敤鐘舵�佷笉姝g‘锛岃妫�鏌�");
+
                         return WebResponseContent.Instance.Error($"璇ュ洖搴撳崟璐т綅{locationInfo.LocationCode}闈為攣瀹氱姸鎬佹垨璐т綅鍚敤鐘舵�佷笉姝g‘锛岃妫�鏌�");
                     }
                 }
@@ -109,6 +127,8 @@
                     locationInfo = _basicService.LocationInfoService.AssignLocation(roadwayInfo.RoadwayNo, stockInfo.PalletType, warehouse.WarehouseId, "", heightType);//, stockInfo.WarehouseId
                     if (locationInfo == null)
                     {
+                        _hubContext.Clients.All.SendAsync("ReceiveMessage", $"璐т綅鍒嗛厤澶辫触,鏈壘鍒板彲鍒嗛厤璐т綅");
+
                         return WebResponseContent.Instance.Error($"璐т綅鍒嗛厤澶辫触,鏈壘鍒板彲鍒嗛厤璐т綅");
                     }
                 }
@@ -225,6 +245,8 @@
             catch (Exception ex)
             {
                 _unitOfWorkManage.RollbackTran();
+                _hubContext.Clients.All.SendAsync("ReceiveMessage", $"{ex.Message}");
+
                 return WebResponseContent.Instance.Error(ex.Message);
             }
         }
@@ -441,6 +463,8 @@
             catch (Exception ex)
             {
                 _unitOfWorkManage.RollbackTran();
+                _hubContext.Clients.All.SendAsync("ReceiveMessage", $"{ex.Message}");
+
                 return WebResponseContent.Instance.Error(ex.Message);
             }
         }

--
Gitblit v1.9.3