From fe2b27527084667a15c424ffba00052cbf35ef7f Mon Sep 17 00:00:00 2001 From: bklLiudl <673013083@qq.com> Date: 星期一, 15 七月 2024 11:45:30 +0800 Subject: [PATCH] Merge branch 'master' into Liudl --- Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs | 29 ++++++++++++++--------------- 1 files changed, 14 insertions(+), 15 deletions(-) diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs index 8726081..3f7e3e2 100644 --- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs +++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs @@ -812,29 +812,29 @@ #region 鍩虹鍔熻兘 - public List<ExportNoticeDto> GetExportNoticeList(string no, string type, string status, string lotNo, int? logisticsId, string isWave, string isDespatch, string waveNo, int page, int limit, out int count) + public async Task<List<ExportNoticeDto>> GetExportNoticeList(GetExportNoticeVm model, RefAsync<int> count) { try { var strList = new List<string>(); - if (!string.IsNullOrWhiteSpace(lotNo)) + if (!string.IsNullOrWhiteSpace(model.LotNo)) { - var detailList = Db.Queryable<BllExportNoticeDetail>().Where(m => m.IsDel == "0" && m.LotNo.Contains(lotNo.Trim())).Select(m => m.SONo).Distinct().ToList(); + var detailList = Db.Queryable<BllExportNoticeDetail>().Where(m => m.IsDel == "0" && m.LotNo.Contains(model.LotNo.Trim())).Select(m => m.SONo).Distinct().ToList(); strList = detailList; } Expression<Func<BllExportNotice, bool>> item = Expressionable.Create<BllExportNotice>() - .AndIF(!string.IsNullOrWhiteSpace(no), it => it.SONo.Contains(no.Trim())) - .AndIF(!string.IsNullOrWhiteSpace(type), it => it.Type == type) - .AndIF(!string.IsNullOrWhiteSpace(status), it => it.Status == status) - .AndIF(logisticsId != null, it => it.LogisticsId == logisticsId) - .AndIF(!string.IsNullOrWhiteSpace(isWave), it => it.IsWave == isWave) - .AndIF(!string.IsNullOrWhiteSpace(isDespatch), it => it.IsDespatch == isDespatch) - .AndIF(!string.IsNullOrWhiteSpace(waveNo), it => it.WaveNo.Contains(waveNo.Trim())) - .AndIF(!string.IsNullOrWhiteSpace(lotNo), it => strList.Contains(it.SONo)) + .AndIF(!string.IsNullOrWhiteSpace(model.No), it => it.SONo.Contains(model.No.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(model.Type), it => it.Type == model.Type) + .AndIF(!string.IsNullOrWhiteSpace(model.Status), it => it.Status == model.Status) + .AndIF(model.LogisticsId != null, it => it.LogisticsId == model.LogisticsId) + .AndIF(!string.IsNullOrWhiteSpace(model.IsWave), it => it.IsWave == model.IsWave) + .AndIF(!string.IsNullOrWhiteSpace(model.IsDespatch), it => it.IsDespatch == model.IsDespatch) + .AndIF(!string.IsNullOrWhiteSpace(model.WaveNo), it => it.WaveNo.Contains(model.WaveNo.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(model.LotNo), it => strList.Contains(it.SONo)) .ToExpression();//娉ㄦ剰 杩欎竴鍙� 涓嶈兘灏� - var total = 0; - var data = GetAllWhereAsync(item) + + var data = await GetAllWhereAsync(item) .LeftJoin<SysLogisticsInfo>((a, b) => a.LogisticsId == b.Id) .LeftJoin<SysUserInfor>((a, b, c) => a.CreateUser == c.Id) .LeftJoin<SysUserInfor>((a, b, c, d) => a.CreateUser == d.Id) @@ -867,8 +867,7 @@ CheckTime = a.CheckTime }) .OrderByDescending(a => a.CreateTime) - .ToOffsetPage(page, limit, ref total); - count = total; + .ToPageListAsync(model.Page, model.Limit, count); return data; } -- Gitblit v1.8.0