From b35e72bcf8011cf6e30182b0800e2f6e1a18e149 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期三, 28 五月 2025 15:40:06 +0800
Subject: [PATCH] 更新代码

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index feae449..a225003 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -128,6 +128,15 @@
                     {
                         stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
                     }
+
+                    if (warehouse.WarehouseCode==WarehouseEnum.HA57.ToString())
+                    {
+                        Dt_Task dt_TaskMesReturn = BaseDal.QueryFirst(x=>x.TaskType==TaskTypeEnum.MesMatReturn.ObjToInt() && x.TaskStatus!=TaskStatusEnum.SC_Executing.ObjToInt());
+                        if (dt_TaskMesReturn!=null)
+                        {
+                            return WebResponseContent.Instance.Error($"閫�鏂欎换鍔℃鎵ц");
+                        }
+                    }
                     _unitOfWorkManage.BeginTran();
                     int taskId = BaseDal.AddData(newTask);
                     newTask.TaskId = taskId;
@@ -200,7 +209,7 @@
                 _stockRepository.StockInfoRepository.AddData(stockInfo);
                 _unitOfWorkManage.CommitTran();
                 PushTasksToWCS(new List<Dt_Task> { newTask });
-                PutFinish(address);
+                PutFinish(address, newTask.PalletCode, newTask.TaskNum.ToString());
                 return WebResponseContent.Instance.OK();
             }
             catch (Exception ex)
@@ -367,7 +376,7 @@
                 WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask);
 
                 PushTasksToWCS(new List<Dt_Task> { newTask });
-                if (newTask.WarehouseId == 5) PutFinish(stationCode);
+                if (newTask.WarehouseId == 5) PutFinish(stationCode.ToString(),newTask.PalletCode, newTask.TaskNum.ToString());
                 return WebResponseContent.Instance.OK(data: wMSTaskDTO);
             }
             catch (Exception ex)
@@ -404,7 +413,7 @@
                 {
                     return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�");
                 }
-                if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎷i�夊畬鎴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.閫�搴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MES閫�搴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MES绌烘墭閫�搴�.ObjToInt())
+                if (stockInfo.StockStatus != StockStatusEmun.閫�搴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MES閫�搴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MES绌烘墭閫�搴�.ObjToInt())
                 {
                     return WebResponseContent.Instance.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘,涓嶅彲鐢宠鍏ュ簱");
                 }
@@ -462,7 +471,7 @@
                 WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask);
 
                 PushTasksToWCS(new List<Dt_Task> { newTask });
-                if (newTask.WarehouseId == 5) PutFinish(stationCode);
+                if (newTask.WarehouseId == 5) PutFinish(stationCode, newTask.PalletCode, newTask.TaskNum.ToString());
                 return WebResponseContent.Instance.OK(data: wMSTaskDTO);
             }
             catch (Exception ex)

--
Gitblit v1.9.3