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) { } /// /// 获取下拉数据 /// /// 模糊搜索字符 /// public async Task>> GetSelectListAsync(string text) { var list = await TenantDb.Queryable() .WhereIF(!text.IsNullOrEmpty(), x => x.Code.Contains(text) || x.Name.Contains(text)) .OrderByDescending(x => x.IsDefault).Select().ToListAsync(); var result = DataResult>.Success(list); result.Count = list.Count; return result; } } }