|
@@ -1,11 +1,13 @@
|
|
using AutoMapper;
|
|
using AutoMapper;
|
|
using AutoMapper.Execution;
|
|
using AutoMapper.Execution;
|
|
|
|
+using EyeSoft.Collections.Generic;
|
|
using EyeSoft.Extensions;
|
|
using EyeSoft.Extensions;
|
|
using MySqlX.XDevAPI.Relational;
|
|
using MySqlX.XDevAPI.Relational;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json;
|
|
using NPOI.OpenXmlFormats.Dml.Diagram;
|
|
using NPOI.OpenXmlFormats.Dml.Diagram;
|
|
using NPOI.SS.Formula.Functions;
|
|
using NPOI.SS.Formula.Functions;
|
|
using NPOI.SS.UserModel;
|
|
using NPOI.SS.UserModel;
|
|
|
|
+using NPOI.Util;
|
|
using OASystem.Domain;
|
|
using OASystem.Domain;
|
|
using OASystem.Domain.AesEncryption;
|
|
using OASystem.Domain.AesEncryption;
|
|
using OASystem.Domain.AutoMappers;
|
|
using OASystem.Domain.AutoMappers;
|
|
@@ -1389,9 +1391,34 @@ namespace OASystem.Infrastructure.Repositories.CRM
|
|
var userArr = _sqlSugar.SqlQueryable<Sys_Users>(sql).ToList();
|
|
var userArr = _sqlSugar.SqlQueryable<Sys_Users>(sql).ToList();
|
|
var dic = new Dictionary<int, int[]>()
|
|
var dic = new Dictionary<int, int[]>()
|
|
{
|
|
{
|
|
- { 95, new int []{ 95 , 337 , 302, 350, 355, 357, 353 , 359 , 361, 368, 364, 366, 369 , 370 } }
|
|
|
|
|
|
+ { 95, new int []{ 95 , 337 , 302, 350, 355, 357, 353 , 359 , 361, 368, 364, 366, 369} }
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ var sqSetting = _sqlSugar.Queryable<Sys_SetData>().First(x => x.Id == 1417);
|
|
|
|
+ if (sqSetting != null)
|
|
|
|
+ {
|
|
|
|
+ Dictionary<int, int[]> result = JsonConvert.DeserializeObject<Dictionary<int, int[]>>(sqSetting.Remark);
|
|
|
|
+ foreach (var item in result.Keys)
|
|
|
|
+ {
|
|
|
|
+ if (dic.Keys.Contains(item))
|
|
|
|
+ {
|
|
|
|
+ int[] dilatation = new int[dic[item].Length + result[item].Length];
|
|
|
|
+ Array.Copy(dic[item], dilatation, dic[item].Length);
|
|
|
|
+ Array.Copy(result[item], 0, dilatation, dic[item].Length, result[item].Length);
|
|
|
|
+ dic[item] = dilatation;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ dic.Add(item, result[item]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ catch (Exception)
|
|
|
|
+ {}
|
|
|
|
+
|
|
if (dic.Keys.Contains(userid))
|
|
if (dic.Keys.Contains(userid))
|
|
{
|
|
{
|
|
return userArr.Where(x=> dic[userid].Contains(x.Id)).ToList();
|
|
return userArr.Where(x=> dic[userid].Contains(x.Id)).ToList();
|