From 014b39f1b9c6adcbf3da84a3d61d5e9e19c3fc74 Mon Sep 17 00:00:00 2001 From: tongfei <244188119@qq.com> Date: Wed, 21 Feb 2024 12:30:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=A1=A8=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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WMS.Web.Repositories/BoxMarkRepositories.cs b/src/WMS.Web.Repositories/BoxMarkRepositories.cs index 02d82da5..1cc7ae88 100644 --- a/src/WMS.Web.Repositories/BoxMarkRepositories.cs +++ b/src/WMS.Web.Repositories/BoxMarkRepositories.cs @@ -75,7 +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) + .OrderByDescending(x => x.order.Id).ThenByDescending(x => x.detail.FirstBillNo).ThenByDescending(x => x.detail.LastBillNo) .Where(adv => 1 == 1); //编号查询 @@ -219,7 +219,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) + .OrderByDescending(x => x.order.Id).ThenByDescending(x => x.detail.FirstBillNo).ThenByDescending(x => x.detail.LastBillNo) .Where(adv => adv.order.Id == id); var list = await query.Select(s => new BoxMarkQueryResponse() {