修改马士基API台账增加数据权限

master
jianghaiqing 8 months ago
parent f3afaef012
commit 9542b850ba

@ -986,9 +986,9 @@ namespace Myshipping.Application.Service.BookingOrder
//这里因为返回给前端的台账数据是DTO所以这里排序时候需要转换成Entity对应的字段 //这里因为返回给前端的台账数据是DTO所以这里排序时候需要转换成Entity对应的字段
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField)) if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
entityOrderCol = MapsterExtHelper.GetAdaptProperty<BookingDeliveryRecordDto, BookingDeliveryRecord>(QuerySearch.SortField); entityOrderCol = MapsterExtHelper.GetAdaptProperty<BookingDeliveryRecordDto, BookingDeliveryRecord>(QuerySearch.SortField);
/*
//菜单375504048771141=我的任务台账 //菜单375504048771141=我的任务台账
List<long> userlist = await _sysDataUserMenuService.GetDataScopeList(MenuConst.MenuTaskManage); List<long> userlist = await _sysDataUserMenuService.GetDataScopeList(MenuConst.MenuMSKApi);
if (userlist == null) if (userlist == null)
userlist = new List<long> { UserManager.UserId }; userlist = new List<long> { UserManager.UserId };
@ -997,9 +997,10 @@ namespace Myshipping.Application.Service.BookingOrder
userlist = userlist.Distinct().ToList(); userlist = userlist.Distinct().ToList();
_logger.LogInformation("任务台账权限范围 {list}", userlist); _logger.LogInformation("任务台账权限范围 {list}", userlist);
*/
var entities = await _bookingDeliveryRecordRep.AsQueryable() var entities = await _bookingDeliveryRecordRep.AsQueryable()
.Where(t => userlist.Contains(t.CreatedUserId.Value))
.WhereIF(createBegin != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value >= createBegin) .WhereIF(createBegin != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value >= createBegin)
.WhereIF(createEnd != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value < createEnd) .WhereIF(createEnd != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value < createEnd)
.WhereIF(updateBegin != DateTime.MinValue, t => t.UpdatedTime.HasValue && t.UpdatedTime.Value >= updateBegin) .WhereIF(updateBegin != DateTime.MinValue, t => t.UpdatedTime.HasValue && t.UpdatedTime.Value >= updateBegin)

@ -16,5 +16,10 @@ namespace Myshipping.Core.Const
/// 我的任务台账 /// 我的任务台账
/// </summary> /// </summary>
public const long MenuTaskManage = 375504048771141; public const long MenuTaskManage = 375504048771141;
/// <summary>
/// 马士基API订舱
/// </summary>
public const long MenuMSKApi = 526643045195845;
} }
} }

@ -842,6 +842,11 @@
我的任务台账 我的任务台账
</summary> </summary>
</member> </member>
<member name="F:Myshipping.Core.Const.MenuConst.MenuMSKApi">
<summary>
马士基API订舱
</summary>
</member>
<member name="T:Myshipping.Core.Const.TenantParamCode"> <member name="T:Myshipping.Core.Const.TenantParamCode">
<summary> <summary>
租户参数Code常量 租户参数Code常量

Loading…
Cancel
Save