Преглед изворни кода

【增加】教务-学生成绩-全院学生成绩查看;

临城职教中职
dyy пре 2 година
committed by ndbs
родитељ
комит
07a4468b99
4 измењених фајлова са 147 додато и 1 уклоњено
  1. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs
  2. +36
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.cshtml
  3. +83
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js
  4. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs

+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs Прегледај датотеку

@@ -183,6 +183,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}
/// <summary>
/// 全院学生成绩查看页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult AllStuScoreQueryIndex()
{
return View();
}
#endregion

#region 获取数据
@@ -715,6 +724,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success(result);
}

/// <summary>
/// 全院学生成绩查看
/// </summary>
/// <param name="queryJson"></param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetScoreListByStuNo2(string queryJson)
{
var data = stuScoreIBLL.GetScoreListByStuNo(queryJson);
if (data.Any())
{
data = data.OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.LessonNo);
}
return Success(data);
}

public ActionResult GetScoreCharts(string AcademicYearNo, string Semester, string ClassNo, string LessonNo)
{
var data = stuScoreIBLL.GetScoreCharts(AcademicYearNo, Semester, ClassNo, LessonNo);


+ 36
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.cshtml Прегледај датотеку

@@ -0,0 +1,36 @@
@{ ViewBag.Title = "全院学生成绩查看"; Layout = "~/Views/Shared/_Index.cshtml"; }
<style>
.lr-select {
width: 150px;
}
</style>
<div class="lr-layout">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="AcademicYearNo" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<div id="Semester" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<input id="StuNo" type="text" class="form-control" placeholder="请输入学号" />
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js")
<script src="~/Content/static/js/LodopFuncs.js"></script>

+ 83
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js Прегледај датотеку

@@ -0,0 +1,83 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-06-14 11:02
* 描 述:全院学生成绩查看
*/
var selectedRow;
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.bind();
page.bindSelect();
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
var p = {};
p.AcademicYearNo = $('#AcademicYearNo').lrselectGet();
p.Semester = $('#Semester').lrselectGet();
p.StuNo = $.trim($('#StuNo').val());
if (p.StuNo == null || p.StuNo == "") {
learun.alert.warning("请输入学号!");
return;
}

page.initGird();
page.search(p);
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
},
bindSelect: function () {
//学年
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学期",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
value: 'value',
text: 'text'
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetScoreListByStuNo2',
headData: [
{ label: '学号', name: 'StuNo', width: 100, align: "left" },
{ label: '姓名', name: 'StuName', width: 100, align: "left" },
{ label: '学年', name: 'AcademicYearNo', width: 100, align: "left" },
{ label: '学期', name: 'Semester', width: 100, align: "left" },
{ label: '课程编号', name: 'LessonNo', width: 100, align: "left" },
{ label: '课程名称', name: 'LessonName', width: 200, align: "left" },
{ label: '总分', name: 'ScoreFormat', width: 100, align: "left" },
],
mainId: 'StuNo',
isPage: false,
sidx: '',
sord: '',
});

//page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs Прегледај датотеку

@@ -1839,7 +1839,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad
var strSql = new StringBuilder();
strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName ");
strSql.Append(" ,case when bb.LessonSortNo='2' then bb.Score else (case when bb.Score >=60 then bb.Score else (case when sp.Score>= 60 then sp.Score else (case when spt.Score>=60 then spt.Score else bb.Score end) end) end) end as Score ");
strSql.Append(" ,case when bb.LessonSortNo='2' then convert(nvarchar(50),bb.Score) else (case when bb.Score >=60 then convert(nvarchar(50),bb.Score) else (case when sp.Score>= 60 then convert(nvarchar(50),sp.Score)+'(补)' else (case when spt.Score>=60 then convert(nvarchar(50),spt.Score)+'(重)' else convert(nvarchar(50),bb.Score) end) end) end) end as ScoreFormat ");
strSql.Append(" ,case when bb.LessonSortNo='2' then convert(nvarchar(50),bb.Score)+'(选修)' else (case when bb.Score >=60 then convert(nvarchar(50),bb.Score) else (case when sp.Score>= 60 then convert(nvarchar(50),sp.Score)+'(补)' else (case when spt.Score>=60 then convert(nvarchar(50),spt.Score)+'(重)' else convert(nvarchar(50),bb.Score) end) end) end) end as ScoreFormat ");
strSql.Append(" from ( ");
strSql.Append($"select s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,Max(s.Score) as Score from {tableName} s left join StuInfoBasic sb on s.StuNo=sb.StuNo ");
strSql.Append(" where 1=1 and s.CheckMark='1' ");


Loading…
Откажи
Сачувај