|
|
@ -292,9 +292,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
|
|
|
|
var error = from itm1 in outPutDetail |
|
|
|
join itm2 in _lst on |
|
|
|
new { itm1.MaterialCode, itm1.Kanban } |
|
|
|
new { itm1.SapMaterialCode, itm1.Kanban } |
|
|
|
equals |
|
|
|
new { itm2.MaterialCode, itm2.Kanban } |
|
|
|
new { itm2.SapMaterialCode, itm2.Kanban } |
|
|
|
select itm1; |
|
|
|
var errList = error.GroupBy(p => new { p.BillNum }).Select(p => new { BillNum = p.Key.BillNum, Number = p.Sum(itm => itm.Qty) }); |
|
|
|
if (errList.Count() == 0) |
|
|
@ -302,9 +302,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
|
|
|
|
var query = from itm1 in _lst |
|
|
|
join itm2 in outPutDetail on |
|
|
|
new { itm1.MaterialCode, itm1.Kanban } |
|
|
|
new { itm1.SapMaterialCode, itm1.Kanban } |
|
|
|
equals |
|
|
|
new { itm2.MaterialCode, itm2.Kanban } into temp1 |
|
|
|
new { itm2.SapMaterialCode, itm2.Kanban } into temp1 |
|
|
|
from tm1 in temp1.DefaultIfEmpty() |
|
|
|
where tm1 == null |
|
|
|
select itm1; |
|
|
@ -459,7 +459,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
//检验1:导入模板中的第一页签数据不能为空
|
|
|
|
if (result == null || result.Count() == 0) |
|
|
|
{ |
|
|
|
checkList.Add(new ErrorExportDto(version, "红旗批量出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, "导入模板中第一页签没有数据,请检查!", string.Empty)); |
|
|
|
checkList.Add(new ErrorExportDto(version, "自定义出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, "导入模板中第一页签没有数据,请检查!", string.Empty)); |
|
|
|
} |
|
|
|
if (checkList.Count > 0) |
|
|
|
{ |
|
|
@ -474,7 +474,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
{ |
|
|
|
if (itm.Qty == 0) |
|
|
|
{ |
|
|
|
checkList.Add(new ErrorExportDto(version, "红旗批量出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中看板号{0}的结算数量为0,影响出库请检查!", itm.Kanban), string.Empty)); |
|
|
|
checkList.Add(new ErrorExportDto(version, "自定义出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中看板号{0}的结算数量为0,影响出库请检查!", itm.Kanban), string.Empty)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -487,7 +487,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
GuidGenerator.Create(), |
|
|
|
!string.IsNullOrEmpty(itm.WmsBillNum) ? itm.WmsBillNum : string.Empty, |
|
|
|
itm.Kanban, |
|
|
|
itm.MaterialCode, |
|
|
|
itm.SapMaterialCode, |
|
|
|
itm.MaterialDesc, |
|
|
|
itm.MaterialGroup, |
|
|
|
string.Empty, |
|
|
@ -512,13 +512,13 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
|
|
|
|
//检验3:导入模板中看板号+物料号,不能重复
|
|
|
|
var _isRepeatOfReportList = from arc in _lst |
|
|
|
group arc by new { arc.Kanban, arc.MaterialCode, arc.Version } |
|
|
|
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}组合物料号{1}有重复,请检查!", itm.Key.Kanban, itm.Key.MaterialCode), string.Empty)); |
|
|
|
checkList.Add(new ErrorExportDto(version, "红旗批量出库单", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中看板号{0}组合物料号{1}有重复,请检查!", itm.Key.Kanban, itm.Key.SapMaterialCode), string.Empty)); |
|
|
|
} |
|
|
|
if (checkList.Count > 0) |
|
|
|
{ |
|
|
@ -532,9 +532,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
|
|
|
|
var error = from itm1 in outPutDetail |
|
|
|
join itm2 in _lst on |
|
|
|
new { itm1.MaterialCode, itm1.Kanban } |
|
|
|
new { itm1.SapMaterialCode, itm1.Kanban } |
|
|
|
equals |
|
|
|
new { itm2.MaterialCode, itm2.Kanban} |
|
|
|
new { itm2.SapMaterialCode, itm2.Kanban} |
|
|
|
select itm1; |
|
|
|
var errList = error.GroupBy(p => new { p.BillNum }).Select(p => new { BillNum = p.Key.BillNum, Number = p.Count() }); |
|
|
|
|
|
|
@ -551,9 +551,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
|
|
|
|
var query = from itm1 in _lst |
|
|
|
join itm2 in outPutDetail on |
|
|
|
new { itm1.MaterialCode, itm1.Kanban } |
|
|
|
new { itm1.SapMaterialCode, itm1.Kanban } |
|
|
|
equals |
|
|
|
new { itm2.MaterialCode, itm2.Kanban } into temp1 |
|
|
|
new { itm2.SapMaterialCode, itm2.Kanban } into temp1 |
|
|
|
from tm1 in temp1.DefaultIfEmpty() |
|
|
|
where tm1 == null |
|
|
|
select itm1; |
|
|
|