|
|
|
@ -3,7 +3,6 @@ using DS.Module.Core;
|
|
|
|
|
using DS.Module.Core.Enums;
|
|
|
|
|
using DS.Module.Core.Extensions;
|
|
|
|
|
using DS.WMS.Core.Application.Dtos;
|
|
|
|
|
using DS.WMS.Core.Application.Entity;
|
|
|
|
|
using DS.WMS.Core.Fee.Dtos;
|
|
|
|
|
using DS.WMS.Core.Fee.Entity;
|
|
|
|
|
using DS.WMS.Core.Invoice.Dtos;
|
|
|
|
@ -122,17 +121,18 @@ namespace DS.WMS.Core.Invoice.Method
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 根据业务编号及类型获取费用记录
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="items">业务ID与业务类型</param>
|
|
|
|
|
/// <param name="inquiry">业务ID与业务类型</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public override async Task<DataResult<InvoiceApplicaitonBiz>> GetFeesAsync(params FeeClient[] items)
|
|
|
|
|
public override async Task<DataResult<InvoiceApplicaitonBiz>> GetFeesAsync(DetailInquiry inquiry)
|
|
|
|
|
{
|
|
|
|
|
var bizIds = items.Select(x => x.Id).Distinct();
|
|
|
|
|
var types = items.Select(x => x.BusinessType).Distinct();
|
|
|
|
|
var cIds = items.Select(x => x.CustomerId).Distinct();
|
|
|
|
|
var bizIds = inquiry.Items.Select(x => x.Id).Distinct();
|
|
|
|
|
var types = inquiry.Items.Select(x => x.BusinessType).Distinct();
|
|
|
|
|
var cIds = inquiry.Items.Select(x => x.CustomerId).Distinct();
|
|
|
|
|
|
|
|
|
|
var list = await TenantDb.Queryable<FeeRecord>()
|
|
|
|
|
.Where(f => bizIds.Contains(f.BusinessId) && types.Contains(f.BusinessType) && cIds.Contains(f.CustomerId) &&
|
|
|
|
|
AllowedStatus.Contains(f.FeeStatus) && f.Amount - f.InvoiceAmount - f.OrderInvoiceAmount + f.OrderInvSettlementAmount != 0)
|
|
|
|
|
.Where(inquiry.GetConditionalModels(Db))
|
|
|
|
|
.Select(f => new FeeInvoiceDto
|
|
|
|
|
{
|
|
|
|
|
RecordId = f.Id,
|
|
|
|
@ -162,13 +162,13 @@ namespace DS.WMS.Core.Invoice.Method
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 根据业务编号及类型获取该票业务的币别
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="items">业务ID与业务类型</param>
|
|
|
|
|
/// <param name="inquiry">业务ID与业务类型</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task<DataResult<List<FeeClient>>> GetCurrenciesAsync(params FeeClient[] items)
|
|
|
|
|
public async Task<DataResult<List<FeeClient>>> GetCurrenciesAsync(DetailInquiry inquiry)
|
|
|
|
|
{
|
|
|
|
|
var bizIds = items.Select(x => x.Id).Distinct();
|
|
|
|
|
var types = items.Select(x => x.BusinessType).Distinct();
|
|
|
|
|
var cIds = items.Select(x => x.CustomerId).Distinct();
|
|
|
|
|
var bizIds = inquiry.Items.Select(x => x.Id).Distinct();
|
|
|
|
|
var types = inquiry.Items.Select(x => x.BusinessType).Distinct();
|
|
|
|
|
var cIds = inquiry.Items.Select(x => x.CustomerId).Distinct();
|
|
|
|
|
|
|
|
|
|
var list = await TenantDb.Queryable<FeeRecord>()
|
|
|
|
|
.Where(f => bizIds.Contains(f.BusinessId) && types.Contains(f.BusinessType) && cIds.Contains(f.CustomerId) &&
|
|
|
|
@ -235,6 +235,7 @@ namespace DS.WMS.Core.Invoice.Method
|
|
|
|
|
return sb.Length > 0 ? DataResult.Failed(sb.ToString()) : DataResult.Success;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//protected override async Task OnDeleteDetailAsync(List<Entity.Invoice> invoices, DeleteOption deleteOption)
|
|
|
|
|
//{
|
|
|
|
|
// var list = invoices.SelectMany(x => x.Details).Where(x => x.DetailId.HasValue).Select(x => new ApplicationDetail
|
|
|
|
|