From 2190be42c0d77be84fed82d387f2a34da7fe4acc Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期四, 07 八月 2025 16:17:07 +0800
Subject: [PATCH] 1
---
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs"
index d89caf3..67756a3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs"
@@ -84,7 +84,8 @@
Creater = "System",
Floor = stationManager.stationFloor,
RGVName = RGVName,
- SourceStation= stationManager.remark,
+ SourceStation = stationManager.remark,
+ TargetStation = 0,
};
_taskRepository.AddData(task);
@@ -93,12 +94,19 @@
{
if (stationManager.stationChildCode == "3002")
{
+
+ var newTask = _taskRepository.QueryFirst(x => x.TargetAddress == "3004");
+ if (newTask != null)
+ {
+ return;
+ }
+
DeviceProDTO? devicePro = conveyorLine.DeviceProDTOs.Where(x => x.DeviceChildCode == stationManager.stationChildCode && x.DeviceProParamName == "ConveyorLineBarcode").FirstOrDefault();
- var x = conveyorLine.Communicator.Read(devicePro.DeviceProAddress, 5);
+ var x = conveyorLine.Communicator.Read(devicePro.DeviceProAddress, 10);
string Barcode = Encoding.UTF8.GetString(x);
- if (Barcode == null)
+ if (Barcode == null || Barcode==""|| Barcode.Trim().Contains("\0"))
{
conveyorLine.SetValue(ConveyorLineDBName.WriteInteractiveSignal, Convert.ToSByte(3), stationManager.stationChildCode);
}
@@ -141,11 +149,11 @@
}
else
{
- DeviceProDTO? devicePro = conveyorLine.DeviceProDTOs.Where(x => x.DeviceChildCode == stationManager.stationChildCode && x.DeviceProParamName == "ConveyorLineBarcode").FirstOrDefault();
- var x = conveyorLine.Communicator.Read(devicePro.DeviceProAddress, 5);
+ DeviceProDTO? devicePro = conveyorLine.DeviceProDTOs.Where(x => x.DeviceChildCode == stationManager.stationNextChildCode && x.DeviceProParamName == "ConveyorLineBarcode").FirstOrDefault();
+ var x = conveyorLine.Communicator.Read(devicePro.DeviceProAddress, 10);
string Barcode = Encoding.UTF8.GetString(x);
- if (Barcode == "")
+ if (Barcode == null || Barcode == "" || Barcode.Trim().Contains("\0"))
{
conveyorLine.SetValue(ConveyorLineDBName.WriteInteractiveSignal, Convert.ToSByte(3), stationManager.stationChildCode);
}
@@ -159,7 +167,7 @@
var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue;
var requestTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.RequestTask)?.ConfigValue;
-
+
WMSTaskDTO taskDTO = new WMSTaskDTO()
{
TPbarcode = Barcode,
--
Gitblit v1.9.3