From d662639715b6f5e56734a3f36a5d43ba433b1cc4 Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期日, 15 九月 2024 16:34:57 +0800
Subject: [PATCH] 任务管理任务日志操作列增加上传按钮
---
Admin.NET/WCS.Application/Hub/PlcDeviceHub.cs | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/Admin.NET/WCS.Application/Hub/PlcDeviceHub.cs b/Admin.NET/WCS.Application/Hub/PlcDeviceHub.cs
index 988502b..fdff08a 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();
@@ -142,7 +142,6 @@
{
(result, var palletNo) = modConn.GetPlcDBValue(modPositionPalletNo.PosType, modDevice.DbNumber, modPositionPalletNo.PlcPos, modPositionPalletNo.StringLength);
modDevice.PalletNo = Convert.ToString(palletNo);
- Console.WriteLine(modDevice.DbNumber + "." + modPositionPalletNo.PlcPos + "----------");
}
if (modPlc.Type == PLCTypeEnum.ConveyorLine)
{
@@ -204,7 +203,7 @@
if (initialStates.TryGetValue(modDevice.Id, out var initialState))
{
if (modDevice.Status != initialState.Status ||
- modDevice.Plc != initialState.Plc ||
+ (modDevice.Plc.IsNullOrEmpty() && modDevice.Plc != initialState.Plc) ||
modDevice.Wcs != initialState.Wcs ||
modDevice.TaskNo != initialState.TaskNo ||
modDevice.TaskType != initialState.TaskType ||
--
Gitblit v1.8.0