|
|
@ -1,4 +1,7 @@ |
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
using Tiobon.Core.Common; |
|
|
|
|
|
|
|
using static StackExchange.Redis.Role; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// 岗位 (服务) |
|
|
|
/// 岗位 (服务) |
|
|
@ -28,7 +31,6 @@ public class Ghra_TitleServices : BaseServices<Ghra_Title, Ghra_TitleDto, Insert |
|
|
|
|
|
|
|
|
|
|
|
dynamic obj = new ExpandoObject(); |
|
|
|
dynamic obj = new ExpandoObject(); |
|
|
|
dynamic result = new ExpandoObject(); |
|
|
|
dynamic result = new ExpandoObject(); |
|
|
|
|
|
|
|
|
|
|
|
var ruleSrc = Db.Queryable<Ghre_StudyRule>(); |
|
|
|
var ruleSrc = Db.Queryable<Ghre_StudyRule>(); |
|
|
|
if (string.IsNullOrWhiteSpace(filter.orderBy)) |
|
|
|
if (string.IsNullOrWhiteSpace(filter.orderBy)) |
|
|
|
filter.orderBy = "Type ASC"; |
|
|
|
filter.orderBy = "Type ASC"; |
|
|
@ -52,6 +54,7 @@ public class Ghra_TitleServices : BaseServices<Ghra_Title, Ghra_TitleDto, Insert |
|
|
|
if (x.GradeId.IsNotEmptyOrNull()) |
|
|
|
if (x.GradeId.IsNotEmptyOrNull()) |
|
|
|
x.GradeIds = JsonHelper.JsonToObj<List<int?>>(x.GradeId); |
|
|
|
x.GradeIds = JsonHelper.JsonToObj<List<int?>>(x.GradeId); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
var titles = await Db.Queryable<Ghra_Title>().OrderBy(x => x.SortNo).ToListAsync(); |
|
|
|
|
|
|
|
|
|
|
|
#region 处理查询条件 |
|
|
|
#region 处理查询条件 |
|
|
|
//Expression<Func<Ghrh_Resume, bool>> whereExpression = new Expression<Func<Ghrh_Resume, bool>>(); |
|
|
|
//Expression<Func<Ghrh_Resume, bool>> whereExpression = new Expression<Func<Ghrh_Resume, bool>>(); |
|
|
@ -117,10 +120,12 @@ public class Ghra_TitleServices : BaseServices<Ghra_Title, Ghra_TitleDto, Insert |
|
|
|
case "Include": |
|
|
|
case "Include": |
|
|
|
if (jsonParam.columnValue != null) |
|
|
|
if (jsonParam.columnValue != null) |
|
|
|
rules = rules.Where(x => x.TitleIds.Contains(jsonParam.columnValue.ObjToInt())).ToList(); |
|
|
|
rules = rules.Where(x => x.TitleIds.Contains(jsonParam.columnValue.ObjToInt())).ToList(); |
|
|
|
|
|
|
|
titles = titles.Where(x => x.TitleID == jsonParam.columnValue.ObjToInt()).ToList(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "NotInclude": |
|
|
|
case "NotInclude": |
|
|
|
if (jsonParam.columnValue != null) |
|
|
|
if (jsonParam.columnValue != null) |
|
|
|
rules = rules.Where(x => !x.TitleIds.Contains(jsonParam.columnValue.ObjToInt())).ToList(); |
|
|
|
rules = rules.Where(x => !x.TitleIds.Contains(jsonParam.columnValue.ObjToInt())).ToList(); |
|
|
|
|
|
|
|
titles = titles.Where(x => x.TitleID != jsonParam.columnValue.ObjToInt()).ToList(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "IsNull": |
|
|
|
case "IsNull": |
|
|
|
rules = rules.Where(x => x.TitleIds.Count == 0).ToList(); |
|
|
|
rules = rules.Where(x => x.TitleIds.Count == 0).ToList(); |
|
|
@ -187,6 +192,22 @@ public class Ghra_TitleServices : BaseServices<Ghra_Title, Ghra_TitleDto, Insert |
|
|
|
rules = rules.Where(x => x.CourseId != jsonParam.columnValue.ObjToLong()).ToList(); |
|
|
|
rules = rules.Where(x => x.CourseId != jsonParam.columnValue.ObjToLong()).ToList(); |
|
|
|
sql += $" AND Id !={jsonParam.columnValue}"; |
|
|
|
sql += $" AND Id !={jsonParam.columnValue}"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "EqualAny":// |
|
|
|
|
|
|
|
if (jsonParam.columnValue != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var ids1 = JsonHelper.JsonToObj<List<string>>(jsonParam.columnValue.ToString()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sql += $" AND Id IN ({string.Join(",", ids1.Select(id => "'" + id + "'"))})"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "NotEqualAny":// |
|
|
|
|
|
|
|
if (jsonParam.columnValue != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var ids1 = JsonHelper.JsonToObj<List<string>>(jsonParam.columnValue.ToString()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sql += $" AND ( Id NOT IN ({string.Join(",", ids1.Select(id => "'" + id + "'"))}) OR {name} IS NULL)"; |
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
break; |
|
|
|
break; |
|
|
@ -212,7 +233,8 @@ public class Ghra_TitleServices : BaseServices<Ghra_Title, Ghra_TitleDto, Insert |
|
|
|
ModuleParam param = new ModuleParam() |
|
|
|
ModuleParam param = new ModuleParam() |
|
|
|
{ |
|
|
|
{ |
|
|
|
langId = filter.langId, |
|
|
|
langId = filter.langId, |
|
|
|
menuName = filter.menuName |
|
|
|
menuName = filter.menuName, |
|
|
|
|
|
|
|
jsonParam1 = filter.jsonParam |
|
|
|
}; |
|
|
|
}; |
|
|
|
var module = await _commonServices.GetModuleInfoAsync(param); |
|
|
|
var module = await _commonServices.GetModuleInfoAsync(param); |
|
|
|
var result1 = new ServicePageResult<TitleSkillMatrix>(filter.pageNum, totalCount, filter.pageSize, list); |
|
|
|
var result1 = new ServicePageResult<TitleSkillMatrix>(filter.pageNum, totalCount, filter.pageSize, list); |
|
|
@ -220,7 +242,6 @@ public class Ghra_TitleServices : BaseServices<Ghra_Title, Ghra_TitleDto, Insert |
|
|
|
|
|
|
|
|
|
|
|
var columns = new JArray(); |
|
|
|
var columns = new JArray(); |
|
|
|
|
|
|
|
|
|
|
|
var titles = await Db.Queryable<Ghra_Title>().OrderBy(x => x.SortNo).ToListAsync(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dict = new Dictionary<string, List<int>>(); |
|
|
|
var dict = new Dictionary<string, List<int>>(); |
|
|
|
|
|
|
|
|
|
|
|