|
|
@ -8,6 +8,7 @@ using DS.WMS.Core.Application.Interface;
|
|
|
|
using DS.WMS.Core.Fee.Dtos;
|
|
|
|
using DS.WMS.Core.Fee.Dtos;
|
|
|
|
using DS.WMS.Core.Fee.Entity;
|
|
|
|
using DS.WMS.Core.Fee.Entity;
|
|
|
|
using DS.WMS.Core.Info.Entity;
|
|
|
|
using DS.WMS.Core.Info.Entity;
|
|
|
|
|
|
|
|
using DS.WMS.Core.Invoice.Dtos;
|
|
|
|
using DS.WMS.Core.Op.Entity;
|
|
|
|
using DS.WMS.Core.Op.Entity;
|
|
|
|
using DS.WMS.Core.Sys.Entity;
|
|
|
|
using DS.WMS.Core.Sys.Entity;
|
|
|
|
using SqlSugar;
|
|
|
|
using SqlSugar;
|
|
|
@ -378,19 +379,23 @@ namespace DS.WMS.Core.Application.Method
|
|
|
|
return DataResult<PaymentApplicationDto>.Success(dto);
|
|
|
|
return DataResult<PaymentApplicationDto>.Success(dto);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override async Task<List<ApplicationDetail>> GetDetailsAsync(IEnumerable<BizItem> items, List<IConditionalModel>? conditions)
|
|
|
|
protected override async Task<List<ApplicationDetail>> GetDetailsAsync(ApplicationRequest<PaymentApplication> request)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var ids1 = items.Select(x => x.Id);
|
|
|
|
var ids1 = request.Items.Select(x => x.Id);
|
|
|
|
var ids2 = items.Select(x => x.BusinessType);
|
|
|
|
var ids2 = request.Items.Select(x => x.BusinessType);
|
|
|
|
|
|
|
|
|
|
|
|
var list = await TenantDb.Queryable<FeeRecord>().Where(x =>
|
|
|
|
var list = await TenantDb.Queryable<FeeRecord>().Where(x =>
|
|
|
|
ids1.Contains(x.BusinessId) && ids2.Contains(x.BusinessType) && x.FeeStatus == FeeStatus.AuditPassed)
|
|
|
|
ids1.Contains(x.BusinessId) && ids2.Contains(x.BusinessType) && x.FeeStatus == FeeStatus.AuditPassed)
|
|
|
|
.Where(conditions)
|
|
|
|
.Where(request.GetQueryConditions(Db))
|
|
|
|
.Select(x => new ApplicationDetail
|
|
|
|
.Select(x => new ApplicationDetail
|
|
|
|
{
|
|
|
|
{
|
|
|
|
RecordId = x.Id,
|
|
|
|
RecordId = x.Id,
|
|
|
|
ApplyAmount = x.Amount - x.SettlementAmount - x.OrderAmount + x.OrderSettlementAmount,
|
|
|
|
CustomerName = x.CustomerName,
|
|
|
|
|
|
|
|
FeeType = x.FeeType,
|
|
|
|
|
|
|
|
FeeId = x.FeeId,
|
|
|
|
|
|
|
|
FeeName = x.FeeName,
|
|
|
|
Currency = x.Currency,
|
|
|
|
Currency = x.Currency,
|
|
|
|
|
|
|
|
ApplyAmount = x.Amount - x.SettlementAmount - x.OrderAmount + x.OrderSettlementAmount,
|
|
|
|
ExchangeRate = x.ExchangeRate,
|
|
|
|
ExchangeRate = x.ExchangeRate,
|
|
|
|
OriginalCurrency = x.Currency
|
|
|
|
OriginalCurrency = x.Currency
|
|
|
|
}).ToListAsync();
|
|
|
|
}).ToListAsync();
|
|
|
@ -402,7 +407,6 @@ namespace DS.WMS.Core.Application.Method
|
|
|
|
return list;
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected override DataResult EnsureApplication(PaymentApplication application, PaymentApplication? dbValue)
|
|
|
|
protected override DataResult EnsureApplication(PaymentApplication application, PaymentApplication? dbValue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (dbValue != null)
|
|
|
|
if (dbValue != null)
|
|
|
|