|
|
@ -5,7 +5,6 @@ using DS.Module.Core.Extensions;
|
|
|
|
using DS.WMS.Core.Application.Dtos;
|
|
|
|
using DS.WMS.Core.Application.Dtos;
|
|
|
|
using DS.WMS.Core.Application.Entity;
|
|
|
|
using DS.WMS.Core.Application.Entity;
|
|
|
|
using DS.WMS.Core.Code.Entity;
|
|
|
|
using DS.WMS.Core.Code.Entity;
|
|
|
|
using DS.WMS.Core.Fee.Dtos;
|
|
|
|
|
|
|
|
using DS.WMS.Core.Fee.Entity;
|
|
|
|
using DS.WMS.Core.Fee.Entity;
|
|
|
|
using DS.WMS.Core.Op.Entity;
|
|
|
|
using DS.WMS.Core.Op.Entity;
|
|
|
|
using DS.WMS.Core.Settlement.Dtos;
|
|
|
|
using DS.WMS.Core.Settlement.Dtos;
|
|
|
@ -143,14 +142,15 @@ namespace DS.WMS.Core.Settlement.Method
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="items">业务ID与业务类型</param>
|
|
|
|
/// <param name="items">业务ID与业务类型</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public async Task<DataResult<FeeForm>> GetFeesAsync(params BizItem[] items)
|
|
|
|
public async Task<DataResult<FeeForm>> GetFeesAsync(params FeeClient[] items)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var bizIds = items.Select(x => x.Id).ToList();
|
|
|
|
var bizIds = items.Select(x => x.Id).Distinct();
|
|
|
|
var types = items.Select(x => x.BusinessType).ToList();
|
|
|
|
var types = items.Select(x => x.BusinessType).Distinct();
|
|
|
|
|
|
|
|
var cIds = items.Select(x => x.CustomerId).Distinct();
|
|
|
|
|
|
|
|
|
|
|
|
var list = await TenantDb.Queryable<FeeRecord>()
|
|
|
|
var list = await TenantDb.Queryable<FeeRecord>()
|
|
|
|
.Where(f => bizIds.Contains(f.BusinessId) && types.Contains(f.BusinessType) && f.FeeStatus == FeeStatus.AuditPassed &&
|
|
|
|
.Where(f => bizIds.Contains(f.BusinessId) && types.Contains(f.BusinessType) && cIds.Contains(f.CustomerId) &&
|
|
|
|
(f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount) != 0)
|
|
|
|
f.FeeStatus == FeeStatus.AuditPassed && (f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount) != 0)
|
|
|
|
.Select(f => new FeeItem
|
|
|
|
.Select(f => new FeeItem
|
|
|
|
{
|
|
|
|
{
|
|
|
|
RecordId = f.Id,
|
|
|
|
RecordId = f.Id,
|
|
|
@ -375,6 +375,5 @@ namespace DS.WMS.Core.Settlement.Method
|
|
|
|
|
|
|
|
|
|
|
|
return DataResult.Success;
|
|
|
|
return DataResult.Success;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|