|
|
@ -20,6 +20,7 @@ using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Volo.Abp.Application.Dtos; |
|
|
|
using Volo.Abp.Application.Services; |
|
|
|
using Volo.Abp.Domain.Entities; |
|
|
|
using Volo.Abp.Uow; |
|
|
|
using Win.Abp.Snowflakes; |
|
|
|
using Win.Sfs.BaseData.ImportExcelCommon; |
|
|
@ -138,7 +139,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
public virtual async Task<INVOICE_GRP_DETAIL_DTO> DetailQueryAsync(INVOICE_GRP_REQ_DTO input) |
|
|
|
{ |
|
|
|
|
|
|
|
INVOICE_GRP_DETAIL_DTO _entity = new INVOICE_GRP_DETAIL_DTO(); |
|
|
|
INVOICE_GRP_DETAIL_DTO entity = new INVOICE_GRP_DETAIL_DTO(); |
|
|
|
|
|
|
|
|
|
|
|
var invs = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount); |
|
|
|
|
|
|
|
|
|
|
|
var m = await _mRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount); |
|
|
|
var mdtos = ObjectMapper.Map<List<INVOICE_MAP_GROUP>, List<INVOICE_MAP_GROUP_DTO>>(m); |
|
|
|
var w = await _wRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount); |
|
|
@ -147,11 +153,74 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
var sdtos = ObjectMapper.Map<List<INVOICE_NOT_SETTLE>, List<INVOICE_NOT_SETTLE_DTO>>(s); |
|
|
|
var adjs =await _adjRepository.GetListByFilterAsync(input.Filters); |
|
|
|
var adjdtos = ObjectMapper.Map<List<PUB_ADJ_DETAIL>, List<PUB_ADJ_DETAIL_DTO>>(adjs); |
|
|
|
_entity.INVOICE_NOT_SETTLE = sdtos; |
|
|
|
_entity.INVOICE_WAIT_DETAIL = wdtos; |
|
|
|
_entity.INVOICE_MAP_GROUP = mdtos; |
|
|
|
_entity.ADJ_DETAIL = adjdtos; |
|
|
|
return _entity; |
|
|
|
var notquery = from itm in sdtos |
|
|
|
join itm1 in invs on itm.InvBillNum equals itm1.InvbillNum |
|
|
|
select |
|
|
|
new INVOICE_NOT_SETTLE_DTO() |
|
|
|
{ |
|
|
|
InvDate = itm1.CreationTime, |
|
|
|
RealInvBillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum, |
|
|
|
InvBillNum = itm.InvBillNum, |
|
|
|
InvGroupNum = itm.InvGroupNum, |
|
|
|
SettleGroupNum = itm.SettleGroupNum, |
|
|
|
LU = itm.LU, |
|
|
|
Qty = itm.Qty, |
|
|
|
Extend1 = itm.Extend1, |
|
|
|
}; |
|
|
|
|
|
|
|
var wquery = from itm in wdtos |
|
|
|
join itm1 in invs on itm.InvbillNum equals itm1.InvbillNum |
|
|
|
select |
|
|
|
new INVOICE_WAIT_DETAIL_DTO() |
|
|
|
{ |
|
|
|
InvDate = itm1.CreationTime, |
|
|
|
RealInvbillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum, |
|
|
|
Version = itm.Version, |
|
|
|
InvbillNum = itm.InvbillNum, |
|
|
|
InvGroupNum = itm.InvGroupNum, |
|
|
|
LU = itm.LU, |
|
|
|
PartCode = itm.PartCode, |
|
|
|
PRICE = itm.PRICE, |
|
|
|
Qty = itm.Qty, |
|
|
|
Amt = itm.Amt, |
|
|
|
BussiessType = itm.BussiessType, |
|
|
|
Extend1 = itm.Extend1, |
|
|
|
BeginDate = itm.BeginDate, |
|
|
|
EndDate = itm.EndDate, |
|
|
|
}; |
|
|
|
var mquery = from itm in mdtos |
|
|
|
join itm1 in invs on itm.InvbillNum equals itm1.InvbillNum |
|
|
|
select |
|
|
|
new INVOICE_MAP_GROUP_DTO() |
|
|
|
{ |
|
|
|
InvDate = itm1.CreationTime, |
|
|
|
RealInvBillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum, |
|
|
|
InvbillNum = itm.InvbillNum, |
|
|
|
InvGroupNum = itm.InvGroupNum, |
|
|
|
SettleGroupNum = itm.SettleGroupNum |
|
|
|
}; |
|
|
|
|
|
|
|
var adjQuery = from itm in adjdtos |
|
|
|
join itm1 in invs on itm.InvBillNum equals itm1.InvbillNum |
|
|
|
select |
|
|
|
new PUB_ADJ_DETAIL_DTO() |
|
|
|
{ |
|
|
|
RealInvBillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum, |
|
|
|
InvBillNum = itm.InvBillNum, |
|
|
|
SettleDate = itm.SettleDate, |
|
|
|
LU = itm.LU, |
|
|
|
PN = itm.PN, |
|
|
|
Qty = itm.Qty, |
|
|
|
GroupNum = itm.GroupNum, |
|
|
|
KeyCode = itm.KeyCode, |
|
|
|
Price = itm.Price |
|
|
|
}; |
|
|
|
|
|
|
|
entity.INVOICE_NOT_SETTLE = notquery.ToList(); |
|
|
|
entity.INVOICE_WAIT_DETAIL = wquery.ToList(); |
|
|
|
entity.INVOICE_MAP_GROUP = mquery.ToList(); |
|
|
|
entity.ADJ_DETAIL = adjQuery.ToList(); |
|
|
|
return entity; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|