You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.0 KiB
C#
31 lines
1.0 KiB
C#
using DS.Module.Core;
|
|
using DS.Module.Core.Extensions;
|
|
using DS.WMS.Core.Code.Entity;
|
|
using DS.WMS.Core.Sys.Dtos;
|
|
using DS.WMS.Core.Sys.Interface;
|
|
|
|
namespace DS.WMS.Core.Sys.Method
|
|
{
|
|
public class CodeInvoiceService : ServiceBase, ICodeInvoiceService
|
|
{
|
|
public CodeInvoiceService(IServiceProvider provider) : base(provider)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取下拉数据
|
|
/// </summary>
|
|
/// <param name="text">模糊搜索字符</param>
|
|
/// <returns></returns>
|
|
public async Task<DataResult<List<CodeInvoiceSelect>>> GetSelectListAsync(string text)
|
|
{
|
|
var list = await TenantDb.Queryable<CodeInvoice>()
|
|
.WhereIF(!text.IsNullOrEmpty(), x => x.Code.Contains(text) || x.Name.Contains(text))
|
|
.OrderByDescending(x => x.IsDefault).Select<CodeInvoiceSelect>().ToListAsync();
|
|
var result = DataResult<List<CodeInvoiceSelect>>.Success(list);
|
|
result.Count = list.Count;
|
|
return result;
|
|
}
|
|
}
|
|
}
|