| | |
| | | using AutoMapper; |
| | | using HslCommunication; |
| | | using Mapster; |
| | | using Microsoft.AspNetCore.DataProtection.XmlEncryption; |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | using System.Diagnostics.CodeAnalysis; |
| | |
| | | // 判断任务类型是否为入库任务 |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) |
| | | { |
| | | |
| | | var value = _sys_ConfigService.GetByConfigKey(CateGoryConst.CONFIG_SYS_InStation, SysConfigKeyConst.JZNGInBoundStation).ConfigValue; |
| | | var valueList = value.Split(',').ToList(); |
| | | // 判断源地址是否不等于"1359-4" |
| | | //if (task.SourceAddress != "1359-4" && task.SourceAddress != "1357-4") |
| | | if (!valueList.Contains(task.SourceAddress)) |
| | | if (task.SourceAddress == "1435" && task.TaskType == (int)TaskInboundTypeEnum.InNG) |
| | | { |
| | | List<Dt_Router> routers = _routerService.QueryNextRoutes(item.SourceAddress, item.TargetAddress); |
| | | if (routers.Count > 0) |
| | | { |
| | | // 设置任务状态为入库新建 |
| | | task.TaskState = (int)TaskInStatusEnum.InNew; |
| | | // 设置当前地址为源地址 |
| | | task.CurrentAddress = item.SourceAddress; |
| | | // 设置下一个地址为第一个子位置 |
| | | task.NextAddress = routers.FirstOrDefault().ChildPosi; |
| | | } |
| | | task.Remark = "NG"; |
| | | } |
| | | else if (!valueList.Contains(task.SourceAddress)) |
| | | { |
| | | // 查询从源地址到目标地址的路由 |
| | | List<Dt_Router> routers = _routerService.QueryNextRoutes(item.SourceAddress, item.TargetAddress); |