|
|
|
@ -1,5 +1,6 @@ |
|
|
|
using ATS.NonCustodial.Application.Base; |
|
|
|
using ATS.NonCustodial.Application.Base; |
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Admins.AppDictionaries; |
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Admins.AppDictionaries; |
|
|
|
|
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Admins.AppDictionaries.Output; |
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Admins.Auth.Output; |
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Admins.Auth.Output; |
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Admins.Menu.Output; |
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Admins.Menu.Output; |
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Admins.Role.Output; |
|
|
|
using ATS.NonCustodial.Application.Contracts.Interfaces.Admins.Role.Output; |
|
|
|
@ -12,7 +13,6 @@ using ATS.NonCustodial.Domain.Shared.OrmRepositories.Basic.EfCore; |
|
|
|
using ATS.NonCustodial.DynamicApi; |
|
|
|
using ATS.NonCustodial.DynamicApi; |
|
|
|
using ATS.NonCustodial.DynamicApi.Attributes; |
|
|
|
using ATS.NonCustodial.DynamicApi.Attributes; |
|
|
|
using ATS.NonCustodial.Shared.Common.Attributes; |
|
|
|
using ATS.NonCustodial.Shared.Common.Attributes; |
|
|
|
using ATS.NonCustodial.Shared.Common.Auth; |
|
|
|
|
|
|
|
using ATS.NonCustodial.Shared.Common.Constants; |
|
|
|
using ATS.NonCustodial.Shared.Common.Constants; |
|
|
|
using ATS.NonCustodial.Shared.Common.Dtos; |
|
|
|
using ATS.NonCustodial.Shared.Common.Dtos; |
|
|
|
using ATS.NonCustodial.Shared.Common.Dtos.Query; |
|
|
|
using ATS.NonCustodial.Shared.Common.Dtos.Query; |
|
|
|
@ -27,10 +27,7 @@ using AutoMapper.QueryableExtensions; |
|
|
|
using Castle.Components.DictionaryAdapter; |
|
|
|
using Castle.Components.DictionaryAdapter; |
|
|
|
using Microsoft.AspNetCore.Http; |
|
|
|
using Microsoft.AspNetCore.Http; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Microsoft.AspNetCore.Routing; |
|
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using System.Collections.Generic; |
|
|
|
|
|
|
|
using System.Xml.Linq; |
|
|
|
|
|
|
|
using Yitter.IdGenerator; |
|
|
|
using Yitter.IdGenerator; |
|
|
|
|
|
|
|
|
|
|
|
namespace ATS.NonCustodial.Application.Impl.Admins |
|
|
|
namespace ATS.NonCustodial.Application.Impl.Admins |
|
|
|
@ -162,9 +159,17 @@ namespace ATS.NonCustodial.Application.Impl.Admins |
|
|
|
var usermenulist = await (from ur in _userRoleRepository.AsQueryable(false, true).Where(q => q.UserId == User.Id) |
|
|
|
var usermenulist = await (from ur in _userRoleRepository.AsQueryable(false, true).Where(q => q.UserId == User.Id) |
|
|
|
join urp in _rolePermissionRepository.AsQueryable(false, true) on ur.RoleId equals urp.RoleId |
|
|
|
join urp in _rolePermissionRepository.AsQueryable(false, true) on ur.RoleId equals urp.RoleId |
|
|
|
join urpm in _MenuRepository.AsQueryable(false, true) on urp.PermissionId equals urpm.Id |
|
|
|
join urpm in _MenuRepository.AsQueryable(false, true) on urp.PermissionId equals urpm.Id |
|
|
|
select new App_Menu{ Id=urpm.Id, menuName=urpm.menuName, icon=urpm.icon, iconName=urpm.iconName, pid=urpm.pid, sort=urpm.sort, |
|
|
|
select new App_Menu |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Id = urpm.Id, |
|
|
|
|
|
|
|
menuName = urpm.menuName, |
|
|
|
|
|
|
|
icon = urpm.icon, |
|
|
|
|
|
|
|
iconName = urpm.iconName, |
|
|
|
|
|
|
|
pid = urpm.pid, |
|
|
|
|
|
|
|
sort = urpm.sort, |
|
|
|
route = urpm.route, |
|
|
|
route = urpm.route, |
|
|
|
menuUrl =urpm.menuUrl }).ToListAsync(); |
|
|
|
menuUrl = urpm.menuUrl |
|
|
|
|
|
|
|
}).ToListAsync(); |
|
|
|
var menulist = Mapper.Map<List<MenuListOutput>>(usermenulist); |
|
|
|
var menulist = Mapper.Map<List<MenuListOutput>>(usermenulist); |
|
|
|
if (User.Name.Contains("aks")) |
|
|
|
if (User.Name.Contains("aks")) |
|
|
|
{ |
|
|
|
{ |
|
|
|
@ -837,13 +842,24 @@ namespace ATS.NonCustodial.Application.Impl.Admins |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// 根据当前登录用户查询下拉列表 |
|
|
|
/// 根据当前登录用户查询下拉列表 |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="isCourt">移交给检察院 0 移交法院 1</param> |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
public async Task<ResultOutput<List<KeyValueDto>>> GetUserSelectList() |
|
|
|
public async Task<ResultOutput<List<KeyValueDto>>> GetUserSelectList(int isCourt = 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var userRoles = await this.IsAdmin(null); |
|
|
|
var userRoles = await this.IsAdmin(null); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dataDict = await _appDictionaryService.GetListNoApiAsync("job_position"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 安全地处理可能的空值 |
|
|
|
|
|
|
|
var codeList = dataDict?.FirstOrDefault()?.Dictionaries? |
|
|
|
|
|
|
|
.Where(w => w.Code == (isCourt == 0 ? "inquisitor" : "judge")) |
|
|
|
|
|
|
|
.ToList() ?? new List<DictionaryGetOutput>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var rtn = await _userRepository.AsQueryable(false, true) |
|
|
|
var rtn = await _userRepository.AsQueryable(false, true) |
|
|
|
.Where(w => w.ChatPersonType != ChatPersonTypeEnum.SupervisedPerson && w.DataStatus != DataStatusEnum.Disable && !w.UserName.Contains("_aks")) |
|
|
|
.Where(w => w.ChatPersonType != ChatPersonTypeEnum.SupervisedPerson && w.DataStatus != DataStatusEnum.Disable && !w.UserName.Contains("_aks")) |
|
|
|
|
|
|
|
.WhereIf(codeList.Count>0,w=> w.PositionId == codeList.FirstOrDefault().Id) |
|
|
|
// .WhereIf(!userRoles.IsAdmin, w => w.Id == User.Id) 2025 -10-20 段肖确认修改 |
|
|
|
// .WhereIf(!userRoles.IsAdmin, w => w.Id == User.Id) 2025 -10-20 段肖确认修改 |
|
|
|
.Select(w => new KeyValueDto() |
|
|
|
.Select(w => new KeyValueDto() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|