|
@ -486,7 +486,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <remarks>
|
|
|
/// <remarks>
|
|
|
/// 验证结算分组号是否已存在
|
|
|
/// 验证结算分组号是否已存在
|
|
|
/// 验证导入的零件号在客户-厂内零件号关系表中是否存在
|
|
|
|
|
|
/// </remarks>
|
|
|
/// </remarks>
|
|
|
private async Task<List<ErrorExportDto>> CheckAsync(List<HBPO_SA_DETAIL> hbpoSaDetails) |
|
|
private async Task<List<ErrorExportDto>> CheckAsync(List<HBPO_SA_DETAIL> hbpoSaDetails) |
|
|
{ |
|
|
{ |
|
@ -507,18 +506,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
|
|
|
|
|
if (!checkList.Any()) |
|
|
if (!checkList.Any()) |
|
|
{ |
|
|
{ |
|
|
//验证客户对应厂内零件号是否存在
|
|
|
////验证客户对应厂内零件号是否存在
|
|
|
//导入的零件号集合
|
|
|
////导入的零件号集合
|
|
|
var importSaLUs = hbpoSaDetails.Select(t => t.LU).Distinct(); |
|
|
//var importSaLUs = hbpoSaDetails.Select(t => t.LU).Distinct();
|
|
|
var materialRelationshipEntitys = await _materialRelationshipRepository.GetListAsync(t => t.BusinessType == BusinessType && importSaLUs.Contains(t.SettleMaterialCode)).ConfigureAwait(false); |
|
|
//var materialRelationshipEntitys = await _materialRelationshipRepository.GetListAsync(t => t.BusinessType == BusinessType && importSaLUs.Contains(t.SettleMaterialCode)).ConfigureAwait(false);
|
|
|
var materialRelationshipEntitySettleMaterialCodes = materialRelationshipEntitys.Select(t => t.SettleMaterialCode).Distinct(); |
|
|
//var materialRelationshipEntitySettleMaterialCodes = materialRelationshipEntitys.Select(t => t.SettleMaterialCode).Distinct();
|
|
|
|
|
|
|
|
|
//不存在的客户零件号(差集)
|
|
|
////不存在的客户零件号(差集)
|
|
|
var noExistSettleMaterialCodes = importSaLUs.Except(materialRelationshipEntitySettleMaterialCodes); |
|
|
//var noExistSettleMaterialCodes = importSaLUs.Except(materialRelationshipEntitySettleMaterialCodes);
|
|
|
noExistSettleMaterialCodes.ForEach(t => |
|
|
//noExistSettleMaterialCodes.ForEach(t =>
|
|
|
{ |
|
|
//{
|
|
|
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, $"客户零件号【{t}】对应厂内零件号系统中不存在", string.Empty)); |
|
|
// checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, $"客户零件号【{t}】对应厂内零件号系统中不存在", string.Empty));
|
|
|
}); |
|
|
//});
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return checkList; |
|
|
return checkList; |
|
|