增加编号搜索

dev
嵇文龙 3 weeks ago
parent 8f5f920810
commit 7a0dc9921f

@ -51,7 +51,13 @@ namespace DS.WMS.Core.Fee.Dtos
/// <summary>
/// 订舱编号
/// </summary>
public string? BookingNO { get; set; }
public string? BookingNo { get; set; }
/// <summary>
/// 客户编号
/// </summary>
public string? CustomerNum { get; set; }
/// <summary>
/// 开船日期

@ -0,0 +1,20 @@
using DS.WMS.Core.Fee.Dtos;
namespace DS.WMS.Core.Application.Dtos
{
/// <summary>
/// 发票申请查询条件
/// </summary>
public class InvoiceApplicationQuery
{
/// <summary>
/// 编号(主提单号、委托编号、客户编号、订舱编号)
/// </summary>
public string? Number { get; set; }
/// <summary>
/// 费用范围
/// </summary>
public FeeRange? FeeRange { get; set; }
}
}

@ -22,7 +22,7 @@ namespace DS.WMS.Core.Application.Interface
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<List<BizInvoiceApplication>>> GetBizListAsync(PageRequest<FeeRange?> request);
Task<DataResult<List<BizInvoiceApplication>>> GetBizListAsync(PageRequest<InvoiceApplicationQuery?> request);
/// <summary>
/// 获取申请单详情

@ -96,13 +96,14 @@ namespace DS.WMS.Core.Application.Method
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public async Task<DataResult<List<BizInvoiceApplication>>> GetBizListAsync(PageRequest<FeeRange?> request)
public async Task<DataResult<List<BizInvoiceApplication>>> GetBizListAsync(PageRequest<InvoiceApplicationQuery?> request)
{
var query = CreateBizQuery(request.GetConditionalModels(Db));
if (request.OtherQueryCondition.HasValue)
if (request.OtherQueryCondition != null)
{
FeeRange feeRange = request.OtherQueryCondition.Value;
switch (feeRange)
if (request.OtherQueryCondition.FeeRange.HasValue)
{
switch (request.OtherQueryCondition.FeeRange)
{
case FeeRange.Unsettled:
query = query.Where(x => x.SettlementAmount == 0);
@ -136,6 +137,14 @@ namespace DS.WMS.Core.Application.Method
break;
}
}
if (!string.IsNullOrEmpty(request.OtherQueryCondition.Number))
{
query = query.Where(x => x.MBLNO.Contains(request.OtherQueryCondition.Number) ||
x.CustomerNo.Contains(request.OtherQueryCondition.Number) ||
x.CustomerNum.Contains(request.OtherQueryCondition.Number) ||
x.BookingNo.Contains(request.OtherQueryCondition.Number));
}
}
var result = await query.ToQueryPageAsync(request.PageCondition);
if (result.Data.Count > 0)
@ -191,7 +200,7 @@ namespace DS.WMS.Core.Application.Method
SaleName = s.Sale,//揽货人
Vessel = s.Vessel,//船名
Voyage = s.Voyage,//航次
BookingNO = s.BookingNo,
BookingNo = s.BookingNo,
StlName = s.StlName,
OrderAmount = SqlFunc.Subqueryable<FeeRecord>().Where(f => f.BusinessId == s.BusinessId).Sum(f => f.OrderAmount),
InvoiceAmount = SqlFunc.Subqueryable<FeeRecord>().Where(f => f.BusinessId == s.BusinessId).Sum(f => f.InvoiceAmount),

@ -196,7 +196,7 @@ namespace DS.WMS.Core.Application.Method
CustomerId = f.CustomerId,
CustomerName = f.CustomerName, //结费单位
AccountDate = s.AccountDate,
BookingNO = s.BookingNo, //订舱编号
BookingNo = s.BookingNo, //订舱编号
CntrTotal = s.CntrTotal,
CreateBy = s.CreateBy,
ETD = s.ETD,

@ -1,7 +1,6 @@
using DS.Module.Core;
using DS.WMS.Core.Op.Entity;
using Masuit.Tools.Systems;
using SqlSugar;
namespace DS.WMS.Core.Fee.Dtos
{
@ -90,6 +89,11 @@ namespace DS.WMS.Core.Fee.Dtos
/// </summary>
public string CustomerNo { get; set; }
/// <summary>
/// 客户编号
/// </summary>
public string? CustomerNum { get; set; }
/// <summary>
/// 报关单号
/// </summary>

@ -61,6 +61,7 @@ namespace DS.WMS.Core.Fee.Method
Vessel = s.Vessel,//船名
Voyage = s.Voyno,//航次
BookingNo = s.BookingNo,
CustomerNum = s.CustomerNum,
StlName = s.StlName,
InvoiceNo = s.InvoiceNo,

@ -83,7 +83,7 @@ namespace DS.WMS.Core.Invoice.Method
SaleName = x.Sale,
Vessel = x.Vessel,
Voyage = x.Voyage,
BookingNO = x.BookingNo,
BookingNo = x.BookingNo,
//未开票金额=金额-已开票金额-申请开票金额+申请开票金额已开票
UnBilledRMB = SqlFunc.Subqueryable<FeeRecord>().Where(f => f.BusinessId == x.BusinessId && f.FeeStatus == FeeStatus.AuditPassed
&& f.Currency == FeeCurrency.RMB_CODE).Select(f => SqlFunc.AggregateSum(f.Amount - f.InvoiceAmount - f.OrderInvoiceAmount + f.OrderInvSettlementAmount)),

@ -90,7 +90,8 @@ namespace DS.WMS.Core.Settlement.Method
{
SettlementTypeName = x.SettlementType.StlName, //结算方式
CustomerBankName = x.CustomerBank.BankName,
CustomerAccount = x.CustomerBank.Account
CustomerAccount = x.CustomerBank.Account,
CreateByName = x.CreateUserName
}, true).FirstAsync(x => x.Id == id);
if (model != null)

@ -229,8 +229,9 @@ namespace DS.WMS.Core.Settlement.Method
{
SettlementTypeName = x.SettlementType.StlName, //结算方式
CustomerBankName = x.CustomerBank.BankName,
CustomerAccount = x.CustomerBank.Account
}, true).FirstAsync(x => x.Id == id && x.Mode == SettlementMode.FreeSettlement);
CustomerAccount = x.CustomerBank.Account,
CreateByName = x.CreateUserName
}, true).FirstAsync(x => x.Id == id);
if (model != null)
{

@ -39,7 +39,8 @@ namespace DS.WMS.Core.Settlement.Method
{
SettlementTypeName = x.SettlementType.StlName, //结算方式
CustomerBankName = x.CustomerBank.BankName,
CustomerAccount = x.CustomerBank.Account
CustomerAccount = x.CustomerBank.Account,
CreateByName = x.CreateUserName
}, true).FirstAsync(x => x.Id == id);
if (model != null)

Loading…
Cancel
Save