|
|
@ -120,9 +120,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
var businessType = SeSyncConfigInfo.BusinessType; |
|
|
|
if (seDetails.Any()) |
|
|
|
{ |
|
|
|
if (businessType != EnumBusinessType.BeiJian) |
|
|
|
{ |
|
|
|
//备件以外其他业务添加客户零件号与厂内零件号关系
|
|
|
|
//if (businessType != EnumBusinessType.BeiJian)
|
|
|
|
//{
|
|
|
|
// //备件以外其他业务添加客户零件号与厂内零件号关系
|
|
|
|
// //客户零件号和厂内零件号
|
|
|
|
// var luRePartCodes = seDetails.Where(t => !string.IsNullOrEmpty(t.LU) && !string.IsNullOrEmpty(t.FactoryPartCode)).Select(t => new { t.LU, t.FactoryPartCode }).Distinct().ToList();
|
|
|
|
// if (luRePartCodes.Any())
|
|
|
|
// {
|
|
|
|
// var materialRelationships = luRePartCodes.Select(t => new MaterialRelationship(GuidGenerator.Create(), t.FactoryPartCode, "", t.LU, businessType));
|
|
|
|
// await _syncExtendManager.AddNewMaterialRelationshipsAsync(materialRelationships).ConfigureAwait(false);
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
|
|
|
|
//客户零件号和厂内零件号
|
|
|
|
var luRePartCodes = seDetails.Where(t => !string.IsNullOrEmpty(t.LU) && !string.IsNullOrEmpty(t.FactoryPartCode)).Select(t => new { t.LU, t.FactoryPartCode }).Distinct().ToList(); |
|
|
|
if (luRePartCodes.Any()) |
|
|
@ -130,7 +139,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
var materialRelationships = luRePartCodes.Select(t => new MaterialRelationship(GuidGenerator.Create(), t.FactoryPartCode, "", t.LU, businessType)); |
|
|
|
await _syncExtendManager.AddNewMaterialRelationshipsAsync(materialRelationships).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var dateTimeNow = DateTime.Now; |
|
|
|
seDetails.ForEach(t => |
|
|
|