booking_auth_dev
wet 2 years ago
parent c4d8d06e92
commit 684ab6a3f7

@ -4463,7 +4463,7 @@
<param name="bookingId"></param>
<returns></returns>
</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>
@ -4802,13 +4802,6 @@
<param name="input"></param>
<returns></returns>
</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)">
<summary>
放舱发送

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

@ -3835,6 +3835,11 @@
机构Id
</summary>
</member>
<member name="P:Myshipping.Core.Entity.SysUserDataScope.SysMenuId">
<summary>
菜单Id
</summary>
</member>
<member name="T:Myshipping.Core.Entity.SysUserRole">
<summary>
用户角色表
@ -13947,6 +13952,13 @@
<param name="input"></param>
<returns></returns>
</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)">
<summary>
获取权限集合

@ -1,9 +1,12 @@
using System.Collections.Generic;
using Myshipping.Core.Service.User.Dto;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Myshipping.Core.Service;
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<SysUser> _sysuser; // 员工表
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;
_sysCache = sysCache;
_sysuser = sysuser;
_sysUserDataScopeRep=sysUserDataScopeRep;
_sysUserDataScopeRep=sysUserDataScopeRep;
_sysEmpRep = sysEmpRep;
_sysOrgRep= sysOrgRep;
}
/// <summary>
@ -96,9 +98,6 @@ public class SysDataUserMenuService : ISysDataUserMenu, ITransient
await _sysUserDataScopeRep.DeleteAsync(x => x.SysUserId == input.UserId);
foreach (var item in input.childrens)
{
var list = new List<SysUserDataScope>();
input.childrens.ForEach(u =>
{
@ -153,7 +152,7 @@ public class SysDataUserMenuService : ISysDataUserMenu, ITransient
datascope.Add(UserManager.UserId);
}
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)

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

Loading…
Cancel
Save