From 5ab61d58dfd7a8da568cd638326fa360e93c5f64 Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期六, 14 三月 2026 16:55:32 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/RuiShengZhiNeng/GaoPuLiTiKu

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs |   38 +++++++++++++++++++++++++++++++++-----
 1 files changed, 33 insertions(+), 5 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 63097eb..bd413ad 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -20,6 +20,7 @@
 using SqlSugar;
 using System.Collections.Generic;
 using System.Diagnostics.CodeAnalysis;
+using System.Threading.Tasks;
 using WIDESEAWCS_BasicInfoService;
 using WIDESEAWCS_Common;
 using WIDESEAWCS_Common.LocationEnum;
@@ -37,6 +38,7 @@
 using WIDESEAWCS_IBasicInfoService;
 using WIDESEAWCS_ITaskInfoService;
 using WIDESEAWCS_Model.Models;
+using WIDESEAWCS_QuartzJob;
 using WIDESEAWCS_QuartzJob.Models;
 using WIDESEAWCS_QuartzJob.Service;
 
@@ -92,12 +94,12 @@
             {
                 List<object> objects = new List<object>();
                 foreach (var item in taskDTOs)
-                {
+                { 
                     foreach (var task in item.tasks)
                     {
                         #region 鍒ゆ柇
-                        content = TaskHelpMethods.isOkTaskInfo(task, true, true);
-                        if (!content.Status)
+                       var  contentStatus = TaskHelpMethods.isOkTaskInfo(task, true, true);
+                        if (!contentStatus.Status)
                         {
                             objects.Add(new
                             {
@@ -132,7 +134,7 @@
                             objects.Add(new
                             {
                                 taskCode = task.taskCode,
-                                Message = $"璧风偣浣嶇疆銆恵task.containerCode}銆戝凡瀛樺湪浠诲姟"
+                                Message = $"璧风偣浣嶇疆銆恵task.fromLocationCode}銆戝凡瀛樺湪浠诲姟"
                             });
                             continue;
                             //throw new Exception($"璧风偣浣嶇疆銆恵task.containerCode}銆戝凡瀛樺湪浠诲姟");
@@ -1134,7 +1136,22 @@
                 }
                 else if (getLocationInfo.WarehouseId == 5)
                 {
-
+                    //璇诲彇鍏夌數淇″彿
+                    var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "F1") as OtherDevice;
+                    if (device == null) throw new Exception("鏈壘鍒�1妤艰川妫�闂ㄨ澶囦俊鎭�") ;
+                    if (!device.IsConnected) throw new Exception("PLC1妤艰川妫�闂ㄨ澶囪繛鎺ュけ璐�");
+                    var sta = _stationMangerService.Repository.QueryData(x => x.Remark == "鎴愬搧搴�");
+                    foreach (var item in sta)
+                    {
+                        bool value = device.GetValue<QualityInspectionCommandEnum,bool>(QualityInspectionCommandEnum.R_StockAvailableSymbol, item.StationCode);
+                             list.Add(new
+                             {
+                                 LoctionCode = item.StationCode,
+                                 LocationStatus = value?100:0,
+                                 EnableStatus = 0,
+                             });
+                    }
+                    content.OK(data: list);
                 }
             }
             catch (Exception ex)
@@ -1298,5 +1315,16 @@
                 return WebResponseContent.Instance.Error(ex.Message);
             }
         }
+
+
+        public override WebResponseContent DeleteData(object[] keys)
+        {
+              //鏌ユ壘鎵�鏈変换鍔′腑鍖呭惈杩欎釜id鐨�
+               var  take= BaseDal.QueryData(x => keys.Contains(x.TaskId));
+                //鎴戝氨灏嗚繖涓换鍔$Щ鍏ュ巻鍙蹭腑
+              BaseDal.DeleteAndMoveIntoHty(take, OperateTypeEnum.鑷姩瀹屾垚);
+            return base.DeleteData(keys); 
+        }
+
     }
 }

--
Gitblit v1.9.3