From 88724eca51a5863f20ee0a552af741aeebf4e8f2 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 11 二月 2026 17:31:45 +0800
Subject: [PATCH] 添加堆垛机配置并重构任务
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs
index 9991cd6..b52c966 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs
@@ -47,7 +47,7 @@
{
try
{
- if (!x.DeviceName.Contains("鏈烘鎵�"))
+ if (!x.DevicePlcType.Contains("Socket"))
{
#region 杩炴帴PLC
@@ -93,7 +93,7 @@
}).ToList();
// 鏍规嵁璁惧绫诲瀷鑾峰彇璁惧鍗忚璇︽儏
- List<DeviceProtocolDetailDTO> deviceProtocolDetails = _deviceProtocolDetailService.GetDeviceProtocolDetailsByDeviceType(x.DeviceType);
+ List<DeviceProtocolDetailDTO> deviceProtocolDetails = _deviceProtocolDetailService.GetDeviceProtocolDetailsByDeviceId(x.Id);
// 鍔犺浇璁惧绋嬪簭闆�
Assembly assemblyDevice = Assembly.Load($"WIDESEAWCS_QuartzJob");
@@ -121,14 +121,14 @@
});
for (int i = 0; i < dispatches.Count; i++)
{
- var targetDevice = deviceInfos.FirstOrDefault(x => x.Id == dispatches[i].Id);
+ var targetDevice = deviceInfos.FirstOrDefault(x => x.DispatchId == dispatches[i].Id);
if (targetDevice is null) continue;
// 浣跨敤妯″紡鍖归厤
dispatches[i].JobParams = targetDevice switch
{
- { DeviceName: var name } when name.Contains("鏈烘鎵�")
+ { DevicePlcType: var type } when type.Contains("Socket")
=> new RobotCraneDevice { DeviceCode = targetDevice.DeviceCode, DeviceName = targetDevice.DeviceName, IPAddress = targetDevice.DeviceIp + ":" + targetDevice.DevicePort },
_ => targetDevice.Device
};
--
Gitblit v1.9.3