|
|
@ -85,8 +85,41 @@ public class Ghre_QuestionServices : BaseServices<Ghre_Question, Ghre_QuestionDt |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else if (name == "CourseId") |
|
|
|
if (!string.IsNullOrWhiteSpace(value)) |
|
|
|
{ |
|
|
|
|
|
|
|
string sql = string.Empty; |
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(value)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var jsonParam = JsonConvert.DeserializeObject<JsonParam>(value); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (jsonParam.columnValue.IsNotEmptyOrNull()) |
|
|
|
|
|
|
|
switch (jsonParam.operationKey) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
//case "Include": |
|
|
|
|
|
|
|
// query = query.Where(x => x.CourseId != null && ids.Contains(x.CourseId.Value)); |
|
|
|
|
|
|
|
// break; |
|
|
|
|
|
|
|
//case "NotInclude": |
|
|
|
|
|
|
|
// query = query.Where(x => x.CourseId != null && !ids1.Contains(x.CourseId.Value)); |
|
|
|
|
|
|
|
// break; |
|
|
|
|
|
|
|
//case "IsNull": |
|
|
|
|
|
|
|
// query = query.Where(x => x.CourseId == null); |
|
|
|
|
|
|
|
// break; |
|
|
|
|
|
|
|
//case "NotNull": |
|
|
|
|
|
|
|
// query = query.Where(x => x.CourseId != null); |
|
|
|
|
|
|
|
// break; |
|
|
|
|
|
|
|
case "Equal": |
|
|
|
|
|
|
|
query = query.Where(x => x.CourseId == jsonParam.columnValue.ObjToLong() || x.CourseIds.Contains(jsonParam.columnValue.ObjToString())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
//case "NotEqual": |
|
|
|
|
|
|
|
// query = query.Where(x => x.CourseId != id1); |
|
|
|
|
|
|
|
// break; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (!string.IsNullOrWhiteSpace(value)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var jsonParam = JsonConvert.DeserializeObject<JsonParam>(value); |
|
|
|
var jsonParam = JsonConvert.DeserializeObject<JsonParam>(value); |
|
|
|
|
|
|
|
|
|
|
@ -226,6 +259,25 @@ public class Ghre_QuestionServices : BaseServices<Ghre_Question, Ghre_QuestionDt |
|
|
|
} |
|
|
|
} |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if (name == "CourseId") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var jsonParam = JsonHelper.JsonToObj<JsonParam>(value); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (jsonParam.columnValue != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (jsonParam.operationKey) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case "Equal": |
|
|
|
|
|
|
|
if (jsonParam.columnValue != null) |
|
|
|
|
|
|
|
conditions += @$" AND (CourseIds like '%{jsonParam.columnValue}%' or CourseId='{jsonParam.columnValue}')"; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(value)) |
|
|
|
if (!string.IsNullOrWhiteSpace(value)) |
|
|
|
conditions = DealConditions(conditions, name, value); |
|
|
|
conditions = DealConditions(conditions, name, value); |
|
|
|