jianghaiqing 2 years ago
commit e61cf3d8c7

@ -141,8 +141,8 @@ namespace Myshipping.Application
[HttpGet("/BookingOrder/Page")] [HttpGet("/BookingOrder/Page")]
public async Task<dynamic> Page([FromQuery] BookingOrderInput input) public async Task<dynamic> Page([FromQuery] BookingOrderInput input)
{ {
//List<long> userlist = await _right.GetDataScopeList(351064299098181); List<long> userlist = await _right.GetDataScopeList(351064299098181);
List<long> userlist = await DataFilterExtensions.GetDataScopeIdList(); //List<long> userlist = await DataFilterExtensions.GetDataScopeIdList();
var entities = await _rep.AsQueryable().Where(x => x.ParentId == 0) var entities = await _rep.AsQueryable().Where(x => x.ParentId == 0)
.WhereIF(!string.IsNullOrWhiteSpace(input.BSNO), u => u.BSNO.Contains(input.BSNO)) .WhereIF(!string.IsNullOrWhiteSpace(input.BSNO), u => u.BSNO.Contains(input.BSNO))
.WhereIF(!string.IsNullOrWhiteSpace(input.BSSTATUS), u => u.BSSTATUS == input.BSSTATUS) .WhereIF(!string.IsNullOrWhiteSpace(input.BSSTATUS), u => u.BSSTATUS == input.BSSTATUS)
@ -2537,8 +2537,6 @@ namespace Myshipping.Application
await _bookingfile.InsertAsync(bookFile); await _bookingfile.InsertAsync(bookFile);
} }
#region 下载订舱、截单EDI #region 下载订舱、截单EDI
/// <summary> /// <summary>
/// 下载订舱、截单EDI /// 下载订舱、截单EDI

@ -15,8 +15,6 @@ public class SysUserDataScope
/// </summary> /// </summary>
public long SysUserId { get; set; } public long SysUserId { get; set; }
/// <summary> /// <summary>
/// 机构Id /// 机构Id
/// </summary> /// </summary>

@ -19,7 +19,8 @@ namespace Myshipping.Core.Service;
/// <summary> /// <summary>
/// 用户数据范围 /// 用户数据范围
/// </summary> /// </summary>
public class SysDataUserMenuService : ISysDataUserMenu, ITransient [ApiDescriptionSettings(Name = "SysDataUserMenu", Order = 150)]
public class SysDataUserMenuService : ISysDataUserMenu, IDynamicApiController,ITransient
{ {
private readonly SqlSugarRepository<SysDataUserMenu> _rep; // 用户数据范围表仓储 private readonly SqlSugarRepository<SysDataUserMenu> _rep; // 用户数据范围表仓储
private readonly ISysCacheService _sysCache;//缓存 private readonly ISysCacheService _sysCache;//缓存
@ -37,6 +38,32 @@ public class SysDataUserMenuService : ISysDataUserMenu, ITransient
_sysOrgRep= sysOrgRep; _sysOrgRep= sysOrgRep;
} }
/// <summary>
/// 获取权限
/// </summary>
/// <param name="userid"></param>
/// <returns></returns>
[HttpGet("/SysDataUserMenu/GetGrantData")]
public async Task<dynamic> GetGrantData(long userid) {
return await _rep.AsQueryable().Where(x => x.SysUserId == userid).ToListAsync();
}
/// <summary>
/// 获取用户自定义权限
/// </summary>
/// <param name="userid"></param>
/// <returns></returns>
[HttpGet("/SysDataUserMenu/GetGrantData")]
public async Task<dynamic> GetGrantRightData(long userid)
{
return await _sysUserDataScopeRep.AsQueryable().Where(x => x.SysUserId == userid).ToListAsync();
}
/// <summary> /// <summary>
/// 授权用户数据 /// 授权用户数据
/// </summary> /// </summary>

Loading…
Cancel
Save