yanjinhui
2026-03-14 50adfb5ea02f1741a31478868af4362de065d969
添加1楼库区光电感应
已修改1个文件
21 ■■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/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;
@@ -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)