From 50adfb5ea02f1741a31478868af4362de065d969 Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期六, 14 三月 2026 10:27:16 +0800
Subject: [PATCH] 添加1楼库区光电感应
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 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..c13ac63 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,7 +94,7 @@
{
List<object> objects = new List<object>();
foreach (var item in taskDTOs)
- {
+ {
foreach (var task in item.tasks)
{
#region 鍒ゆ柇
@@ -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)
--
Gitblit v1.9.3