diff --git a/src/SJZY.Track.Repository/Repositories/TrackStatusRepository.cs b/src/SJZY.Track.Repository/Repositories/TrackStatusRepository.cs index 7ea0fb26..30af2705 100644 --- a/src/SJZY.Track.Repository/Repositories/TrackStatusRepository.cs +++ b/src/SJZY.Track.Repository/Repositories/TrackStatusRepository.cs @@ -44,21 +44,21 @@ public class TrackStatusRepository : BasicRepository, ITrackS .LeftJoin((a, b) => a.SubSystemId == b.Id && b.IsDeleted == false) .LeftJoin((a, b, c) => a.CreateUserId == c.Id && c.IsDeleted == false) .LeftJoin((a, b, c, d) => a.UpdateUserId == d.Id && d.IsDeleted == false) + .InnerJoin((a, b, c, d,e) => a.Node==e.Id&&a.SubSystemId==e.SubSystemId) .WhereIF(input.SubSystemId > 0, (a, b, c, d) => a.SubSystemId == input.SubSystemId) .WhereIF(!input.Keywords.IsNullOrWhiteSpace(), (a, b, c, d) => a.Status.Contains(input.Keywords) || a.EnStatus.Contains(input.Keywords) || a.Code.Contains(input.Keywords)) .OrderByIF(input.SelectIds.IsNullOrEmpty(), (a, b, c, d) => a.CreateTime, OrderByType.Desc) .OrderByIF(!input.SelectIds.IsNullOrEmpty(), (a, b, c, d) => SqlFunc.IIF(input.SelectIds.Contains(a.Id), SqlFunc.DateAdd(SqlFunc.GetDate(), 1), a.CreateTime), OrderByType.Desc) - .Select((a, b, c, d) => new GetTrackStatusListVO + .Select((a, b, c, d,e) => new GetTrackStatusListVO { Id = a.Id, Code = a.Code, EntrackStatus = a.EnStatus, TrackStatus = a.Status, NodeId = a.Node, - Node = SqlFunc.IF(a.Node == 1).Return("揽收").ElseIF(a.Node == 2).Return("清关").ElseIF(a.Node == 3) - .Return("干线").ElseIF(a.Node == 4).Return("派送").ElseIF(a.Node == 5).Return("其他").End(""), + Node = e.NodeName!, CreateTime = a.CreateTime, CreateUser = c.Name, UpdateTime = a.UpdateTime,