From b9ad304d0ed7d372e4b54b138f0fa451823b765c Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 23 May 2022 14:54:28 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E8=8D=A3?= =?UTF-8?q?=E8=AA=89=E7=A7=B0=E5=8F=B7=E7=AE=A1=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/DtHonorType/Form.js | 2 +- .../Views/DtHonoraryUser/Form.js | 2 +- .../Views/DtHonoraryUser/Index.js | 2 +- .../StudentWork/Views/SW_Ask_Student/Index.js | 2 +- .../DtHonoraryUser/DtHonoraryUserService.cs | 17 ++++++++++++++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtHonorType/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtHonorType/Form.js index 68b0e984f..4d3a70710 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtHonorType/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtHonorType/Form.js @@ -33,7 +33,7 @@ var bootstrap = function ($, learun) { if (!$('form').lrValidform()) { return false; } - //var postData = $('#form').lrGetFormData(keyValue); + var postData = $('#form').lrGetFormData(keyValue); //if (postData["ParentId"] == '' || postData["ParentId"] == ' ') { // postData["ParentId"] = $("#ParentId").lrselectGet(); //} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtHonoraryUser/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtHonoraryUser/Form.js index 1e3974c0d..2dc7e637a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtHonoraryUser/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtHonoraryUser/Form.js @@ -34,7 +34,7 @@ var bootstrap = function ($, learun) { if (ClassNo != null && ClassNo != "" && ClassNo != undefined) { $('#StuNo').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuList', - param: { strWhere: " 1=1 and classno in (" + ClassNo + ")" }, + param: { strWhere: " 1=1 and classno in ('" + ClassNo + "')" }, value: "stuid", text: "stuname", maxHeight: 200, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtHonoraryUser/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtHonoraryUser/Index.js index 66672e481..e0bf27702 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtHonoraryUser/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DtHonoraryUser/Index.js @@ -39,7 +39,7 @@ var bootstrap = function ($, learun) { if (ClassNo != null && ClassNo != "" && ClassNo != undefined) { $('#StuNo').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuList', - param: { strWhere: " 1=1 and classno in (" + ClassNo + ")" }, + param: { strWhere: " 1=1 and classno in ('" + ClassNo + "')" }, value: "stuid", text: "stuname", maxHeight: 200, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Index.js index 766fff5fa..48db62568 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Student/Index.js @@ -36,7 +36,7 @@ var bootstrap = function ($, learun) { if (ClassNo != null && ClassNo != "" && ClassNo != undefined) { $('#StuNo').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuList', - param: { strWhere: " 1=1 and classno in (" + ClassNo + ")" }, + param: { strWhere: " 1=1 and classno in ('" + ClassNo + "')" }, value: "stuid", text: "stuname", maxHeight: 200, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtHonoraryUser/DtHonoraryUserService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtHonoraryUser/DtHonoraryUserService.cs index bb2a965fb..aa5524a92 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtHonoraryUser/DtHonoraryUserService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DtHonoraryUser/DtHonoraryUserService.cs @@ -31,12 +31,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" * "); + strSql.Append(@" t.* "); strSql.Append(" FROM DtHonoraryUser t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.ClassNo = @ClassNo "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex)