Browse Source

Merge branch 'master' of http://dev.ccwin-in.com:3000/BoXu.Zheng/BeiJinSettleAccount

master
wanggang 1 year ago
parent
commit
a510fba274
  1. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs
  2. 24
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs
  3. 25
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs
  4. 27
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
  5. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

4
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs

@ -96,6 +96,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 厂内物料号
/// </summary>
public string PartCode { get; set; }
/// <summary>
/// 生产码类型
/// </summary>
public string ProductionCodeType { get; set; }
}
/// <summary>

24
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs

@ -176,18 +176,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
}
if (!checkList.Any())
{
//验证客户对应厂内零件号是否存在
if (jisSaDetails.Any())
{
checkList.AddRange(await CheckAsync(jisSaDetails, EnumBusinessType.JisBBAC).ConfigureAwait(false));
}
if (maiDanSaDetails.Any())
{
checkList.AddRange(await CheckAsync(maiDanSaDetails, EnumBusinessType.MaiDanJianBBAC).ConfigureAwait(false));
}
}
//if (!checkList.Any())
//{
// //验证客户对应厂内零件号是否存在
// if (jisSaDetails.Any())
// {
// checkList.AddRange(await CheckAsync(jisSaDetails, EnumBusinessType.JisBBAC).ConfigureAwait(false));
// }
// if (maiDanSaDetails.Any())
// {
// checkList.AddRange(await CheckAsync(maiDanSaDetails, EnumBusinessType.MaiDanJianBBAC).ConfigureAwait(false));
// }
//}
if (checkList.Count > 0)
{

25
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs

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

27
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs

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

3
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -996,7 +996,8 @@ namespace Win.Sfs.SettleAccount
{ "Total", d.Total},
{ "ProtocolNumber", d.ProtocolNumber},
{ "Remark", d.Remark},
{ "CommodityGroup", d.CommodityGroup}
{ "CommodityGroup", d.CommodityGroup},
{ "PO", d.Extend3}
}));
CreateMap<YinDuJianImportDto, PUB_SA_DETAIL>();
}

Loading…
Cancel
Save