booking_auth_dev
wet 2 years ago
parent c4d8d06e92
commit 684ab6a3f7

@ -4463,7 +4463,7 @@
<param name="bookingId"></param> <param name="bookingId"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Myshipping.Application.BookingOrderContactService.SaveBatch(System.Collections.Generic.List{Myshipping.Application.UpdateBookingOrderContactInput},System.Int64)"> <member name="M:Myshipping.Application.BookingOrderContactService.SaveBatch(System.Collections.Generic.List{Myshipping.Application.UpdateBookingOrderContactInput})">
<summary> <summary>
批量保存关系人(同时新增、删除、修改) 批量保存关系人(同时新增、删除、修改)
</summary> </summary>
@ -4802,13 +4802,6 @@
<param name="input"></param> <param name="input"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Myshipping.Application.BookingOrderService.LetterYardDelete(System.Int64)">
<summary>
删除放舱
</summary>
<param name="Id"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Application.BookingOrderService.SendLetterYard(System.Int64)"> <member name="M:Myshipping.Application.BookingOrderService.SendLetterYard(System.Int64)">
<summary> <summary>
放舱发送 放舱发送

@ -70,7 +70,7 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<BookingLogDetail> _bookinglogdetail; private readonly SqlSugarRepository<BookingLogDetail> _bookinglogdetail;
private readonly SqlSugarRepository<BookingRemark> _bookingremark; private readonly SqlSugarRepository<BookingRemark> _bookingremark;
private readonly SqlSugarRepository<BookingFile> _bookingfile; private readonly SqlSugarRepository<BookingFile> _bookingfile;
private readonly ISysDataUserMenu _right;
private readonly SqlSugarRepository<BookingPrintTemplate> _repPrint; private readonly SqlSugarRepository<BookingPrintTemplate> _repPrint;
private readonly ILogger<BookingOrderService> _logger; private readonly ILogger<BookingOrderService> _logger;
private readonly ISysCacheService _cache; private readonly ISysCacheService _cache;
@ -98,8 +98,8 @@ namespace Myshipping.Application
SqlSugarRepository<BookingLog> bookinglog, SqlSugarRepository<BookingLogDetail> bookinglogdetail, SqlSugarRepository<BookingRemark> bookingremark, SqlSugarRepository<BookingLog> bookinglog, SqlSugarRepository<BookingLogDetail> bookinglogdetail, SqlSugarRepository<BookingRemark> bookingremark,
SqlSugarRepository<BookingFile> bookingfile, SqlSugarRepository<DjyUserConfig> repUserConfig, SqlSugarRepository<BookingPrintTemplate> repPrint, SqlSugarRepository<BookingFile> bookingfile, SqlSugarRepository<DjyUserConfig> repUserConfig, SqlSugarRepository<BookingPrintTemplate> repPrint,
SqlSugarRepository<SysDictData> dicdata, SqlSugarRepository<BookingStatusLog> statuslog, SqlSugarRepository<BookingStatusLogDetail> statuslogdetail, SqlSugarRepository<SysDictData> dicdata, SqlSugarRepository<BookingStatusLog> statuslog, SqlSugarRepository<BookingStatusLogDetail> statuslogdetail,
ILogger<BookingOrderService> logger, ISysCacheService cache, IDjyWebsiteAccountConfigService webAccountConfig, ILogger<BookingOrderService> logger, ISysCacheService cache, IDjyWebsiteAccountConfigService webAccountConfig, ISysDataUserMenu right,
SqlSugarRepository<BookingPrintTemplate> repPrintTemplate, SqlSugarRepository<BookingLetteryard> repLetterYard, SqlSugarRepository<SysUser> repUser, SqlSugarRepository<BookingPrintTemplate> repPrintTemplate, SqlSugarRepository<BookingLetteryard> repLetterYard, SqlSugarRepository<SysUser> repUser,
SqlSugarRepository<BookingOrderUrl> repOrderUrl, SqlSugarRepository<BookingOrderContact> repOrderContact, SqlSugarRepository<BookingSampleBill> repSampleBill, SqlSugarRepository<BookingOrderUrl> repOrderUrl, SqlSugarRepository<BookingOrderContact> repOrderContact, SqlSugarRepository<BookingSampleBill> repSampleBill,
SqlSugarRepository<DjyUserMailAccount> repUserMail, SqlSugarRepository<SysTenant> repTenant, SqlSugarRepository<BookingStatus> repBookingStatus, SqlSugarRepository<BookingEDIExt> bookingEDIExt, SqlSugarRepository<DjyUserMailAccount> repUserMail, SqlSugarRepository<SysTenant> repTenant, SqlSugarRepository<BookingStatus> repBookingStatus, SqlSugarRepository<BookingEDIExt> bookingEDIExt,
IHttpContextAccessor httpContextAccessor) IHttpContextAccessor httpContextAccessor)
@ -113,7 +113,7 @@ namespace Myshipping.Application
this._bookingremark = bookingremark; this._bookingremark = bookingremark;
this._bookingfile = bookingfile; this._bookingfile = bookingfile;
this._repPrint = repPrint; this._repPrint = repPrint;
this._right = right;
this._cache = cache; this._cache = cache;
this._webAccountConfig = webAccountConfig; this._webAccountConfig = webAccountConfig;
this._repStatuslog = statuslog; this._repStatuslog = statuslog;
@ -141,7 +141,7 @@ 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 DataFilterExtensions.GetDataScopeIdList(); List<long> userlist = await _right.GetDataScopeList(351064299098181);
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))
@ -290,9 +290,9 @@ namespace Myshipping.Application
foreach (var item in list.Items) foreach (var item in list.Items)
{ {
var sta= await _repBookingStatus.AsQueryable().Where(x => x.BookingId == item.Id).ToListAsync(); var sta = await _repBookingStatus.AsQueryable().Where(x => x.BookingId == item.Id).ToListAsync();
if (sta!=null) { item.bookstatus = sta; } if (sta != null) { item.bookstatus = sta; }
} }
return list; return list;
@ -1029,9 +1029,6 @@ namespace Myshipping.Application
} }
#endregion #endregion
#region 放舱(入货通知) #region 放舱(入货通知)
/// <summary> /// <summary>
@ -2461,6 +2458,7 @@ namespace Myshipping.Application
await _bookingfile.InsertAsync(bookFile); await _bookingfile.InsertAsync(bookFile);
} }
#region 下载订舱、截单EDI #region 下载订舱、截单EDI
/// <summary> /// <summary>
/// 下载订舱、截单EDI /// 下载订舱、截单EDI

