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