Browse Source

价格单

master
mahao 1 year ago
parent
commit
ae12b726f1
  1. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs
  2. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

8
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs

@ -133,7 +133,7 @@ public class PriceListImportDto
/// </summary>
[Display(Name = "零件号")]
[Required(ErrorMessage = "{0}是必填项")]
[ImporterHeader(Name = "*Part No.")]
[ImporterHeader(Name = "Part No.")]
public string PartNo { get; set; }
/// <summary>
/// 价格
@ -143,17 +143,17 @@ public class PriceListImportDto
/// <summary>
/// 开始时间
/// </summary>
[ImporterHeader(Name = "*Valid From")]
[ImporterHeader(Name = "Valid From")]
public DateTime ValidFrom { get; set; }
/// <summary>
/// 结束时间
/// </summary>
[ImporterHeader(Name = "*Valid To")]
[ImporterHeader(Name = "Valid To")]
public DateTime ValidTo { get; set; }
/// <summary>
/// 客户编码
/// </summary>
[ImporterHeader(Name = "*Plant")]
[ImporterHeader(Name = "Plant")]
public string Plant { get; set; }
/// <summary>
/// ES1

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

@ -77,7 +77,7 @@ public class PriceListAppService : SettleAccountApplicationBase<PriceList>
_checkls.Add("1046");
_checkls.Add("104T");
result = result.Where(p => _checkls.Contains(p.Plant)).ToList();
result.ForEach(t => t.PartNo = t.PartNo + new string(' ', 6) + t.ES1 + t.ES2);
result.Where(t => !string.IsNullOrEmpty(t.ES1) || !string.IsNullOrEmpty(t.ES2)).ForEach(t => t.PartNo = t.PartNo + new string(' ', 6) + t.ES1 + t.ES2);
var entityList = ObjectMapper.Map<List<PriceListImportDto>, List<PriceList>>(result);
entityList = entityList.GroupBy(p => new { p.LU, p.ClientCode, p.BeginTime, p.EndTime }).Select(p => p.FirstOrDefault()).ToList();

Loading…
Cancel
Save