Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
b5fb8bd90b
  1. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
  2. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs

2
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 // where a.MinChangedTime < b.MinChangedTime && a.SumChangedQty <= b.SumChangedQty
// select b); // 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<VmiLog> query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda<VmiLog>()); // IQueryable<VmiLog> query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda<VmiLog>());
var fileName = $"补货数据_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx"; var fileName = $"补货数据_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx";
var content = this.GetContent(entities, "补货数据_"); var content = this.GetContent(entities, "补货数据_");

6
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); 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<PriceListBJImportDto>, List<PriceListBJ>>(result); var newPrice = ObjectMapper.Map<List<PriceListBJImportDto>, List<PriceListBJ>>(result);
newPrice = newPrice.GroupBy(p => new { p.Date, p.ClientCode, p.LU, p.BeginDate, p.EndDate }).Select(p => p.FirstOrDefault()).ToList(); newPrice = newPrice.GroupBy(p => new { p.Date, p.ClientCode, p.LU, p.BeginDate, p.EndDate }).Select(p => p.FirstOrDefault()).ToList();
#region 校验 #region 校验
if (newPrice.Any()) if (newPrice.Any())
{ {
@ -101,7 +100,6 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
return new JsonResult(new { code = ApplicationConsts.ImportFailCode, message = "导入失败", fileName }); return new JsonResult(new { code = ApplicationConsts.ImportFailCode, message = "导入失败", fileName });
} }
#endregion #endregion
newPrice.ForEach(t => t.IsCancel = true); newPrice.ForEach(t => t.IsCancel = true);
newPrice.GroupBy(t => new { t.ClientCode, t.LU }) newPrice.GroupBy(t => new { t.ClientCode, t.LU })
.SelectMany(t => .SelectMany(t =>
@ -269,14 +267,10 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
} }
plist.Add(entity); plist.Add(entity);
} }
await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false); await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false);
var dto = ObjectMapper.Map<PriceListBJ, PriceListBJDto>(plist.FirstOrDefault()); var dto = ObjectMapper.Map<PriceListBJ, PriceListBJDto>(plist.FirstOrDefault());
return dto; return dto;
} }
#endregion #endregion
} }
} }

Loading…
Cancel
Save