列表查询条件添加
This commit is contained in:
54
src/WMS.Web.Repositories/BasicsRepositories.cs
Normal file
54
src/WMS.Web.Repositories/BasicsRepositories.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using AutoMapper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WMS.Web.Core.Dto.Basics;
|
||||
using WMS.Web.Core.Dto.SingleData;
|
||||
using WMS.Web.Core.Internal.Results;
|
||||
using WMS.Web.Domain.Infrastructure;
|
||||
using WMS.Web.Domain.IService.Public;
|
||||
using WMS.Web.Domain.Values;
|
||||
using WMS.Web.Domain.Values.Single;
|
||||
using WMS.Web.Repositories.Configuration;
|
||||
|
||||
namespace WMS.Web.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 基础数据
|
||||
/// </summary>
|
||||
public class BasicsRepositories : IBasicsRepositories
|
||||
{
|
||||
private readonly IMapper _mapper;
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
private RepositoryDbContext _context;
|
||||
private readonly ILoginRepositories _loginService;
|
||||
private readonly ISingleDataService _singleDataService;
|
||||
|
||||
|
||||
public BasicsRepositories(RepositoryDbContext context, IMapper mapper, IServiceProvider serviceProvider,
|
||||
ILoginRepositories loginService, ISingleDataService singleDataService)
|
||||
{
|
||||
_context = context;
|
||||
_mapper = mapper;
|
||||
_serviceProvider = serviceProvider;
|
||||
_loginService = loginService;
|
||||
_singleDataService = singleDataService;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取所有人员
|
||||
/// </summary>
|
||||
/// <param name="CompanyId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<SysStaffResponse>> GetStaffListAsync(int CompanyId)
|
||||
{
|
||||
var result = await _singleDataService.GetSysConfigData<ResultList<SysStaffResponse>, SingleDataRequest>
|
||||
(new SingleDataRequest(CompanyId),
|
||||
SysConfigAction.GetStaffByCompany);
|
||||
if (!result.Success)
|
||||
return null;
|
||||
return result.Data.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user