| | |
| | | using SqlSugar; |
| | | using Masuit.Tools; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | } |
| | | visitedRoutes.Add(routeKey); |
| | | |
| | | List<Dt_Router> dt_Routers = BaseDal.QueryData(x => x.NextPosi == endPosi || x.ChildPosi == endPosi, new Dictionary<string, OrderByType> { { nameof(Dt_Router.IsEnd), OrderByType.Desc } }); |
| | | List<Dt_Router> dt_Routers = BaseDal.QueryData(x => (x.NextPosi == endPosi || x.ChildPosi == endPosi) && x.StartPosi == startPosi, new Dictionary<string, OrderByType> { { nameof(Dt_Router.IsEnd), OrderByType.Desc } }); |
| | | if (dt_Routers.IsNullOrEmpty()) |
| | | { |
| | | dt_Routers = BaseDal.QueryData(x => x.NextPosi == endPosi || x.ChildPosi == endPosi, new Dictionary<string, OrderByType> { { nameof(Dt_Router.IsEnd), OrderByType.Desc } }); |
| | | } |
| | | if (dt_Routers.Count > 0) |
| | | { |
| | | foreach (var item in dt_Routers) |
| | |
| | | { |
| | | if (routerType == (int)RouterInOutType.Out) |
| | | router.ChildPosi = routersAddDTOs[i + 1].ChildPositionCode; |
| | | router.IsEnd = true; |
| | | router.IsEnd = true; |
| | | } |
| | | routers.Add(router); |
| | | } |