From 4d7c377173784d6ec495b2c4178395a65f4e2a76 Mon Sep 17 00:00:00 2001
From: zhangchengsong <zhangchengsong@hnkhzn.com>
Date: 星期三, 22 四月 2026 19:55:18 +0800
Subject: [PATCH] 1
---
项目代码/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs"
index cff8018..f90cde9 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs"
@@ -257,12 +257,9 @@
{
try
{
- CommonConveyorLine? conveyorLine = null;
- lock (Storage.Devices)
- {
+ CommonConveyorLine? conveyorLine = null;
string deviceCode = Roadway == "C" ? "1004" : "1003";
conveyorLine = Storage.Devices.FirstOrDefault(x => x.DeviceCode == deviceCode) as CommonConveyorLine;
- }
if (conveyorLine == null) return false;
DeviceProDTO? deviceProDTO = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == NextAddress && x.DeviceProParamName == "StationNum");
@@ -291,11 +288,8 @@
{
CommonConveyorLine? conveyorLine = null;
- lock (Storage.Devices)
- {
string deviceCode = Roadway == "C" ? "1004" : "1003";
conveyorLine = Storage.Devices.FirstOrDefault(x => x.DeviceCode == deviceCode) as CommonConveyorLine;
- }
if (conveyorLine == null) return false;
DeviceProDTO? deviceProDTO = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == SourceAddress && x.DeviceProParamName == "StationNum");
@@ -305,7 +299,7 @@
int StationNum = conveyorLine.Communicator.Read<ushort>(deviceProDTO.DeviceProAddress);
int HandShake = conveyorLine.Communicator.Read<ushort>(HandShakeprodto.DeviceProAddress);
WriteLog.Write_Log("鍏ュ簱搴撳彛鐘舵�佷俊鎭�", "鍏ュ簱搴撳彛鐘舵�佷俊鎭�", $"搴撳彛鏄�恵SourceAddress}銆戯紝鐢宠鐘舵�佸湴鍧�锛氥�恵HandShakeprodto.DeviceProAddress}銆�,璇诲彇鐨勬暟鎹細銆恵HandShake}銆慭n搴撳彛鏄惁鏈夎揣鐘舵�佸湴鍧�锛氥�恵deviceProDTO.DeviceProAddress}銆戯紝璇诲彇鐨勬暟鎹�恵StationNum}銆�");
- return (StationNum == 1 && HandShake == 0) ? true : false;
+ return StationNum == 1;
}
catch (Exception ex)
{
--
Gitblit v1.9.3