|
|
@ -32,14 +32,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
private readonly INormalEfCoreRepository<PriceListBJ, Guid> _pricebjRepository; |
|
|
|
private readonly ADJ_SERVICE _adjservice; |
|
|
|
private readonly INormalEfCoreRepository<MaterialRelationship, Guid> _relationRepository; |
|
|
|
|
|
|
|
private readonly INormalEfCoreRepository<PUB_PD, Guid> _pdRepository; |
|
|
|
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, |
|
|
|
TaskJobService service, |
|
|
|
BaseDomainService baseservice, |
|
|
|
INormalEfCoreRepository<PriceList, Guid> priceRepository, |
|
|
|
INormalEfCoreRepository<PriceListBJ, Guid> pricebjRepository, |
|
|
|
ADJ_SERVICE adjservice, |
|
|
|
INormalEfCoreRepository<MaterialRelationship, Guid> relationRepository |
|
|
|
INormalEfCoreRepository<MaterialRelationship, Guid> relationRepository, |
|
|
|
INormalEfCoreRepository<PUB_PD, Guid> pdRepository |
|
|
|
|
|
|
|
) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, wRepository, sRepository, mRepository, adjRepository, bbacMng, hbpoMng, pubMng, invMng, service, baseservice) |
|
|
|
{ |
|
|
@ -47,6 +48,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
_pricebjRepository = pricebjRepository; |
|
|
|
_adjservice = adjservice; |
|
|
|
_relationRepository = relationRepository; |
|
|
|
_pdRepository = pdRepository; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
@ -336,6 +338,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
} |
|
|
|
var first = p_list.FirstOrDefault(); |
|
|
|
var invbillnum = first.InvBillNum; |
|
|
|
var count = _pdRepository.Count(p => p.BillNum == invbillnum); |
|
|
|
if (count > 0) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"单号{invbillnum}在待扣减单里已存在,请在待扣减单退回", "400"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var invBilllist = new List<INVOICE_REPEAT_DTO>(); |
|
|
|
List<INVOICE_WAIT_DETAIL_DTO> ls = new List<INVOICE_WAIT_DETAIL_DTO>(); |
|
|
|
var adjlist = ObjectMapper.Map<List<PUB_ADJ_DETAIL_DTO>, List<PUB_ADJ_DETAIL>>(p_list); |
|
|
@ -531,6 +540,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
} |
|
|
|
var first = p_list.FirstOrDefault(); |
|
|
|
var invbillnum = first.InvBillNum; |
|
|
|
|
|
|
|
var count = _pdRepository.Count(p => p.BillNum == invbillnum); |
|
|
|
if (count > 0) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"单号{invbillnum}在待扣减单里已存在,请在待扣减单退回", "400"); |
|
|
|
} |
|
|
|
|
|
|
|
var invBilllist = new List<INVOICE_WAIT_DETAIL_DTO>(); |
|
|
|
List<INVOICE_WAIT_DETAIL_DTO> ls = new List<INVOICE_WAIT_DETAIL_DTO>(); |
|
|
|
var adjlist = ObjectMapper.Map<List<PUB_ADJ_DETAIL_DTO>, List<PUB_ADJ_DETAIL>>(p_list); |
|
|
|