From b5fb8bd90bf216333500c4c37a014fd5cc13b124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 2 Nov 2023 10:35:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/HBPO_BA_SERVICE.cs | 10 +++++----- .../Entities/BQ/VmiAppService.cs | 2 +- .../Entities/Prices/PriceListAppServiceBJ.cs | 6 ------ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs index e9ba9952..a2768605 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs @@ -551,11 +551,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ var gNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();// var priceList = _priceRepository.ToList(); //价格单 - //var errorList = await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType); - //if (errorList.Count() > 0) - //{ - // return await ExportErrorReportAsync(errorList); - //} + //var errorList = await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType); + //if (errorList.Count() > 0) + //{ + // return await ExportErrorReportAsync(errorList); + //} var dto1s = ObjectMapper.Map, List>(entitys); var q = from d in dto1s join p in priceList on d.LU equals p.LU 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 6b06f496..a6b7003e 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 @@ -474,7 +474,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ // where a.MinChangedTime < b.MinChangedTime && a.SumChangedQty <= b.SumChangedQty // select b); - var entities = result.Where(p => p.BillTime >= DateTime.Parse(beginDate) && p.BillTime <= DateTime.Parse(endDate)).ToList(); + var entities = result.Where(p => p.BillTime >= DateTime.Parse(beginDate) && p.BillTime <= DateTime.Parse(endDate) && p.LogType==VmiLogType.Type100).ToList(); // 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(entities, "补货数据_"); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs index 161cf39b..49f3407d 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs @@ -75,7 +75,6 @@ namespace Win.Sfs.SettleAccount.Entities.Prices result.FindAll(t => !string.IsNullOrEmpty(t.ES1) || !string.IsNullOrEmpty(t.ES2)).ForEach(t => t.PartNo = t.PartNo + new string(' ', 6) + t.ES1 + t.ES2); var newPrice = ObjectMapper.Map, List>(result); newPrice = newPrice.GroupBy(p => new { p.Date, p.ClientCode, p.LU, p.BeginDate, p.EndDate }).Select(p => p.FirstOrDefault()).ToList(); - #region 校验 if (newPrice.Any()) { @@ -101,7 +100,6 @@ namespace Win.Sfs.SettleAccount.Entities.Prices return new JsonResult(new { code = ApplicationConsts.ImportFailCode, message = "导入失败", fileName }); } #endregion - newPrice.ForEach(t => t.IsCancel = true); newPrice.GroupBy(t => new { t.ClientCode, t.LU }) .SelectMany(t => @@ -269,14 +267,10 @@ namespace Win.Sfs.SettleAccount.Entities.Prices } plist.Add(entity); } - await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false); var dto = ObjectMapper.Map(plist.FirstOrDefault()); return dto; } - - - #endregion } }