From 1f8a9a6a0f6cac4be41dc8ebf0444e80dd289440 Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期六, 14 三月 2026 16:54:46 +0800
Subject: [PATCH] 优化前端,添加删除任务移入历史
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 39 ++++++++++++++++++++++++++++++++++-----
1 files changed, 34 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 b1318e5..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}銆戝凡瀛樺湪浠诲姟");
@@ -273,6 +275,7 @@
}
}
#endregion
+
#region 娴峰悍
if (isHK)
{
@@ -1133,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)
@@ -1297,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