From 91258cec5575a384833799191a3b1f46274cda1a Mon Sep 17 00:00:00 2001 From: tongfei <244188119@qq.com> Date: Mon, 19 Feb 2024 09:33:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WMS.Web.Repositories/BoxMarkRepositories.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/WMS.Web.Repositories/BoxMarkRepositories.cs b/src/WMS.Web.Repositories/BoxMarkRepositories.cs index d72dfc1a..79aa9541 100644 --- a/src/WMS.Web.Repositories/BoxMarkRepositories.cs +++ b/src/WMS.Web.Repositories/BoxMarkRepositories.cs @@ -75,6 +75,7 @@ namespace WMS.Web.Repositories var query = _context.BoxMarkBillNo .GroupJoin(_context.BoxMark, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders }) .SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order }) + .OrderByDescending(x => x.detail.Id).ThenByDescending(x => x.detail.FirstBillNo).ThenByDescending(x => x.detail.LastBillNo) .Where(adv => 1 == 1); //编号查询 @@ -152,7 +153,7 @@ namespace WMS.Web.Repositories Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.CreatorId), CreateTime = s.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), Remark = s.order.Remark - }).OrderByDescending(x => x.DetailId).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync(); + }).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync(); return (list, total); }