|
@ -279,11 +279,30 @@ namespace Win.Sfs.SettleAccount.Entities.WMS |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//不是汇总形式出库的不能导入,即导入的数据中如果SAP编号 即厂内零件号有重复不能导入
|
|
|
|
|
|
var sapcodegroup = (from t in _list |
|
|
|
|
|
group t by new { sapcode = t.SapMaterialCode, isbj = t.IsBack } into m |
|
|
|
|
|
select new |
|
|
|
|
|
{ |
|
|
|
|
|
物料号 = m.Key.sapcode, |
|
|
|
|
|
是否备件 = m.Key.isbj, |
|
|
|
|
|
rowcount = m.Count() |
|
|
|
|
|
} into c |
|
|
|
|
|
where c.rowcount >= 2 |
|
|
|
|
|
select c).ToList(); |
|
|
|
|
|
if (sapcodegroup != null && sapcodegroup.Count > 0) |
|
|
|
|
|
{ |
|
|
|
|
|
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)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
foreach (var itm in _list) |
|
|
foreach (var itm in _list) |
|
|
{ |
|
|
{ |
|
|
if (itm.IsBack != "是" && itm.IsBack != "否") |
|
|
if (itm.IsBack != "是" && itm.IsBack != "否") |
|
|
{ |
|
|
{ |
|
|
checkList.Add(new ErrorExportDto(version, "红旗一轿出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中SAP编码{0}的是否备件请填写是或否,影响出库请检查!", itm.SapMaterialCode), string.Empty)); |
|
|
checkList.Add(new ErrorExportDto(version, "红旗一轿出库单导入", string.Empty, string.Empty, itm.SapMaterialCode, string.Empty, string.Format("导入模板中SAP编码{0}的是否备件请填写是或否,影响出库请检查!", itm.SapMaterialCode), string.Empty)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
//和物料主数据中SAP物料号检验是否存在
|
|
|
//和物料主数据中SAP物料号检验是否存在
|
|
|