diff --git a/Tiobon.Core.Services/Ghre/Ghre_QuestionServices.cs b/Tiobon.Core.Services/Ghre/Ghre_QuestionServices.cs index 6b9eb268..45e274ba 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_QuestionServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_QuestionServices.cs @@ -180,8 +180,8 @@ public class Ghre_QuestionServices : BaseServices totalCount = 0; string sql = @"SELECT * FROM (SELECT A.*, - B.CourseName, - B.CourseClassId CourseTypeId, + B.CourseName + ' (' + B.CourseNo + ')' CourseName, + B.CourseClassId, G.UserName CreateDataInfo, H.UserName UpdateDataInfo, ISNULL(A.UpdateTime, A.CreateTime) CreateTime1 @@ -227,6 +227,34 @@ public class Ghre_QuestionServices : BaseServices='{jsonParam.columnValue}'"; + break; + case "Greater"://大于 + conditions += $" AND {name} >'{jsonParam.columnValue}'"; + break; + case "LessOrEqual"://小于等于 + conditions += $" AND {name} <='{jsonParam.columnValue}'"; + break; + case "Less"://小于 + conditions += $" AND {name} <'{jsonParam.columnValue}'"; + break; + case "EqualAny":// + if (jsonParam.columnValue != null) + { + var ids1 = JsonHelper.JsonToObj>(jsonParam.columnValue.ToString()); + + conditions += $" AND {name} IN ({string.Join(",", ids1.Select(id => "'" + id + "'"))})"; + } + break; + case "NotEqualAny":// + if (jsonParam.columnValue != null) + { + var ids1 = JsonHelper.JsonToObj>(jsonParam.columnValue.ToString()); + + conditions += $" AND ({name} NOT IN ({string.Join(",", ids1.Select(id => "'" + id + "'"))}) OR {name} IS NULL)"; + } + break; default: break; } @@ -260,7 +288,7 @@ public class Ghre_QuestionServices : BaseServices x.CourseClassId.Contains(a.Id.ToString())).ToList(); - x.CourseType = string.Join(",", courseClass.Select(a => a.ClassName)); + x.CourseType = string.Join(",", courseClass.Select(a => a.ClassName + " (" + a.ClassNo + ")")); });