From 99c0270820dce33ddef3d96d999f728d9edf7307 Mon Sep 17 00:00:00 2001
From: Admin <Admin@ADMIN>
Date: 星期二, 31 三月 2026 18:15:01 +0800
Subject: [PATCH] 最新
---
项目代码/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/WMSTaskService.cs | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/WMSTaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/WMSTaskService.cs"
index e011e25..0d0a14e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/WMSTaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/WMSTaskService.cs"
@@ -17,6 +17,7 @@
using AutoMapper;
using Castle.Components.DictionaryAdapter.Xml;
+using HslCommunication;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.OpenApi.Any;
@@ -185,9 +186,16 @@
//鏄惁鏈夎揣
int StationStatus = conveyorLine.Communicator.Read<ushort>(StationNumProDTO.DeviceProAddress);
- //鏈夎揣锛屽彲杩涗俊鍙�
- statusValue = ((portStatus == 1 && StationStatus == 1) || (portStatus == 2 && StationStatus == 0)) ? 1 : (portStatus == 0) ? 0 : 0;
+ if(DeStateName== "G01" || DeStateName == "G06" || DeStateName == "G07")
+ {
+ //鏈夎揣锛屽彲杩涗俊鍙�
+ statusValue = (portStatus == 1 && StationStatus == 1) ? 1 : (portStatus == 2 && StationStatus == 0) ?0: (portStatus == 0) ? 0 : 0;
+ }
+ else
+ {
+ statusValue = StationStatus == 1 ? 0 : 1;
+ }
portStatusDict[DeStateName] = statusValue;
}
@@ -330,7 +338,7 @@
taskInfo1.psd = "akjfapjfpadaoif";
commandResult = HttpHelper.Post<CommandResult>(urlWMStaskreturn, taskInfo1, "浠诲姟鐘舵�佸洖璋�");
- WriteLog.Write_Log("鍚屾缁欎笂娓稿弽棣堜换鍔″畬鎴�", "浠诲姟淇℃伅", $"浠诲姟鍙凤細{taskId}", $"璋冨彇鍙傛暟锛歿taskInfo1.ToJson()},杩斿洖鍙傛暟锛歿commandResult.ToJson()}");
+ WriteLog.Write_Log("鍚屾缁欎笂娓稿弽棣堜换鍔″畬鎴�", "浠诲姟淇℃伅", $"浠诲姟鍙凤細{taskId}", $"璋冨彇鍙傛暟锛歿taskInfo1.ToJsonString()},杩斿洖鍙傛暟锛歿commandResult.ToJsonString()}");
return commandResult;
}
catch (Exception ex)
@@ -338,7 +346,7 @@
commandResult.status = "error";
commandResult.result = $"WCS鎺ュ彛閿欒锛屽師鍥狅細{ex.Message}";
- WriteLog.Write_Log("鍚屾缁欎笂娓稿弽棣堜换鍔″畬鎴�", "浠诲姟淇℃伅", $"浠诲姟鍙凤細{taskId}", $"WCS鎺ュ彛閿欒锛屽師鍥狅細{ex.Message}");
+ WriteLog.Write_Log("鍚屾缁欎笂娓稿弽棣堜换鍔″畬鎴�", "浠诲姟淇℃伅", $"浠诲姟鍙凤細{taskId}", $"闇�瑕佷笂浼燱MS淇℃伅鍐呭锛歿commandResult.ToJsonString()},WCS鎺ュ彛閿欒锛屽師鍥狅細{ex.Message}");
return commandResult;
}
--
Gitblit v1.9.3