From 037168664352ee3cffae27fe1c3b16722d3aeac4 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Thu, 1 Sep 2022 17:18:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=96=86=E5=BD=B1=E8=A7=86=E5=AD=A6?= =?UTF-8?q?=E9=99=A2=E6=8B=9B=E7=94=9F=E7=BB=9F=E8=AE=A1=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuEnroll/EnrollIndexTJ.js | 28 +++++++++---------- .../StuEnroll/StuEnrollService.cs | 3 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.js index 521dfaa87..9299fb83a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.js @@ -240,52 +240,52 @@ var bootstrap = function ($, learun) { param.SqlParameter = " and t.IsAdmission=1"; //中考总分 if (!!$('#MidTermExam1').val()) { - param.SqlParameter += " and t.MidTermExam>=" + $('#MidTermExam1').val(); + param.SqlParameter += " and isnull(t.MidTermExam,0)>=" + $('#MidTermExam1').val(); } if (!!$('#MidTermExam2').val()) { - param.SqlParameter += " and t.MidTermExam<=" + $('#MidTermExam2').val(); + param.SqlParameter += " and isnull(t.MidTermExam,0)<=" + $('#MidTermExam2').val(); } //语文 if (!!$('#chinese1').val()) { - param.SqlParameter += " and s.chinese>=" + $('#chinese1').val(); + param.SqlParameter += " and isnull(s.chinese,0)>=" + $('#chinese1').val(); } if (!!$('#chinese2').val()) { - param.SqlParameter += " and s.chinese<=" + $('#chinese2').val(); + param.SqlParameter += " and isnull(s.chinese,0)<=" + $('#chinese2').val(); } //数学 if (!!$('#math1').val()) { - param.SqlParameter += " and s.math>=" + $('#math1').val(); + param.SqlParameter += " and isnull(s.math,0)>=" + $('#math1').val(); } if (!!$('#math2').val()) { - param.SqlParameter += " and s.math<=" + $('#math2').val(); + param.SqlParameter += " and isnull(s.math,0)<=" + $('#math2').val(); } //英语 if (!!$('#english1').val()) { - param.SqlParameter += " and s.english>=" + $('#english1').val(); + param.SqlParameter += " and isnull(s.english,0)>=" + $('#english1').val(); } if (!!$('#english2').val()) { - param.SqlParameter += " and s.english<=" + $('#english2').val(); + param.SqlParameter += " and isnull(s.english,0)<=" + $('#english2').val(); } //物理与化学 if (!!$('#physicsAndChemistry1').val()) { - param.SqlParameter += " and s.physicsAndChemistry>=" + $('#physicsAndChemistry1').val(); + param.SqlParameter += " and isnull(s.physicsAndChemistry,0)>=" + $('#physicsAndChemistry1').val(); } if (!!$('#physicsAndChemistry2').val()) { - param.SqlParameter += " and s.physicsAndChemistry<=" + $('#physicsAndChemistry2').val(); + param.SqlParameter += " and isnull(s.physicsAndChemistry,0)<=" + $('#physicsAndChemistry2').val(); } //政治与历史 if (!!$('#politicsAndHistory1').val()) { - param.SqlParameter += " and s.politicsAndHistory>=" + $('#politicsAndHistory1').val(); + param.SqlParameter += " and isnull(s.politicsAndHistory,0)>=" + $('#politicsAndHistory1').val(); } if (!!$('#politicsAndHistory2').val()) { - param.SqlParameter += " and s.politicsAndHistory<=" + $('#politicsAndHistory2').val(); + param.SqlParameter += " and isnull(s.politicsAndHistory,0)<=" + $('#politicsAndHistory2').val(); } //体育 if (!!$('#physicalEducation1').val()) { - param.SqlParameter += " and s.physicalEducation>=" + $('#physicalEducation1').val(); + param.SqlParameter += " and isnull(s.physicalEducation,0)>=" + $('#physicalEducation1').val(); } if (!!$('#physicalEducation2').val()) { - param.SqlParameter += " and s.physicalEducation<=" + $('#physicalEducation2').val(); + param.SqlParameter += " and isnull(s.physicalEducation,0)<=" + $('#physicalEducation2').val(); } $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs index 87faba0fc..4de684654 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs @@ -348,7 +348,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" s.physicsAndChemistry,s.english,s.chinese, s.politicsAndHistory,s.physicalEducation,s.math, + strSql.Append(@" isnull(s.physicsAndChemistry,0) physicsAndChemistry,isnull(s.english,0) english,isnull(s.chinese,0) chinese, +isnull(s.politicsAndHistory,0) politicsAndHistory,isnull(s.physicalEducation,0) physicalEducation,isnull(s.math,0) math, t.StuName,t.Gender,t.Nationals,t.IDCard,t.HomeAddress,t.StuMobile, t.MidTermExam,t.FromSchool,t.Specialty,t.City,t.County,t.MajorNo,t.EmpNo "); strSql.Append(" FROM StuEnroll t ");