Browse Source

更新版本

master
学 赵 11 months ago
parent
commit
b5fb8bd90b
  1. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs
  2. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
  3. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs

10
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 gNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();//
var priceList = _priceRepository.ToList(); var priceList = _priceRepository.ToList();
//价格单 //价格单
//var errorList = await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType); //var errorList = await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType);
//if (errorList.Count() > 0) //if (errorList.Count() > 0)
//{ //{
// return await ExportErrorReportAsync(errorList); // return await ExportErrorReportAsync(errorList);
//} //}
var dto1s = ObjectMapper.Map<List<HBPO_CAN_SA_DETAIL>, List<HBPO_CAN_SA_DETAIL_DTO>>(entitys); var dto1s = ObjectMapper.Map<List<HBPO_CAN_SA_DETAIL>, List<HBPO_CAN_SA_DETAIL_DTO>>(entitys);
var q = from d in dto1s var q = from d in dto1s
join p in priceList on d.LU equals p.LU join p in priceList on d.LU equals p.LU

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