wanshenmean
2025-04-16 29f20b28392d212c04c0c40a512894f8622cfa53
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -24,6 +24,8 @@
using HslCommunication;
using Microsoft.CodeAnalysis;
using Newtonsoft.Json;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using Quartz;
using SqlSugar;
using System.Reflection;
@@ -136,7 +138,7 @@
                        if (childDeviceCode == "3464" || childDeviceCode == "3460" || childDeviceCode == "3456" )
                        {
                            Platform platform = _platFormRepository.QueryFirst(x => x.PLCCode == conveyorLine.DeviceCode && x.PlatCode == childDeviceCode && x.Status == "Active");
                            Platform platform = _platFormRepository.QueryFirst(x => x.DeviceCode == conveyorLine.DeviceCode && x.PlatCode == childDeviceCode && x.Status == "Active");
                            if (platform != null)
                            {
                                if (command.HasPallet != 1)
@@ -411,13 +413,17 @@
                            _needBarcodeRepository.UpdateData(needBarcode);
                        }
                    }
                    content = _taskService.UpdateTaskStatusToNext(task);
                    var proAddress = conveyorLine.DeviceProDTOs
                                    .FirstOrDefault(x => x.DeviceChildCode == childDeviceCode && x.DeviceProParamName == ConveyorLineDBName_After.InteractiveSignal.ToString())
                                    ?.DeviceProAddress;
                    string address = proAddress.Contains(".0") ? proAddress : proAddress + ".0";
                    conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, taskCommand.ConveyorLineTaskNum, childDeviceCode);
                    conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, taskCommand.ConveyorLineTargetAddress, childDeviceCode);
                    conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, taskCommand.ConveyorLineBarcode, childDeviceCode);
                    conveyorLine.Communicator.Write(address, 1);
                    //conveyorLine.SetValue(ConveyorLineDBName_After.InteractiveSignal, taskCommand.InteractiveSignal, childDeviceCode);
                    conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
                    content = _taskService.UpdateTaskStatusToNext(task);
                    //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
                }
            }
            catch (Exception ex)