|
@ -34,7 +34,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
private readonly ADJ_SERVICE _adjservice; |
|
|
private readonly ADJ_SERVICE _adjservice; |
|
|
private readonly INormalEfCoreRepository<MaterialRelationship, Guid> _relationRepository; |
|
|
private readonly INormalEfCoreRepository<MaterialRelationship, Guid> _relationRepository; |
|
|
private readonly INormalEfCoreRepository<PUB_PD, Guid> _pdRepository; |
|
|
private readonly INormalEfCoreRepository<PUB_PD, Guid> _pdRepository; |
|
|
|
|
|
private readonly INormalEfCoreRepository<InvoiceSyncQad, Guid> _invSyncrepository; |
|
|
private readonly INormalEfCoreRepository<PriceListYinDu, Guid> _priceYinDuRepository; |
|
|
private readonly INormalEfCoreRepository<PriceListYinDu, Guid> _priceYinDuRepository; |
|
|
|
|
|
|
|
|
public PUB_BA_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> pubRepository, INormalEfCoreRepository<INVOICE_GRP, Guid> repository, INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> wRepository, INormalEfCoreRepository<INVOICE_NOT_SETTLE, Guid> sRepository, INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> mRepository, INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> adjRepository, BBAC_CAN_SA_MNG bbacMng, HBPO_CAN_SA_MNG hbpoMng, PUB_CAN_SA_MNG pubMng, INV_MNG invMng, |
|
|
public PUB_BA_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> pubRepository, INormalEfCoreRepository<INVOICE_GRP, Guid> repository, INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> wRepository, INormalEfCoreRepository<INVOICE_NOT_SETTLE, Guid> sRepository, INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> mRepository, INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> adjRepository, BBAC_CAN_SA_MNG bbacMng, HBPO_CAN_SA_MNG hbpoMng, PUB_CAN_SA_MNG pubMng, INV_MNG invMng, |
|
@ -45,7 +45,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
ADJ_SERVICE adjservice, |
|
|
ADJ_SERVICE adjservice, |
|
|
INormalEfCoreRepository<MaterialRelationship, Guid> relationRepository, |
|
|
INormalEfCoreRepository<MaterialRelationship, Guid> relationRepository, |
|
|
INormalEfCoreRepository<PUB_PD, Guid> pdRepository, |
|
|
INormalEfCoreRepository<PUB_PD, Guid> pdRepository, |
|
|
INormalEfCoreRepository<PriceListYinDu, Guid> priceYinDuRepository |
|
|
INormalEfCoreRepository<PriceListYinDu, Guid> priceYinDuRepository, |
|
|
|
|
|
INormalEfCoreRepository<InvoiceSyncQad, Guid> invSyncrepository |
|
|
|
|
|
|
|
|
) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, wRepository, sRepository, mRepository, adjRepository, bbacMng, hbpoMng, pubMng, invMng, service, baseservice) |
|
|
) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, wRepository, sRepository, mRepository, adjRepository, bbacMng, hbpoMng, pubMng, invMng, service, baseservice) |
|
|
{ |
|
|
{ |
|
@ -55,6 +56,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
_relationRepository = relationRepository; |
|
|
_relationRepository = relationRepository; |
|
|
_pdRepository = pdRepository; |
|
|
_pdRepository = pdRepository; |
|
|
_priceYinDuRepository = priceYinDuRepository; |
|
|
_priceYinDuRepository = priceYinDuRepository; |
|
|
|
|
|
_invSyncrepository = invSyncrepository; |
|
|
} |
|
|
} |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 提交发票
|
|
|
/// 提交发票
|
|
@ -891,6 +893,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
{ |
|
|
{ |
|
|
throw new UserFriendlyException($"无原发票记录!", "400"); |
|
|
throw new UserFriendlyException($"无原发票记录!", "400"); |
|
|
} |
|
|
} |
|
|
|
|
|
if (inv.State == SettleBillState.红冲发票) |
|
|
|
|
|
{ |
|
|
|
|
|
if (_invSyncrepository.Any(p => p.InvoiceNumber == inv.RealnvBillNum)) |
|
|
|
|
|
{ |
|
|
|
|
|
throw new UserFriendlyException($"红冲金税发票号{inv.RealnvBillNum}已经传过QAD,请更改金税发票号和开票日期后再进行重开!", "400"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
if (inv.InvoiceState == InvoiceBillState.报废) |
|
|
if (inv.InvoiceState == InvoiceBillState.报废) |
|
|
{ |
|
|
{ |
|
|
throw new UserFriendlyException($"已经报废发票不能再次报废!", "400"); |
|
|
throw new UserFriendlyException($"已经报废发票不能再次报废!", "400"); |
|
|