From d4beffac7005967f3eeb5b175170de20ab963781 Mon Sep 17 00:00:00 2001
From: hwh <332078369@qq.com>
Date: 星期五, 13 九月 2024 11:35:00 +0800
Subject: [PATCH] PLC添加禁用,修改写入bug

---
 Admin.NET/WCS.Application/Hub/PlcDeviceHub.cs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Admin.NET/WCS.Application/Hub/PlcDeviceHub.cs b/Admin.NET/WCS.Application/Hub/PlcDeviceHub.cs
index 988502b..f4ef73a 100644
--- a/Admin.NET/WCS.Application/Hub/PlcDeviceHub.cs
+++ b/Admin.NET/WCS.Application/Hub/PlcDeviceHub.cs
@@ -71,7 +71,7 @@
             // 鐢ㄤ簬淇濆瓨姣忎釜璁惧鐨勫垵濮嬬姸鎬�
             var initialStates = new Dictionary<long, WcsDeviceOutput>();
 
-            var listPlc = _db.Queryable<WcsPlc>().Where(s => s.Type == PLCTypeEnum.StackingMachine || s.Type == PLCTypeEnum.ConveyorLine).ToList();
+            var listPlc = _db.Queryable<WcsPlc>().Where(s => s.Type == PLCTypeEnum.StackingMachine || s.Type == PLCTypeEnum.ConveyorLine).Where(s => s.Enable == YesNoEnum.Y).ToList();
             var listPlcId = listPlc.Select(s => s.Id).ToList();
             var listPlcDevice = _db.Queryable<WcsDevice>().Where(s => s.DeviceType == DeviceTypeEnum.Business && listPlcId.Contains(s.PlcId)).Select<WcsDeviceOutput>().ToList();
             var listPlcDeviceId = listPlcDevice.Select(s => s.Id).ToList();

--
Gitblit v1.8.0