GetFees方法结构变更

dev
嵇文龙 4 weeks ago
parent 213407bf08
commit 31a676e3bf

@ -1,11 +1,43 @@
using DS.WMS.Core.Invoice.Dtos; using DS.WMS.Core.Invoice.Dtos;
using DS.WMS.Core.Op.Entity; using DS.WMS.Core.Op.Entity;
using SqlSugar;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization; using System.Runtime.Serialization;
namespace DS.WMS.Core.Application.Dtos namespace DS.WMS.Core.Application.Dtos
{ {
/// <summary>
/// 用于申请/发票/结算的费用明细查询
/// </summary>
public class DetailInquiry
{
/// <summary>
/// 业务ID与费用对象的组合
/// </summary>
public List<FeeClient> Items { get; set; } = [];
/// <summary>
/// 费用查询条件
/// </summary>
public string QueryCondition { get; set; } = string.Empty;
/// <summary>
/// 获取当前实例的查询条件
/// </summary>
/// <param name="client">SqlSugar对象</param>
/// <returns></returns>
/// <exception cref="ArgumentNullException">当<paramref name="client"/>为null时引发</exception>
public List<IConditionalModel> GetConditionalModels(ISqlSugarClient client)
{
if (string.IsNullOrEmpty(QueryCondition))
return [];
ArgumentNullException.ThrowIfNull(client, nameof(client));
return client.Utilities.JsonToConditionalModels(QueryCondition);
}
}
/// <summary> /// <summary>
/// 业务ID与类型 /// 业务ID与类型
/// </summary> /// </summary>
@ -42,7 +74,7 @@ namespace DS.WMS.Core.Application.Dtos
} }
/// <summary> /// <summary>
/// 费用对象/单位 /// 业务ID与费用对象的组合
/// </summary> /// </summary>
public class FeeClient : BizItem public class FeeClient : BizItem
{ {
@ -62,6 +94,9 @@ namespace DS.WMS.Core.Application.Dtos
public List<CurrencyExchangeRate>? ExchangeRates { get; set; } public List<CurrencyExchangeRate>? ExchangeRates { get; set; }
} }
/// <summary>
/// 业务操作
/// </summary>
public class BizOperation : IValidatableObject public class BizOperation : IValidatableObject
{ {
/// <summary> /// <summary>
@ -95,6 +130,9 @@ namespace DS.WMS.Core.Application.Dtos
} }
} }
/// <summary>
/// 业务操作
/// </summary>
public class BizOperation<T> : BizOperation public class BizOperation<T> : BizOperation
{ {
/// <summary> /// <summary>

@ -34,9 +34,9 @@ namespace DS.WMS.Core.Application.Interface
/// <summary> /// <summary>
/// 根据业务编号及类型获取关联费用记录 /// 根据业务编号及类型获取关联费用记录
/// </summary> /// </summary>
/// <param name="items">业务ID与业务类型</param> /// <param name="inquiry">业务ID与业务类型</param>
/// <returns></returns> /// <returns></returns>
Task<DataResult<InvoiceApplicaitonBiz>> GetFeesAsync(params FeeClient[] items); Task<DataResult<InvoiceApplicaitonBiz>> GetFeesAsync(DetailInquiry inquiry);
/// <summary> /// <summary>
/// 删除发票明细 /// 删除发票明细

@ -34,9 +34,9 @@ namespace DS.WMS.Core.Application.Interface
/// <summary> /// <summary>
/// 根据业务编号及类型获取关联费用记录 /// 根据业务编号及类型获取关联费用记录
/// </summary> /// </summary>
/// <param name="items">业务ID与业务类型</param> /// <param name="inquiry">业务ID与业务类型</param>
/// <returns></returns> /// <returns></returns>
Task<DataResult<PaymentApplicaitonBiz>> GetFeesAsync(IEnumerable<FeeClient> items); Task<DataResult<PaymentApplicaitonBiz>> GetFeesAsync(DetailInquiry inquiry);
/// <summary> /// <summary>
/// 设置是否收到发票 /// 设置是否收到发票

@ -231,17 +231,18 @@ namespace DS.WMS.Core.Application.Method
/// <summary> /// <summary>
/// 根据业务编号及类型获取关联费用记录 /// 根据业务编号及类型获取关联费用记录
/// </summary> /// </summary>
/// <param name="items">业务ID与业务类型</param> /// <param name="inquiry">业务ID与业务类型</param>
/// <returns></returns> /// <returns></returns>
public async Task<DataResult<InvoiceApplicaitonBiz>> GetFeesAsync(params FeeClient[] items) public async Task<DataResult<InvoiceApplicaitonBiz>> GetFeesAsync(DetailInquiry inquiry)
{ {
var bizIds = items.Select(x => x.Id).Distinct(); var bizIds = inquiry.Items.Select(x => x.Id).Distinct();
var types = items.Select(x => x.BusinessType).Distinct(); var types = inquiry.Items.Select(x => x.BusinessType).Distinct();
var cIds = items.Select(x => x.CustomerId).Distinct(); var cIds = inquiry.Items.Select(x => x.CustomerId).Distinct();
var list = await TenantDb.Queryable<FeeRecord>() var list = await TenantDb.Queryable<FeeRecord>()
.Where(f => f.FeeStatus == FeeStatus.AuditPassed && .Where(f => f.FeeStatus == FeeStatus.AuditPassed &&
bizIds.Contains(f.BusinessId) && types.Contains(f.BusinessType) && cIds.Contains(f.CustomerId)) bizIds.Contains(f.BusinessId) && types.Contains(f.BusinessType) && cIds.Contains(f.CustomerId))
.Where(inquiry.GetConditionalModels(Db))
.Select(f => new FeeInvoiceDto .Select(f => new FeeInvoiceDto
{ {
RecordId = f.Id, RecordId = f.Id,
@ -524,7 +525,7 @@ namespace DS.WMS.Core.Application.Method
protected override async Task PreSaveAsync(InvoiceApplication application) protected override async Task PreSaveAsync(InvoiceApplication application)
{ {
//获取所有应收项 //获取所有应收项
var recvDetails = application.Details.FindAll(x => x.FeeType == FeeType.Receivable); var recvDetails = application.Details.FindAll(x => x.FeeType == FeeType.Payable);
foreach (var item in recvDetails) foreach (var item in recvDetails)
{ {
item.ApplyAmount *= -1; item.ApplyAmount *= -1;

@ -239,17 +239,18 @@ namespace DS.WMS.Core.Application.Method
/// <summary> /// <summary>
/// 根据业务编号及类型获取关联费用记录 /// 根据业务编号及类型获取关联费用记录
/// </summary> /// </summary>
/// <param name="items">业务ID与业务类型</param> /// <param name="inquiry">业务ID与业务类型</param>
/// <returns></returns> /// <returns></returns>
public async Task<DataResult<PaymentApplicaitonBiz>> GetFeesAsync(IEnumerable<FeeClient> items) public async Task<DataResult<PaymentApplicaitonBiz>> GetFeesAsync(DetailInquiry inquiry)
{ {
var ids = items.Select(x => x.Id).Distinct(); var ids = inquiry.Items.Select(x => x.Id).Distinct();
var types = items.Select(x => x.BusinessType).Distinct(); var types = inquiry.Items.Select(x => x.BusinessType).Distinct();
var cIds = items.Select(x => x.CustomerId).Distinct(); var cIds = inquiry.Items.Select(x => x.CustomerId).Distinct();
var list = await TenantDb.Queryable<FeeRecord>() var list = await TenantDb.Queryable<FeeRecord>()
.Where(f => ids.Contains(f.BusinessId) && types.Contains(f.BusinessType) && cIds.Contains(f.CustomerId) && .Where(f => ids.Contains(f.BusinessId) && types.Contains(f.BusinessType) && cIds.Contains(f.CustomerId) &&
f.FeeStatus == FeeStatus.AuditPassed && f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount != 0) f.FeeStatus == FeeStatus.AuditPassed && f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount != 0)
.Where(inquiry.GetConditionalModels(Db))
.Select(f => new FeePaymentDto .Select(f => new FeePaymentDto
{ {
RecordId = f.Id, RecordId = f.Id,

@ -19,16 +19,15 @@ namespace DS.WMS.Core.Invoice.Interface
/// <summary> /// <summary>
/// 根据业务编号及类型获取费用记录 /// 根据业务编号及类型获取费用记录
/// </summary> /// </summary>
/// <param name="items">业务ID与业务类型</param> /// <param name="inquiry">业务ID与业务类型</param>
/// <returns></returns> /// <returns></returns>
Task<DataResult<InvoiceApplicaitonBiz>> GetFeesAsync(params FeeClient[] items); Task<DataResult<InvoiceApplicaitonBiz>> GetFeesAsync(DetailInquiry inquiry);
/// <summary> /// <summary>
/// 根据业务编号及类型获取该票业务的币别 /// 根据业务编号及类型获取该票业务的币别
/// </summary> /// </summary>
/// <param name="items">业务ID与业务类型</param> /// <param name="inquiry">业务ID与业务类型</param>
/// <returns></returns> /// <returns></returns>
Task<DataResult<List<FeeClient>>> GetCurrenciesAsync(params FeeClient[] items); Task<DataResult<List<FeeClient>>> GetCurrenciesAsync(DetailInquiry inquiry);
} }
} }

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

@ -31,7 +31,7 @@ namespace DS.WMS.Core.Invoice.Method
public async Task<DataResult<List<InvoiceApplicationDto>>> GetApplicationListAsync(PageRequest request) public async Task<DataResult<List<InvoiceApplicationDto>>> GetApplicationListAsync(PageRequest request)
{ {
var query = TenantDb.Queryable<InvoiceApplication>() var query = TenantDb.Queryable<InvoiceApplication>()
.Where(a => (a.Status == InvoiceApplicationStatus.AuditPassed || a.Status == InvoiceApplicationStatus.PartialInvoiced) && .Where(a => (a.Status == InvoiceApplicationStatus.AuditSubmittd || a.Status == InvoiceApplicationStatus.AuditPassed || a.Status == InvoiceApplicationStatus.PartialInvoiced) &&
SqlFunc.Subqueryable<ApplicationDetail>().Where(d => d.ApplicationId == a.Id && d.Category == DetailCategory.InvoiceApplication && (d.OriginalAmount - d.OriginalProcessedAmount) != 0).Any()) SqlFunc.Subqueryable<ApplicationDetail>().Where(d => d.ApplicationId == a.Id && d.Category == DetailCategory.InvoiceApplication && (d.OriginalAmount - d.OriginalProcessedAmount) != 0).Any())
.Select(a => new InvoiceApplicationDto .Select(a => new InvoiceApplicationDto
{ {

@ -180,12 +180,11 @@ namespace DS.WMS.Core.Invoice.Method
/// <summary> /// <summary>
/// 根据业务编号及类型获取费用记录 /// 根据业务编号及类型获取费用记录
/// </summary> /// </summary>
/// <param name="items">业务ID与业务类型</param> /// <param name="inquiry">业务ID与业务类型</param>
/// <returns></returns> /// <returns></returns>
public virtual Task<DataResult<InvoiceApplicaitonBiz>> GetFeesAsync(params FeeClient[] items) public virtual Task<DataResult<InvoiceApplicaitonBiz>> GetFeesAsync(DetailInquiry inquiry)
{ {
return Task.FromResult(DataResult<InvoiceApplicaitonBiz>.Success( return Task.FromResult(DataResult<InvoiceApplicaitonBiz>.Success(new InvoiceApplicaitonBiz([])));
new InvoiceApplicaitonBiz(new List<FeeInvoiceDto>())));
} }

@ -18,12 +18,12 @@ namespace DS.WMS.Core.QuarztJobs.Method
/// </summary> /// </summary>
public class InInvoiceService : IInInvoiceJobService public class InInvoiceService : IInInvoiceJobService
{ {
ISqlSugarClient? db; ISqlSugarClient? db;
public InInvoiceService(IServiceProvider serviceProvider) public InInvoiceService(IServiceProvider serviceProvider)
{ {
db = serviceProvider.GetRequiredService<ISqlSugarClient>(); db = serviceProvider.GetRequiredService<ISqlSugarClient>();
} }
/// <summary> /// <summary>
@ -32,14 +32,14 @@ namespace DS.WMS.Core.QuarztJobs.Method
/// <returns></returns> /// <returns></returns>
public async Task GetInInvoiceData() public async Task GetInInvoiceData()
{ {
//获取组织机构请求授权列表 //获取组织机构请求授权列表
if (db==null) if (db == null)
{ {
return; return;
} }
var orgauthlist= db.Queryable<SysOrgAuth>().ClearFilter().Where(t => t.Deleted == false&&t.Type== "InInvoice").ToList(); var orgauthlist = db.Queryable<SysOrgAuth>().ClearFilter().Where(t => t.Deleted == false && t.Type == "InInvoice").ToList();
@ -57,15 +57,15 @@ namespace DS.WMS.Core.QuarztJobs.Method
InInvoicePost model = new InInvoicePost(); InInvoicePost model = new InInvoicePost();
model.kprqks = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd HH:mm:ss"); //往前查24小时的进项发票数据 model.kprqks = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd HH:mm:ss"); //往前查24小时的进项发票数据
model.kprqjs = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); model.kprqjs = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
var result = await HttpHellp.PostAsync("http://47.105.115.105:26650/api/XSD/GetInInvoiceDataList", JsonConvert.SerializeObject(model), header); var result = await HttpHellp.PostAsync("http://47.105.115.105:26650/api/XSD/GetInInvoiceDataList", JsonConvert.SerializeObject(model), header);
//处理返回结果 //处理返回结果
var info= JsonConvert.DeserializeObject<InInvoicePostOutput>(result); var info = JsonConvert.DeserializeObject<InInvoicePostOutput>(result);
if (!info.success) if (info == null || !info.success)
continue; continue;
if (info!=null&&info.Data.data!=null) if (info != null && info.Data.data != null)
{ {
var dbLink = await db.Queryable<Module.SqlSugar.SysTenantLink>().ClearFilter().Where(t => t.TenantId == item.TenantId).FirstAsync(); var dbLink = await db.Queryable<Module.SqlSugar.SysTenantLink>().ClearFilter().Where(t => t.TenantId == item.TenantId).FirstAsync();
SqlSugarClient? tenantDb = null; SqlSugarClient? tenantDb = null;
@ -83,9 +83,9 @@ namespace DS.WMS.Core.QuarztJobs.Method
var ininviceinfo = await tenantDb.Queryable<InInvoice>().Where(x => x.InvoiceNumber == itemdata.fphm).FirstAsync(); var ininviceinfo = await tenantDb.Queryable<InInvoice>().Where(x => x.InvoiceNumber == itemdata.fphm).FirstAsync();
//数据库中发票数据为空,获取发票详情数据 //数据库中发票数据为空,获取发票详情数据
if (ininviceinfo==null) if (ininviceinfo == null)
{ {
GetInInvoiceDataInfo gidi = new GetInInvoiceDataInfo(); GetInInvoiceDataInfo gidi = new GetInInvoiceDataInfo();
gidi.fphm = itemdata.fphm; gidi.fphm = itemdata.fphm;
var resultinfo = await HttpHellp.PostAsync("http://47.105.115.105:26650/api/XSD/GetInInvoiceDataInfo", JsonConvert.SerializeObject(gidi), header); var resultinfo = await HttpHellp.PostAsync("http://47.105.115.105:26650/api/XSD/GetInInvoiceDataInfo", JsonConvert.SerializeObject(gidi), header);
var Iinfo = JsonConvert.DeserializeObject<InInvoiceDataInfoOutput>(resultinfo); var Iinfo = JsonConvert.DeserializeObject<InInvoiceDataInfoOutput>(resultinfo);
@ -155,12 +155,12 @@ namespace DS.WMS.Core.QuarztJobs.Method
inInvoice.OrgId = item.OrgId; inInvoice.OrgId = item.OrgId;
inInvoice.CreateTime = DateTime.Now; inInvoice.CreateTime = DateTime.Now;
var datainv = await tenantDb.Insertable(inInvoice).ExecuteReturnEntityAsync(); var datainv = await tenantDb.Insertable(inInvoice).ExecuteReturnEntityAsync();
foreach (var dtl in Iinfo.data.List) foreach (var dtl in Iinfo.data.List)
{ {
//添加发票详情数据 //添加发票详情数据
InInvoiceDetail inInvoicedtl = new InInvoiceDetail(); InInvoiceDetail inInvoicedtl = new InInvoiceDetail();
inInvoicedtl.Id= SnowFlakeSingle.Instance.NextId(); inInvoicedtl.Id = SnowFlakeSingle.Instance.NextId();
inInvoicedtl.PId = datainv.Id; inInvoicedtl.PId = datainv.Id;
inInvoicedtl.DetailId = dtl.mxid; inInvoicedtl.DetailId = dtl.mxid;
inInvoicedtl.InvoiceCode = dtl.fpdm; inInvoicedtl.InvoiceCode = dtl.fpdm;
@ -187,7 +187,7 @@ namespace DS.WMS.Core.QuarztJobs.Method
await tenantDb.Insertable(inInvoicedtl).ExecuteCommandAsync(); await tenantDb.Insertable(inInvoicedtl).ExecuteCommandAsync();
} }
} }
} }
@ -199,9 +199,9 @@ namespace DS.WMS.Core.QuarztJobs.Method
try try
{ {
#region 同步发票到钉钉审批 #region 同步发票到钉钉审批
var dingconfig = db.Queryable<SysOrgAuth>().Where(t => t.Type == "DingConfig" &&t.OrgId==item.OrgId).First(); var dingconfig = db.Queryable<SysOrgAuth>().Where(t => t.Type == "DingConfig" && t.OrgId == item.OrgId).First();
if (dingconfig!=null) if (dingconfig != null)
{ {
//获取钉钉密钥 //获取钉钉密钥
var token = DingDing.GetDingToken(dingconfig.Key, dingconfig.Secret); var token = DingDing.GetDingToken(dingconfig.Key, dingconfig.Secret);
@ -229,8 +229,8 @@ namespace DS.WMS.Core.QuarztJobs.Method
} }
} }
} }
} }

@ -21,9 +21,9 @@ namespace DS.WMS.Core.Settlement.Interface
/// <summary> /// <summary>
/// 根据业务编号及类型获取关联费用记录 /// 根据业务编号及类型获取关联费用记录
/// </summary> /// </summary>
/// <param name="items">业务ID与业务类型</param> /// <param name="inquiry">业务ID与业务类型</param>
/// <returns></returns> /// <returns></returns>
Task<DataResult<FeeForm>> GetFeesAsync(params FeeClient[] items); Task<DataResult<FeeForm>> GetFeesAsync(DetailInquiry inquiry);
/// <summary> /// <summary>
/// 获取自由结算单 /// 获取自由结算单

@ -141,17 +141,18 @@ namespace DS.WMS.Core.Settlement.Method
/// <summary> /// <summary>
/// 根据业务编号及类型获取关联费用记录 /// 根据业务编号及类型获取关联费用记录
/// </summary> /// </summary>
/// <param name="items">业务ID与业务类型</param> /// <param name="inquiry">业务ID与业务类型</param>
/// <returns></returns> /// <returns></returns>
public async Task<DataResult<FeeForm>> GetFeesAsync(params FeeClient[] items) public async Task<DataResult<FeeForm>> GetFeesAsync(DetailInquiry inquiry)
{ {
var bizIds = items.Select(x => x.Id).Distinct(); var bizIds = inquiry.Items.Select(x => x.Id).Distinct();
var types = items.Select(x => x.BusinessType).Distinct(); var types = inquiry.Items.Select(x => x.BusinessType).Distinct();
var cIds = items.Select(x => x.CustomerId).Distinct(); var cIds = inquiry.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) && cIds.Contains(f.CustomerId) && .Where(f => bizIds.Contains(f.BusinessId) && types.Contains(f.BusinessType) && cIds.Contains(f.CustomerId) &&
(f.FeeStatus == FeeStatus.AuditPassed || f.FeeStatus == FeeStatus.PartialSettlement) && (f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount) != 0) (f.FeeStatus == FeeStatus.AuditPassed || f.FeeStatus == FeeStatus.PartialSettlement) && (f.Amount - f.SettlementAmount - f.OrderAmount + f.OrderSettlementAmount) != 0)
.Where(inquiry.GetConditionalModels(Db))
.Select(f => new FeeItem .Select(f => new FeeItem
{ {
RecordId = f.Id, RecordId = f.Id,

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl> <_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl>
<History>True|2024-10-29T10:52:12.7978878Z||;True|2024-10-29T10:27:49.1623527+08:00||;True|2024-10-25T15:09:27.7029075+08:00||;True|2024-10-25T10:29:26.9218878+08:00||;True|2024-10-22T17:58:39.9582805+08:00||;True|2024-10-21T17:57:21.7047579+08:00||;True|2024-10-21T14:30:54.4520206+08:00||;True|2024-10-21T10:19:05.7405749+08:00||;True|2024-10-18T16:11:05.4049685+08:00||;True|2024-10-18T14:59:49.1162741+08:00||;True|2024-10-16T16:29:15.3185348+08:00||;True|2024-10-16T14:12:58.1754214+08:00||;True|2024-10-16T14:08:06.5805581+08:00||;True|2024-10-16T11:55:29.8273176+08:00||;True|2024-10-15T17:39:40.4090324+08:00||;True|2024-10-15T17:06:43.0181578+08:00||;True|2024-10-15T15:07:38.9601925+08:00||;True|2024-10-12T13:33:32.4412583+08:00||;True|2024-10-11T17:00:54.0916209+08:00||;True|2024-10-11T10:54:50.3307087+08:00||;True|2024-10-11T10:45:07.8181500+08:00||;True|2024-10-11T10:40:44.2066046+08:00||;True|2024-10-11T10:21:25.7226983+08:00||;True|2024-10-11T10:09:05.5257478+08:00||;True|2024-10-10T14:58:29.1228618+08:00||;True|2024-10-10T14:05:59.4501659+08:00||;True|2024-10-10T11:08:58.9765455+08:00||;True|2024-10-08T17:59:07.5583287+08:00||;True|2024-09-27T19:01:59.6945760+08:00||;True|2024-09-27T18:45:48.2812860+08:00||;True|2024-09-27T18:10:25.5697467+08:00||;True|2024-09-27T17:39:06.3169139+08:00||;True|2024-09-27T17:30:14.1043193+08:00||;True|2024-09-27T16:02:09.0703159+08:00||;True|2024-09-27T15:53:05.1789245+08:00||;True|2024-09-27T15:32:52.1934490+08:00||;True|2024-09-27T13:51:24.9197626+08:00||;True|2024-09-27T13:48:17.2817346+08:00||;True|2024-09-27T11:51:46.8193040+08:00||;True|2024-09-27T10:58:33.1059648+08:00||;True|2024-09-27T10:37:35.0336563+08:00||;False|2024-09-27T10:31:52.6302264+08:00||;True|2024-09-26T19:50:15.5513195+08:00||;True|2024-09-26T19:47:14.0781788+08:00||;True|2024-09-26T19:01:26.5428388+08:00||;True|2024-09-26T18:35:28.7455319+08:00||;True|2024-09-26T18:24:30.8084807+08:00||;True|2024-09-26T18:20:47.3005460+08:00||;True|2024-09-26T18:04:39.8012913+08:00||;True|2024-09-26T17:48:13.8526872+08:00||;True|2024-09-26T16:08:20.1746970+08:00||;True|2024-09-26T16:01:01.1501975+08:00||;False|2024-09-26T16:00:34.1516745+08:00||;True|2024-09-26T14:33:03.4007570+08:00||;True|2024-09-25T19:14:27.8906774+08:00||;True|2024-09-25T18:57:40.1435131+08:00||;True|2024-09-25T17:38:44.0915841+08:00||;True|2024-09-25T15:33:58.4630618+08:00||;True|2024-09-25T15:10:31.3022063+08:00||;False|2024-09-25T14:14:40.9640545+08:00||;True|2024-09-25T10:09:32.2558600+08:00||;True|2024-09-25T09:59:17.1525160+08:00||;False|2024-09-25T09:57:58.7265103+08:00||;False|2024-09-25T09:53:36.7732713+08:00||;False|2024-09-24T18:40:10.0166224+08:00||;True|2024-09-24T08:59:56.1995425+08:00||;True|2024-09-23T18:07:54.7222163+08:00||;True|2024-09-23T17:23:57.7568406+08:00||;True|2024-09-23T16:28:49.3169826+08:00||;True|2024-09-23T15:57:31.8052490+08:00||;True|2024-09-23T11:47:21.1445419+08:00||;True|2024-09-23T09:24:36.0732229+08:00||;True|2024-09-21T11:59:19.0549926+08:00||;True|2024-09-21T11:24:32.4451752+08:00||;True|2024-09-21T10:39:11.5297411+08:00||;True|2024-09-20T18:24:31.7827684+08:00||;True|2024-09-19T17:55:53.1666689+08:00||;True|2024-09-19T17:42:47.9061485+08:00||;True|2024-09-19T16:08:21.7225571+08:00||;False|2024-09-19T14:15:42.9318446+08:00||;True|2024-09-19T11:20:03.5567568+08:00||;True|2024-09-18T11:35:18.1509724+08:00||;True|2024-09-18T09:08:59.1152574+08:00||;True|2024-09-14T15:48:22.9374486+08:00||;True|2024-09-14T15:42:19.0503983+08:00||;True|2024-09-14T11:51:53.3339222+08:00||;True|2024-09-14T11:41:38.3542237+08:00||;True|2024-09-14T11:19:13.1037012+08:00||;True|2024-09-13T14:31:12.4598160+08:00||;True|2024-09-13T10:44:56.1241214+08:00||;False|2024-09-13T10:44:26.6088271+08:00||;False|2024-09-13T10:44:06.1615137+08:00||;False|2024-09-13T10:43:19.2432517+08:00||;False|2024-09-13T10:38:18.1663387+08:00||;True|2024-09-06T18:49:17.9435308+08:00||;True|2024-09-06T17:01:39.6646353+08:00||;True|2024-09-06T10:27:36.9990456+08:00||;True|2024-09-06T09:48:23.4236094+08:00||;True|2024-09-05T13:57:23.8452431+08:00||;True|2024-09-05T10:21:34.6675149+08:00||;</History> <History>True|2024-11-02T03:50:48.2452805Z||;True|2024-10-29T18:52:12.7978878+08:00||;True|2024-10-29T10:27:49.1623527+08:00||;True|2024-10-25T15:09:27.7029075+08:00||;True|2024-10-25T10:29:26.9218878+08:00||;True|2024-10-22T17:58:39.9582805+08:00||;True|2024-10-21T17:57:21.7047579+08:00||;True|2024-10-21T14:30:54.4520206+08:00||;True|2024-10-21T10:19:05.7405749+08:00||;True|2024-10-18T16:11:05.4049685+08:00||;True|2024-10-18T14:59:49.1162741+08:00||;True|2024-10-16T16:29:15.3185348+08:00||;True|2024-10-16T14:12:58.1754214+08:00||;True|2024-10-16T14:08:06.5805581+08:00||;True|2024-10-16T11:55:29.8273176+08:00||;True|2024-10-15T17:39:40.4090324+08:00||;True|2024-10-15T17:06:43.0181578+08:00||;True|2024-10-15T15:07:38.9601925+08:00||;True|2024-10-12T13:33:32.4412583+08:00||;True|2024-10-11T17:00:54.0916209+08:00||;True|2024-10-11T10:54:50.3307087+08:00||;True|2024-10-11T10:45:07.8181500+08:00||;True|2024-10-11T10:40:44.2066046+08:00||;True|2024-10-11T10:21:25.7226983+08:00||;True|2024-10-11T10:09:05.5257478+08:00||;True|2024-10-10T14:58:29.1228618+08:00||;True|2024-10-10T14:05:59.4501659+08:00||;True|2024-10-10T11:08:58.9765455+08:00||;True|2024-10-08T17:59:07.5583287+08:00||;True|2024-09-27T19:01:59.6945760+08:00||;True|2024-09-27T18:45:48.2812860+08:00||;True|2024-09-27T18:10:25.5697467+08:00||;True|2024-09-27T17:39:06.3169139+08:00||;True|2024-09-27T17:30:14.1043193+08:00||;True|2024-09-27T16:02:09.0703159+08:00||;True|2024-09-27T15:53:05.1789245+08:00||;True|2024-09-27T15:32:52.1934490+08:00||;True|2024-09-27T13:51:24.9197626+08:00||;True|2024-09-27T13:48:17.2817346+08:00||;True|2024-09-27T11:51:46.8193040+08:00||;True|2024-09-27T10:58:33.1059648+08:00||;True|2024-09-27T10:37:35.0336563+08:00||;False|2024-09-27T10:31:52.6302264+08:00||;True|2024-09-26T19:50:15.5513195+08:00||;True|2024-09-26T19:47:14.0781788+08:00||;True|2024-09-26T19:01:26.5428388+08:00||;True|2024-09-26T18:35:28.7455319+08:00||;True|2024-09-26T18:24:30.8084807+08:00||;True|2024-09-26T18:20:47.3005460+08:00||;True|2024-09-26T18:04:39.8012913+08:00||;True|2024-09-26T17:48:13.8526872+08:00||;True|2024-09-26T16:08:20.1746970+08:00||;True|2024-09-26T16:01:01.1501975+08:00||;False|2024-09-26T16:00:34.1516745+08:00||;True|2024-09-26T14:33:03.4007570+08:00||;True|2024-09-25T19:14:27.8906774+08:00||;True|2024-09-25T18:57:40.1435131+08:00||;True|2024-09-25T17:38:44.0915841+08:00||;True|2024-09-25T15:33:58.4630618+08:00||;True|2024-09-25T15:10:31.3022063+08:00||;False|2024-09-25T14:14:40.9640545+08:00||;True|2024-09-25T10:09:32.2558600+08:00||;True|2024-09-25T09:59:17.1525160+08:00||;False|2024-09-25T09:57:58.7265103+08:00||;False|2024-09-25T09:53:36.7732713+08:00||;False|2024-09-24T18:40:10.0166224+08:00||;True|2024-09-24T08:59:56.1995425+08:00||;True|2024-09-23T18:07:54.7222163+08:00||;True|2024-09-23T17:23:57.7568406+08:00||;True|2024-09-23T16:28:49.3169826+08:00||;True|2024-09-23T15:57:31.8052490+08:00||;True|2024-09-23T11:47:21.1445419+08:00||;True|2024-09-23T09:24:36.0732229+08:00||;True|2024-09-21T11:59:19.0549926+08:00||;True|2024-09-21T11:24:32.4451752+08:00||;True|2024-09-21T10:39:11.5297411+08:00||;True|2024-09-20T18:24:31.7827684+08:00||;True|2024-09-19T17:55:53.1666689+08:00||;True|2024-09-19T17:42:47.9061485+08:00||;True|2024-09-19T16:08:21.7225571+08:00||;False|2024-09-19T14:15:42.9318446+08:00||;True|2024-09-19T11:20:03.5567568+08:00||;True|2024-09-18T11:35:18.1509724+08:00||;True|2024-09-18T09:08:59.1152574+08:00||;True|2024-09-14T15:48:22.9374486+08:00||;True|2024-09-14T15:42:19.0503983+08:00||;True|2024-09-14T11:51:53.3339222+08:00||;True|2024-09-14T11:41:38.3542237+08:00||;True|2024-09-14T11:19:13.1037012+08:00||;True|2024-09-13T14:31:12.4598160+08:00||;True|2024-09-13T10:44:56.1241214+08:00||;False|2024-09-13T10:44:26.6088271+08:00||;False|2024-09-13T10:44:06.1615137+08:00||;False|2024-09-13T10:43:19.2432517+08:00||;False|2024-09-13T10:38:18.1663387+08:00||;True|2024-09-06T18:49:17.9435308+08:00||;True|2024-09-06T17:01:39.6646353+08:00||;True|2024-09-06T10:27:36.9990456+08:00||;True|2024-09-06T09:48:23.4236094+08:00||;True|2024-09-05T13:57:23.8452431+08:00||;</History>
<LastFailureDetails /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
</Project> </Project>
Loading…
Cancel
Save