From 061002a7418bbe6ed4d51fc6844fd89a8c17ef66 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Thu, 25 Jul 2024 16:53:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E5=BA=93=E6=9F=A5=E8=AF=A2=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=88=E5=85=B3=E8=81=94=E8=AF=BE=E7=A8=8B=E3=80=81?= =?UTF-8?q?=E5=88=86=E7=B1=BB=20=E6=98=BE=E7=A4=BA=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E7=BC=96=E5=8F=B7=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ghre/Ghre_QuestionServices.cs | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) 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 + ")")); });