| | |
| | | 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; |
| | |
| | | |
| | | 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) |
| | |
| | | _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) |