Browse Source

检验物料号是否重复

FoShanPG
44673626 2 years ago
parent
commit
d275f7b0e7
  1. 17
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs
  2. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs

17
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs

@ -569,23 +569,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
} }
} }
//检验3:导入模板中物料号,不能重复
var _isRepeatOfReportList = from arc in _lst
group arc by new { arc.Kanban, arc.SapMaterialCode, arc.Version }
into g
where g.Count() > 1
select g;
foreach (var itm in _isRepeatOfReportList)
{
checkList.Add(new ErrorExportDto(version, "自定义出库单", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中物料号{0}有重复,请检查!", itm.Key.SapMaterialCode), string.Empty));
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
var outPutDetail = await _wmsRepository.Where(p => p.Version == version && p.State != 4 ).ToListAsync(); var outPutDetail = await _wmsRepository.Where(p => p.Version == version && p.State != 4 ).ToListAsync();

2
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs

@ -294,7 +294,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
{ {
foreach (var item in sapcodegroup) foreach (var item in sapcodegroup)
{ {
checkList.Add(new ErrorExportDto(version, "红旗一轿出库单导入", string.Empty, string.Empty, item., string.Empty, string.Format("导入模板中SAP编码{0}并且是否备件值{1},有重复不是汇总出库请检查!", item., item.), string.Empty)); checkList.Add(new ErrorExportDto(version, "红旗一轿出库单导入", string.Empty, string.Empty, item., string.Empty, string.Format("导入模板中SAP编码{0}并且是否备件值{1},有重复不是汇总出库请检查!", item., item.), string.Empty));
} }
} }

Loading…
Cancel
Save