获取开票分页列表更改数据结构

dev
嵇文龙 2 months ago
parent 4e3738845e
commit 85b90935e9

@ -76,11 +76,6 @@ namespace DS.WMS.Core.Application.Dtos
/// 原始金额
/// </summary>
public decimal OriginalAmount { get; set; }
/// <summary>
/// 开票金额
/// </summary>
public decimal InvoiceAmount { get; set; }
}
/// <summary>

@ -1,11 +1,10 @@
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization;
using DS.Module.Core.Enums;
using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Application.Entity;
using Masuit.Tools.Systems;
namespace DS.WMS.Core.Invoice.Dto
namespace DS.WMS.Core.Invoice.Dtos
{
/// <summary>
/// 发票

@ -0,0 +1,23 @@
namespace DS.WMS.Core.Invoice.Dtos
{
/// <summary>
/// 发票列表
/// </summary>
public class InvoiceList
{
/// <summary>
/// 申请金额
/// </summary>
public decimal? ApplyAmount => List?.Sum(x => x.ApplyAmount);
/// <summary>
/// 开票金额
/// </summary>
public decimal? InvoiceAmount => List?.Sum(x => x.InvoiceAmount);
/// <summary>
/// 发票列表
/// </summary>
public List<InvoiceDto>? List { get; set; }
}
}

@ -1,5 +1,4 @@
using DS.Module.Core;
using DS.WMS.Core.Invoice.Dto;
using DS.WMS.Core.Invoice.Dtos;
namespace DS.WMS.Core.Invoice.Interface
@ -15,7 +14,7 @@ namespace DS.WMS.Core.Invoice.Interface
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<List<InvoiceDto>>> GetListAsync(PageRequest<string> request);
Task<DataResult<InvoiceList>> GetListAsync(PageRequest<string> request);
/// <summary>
/// 获取发票详情

@ -5,7 +5,6 @@ using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Application.Entity;
using DS.WMS.Core.Application.Method;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Invoice.Dto;
using DS.WMS.Core.Invoice.Dtos;
using DS.WMS.Core.Invoice.Interface;
using DS.WMS.Core.Sys.Entity;
@ -38,7 +37,7 @@ namespace DS.WMS.Core.Invoice.Method
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public async Task<DataResult<List<InvoiceDto>>> GetListAsync(PageRequest<string> request)
public async Task<DataResult<InvoiceList>> GetListAsync(PageRequest<string> request)
{
var query = TenantDb.Queryable<Entity.Invoice>()
.Select((i) => new InvoiceDto
@ -79,7 +78,8 @@ namespace DS.WMS.Core.Invoice.Method
{
OriginalCurrency = d.OriginalCurrency,
OriginalAmount = d.OriginalAmount,
OriginalSettlementAmount = d.OriginalSettlementAmount
OriginalSettlementAmount = d.OriginalSettlementAmount,
ExchangeRate = d.ExchangeRate
}),
InvoiceApplicationList = SqlFunc.Subqueryable<ApplicationDetail>().LeftJoin<InvoiceApplication>((d, a) =>
d.ApplicationId == i.Id && d.Category == DetailCategory.InvoiceIssuance && d.RefId == a.Id)
@ -117,7 +117,10 @@ namespace DS.WMS.Core.Invoice.Method
}
}
return result;
InvoiceList list = new() { List = result.Data };
var invResult = DataResult<InvoiceList>.Success(list, result.MultiCode);
invResult.Count = result.Count;
return invResult;
}
/// <summary>

@ -732,6 +732,12 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
TaskType = request.TaskType
});
if (request.TaskType == TaskBaseTypeEnum.WAIT_ORDER_AUDIT)
{
await TenantDb.Updateable<SeaExport>().SetColumns(x => x.BusinessStatusName == null)
.Where(x => x.Id == request.BusinessId).ExecuteCommandAsync();
}
if (useTransaction)
await TenantDb.Ado.CommitTranAsync();

@ -1,7 +1,6 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Invoice.Dto;
using DS.WMS.Core.Invoice.Dtos;
using DS.WMS.Core.Invoice.Entity;
using DS.WMS.Core.Invoice.Interface;
@ -33,7 +32,7 @@ namespace DS.WMS.FeeApi.Controllers
/// <returns></returns>
/// <remarks>【编号检索】需通过 OtherQueryCondition 字段传入</remarks>
[HttpPost, Route("GetList")]
public async Task<DataResult<List<InvoiceDto>>> GetListAsync([FromBody] PageRequest<string> request)
public async Task<DataResult<InvoiceList>> GetListAsync([FromBody] PageRequest<string> request)
{
return await _service.GetListAsync(request);
}

Loading…
Cancel
Save