| | |
| | | using Model.ModelDto.LogDto; |
| | | using Utility; |
| | | using Model.ModelVm.LogVm; |
| | | using System.Diagnostics; |
| | | |
| | | namespace Wms.Controllers |
| | | { |
| | |
| | | /// <param name="department">部门</param> |
| | | /// <param name="setting">功能设定</param> |
| | | /// <param name="operation">操作日志</param> |
| | | public BasisController(ICustomerServer customerSvc, ILogisticsInfoServer logisticsSvc, IUserInforServer userInforServer, IRolesServer rolesServer, IRoleRightServer roleRightServer, IRBACServer rBACServer, IUnitServer unitSvc, IPackagServer packagServer, IMaterialsServer mate, IDepartmentServer department, IFunSettingServer setting, IInterfaceServer interfaceS, IOperationSysServer operation, UserManager userManager) |
| | | public BasisController(ICustomerServer customerSvc, ILogisticsInfoServer logisticsSvc, IUserInforServer userInforServer, |
| | | IRolesServer rolesServer, IRoleRightServer roleRightServer, IRBACServer rBACServer, IUnitServer unitSvc, |
| | | IPackagServer packagServer, IMaterialsServer mate, IDepartmentServer department, IFunSettingServer setting, |
| | | IInterfaceServer interfaceS, IOperationSysServer operation, UserManager userManager) |
| | | { |
| | | _customerSvc = customerSvc;//客户Svc |
| | | _logisticsSvc = logisticsSvc;//物流Svc |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<List<FunctionMenuDto>> GetRBACLists(int id) |
| | | { |
| | | return await _rBACServer.GetMenuByroleIdNew(id); |
| | |
| | | [HttpGet] |
| | | public async Task<List<RoleRightDto>> GetRoleRightList() |
| | | { |
| | | return await _roleRightServer.GetRoleMenuList(); |
| | | Stopwatch stopwatch = new Stopwatch(); |
| | | stopwatch.Start(); |
| | | var model = await _roleRightServer.GetRoleMenuList(); |
| | | stopwatch.Stop(); |
| | | |
| | | var time = stopwatch.ElapsedMilliseconds; |
| | | return model; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<SqlSugarPagedList<CustomerDto>> GetCustomerList(GetCustomerVm model) |
| | | public async Task<SqlSugarPagedList> GetCustomerList(GetCustomerVm model) |
| | | { |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _customerSvc.GetCustomerList(model.CustomerNo, model.CustomerName, model.Type, model.LinkMan, model.Phone, model.Page, model.Limit, count); |
| | | return new SqlSugarPagedList<CustomerDto>() { Items = bolls, Total = bolls.Count }; |
| | | return new SqlSugarPagedList() { Items = bolls, Total = count }; |
| | | } |
| | | /// <summary> |
| | | /// 查询单条客户信息 |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<SqlSugarPagedList<LogisticsInfoDto>> GetLogisticsInfoList(GetLogisticsInfoVm model) |
| | | public async Task<SqlSugarPagedList> GetLogisticsInfoList(GetLogisticsInfoVm model) |
| | | { |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var list = await _logisticsSvc.GetLogisticsInfoList(model.CarrierName, model.LinkMan, model.Phone, model.LicensePlate, model.Type, model.Page, model.Limit, count); |
| | | return new SqlSugarPagedList<LogisticsInfoDto>() { Items = list, Total = count }; |
| | | return new SqlSugarPagedList() { Items = list, Total = count }; |
| | | } |
| | | /// <summary> |
| | | /// 查询单条物流信息 |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<SqlSugarPagedList<UnitDto>> GetUnitList(GetUnitVm model) |
| | | public async Task<SqlSugarPagedList> GetUnitList(GetUnitVm model) |
| | | { |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var list = await _unitSvc.GetUnitList(model.UnitNo, model.UnitName, model.Page, model.Limit, count); |
| | | return new SqlSugarPagedList<UnitDto>() { Items = list, Total = count }; |
| | | return new SqlSugarPagedList() { Items = list, Total = count }; |
| | | } |
| | | /// <summary> |
| | | /// 查询单条单位信息 |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<SqlSugarPagedList<PackagDto>> GetPackagList(GetPackagVm model) |
| | | public async Task<SqlSugarPagedList> GetPackagList(GetPackagVm model) |
| | | { |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var list = await _packagSvc.GetPackagList(model.PackagNo, model.PackagName, model.Level, model.Page, model.Limit, count); |
| | | return new SqlSugarPagedList<PackagDto> { Items = list, Total = count }; |
| | | return new SqlSugarPagedList { Items = list, Total = count }; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<SqlSugarPagedList<OperationDto>> GetSysOperationList(GetOperationVm model) |
| | | public async Task<SqlSugarPagedList> GetSysOperationList(GetOperationVm model) |
| | | { |
| | | return await _operation.GetSysOperationList(model); |
| | | } |
| | |
| | | /// <param name="dicName">字典名称</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<List<SysDictionary>> GetDicTypeList(string dicName) |
| | | { |
| | | return await _operation.GetDicTypeList(dicName); |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<SqlSugarPagedList<InterfaceDto>> GetInterfaceList(InterfaceVm model) |
| | | public async Task<SqlSugarPagedList> GetInterfaceList(InterfaceVm model) |
| | | { |
| | | return await _interface.GetInterfaceList(model); |
| | | } |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<SqlSugarPagedList<InterfaceDetailDto>> GetInterfaceDetailList(InterfaceDetailVm model) |
| | | public async Task<SqlSugarPagedList> GetInterfaceDetailList(InterfaceDetailVm model) |
| | | { |
| | | return await _interface.GetInterfaceDetailList(model); |
| | | } |