|
|
@ -120,16 +120,24 @@ 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()) |
|
|
|
{ |
|
|
|
//备件以外其他业务添加客户零件号与厂内零件号关系
|
|
|
|
//客户零件号和厂内零件号
|
|
|
|
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 materialRelationships = luRePartCodes.Select(t => new MaterialRelationship(GuidGenerator.Create(), t.FactoryPartCode, "", t.LU, businessType)); |
|
|
|
await _syncExtendManager.AddNewMaterialRelationshipsAsync(materialRelationships).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
|
var dateTimeNow = DateTime.Now; |
|
|
|