Browse Source

【修改】班级学籍管理:增加查询条件,超管可以查看全部班级和学生;

金隅分支
dyy 1 year ago
parent
commit
638829a30c
3 changed files with 65 additions and 3 deletions
  1. +26
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.cshtml
  2. +16
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.js
  3. +23
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs

+ 26
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.cshtml View File

@@ -16,6 +16,32 @@
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学号</div>
<input id="StuNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">姓名</div>
<input id="StuName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">性别</div>
<div id="GenderNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">民族</div>
<div id="NationalityNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">身份证号</div>
<input id="IdentityCardNo" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">


+ 16
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.js View File

@@ -1,6 +1,7 @@
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var Class;
var page = {
init: function () {
page.initGird();
@@ -11,9 +12,15 @@ var bootstrap = function ($, learun) {
$('#dataTree').lrtree({
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetTree',
nodeClick: function (item) {
Class = item.value;
page.search({ ClassNo: item.value });
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#GenderNo').lrDataItemSelect({ code: 'usersexbit' });
$('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
@@ -126,7 +133,7 @@ var bootstrap = function ($, learun) {
],
mainId: 'StuId',
isPage: true,
isMultiselect: true,
//isMultiselect: true,
//onSelectRow: function (rowdata) {
// if (rowdata.CheckMark == "1") {
// $("#check").hide();
@@ -142,10 +149,17 @@ var bootstrap = function ($, learun) {
//}

});
//page.search();
page.search();
},
search: function (param) {
if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") {//登录用户是system时,列表展示所有学生;其他用户登录时,必须选择左侧班级才能查看学生;
if (Class == "" || Class == undefined || Class == null) {
learun.alert.warning("请选择左侧班级!");
return false;
}
}
param = param || {};
param.ClassNo = Class;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 23
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs View File

@@ -88,6 +88,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("Remark", "%" + queryParam["Remark"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Remark Like @Remark ");
}

if (!queryParam["GenderNo"].IsEmpty())
{
dp.Add("GenderNo", "" + queryParam["GenderNo"] + "", DbType.Boolean);
strSql.Append(" AND t.GenderNo=@GenderNo ");
}
if (!queryParam["NationalityNo"].IsEmpty())
{
dp.Add("NationalityNo", "" + queryParam["NationalityNo"].ToString() + "", DbType.String);
strSql.Append(" AND t.NationalityNo=@NationalityNo ");
}
if (!queryParam["IdentityCardNo"].IsEmpty())
{
dp.Add("IdentityCardNo", "%" + queryParam["IdentityCardNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.IdentityCardNo Like @IdentityCardNo ");
}
return this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
@@ -330,7 +346,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
var ClassDiredctorNo = LoginUserInfo.Get().account;
return this.BaseRepository("CollegeMIS").FindTable($" SELECT * FROM dbo.ClassInfo where ClassDiredctorNo='{ClassDiredctorNo}' or ClassTutorNo='{ClassDiredctorNo}'");
string sql = " SELECT * FROM dbo.ClassInfo where CheckMark=1 ";
if (ClassDiredctorNo.ToUpper() != "SYSTEM")
{
sql += $" and ClassDiredctorNo='{ClassDiredctorNo}' or ClassTutorNo='{ClassDiredctorNo}'";
}
sql += $" order by ClassNo";
return this.BaseRepository("CollegeMIS").FindTable(sql);
}
catch (Exception ex)
{


Loading…
Cancel
Save