|
@ -68,6 +68,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private readonly INormalEfCoreRepository<PriceListBJ, Guid> _priceBjListRepository; |
|
|
private readonly INormalEfCoreRepository<PriceListBJ, Guid> _priceBjListRepository; |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
|
|
|
/// 印度价格仓储
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private readonly INormalEfCoreRepository<PriceListYinDu, Guid> _priceYinDuListRepository; |
|
|
|
|
|
/// <summary>
|
|
|
/// 客户零件关系仓储
|
|
|
/// 客户零件关系仓储
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private readonly INormalEfCoreRepository<MaterialRelationship, Guid> _materialRelationshipRepository; |
|
|
private readonly INormalEfCoreRepository<MaterialRelationship, Guid> _materialRelationshipRepository; |
|
@ -87,6 +91,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> pubNotSaDetailRepository, |
|
|
INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> pubNotSaDetailRepository, |
|
|
INormalEfCoreRepository<PriceList, Guid> priceListRepository, |
|
|
INormalEfCoreRepository<PriceList, Guid> priceListRepository, |
|
|
INormalEfCoreRepository<PriceListBJ, Guid> priceBjListRepository, |
|
|
INormalEfCoreRepository<PriceListBJ, Guid> priceBjListRepository, |
|
|
|
|
|
INormalEfCoreRepository<PriceListYinDu, Guid> priceYinDuListRepository, |
|
|
INormalEfCoreRepository<MaterialRelationship, Guid> materialRelationshipRepository, |
|
|
INormalEfCoreRepository<MaterialRelationship, Guid> materialRelationshipRepository, |
|
|
INormalEfCoreRepository<TB_RePartsRelationship, Guid> tbRePartsRelationshipRepository, |
|
|
INormalEfCoreRepository<TB_RePartsRelationship, Guid> tbRePartsRelationshipRepository, |
|
|
IDistributedCache<PUB_SA> cache, |
|
|
IDistributedCache<PUB_SA> cache, |
|
@ -103,6 +108,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
_pubNotSaDetailRepository = pubNotSaDetailRepository; |
|
|
_pubNotSaDetailRepository = pubNotSaDetailRepository; |
|
|
_priceListRepository = priceListRepository; |
|
|
_priceListRepository = priceListRepository; |
|
|
_priceBjListRepository = priceBjListRepository; |
|
|
_priceBjListRepository = priceBjListRepository; |
|
|
|
|
|
_priceYinDuListRepository = priceYinDuListRepository; |
|
|
_materialRelationshipRepository = materialRelationshipRepository; |
|
|
_materialRelationshipRepository = materialRelationshipRepository; |
|
|
_tbRePartsRelationshipRepository = tbRePartsRelationshipRepository; |
|
|
_tbRePartsRelationshipRepository = tbRePartsRelationshipRepository; |
|
|
} |
|
|
} |
|
@ -550,6 +556,24 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
importPubSaDetail.Price = priceListEntity?.Price ?? 0; |
|
|
importPubSaDetail.Price = priceListEntity?.Price ?? 0; |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
else if(businessType == EnumBusinessType.YinDuJian) |
|
|
|
|
|
{ |
|
|
|
|
|
//印度销售价格
|
|
|
|
|
|
var priceListEntitys = _priceYinDuListRepository.Where(t => t.IsCancel == false) |
|
|
|
|
|
.Where(t => t.ClientCode == clientCode) |
|
|
|
|
|
.Where(t => lus.Contains(t.LU)).ToList(); |
|
|
|
|
|
pubSaDetails.ForEach(importPubSaDetail => |
|
|
|
|
|
{ |
|
|
|
|
|
//根据物料号、结算日期获取价格
|
|
|
|
|
|
var priceListEntity = priceListEntitys |
|
|
|
|
|
.Where(t => t.LU == importPubSaDetail.LU) |
|
|
|
|
|
.Where(t => importPubSaDetail.SettleDate >= t.BeginDate && importPubSaDetail.SettleDate <= t.EndDate) |
|
|
|
|
|
.OrderByDescending(t => t.Date) |
|
|
|
|
|
.ThenByDescending(t => t.CreationTime) |
|
|
|
|
|
.FirstOrDefault(); |
|
|
|
|
|
importPubSaDetail.Price = priceListEntity?.Price ?? 0; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
//销售价格
|
|
|
//销售价格
|
|
|