| | |
| | | private ConveyorLineTaskCommand MapTaskCommand(Dt_Task task, ConveyorLineTaskCommand command) |
| | | { |
| | | // 使用正则表达式匹配类似 -数字 的模式,并替换为空字符串 |
| | | task.NextAddress = Regex.Replace(task.NextAddress, @"-(\d+)", ""); |
| | | if (Convert.ToInt32(task.NextAddress) > 1999) |
| | | { |
| | | task.NextAddress = (Convert.ToInt32(task.NextAddress) - 1000).ToString(); |
| | | } |
| | | //task.NextAddress = Regex.Replace(task.NextAddress, @"-(\d+)", ""); |
| | | //if (Convert.ToInt32(task.NextAddress) > 1999) |
| | | //{ |
| | | // task.NextAddress = (Convert.ToInt32(task.NextAddress) - 1000).ToString(); |
| | | //} |
| | | var comm = _mapper.Map<ConveyorLineTaskCommand>(task); |
| | | comm.InteractiveSignal = command.InteractiveSignal; |
| | | return comm; |
| | |
| | | else if (task.Roadway.Contains("JZ")) |
| | | { |
| | | // 查询是否存在静置出库任务 |
| | | var outJZTask = _taskRepository.QueryData(x => x.Roadway == task.Roadway && |
| | | var outJZTask = _taskRepository.QueryData(x => x.Roadway == task.Roadway && task.TaskType == (int)TaskOutboundTypeEnum.Outbound && |
| | | (x.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting || |
| | | x.TaskState == (int)TaskOutStatusEnum.SC_OutFinish || x.TaskState == (int)TaskOutStatusEnum.OutNew)); |
| | | |