From 7e68af1e2b0dcb0f47db46dbc610b041647e70c7 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Thu, 18 May 2023 15:05:50 +0800 Subject: [PATCH] 1 --- .../Service/BookingOrder/BookingOrderService.cs | 4 ++-- Myshipping.Core/Service/User/SysUserService.cs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index a2ee5649..da42c7fd 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -5663,7 +5663,7 @@ namespace Myshipping.Application var Forwarder = _cache.GetAllCodeForwarder().Result.Take(10).ToList(); var GoodsName = _paraGoodsInfoRepository.AsQueryable().OrderBy("GOODS_CODE asc").Take(50).ToList().Select(t => t.Adapt()).ToList(); var YFXY = _paraContractNoInfoRepository.AsQueryable().OrderBy("CONTRACT_NO asc").Take(10).ToList().Select(t => t.Adapt()).ToList(); ; - var User = await _repUser.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID && x.Status == CommonStatus.ENABLE && x.IsDeleted == false).ToListAsync(); + var User = await _repUser.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID && x.Status == CommonStatus.ENABLE && x.IsDeleted == false).OrderBy(x => x.Name).ToListAsync(); var Service = _cache.GetAllCodeService().Result.Take(10).ToList(); dynamic obj = new { @@ -5679,7 +5679,7 @@ namespace Myshipping.Application WTDW = WTDW, DCDL = DCDL, GoodsName = GoodsName, - User = User.OrderBy(x => x.Name).ToList(), + User = User, Forwarder = Forwarder, Service = Service, contractno = YFXY, diff --git a/Myshipping.Core/Service/User/SysUserService.cs b/Myshipping.Core/Service/User/SysUserService.cs index a040f814..45404c4e 100644 --- a/Myshipping.Core/Service/User/SysUserService.cs +++ b/Myshipping.Core/Service/User/SysUserService.cs @@ -77,7 +77,8 @@ public class SysUserService : ISysUserService, IDynamicApiController, ITransient o.Pids.Contains(pid.Trim())) .WhereIF(Enum.IsDefined(typeof(CommonStatus), input.SearchStatus), (u, e, o) => u.Status == input.SearchStatus) .Where((u, e, o) => u.AdminType == AdminType.None) - .Select("u.*,t.Name As TenantName ").ToDataFilter("u", "Id", FilterType.User).OrderByDescending(u => u.Name). + .Select("u.*,t.Name As TenantName ").ToDataFilter("u", "Id", FilterType.User).OrderByDescending(u => u.Name) + .OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)). ToPagedListAsync(input.PageNo, input.PageSize); var empInfos = await _sysEmpService.GetEmpInfo(users.Items.Select(m => long.Parse(m.Id)).ToList()); @@ -586,7 +587,7 @@ public class SysUserService : ISysUserService, IDynamicApiController, ITransient return await _sysUserRep.AsQueryable().Filter(null, true).WhereIF(tenantId == 0, x => x.TenantId == Convert.ToInt64(UserManager.TENANT_ID) && x.Status == CommonStatus.ENABLE&&x.IsDeleted==false) .WhereIF(tenantId != 0, x => x.TenantId == tenantId) .WhereIF(!string.IsNullOrWhiteSpace(name), x => x.Name.Contains(name)) - .OrderByDescending(x => x.Name).ToListAsync(); + .OrderBy(x => x.Name).ToListAsync(); } [HttpGet("/sysUser/DecryptPassword")]