|
|
@ -34,10 +34,7 @@ namespace DS.WMS.Core.Application.Method
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public async Task<DataResult<List<InvoiceApplicationDto>>> GetListAsync(PageRequest request)
|
|
|
|
public async Task<DataResult<List<InvoiceApplicationDto>>> GetListAsync(PageRequest request)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
List<IConditionalModel> whereList = [];
|
|
|
|
List<IConditionalModel> whereList = request.GetConditionalModels(Db);
|
|
|
|
if (!request.QueryCondition.IsNullOrEmpty())
|
|
|
|
|
|
|
|
whereList = Db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var result = await TenantDb.Queryable<InvoiceApplication>().Where(whereList)
|
|
|
|
var result = await TenantDb.Queryable<InvoiceApplication>().Where(whereList)
|
|
|
|
.Select((x) => new InvoiceApplicationDto
|
|
|
|
.Select((x) => new InvoiceApplicationDto
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -243,6 +240,7 @@ namespace DS.WMS.Core.Application.Method
|
|
|
|
RecordId = f.Id,
|
|
|
|
RecordId = f.Id,
|
|
|
|
BusinessId = f.BusinessId,
|
|
|
|
BusinessId = f.BusinessId,
|
|
|
|
BusinessType = f.BusinessType,
|
|
|
|
BusinessType = f.BusinessType,
|
|
|
|
|
|
|
|
CustomerId = f.CustomerId,
|
|
|
|
CustomerName = f.CustomerName,
|
|
|
|
CustomerName = f.CustomerName,
|
|
|
|
FeeId = f.FeeId,
|
|
|
|
FeeId = f.FeeId,
|
|
|
|
FeeName = f.FeeName,
|
|
|
|
FeeName = f.FeeName,
|
|
|
@ -409,18 +407,17 @@ namespace DS.WMS.Core.Application.Method
|
|
|
|
return rows > 0 ? DataResult.Success : DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
|
|
|
|
return rows > 0 ? DataResult.Success : DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override async Task<List<ApplicationDetail>> GetDetailsAsync(IEnumerable<BizItem> items)
|
|
|
|
protected override async Task<List<ApplicationDetail>> GetDetailsAsync(IEnumerable<BizItem> items, List<IConditionalModel>? conditions)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var ids1 = items.Select(x => x.Id);
|
|
|
|
var ids1 = items.Select(x => x.Id);
|
|
|
|
var ids2 = items.Select(x => x.BusinessType);
|
|
|
|
var ids2 = 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)
|
|
|
|
.Select(x => new ApplicationDetail
|
|
|
|
.Select(x => new ApplicationDetail
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Id = x.Id,
|
|
|
|
Id = x.Id,
|
|
|
|
//BusinessId = x.BusinessId,
|
|
|
|
|
|
|
|
//BusinessType = x.BusinessType,
|
|
|
|
|
|
|
|
ApplyAmount = x.Amount - x.InvoiceAmount - x.OrderInvoiceAmount + x.OrderInvSettlementAmount,
|
|
|
|
ApplyAmount = x.Amount - x.InvoiceAmount - x.OrderInvoiceAmount + x.OrderInvSettlementAmount,
|
|
|
|
ExchangeRate = x.ExchangeRate,
|
|
|
|
ExchangeRate = x.ExchangeRate,
|
|
|
|
OriginalCurrency = x.Currency
|
|
|
|
OriginalCurrency = x.Currency
|
|
|
|