From 2ced338e80f9b33cee405dd9312601352d5be327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Wed, 1 Nov 2023 09:16:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=A1=A5=E8=B4=A7=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/VmiAppService.cs | 40 ++----------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs index ab0706d8..e8663120 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs @@ -408,15 +408,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ public async Task ReplenishedExportAsync(ARequestDto input) { RequestDto inputTemp = new RequestDto(); - //inputTemp.Filters.Add(new FilterCondition("BillTime", input.startBillTime, EnumFilterAction.BiggerThanOrEqual, EnumFilterLogic.And)); - //inputTemp.Filters.Add(new FilterCondition("BillTime", input.endBillTime, EnumFilterAction.SmallThanOrEqual, EnumFilterLogic.And)); - //var entities = await _logRepository.GetListByFilterAsync(inputTemp.Filters,null,3,0).ConfigureAwait(false); + var beginDate= DateTime.Parse(input.startBillTime).ToString("yyyy/MM/dd") + " 00:00:00 "; var endDate = DateTime.Parse(input.endBillTime).ToString("yyyy/MM/dd") + " 23:59:59 "; DateTimeFormatInfo dtFormat = new DateTimeFormatInfo(); dtFormat.ShortDatePattern = "yyyy/MM/dd HH:mm:ss"; - //DateTime aa= DateTime.ParseExact(DateTime.Parse(input.startBillTime).ToString("yyyy/MM/dd"), "yyyy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture); - var result = (from temp1 in _logRepository join temp2 in @@ -452,18 +448,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ ) on new { temp1.VinCode, temp1.RealPartCode } equals new { temp2.VinCode, temp2.RealPartCode } where temp1.ChangedQty > 0 select temp1).ToList(); - - - - - - - - - - - - //var temp2 = (from a in _logRepository // where (int)a.LogType == 200 // group a by new { a.VinCode, a.RealPartCode } into g @@ -491,28 +475,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ // where a.MinChangedTime < b.MinChangedTime && a.SumChangedQty <= b.SumChangedQty // select b); - - - - - - - - - - - - - - - - - - - // var entities = await _logRepository.Where(p => p.BillTime >= DateTime.Parse(beginDate) && p.BillTime <= DateTime.Parse(endDate)).ToListAsync(); + var entities = await result.Where(p => p.BillTime >= DateTime.Parse(beginDate) && p.BillTime <= DateTime.Parse(endDate)).ToListAsync(); // IQueryable query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda()); var fileName = $"补货数据_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx"; - var content = this.GetContent(result, "补货数据_"); + var content = this.GetContent(entities, "补货数据_"); await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false); return fileName; }