| | |
| | | using Masuit.Tools; |
| | | using Masuit.Tools.Systems; |
| | | using Newtonsoft.Json; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common; |
| | |
| | | { |
| | | if (command.ConveyorLineBarcode != "NoRead") |
| | | { |
| | | #region |
| | | //var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress); |
| | | //var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.MOMIP_BASE)?.ConfigValue; |
| | | //var ipAddress = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.TrayCellsStatus)?.ConfigValue; |
| | |
| | | // if (device != null) |
| | | // { |
| | | // CommonConveyorLine_After CommonConveyorLine_After = (CommonConveyorLine_After)device; |
| | | // ConveyorLineTaskCommand_After conveyorLineAfter = CommonConveyorLine_After.ReadCustomer<ConveyorLineTaskCommand_After>((Convert.ToInt32(station.stationChildCode)).ToString()); |
| | | |
| | | // ConveyorLineTaskCommand_After taskCommand = new ConveyorLineTaskCommand_After() |
| | | // { |
| | | // ConveyorLineTaskNum = Convert.ToInt32(1), |
| | | // ConveyorLineTargetAddress = Convert.ToInt16(2234), |
| | | // ConveyorLineBarcode = command.ConveyorLineBarcode.ToString(), |
| | | // }; |
| | | // CommonConveyorLine_After.SendCommand(taskCommand, station.stationChildCode); |
| | | // CommonConveyorLine_After.SetValue(ConveyorLineDBName_After.ResponState, 1, station.stationChildCode); |
| | | // } |
| | | // //发送到分容 |
| | | // return; |
| | | // } |
| | | // } |
| | | // } |
| | |
| | | // if (device != null) |
| | | // { |
| | | // CommonConveyorLine_After CommonConveyorLine_After = (CommonConveyorLine_After)device; |
| | | // ConveyorLineTaskCommand_After conveyorLineAfter = CommonConveyorLine_After.ReadCustomer<ConveyorLineTaskCommand_After>((Convert.ToInt32(station.stationChildCode)).ToString()); |
| | | // if (conveyorLineAfter.HasPallet == 0) |
| | | // ConveyorLineTaskCommand_After conveyorLineAfter = CommonConveyorLine_After.ReadCustomer<ConveyorLineTaskCommand_After>(Convert.ToInt32(station.stationChildCode).ToString()); |
| | | // if (conveyorLineAfter.InteractiveSignal == 16) |
| | | // { |
| | | // var TaskNum = SnowFlake.LongId; |
| | | // Dt_Task task = new Dt_Task() |
| | | // { |
| | | // TaskNum = _taskRepository.GetTaskNo().Result, |
| | |
| | | // Roadway = station.Roadway, |
| | | // SourceAddress = childDeviceCode, |
| | | // TargetAddress = station.stationChildCode, |
| | | // CurrentAddress = station.stationChildCode, |
| | | // CurrentAddress = childDeviceCode, |
| | | // NextAddress = station.stationChildCode, |
| | | // TaskState = (int)TaskInStatusEnum.InNew, |
| | | // ExceptionMessage = "", |
| | |
| | | //{ |
| | | // ConsoleHelper.WriteErrorLine(result1.MOMMessage); |
| | | //} |
| | | |
| | | #endregion |
| | | |
| | | if (_taskRepository.QueryFirst(x => x.PalletCode == command.ConveyorLineBarcode) != null) |
| | | { |
| | |
| | | { |
| | | var taskCommand = MapTaskCommand(task, command); |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); |
| | | _taskService.UpdateTaskStatusToNext(task); |
| | | } |
| | | } |