|
@ -7,6 +7,7 @@ using SettleAccount.Domain.BQ; |
|
|
using Volo.Abp.Domain.Services; |
|
|
using Volo.Abp.Domain.Services; |
|
|
using Win.Sfs.SettleAccount.Bases; |
|
|
using Win.Sfs.SettleAccount.Bases; |
|
|
using Win.Sfs.SettleAccount.Bases.DomainServices; |
|
|
using Win.Sfs.SettleAccount.Bases.DomainServices; |
|
|
|
|
|
using Win.Sfs.SettleAccount.Entities.Prices; |
|
|
using Win.Sfs.Shared.RepositoryBase; |
|
|
using Win.Sfs.Shared.RepositoryBase; |
|
|
|
|
|
|
|
|
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
@ -23,6 +24,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
private readonly INormalEfCoreRepository<BBAC_CAN_SA, Guid> _repository; |
|
|
private readonly INormalEfCoreRepository<BBAC_CAN_SA, Guid> _repository; |
|
|
private readonly INormalEfCoreRepository<BBAC_CAN_SA_DETAIL, Guid> _detailRepository; |
|
|
private readonly INormalEfCoreRepository<BBAC_CAN_SA_DETAIL, Guid> _detailRepository; |
|
|
private readonly INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> _notRepository; |
|
|
private readonly INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> _notRepository; |
|
|
|
|
|
private readonly INormalEfCoreRepository<PriceList, Guid> _priceRepository; |
|
|
private readonly BaseDomainService _service; |
|
|
private readonly BaseDomainService _service; |
|
|
public BBAC_NOT_SA_MNG() |
|
|
public BBAC_NOT_SA_MNG() |
|
|
{ |
|
|
{ |
|
@ -32,9 +34,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
BaseDomainService service, |
|
|
BaseDomainService service, |
|
|
INormalEfCoreRepository<BBAC_CAN_SA, Guid> repository, |
|
|
INormalEfCoreRepository<BBAC_CAN_SA, Guid> repository, |
|
|
INormalEfCoreRepository<BBAC_CAN_SA_DETAIL, Guid> detailRepository, |
|
|
INormalEfCoreRepository<BBAC_CAN_SA_DETAIL, Guid> detailRepository, |
|
|
INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> notRepository |
|
|
INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> notRepository, |
|
|
|
|
|
INormalEfCoreRepository<PriceList, Guid> priceRepository |
|
|
) |
|
|
) |
|
|
{ |
|
|
{ |
|
|
|
|
|
_priceRepository = priceRepository; |
|
|
_repository = repository; |
|
|
_repository = repository; |
|
|
_detailRepository = detailRepository; |
|
|
_detailRepository = detailRepository; |
|
|
_notRepository = notRepository; |
|
|
_notRepository = notRepository; |
|
@ -42,6 +46,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
} |
|
|
} |
|
|
public virtual async Task<List<string>> GenerateSettlementOrder(List<BBAC_NOT_SA_DETAIL> p_list) |
|
|
public virtual async Task<List<string>> GenerateSettlementOrder(List<BBAC_NOT_SA_DETAIL> p_list) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
var first = p_list.FirstOrDefault(); |
|
|
var first = p_list.FirstOrDefault(); |
|
|
List<string> errors = new List<string>(); |
|
|
List<string> errors = new List<string>(); |
|
|
var priceErrors = await _service.CheckPriceList(p_list, first.Site).ConfigureAwait(false); |
|
|
var priceErrors = await _service.CheckPriceList(p_list, first.Site).ConfigureAwait(false); |
|
@ -52,6 +57,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
errors.Add($"生产号{itm.PN}零件{itm.LU}结算日期{itm.SettleDate}无价格区间数据"); |
|
|
errors.Add($"生产号{itm.PN}零件{itm.LU}结算日期{itm.SettleDate}无价格区间数据"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (errors.Count > 0) |
|
|
if (errors.Count > 0) |
|
|
{ |
|
|
{ |
|
|
return errors; |
|
|
return errors; |
|
|