修改马士基API订舱的台账数据权限

master
jianghaiqing 8 months ago
parent bea8eb0c76
commit fa9cbd561d

@ -990,17 +990,16 @@ namespace Myshipping.Application.Service.BookingOrder
//菜单375504048771141=我的任务台账
List<long> userlist = await _sysDataUserMenuService.GetDataScopeList(MenuConst.MenuMSKApi);
if (userlist == null)
userlist = new List<long> { UserManager.UserId };
if (userlist.Count > 0)
{
userlist.Add(UserManager.UserId);
userlist = userlist.Distinct().ToList();
}
_logger.LogInformation("任务台账权限范围 {list}", userlist);
var entities = await _bookingDeliveryRecordRep.AsQueryable()
.Where(t => userlist.Contains(t.CreatedUserId.Value))
.Where(t => userlist == null || (userlist.Count > 0 && userlist.Contains(t.CreatedUserId.Value)))
.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(updateBegin != DateTime.MinValue, t => t.UpdatedTime.HasValue && t.UpdatedTime.Value >= updateBegin)
@ -1296,6 +1295,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// </summary>
/// <param name="ids">马士基API订舱ID组</param>
/// <returns>返回执行结果消息</returns>
[HttpPost("/BookingMSKAPI/BatchSend")]
public async Task<string> BatchSend(long[] ids)
{
var list = await _bookingDeliveryRecordRep.AsQueryable()
@ -1316,6 +1316,7 @@ namespace Myshipping.Application.Service.BookingOrder
/// <param name="id">马士基API订舱ID</param>
/// <param name="copyNum">需要复制生成记录</param>
/// <returns>返回执行结果消息</returns>
[HttpGet("/BookingMSKAPI/BatchSend")]
public async Task<string> BatchCopy(long id, int copyNum)
{

Loading…
Cancel
Save