@ -3835,6 +3835,11 @@
机构Id 机构Id
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Core.Entity.SysUserDataScope.SysMenuId">
<summary>
菜单Id
</summary>
</member>
<member name="T:Myshipping.Core.Entity.SysUserRole"> <member name="T:Myshipping.Core.Entity.SysUserRole">
<summary> <summary>
用户角色表 用户角色表
@ -13947,6 +13952,13 @@
<param name="input"></param> <param name="input"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Myshipping.Core.Service.SysDataUserMenuService.GrantRightData(Myshipping.Core.Service.User.Dto.RightList)">
<summary>
授权用户自定义数据
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.SysDataUserMenuService.GetDataScopeList(System.Int64)"> <member name="M:Myshipping.Core.Service.SysDataUserMenuService.GetDataScopeList(System.Int64)">
<summary> <summary>
获取权限集合 获取权限集合

@ -1,9 +1,12 @@
using System.Collections.Generic; using Myshipping.Core.Service.User.Dto;
using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Myshipping.Core.Service; namespace Myshipping.Core.Service;
public interface ISysDataUserMenu public interface ISysDataUserMenu
{ {
Task GrantData(SysDataUserMenuDto input);
Task GrantRightData(RightList input);
Task<List<long>> GetDataScopeList(long menuid);
} }

@ -27,12 +27,14 @@ public class SysDataUserMenuService : ISysDataUserMenu, ITransient
private readonly SqlSugarRepository<SysEmp> _sysEmpRep; // 员工表仓储 private readonly SqlSugarRepository<SysEmp> _sysEmpRep; // 员工表仓储
private readonly SqlSugarRepository<SysUser> _sysuser; // 员工表 private readonly SqlSugarRepository<SysUser> _sysuser; // 员工表
private readonly SqlSugarRepository<SysUserDataScope> _sysUserDataScopeRep; // 用户数据范围表仓储 private readonly SqlSugarRepository<SysUserDataScope> _sysUserDataScopeRep; // 用户数据范围表仓储
public SysDataUserMenuService(SqlSugarRepository<SysDataUserMenu> rep, ISysCacheService sysCache, SqlSugarRepository<SysUser> sysuser, SqlSugarRepository<SysUserDataScope> sysUserDataScopeRep) public SysDataUserMenuService(SqlSugarRepository<SysDataUserMenu> rep, ISysCacheService sysCache, SqlSugarRepository<SysUser> sysuser, SqlSugarRepository<SysUserDataScope> sysUserDataScopeRep, SqlSugarRepository<SysEmp> sysEmpRep, SqlSugarRepository<SysOrg> sysOrgRep)
{ {
_rep = rep; _rep = rep;
_sysCache = sysCache; _sysCache = sysCache;
_sysuser = sysuser; _sysuser = sysuser;
_sysUserDataScopeRep=sysUserDataScopeRep; _sysUserDataScopeRep=sysUserDataScopeRep;
_sysEmpRep = sysEmpRep;
_sysOrgRep= sysOrgRep;
} }
/// <summary> /// <summary>
@ -96,9 +98,6 @@ public class SysDataUserMenuService : ISysDataUserMenu, ITransient
await _sysUserDataScopeRep.DeleteAsync(x => x.SysUserId == input.UserId); await _sysUserDataScopeRep.DeleteAsync(x => x.SysUserId == input.UserId);
foreach (var item in input.childrens) foreach (var item in input.childrens)
{ {
var list = new List<SysUserDataScope>(); var list = new List<SysUserDataScope>();
input.childrens.ForEach(u => input.childrens.ForEach(u =>
{ {
@ -153,7 +152,7 @@ public class SysDataUserMenuService : ISysDataUserMenu, ITransient
datascope.Add(UserManager.UserId); datascope.Add(UserManager.UserId);
} }
if (_dataScopeType==DataScopeType.DEPT) { if (_dataScopeType==DataScopeType.DEPT) {
datascope=await _sysEmpRep.AsQueryable().InnerJoin<SysEmp>((d, t) => d.OrgId == t.OrgId && d.Id == UserManager.UserId).Select(x => x.Id).ToListAsync(); datascope=await _sysEmpRep.AsQueryable().InnerJoin<SysEmp>((d, t) => d.OrgId == t.OrgId && d.Id == UserManager.UserId).Select(d => d.Id).ToListAsync();
} }
if (_dataScopeType == DataScopeType.DEPT_WITH_CHILD) if (_dataScopeType == DataScopeType.DEPT_WITH_CHILD)

@ -24,7 +24,7 @@ public class SysUserDataScopeService : ISysUserDataScopeService, ITransient
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
public async Task GrantData(UpdateUserInput input) public async Task GrantData(UpdateUserInput input)
{ {
try try
{ {

Loading…
Cancel
Save