| | |
| | | using HslCommunication; |
| | | using Mapster; |
| | | using Newtonsoft.Json; |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading.Tasks; |
| | |
| | | /// </summary> |
| | | private async Task RequestWmsTask(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue) |
| | | { |
| | | |
| | | var content = await _taskService.RequestWMSTask(command.Barcode, childDeviceCode); |
| | | if (content.Status) |
| | | { |
| | |
| | | { |
| | | if (task.SourceAddress == "1059-4") |
| | | { |
| | | |
| | | //conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, "1000", childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, "1000", childDeviceCode); |
| | | |
| | | ConsoleHelper.WriteWarningLine($"【{conveyorLine._deviceName}】任务号:【{task.TaskNum}】,托盘条码:【{task.PalletCode}】已到达【{childDeviceCode}】请求扫码入库(实盘),下一目标地址【{1000}】"); |
| | | ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true); |
| | | } |
| | | else if(task.TargetAddress == "1020-1") |
| | | { |
| | | var next = task.NextAddress; |
| | | var taskCommand = MapTaskCommand(task, command); |
| | | task.NextAddress = next; |
| | | ConsoleHelper.WriteWarningLine($"【{conveyorLine._deviceName}】任务号:【{command.TaskNum}】,托盘条码:【{command.Barcode}】已到达【{childDeviceCode}】请求扫码入库(实盘),下一目标地址【{taskCommand.TargetAddress}】"); |
| | | |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true); |
| | | |
| | | var taskHty = task.Adapt<Dt_Task_Hty>(); |
| | | _task_HtyRepository.AddData(taskHty); |
| | | _taskService.DeleteData(task); |
| | | } |
| | | else |
| | | { |
| | | var next = task.NextAddress; |