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> /// </summary>
[Display(Name = "零件号")] [Display(Name = "零件号")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[ImporterHeader(Name = "*Part No.")] [ImporterHeader(Name = "Part No.")]
public string PartNo { get; set; } public string PartNo { get; set; }
/// <summary> /// <summary>
/// 价格 /// 价格
@ -143,17 +143,17 @@ public class PriceListImportDto
/// <summary> /// <summary>
/// 开始时间 /// 开始时间
/// </summary> /// </summary>
[ImporterHeader(Name = "*Valid From")] [ImporterHeader(Name = "Valid From")]
public DateTime ValidFrom { get; set; } public DateTime ValidFrom { get; set; }
/// <summary> /// <summary>
/// 结束时间 /// 结束时间
/// </summary> /// </summary>
[ImporterHeader(Name = "*Valid To")] [ImporterHeader(Name = "Valid To")]
public DateTime ValidTo { get; set; } public DateTime ValidTo { get; set; }
/// <summary> /// <summary>
/// 客户编码 /// 客户编码
/// </summary> /// </summary>
[ImporterHeader(Name = "*Plant")] [ImporterHeader(Name = "Plant")]
public string Plant { get; set; } public string Plant { get; set; }
/// <summary> /// <summary>
/// ES1 /// 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("1046");
_checkls.Add("104T"); _checkls.Add("104T");
result = result.Where(p => _checkls.Contains(p.Plant)).ToList(); 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); 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(); entityList = entityList.GroupBy(p => new { p.LU, p.ClientCode, p.BeginTime, p.EndTime }).Select(p => p.FirstOrDefault()).ToList();

Loading…
Cancel
Save