@@ -5,6 +5,7 @@ using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -19,6 +20,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
private Exam_ArrangeExamTermNewIBLL exam_ArrangeExamTermNewIBLL = new Exam_ArrangeExamTermNewBLL(); | |||
private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL(); | |||
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); | |||
private RoleIBLL roleIbll = new RoleBLL(); | |||
#region 视图功能 | |||
@@ -47,11 +50,29 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult IndexForClass() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult IndexItem() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -71,6 +92,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult IndexClassRoom() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
#endregion | |||
@@ -95,7 +125,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult GetClassTree() | |||
{ | |||
return Success(exam_ArrangeExamTermNewIBLL.GetClassTree()); | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
return Success(exam_ArrangeExamTermNewIBLL.GetClassTree(empinfo.DeptNo)); | |||
} | |||
else | |||
return Success(exam_ArrangeExamTermNewIBLL.GetClassTree("")); | |||
} | |||
else | |||
return Success(exam_ArrangeExamTermNewIBLL.GetClassTree("")); | |||
} | |||
/// <summary> | |||
@@ -44,6 +44,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult StuScoreQueryIndexRow() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult Monitor() | |||
{ | |||
@@ -14,7 +14,6 @@ var bootstrap = function ($, learun) { | |||
var ClassNo = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
@@ -69,6 +68,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
page.initGird(); | |||
} | |||
}.bind(this), "json"); | |||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); | |||
$('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); | |||
@@ -105,6 +111,8 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
param.StartTime = datebegin; | |||
param.EndTime = dateend; | |||
var loginInfo = learun.clientdata.get(['userinfo']); | |||
@@ -13,7 +13,6 @@ var bootstrap = function ($, learun) { | |||
var dateend = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
@@ -68,6 +67,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
page.initGird(); | |||
} | |||
}.bind(this), "json"); | |||
//课程 | |||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder:'请选择课程' }); | |||
}, | |||
@@ -98,6 +104,8 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
param.StartTime = datebegin; | |||
param.EndTime = dateend; | |||
var loginInfo = learun.clientdata.get(['userinfo']); | |||
@@ -48,4 +48,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js") |
@@ -11,7 +11,6 @@ var bootstrap = function ($, learun) { | |||
var logend = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
@@ -40,7 +39,6 @@ var bootstrap = function ($, learun) { | |||
selectfn: function (begin, end) { | |||
logbegin = begin; | |||
logend = end; | |||
page.search(); | |||
} | |||
}); | |||
@@ -67,6 +65,14 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
page.initGird(); | |||
} | |||
}.bind(this), "json"); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -138,8 +144,14 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
param.StartTime = logbegin; | |||
param.EndTime = logend; | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -48,4 +48,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js") |
@@ -14,7 +14,6 @@ var bootstrap = function ($, learun) { | |||
var ClassNo = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
@@ -78,6 +77,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
page.initGird(); | |||
} | |||
}.bind(this), "json"); | |||
//课程 | |||
//$('#LessonNo').lrselect({ | |||
// placeholder: "请选择课程", | |||
@@ -119,9 +125,14 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
param.StartTime = datebegin; | |||
param.EndTime = dateend; | |||
//console.log(param); | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -48,4 +48,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js") |
@@ -14,7 +14,6 @@ var bootstrap = function ($, learun) { | |||
var ClassNo = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
@@ -78,6 +77,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$.get('/Home/GetYearAndSemesteResult', function (ref) { | |||
if (ref.code == "200") { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
page.initGird(); | |||
} | |||
}.bind(this), "json"); | |||
//课程 | |||
//$('#LessonNo').lrselect({ | |||
// placeholder: "请选择课程", | |||
@@ -121,9 +127,14 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
param.StartTime = datebegin; | |||
param.EndTime = dateend; | |||
console.log(param); | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -79,7 +79,8 @@ var bootstrap = function ($, learun) { | |||
{ label: '班级', name: 'ClassName', width: 100, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 50, align: "left" }, | |||
{ label: '科目类型', name: 'LessonSortName', width: 60, align: "left" }, | |||
{ label: '课程分类', name: 'LessonSortName', width: 60, align: "left" }, | |||
{ label: '课程类型', name: 'LessonTypeName', width: 100, align: "left" }, | |||
{ label: '科目', name: 'LessonName', width: 300, align: "left" }, | |||
{ label: '学分', name: 'StudyScore', width: 50, align: "left" }, | |||
{ label: '成绩', name: 'Score', width: 100, align: "left" }, | |||
@@ -37,22 +37,23 @@ var bootstrap = function ($, learun) { | |||
learun.alert.warning("请选择班级!"); | |||
return; | |||
} | |||
$.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoData', p, | |||
function (data) { | |||
var temparr = []; | |||
for (var i = 0; i < data.length; i++) { | |||
var item = {}; | |||
item.label = data[i].text; | |||
item.name = data[i].value; | |||
item.width = 150; | |||
item.align = "left"; | |||
temparr.push(item); | |||
} | |||
LessonTemp = temparr; | |||
page.initGird(); | |||
page.search(p); | |||
}); | |||
//$.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoData', { }, | |||
// function (data) { | |||
// var temparr = []; | |||
// for (var i = 0; i < data.length; i++) { | |||
// var item = {}; | |||
// item.label = data[i].text; | |||
// item.name = data[i].value; | |||
// item.width = 150; | |||
// item.align = "left"; | |||
// temparr.push(item); | |||
// } | |||
// LessonTemp = temparr; | |||
// page.initGird(); | |||
// page.search(p); | |||
// }); | |||
page.initGird(); | |||
page.search(p); | |||
}); | |||
// 刷新 | |||
@@ -0,0 +1,35 @@ | |||
@{ 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"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
@*<div class=" btn-group btn-group-sm"> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-check-circle"></i> 打印</a> | |||
</div>*@ | |||
<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/StuScoreQueryIndexRow.js") |
@@ -0,0 +1,114 @@ | |||
/* * 版 本 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) { | |||
var stuinfo = learun.clientdata.get(['userinfo']).account; | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 查询 | |||
$('#btn_Search').on('click', function () { | |||
var p = {}; | |||
p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
p.Semester = $('#Semester').lrselectGet(); | |||
p.StuNo = stuinfo; | |||
page.search(p); | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
//打印 | |||
$('#lr_print').on('click', function () { | |||
var AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
var Semester = $('#Semester').lrselectGet(); | |||
var StuNo = $.trim($('#StuNo').val()); | |||
if (StuNo == null || StuNo == "") { | |||
learun.alert.warning("请输入学号!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'AllStuScoreQueryPrint', | |||
title: '学生成绩单', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/AllStuScoreQueryPrint?StuNo=' + StuNo + '&AcademicYearNo=' + AcademicYearNo + '&Semester=' + Semester, | |||
width: 1200, | |||
height: 800, | |||
btn: null | |||
}); | |||
}); | |||
//学年 | |||
$('#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' | |||
}); | |||
$.get({ | |||
url: '/Home/GetYearAndSemesteResult', | |||
dataType:'json', | |||
success: function (ref) { | |||
if (ref.code == 200) { | |||
$('#AcademicYearNo').lrselectSet(ref.data.Item1); | |||
$('#Semester').lrselectSet(ref.data.Item3); | |||
setTimeout(page.initGird,1000); | |||
} | |||
} | |||
}); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetScoreListByStuInfo', | |||
headData: [ | |||
{ label: '学号', name: 'StuNo', width: 100, align: "left" }, | |||
{ label: '姓名', name: 'StuName', width: 200, align: "left" }, | |||
{ label: '专业', name: 'MajorName', width: 100, align: "left" }, | |||
{ label: '班级', name: 'ClassName', width: 100, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 50, align: "left" }, | |||
{ label: '课程分类', name: 'LessonSortName', width: 60, align: "left" }, | |||
{ label: '课程类型', name: 'LessonTypeName', width: 100, align: "left" }, | |||
{ label: '科目', name: 'LessonName', width: 300, align: "left" }, | |||
{ label: '学分', name: 'StudyScore', width: 50, align: "left" }, | |||
{ label: '成绩', name: 'Score', width: 100, align: "left" }, | |||
{ label: '第一次补考成绩', name: 'ScoreOfNotPass', width: 100, align: "left" }, | |||
{ label: '第二次补考成绩', name: 'ScoreOfNotPassTwo', width: 100, align: "left" }, | |||
{ label: '专业排名', name: 'RankInMajor', width: 100, align: "left" }, | |||
{ label: '班级排名', name: 'RankInClass', width: 100, align: "left" }, | |||
], | |||
mainId: 'StuNo', | |||
isPage: false, | |||
sidx: '', | |||
sord: '', | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
param.Semester = $('#Semester').lrselectGet(); | |||
param.StuNo = stuinfo; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -89,7 +89,9 @@ var bootstrap = function ($, learun) { | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LR_SystemModule/Interface/GetEntity?keyValue=' + keyValue, function (data) { | |||
$('#form1').lrSetFormData(data); | |||
// $('#form1').lrSetFormData(data); | |||
$('#F_Name').val(data.F_Name); | |||
$('#F_Address').val(data.F_Address); | |||
var formatdata = JSON.parse(data.F_FieldsJson); | |||
$('#gridtable').jfGridSet('refreshdata', formatdata); | |||
}); | |||
@@ -1035,6 +1035,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\InputScoreIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\InputScoreIndexImport.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\Monitor.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\StuScoreQueryIndexRow.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\AuditForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\AuditIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\FinishIndex.js" /> | |||
@@ -8223,6 +8224,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\Monitor.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\InputScoreIndexImport.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\InputScoreIndexInTeacher.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\StuScoreQueryIndexRow.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -22,12 +22,71 @@ namespace Learun.Application.WebApi.Modules | |||
Get["/StuList"] = GetStuInfo; | |||
Get["/StuLessonInfo"] = GetStuLessonInfo; | |||
Get["/timeTableData"] = GetTimeTableData; | |||
Get["/weeklist"] = GetWeeksData; | |||
Get["/currentweek"] = GetCurrentWeek; | |||
} | |||
private ArrangeLessonTermIBLL arrangeLessonTermIBLL = new ArrangeLessonTermBLL(); | |||
private ArrangeLessonTermOfElectiveIBLL arrangeLessonTermOfElectiveIBLL = new ArrangeLessonTermOfElectiveBLL(); | |||
private StuAttendanceLeaveIBLL stuAttendanceLeaveIBLL = new StuAttendanceLeaveBLL(); | |||
private StuAttendanceIBLL stuAttendanceIBLL = new StuAttendanceBLL(); | |||
public class WeekDate | |||
{ | |||
public int week { get; set; } | |||
public string startdate { get; set; } | |||
public string enddate { get; set; } | |||
public string textweek { get; set; } | |||
} | |||
public Response GetWeeksData(dynamic _) | |||
{ | |||
var weekdatelist = new List<WeekDate>(); | |||
var yearsemester = Common.GetSemesterAndYear(); | |||
var arrangelessonlist = arrangeLessonTermIBLL.GetListForTimeTable("{\"AcademicYearNo\":\"" + yearsemester.AcademicYearShort + "\",\"Semester\":\"" + yearsemester.Semester + "\"}").OrderBy(m => m.LessonDate); | |||
if (arrangelessonlist.Any()) | |||
{ | |||
var firstday = arrangelessonlist.First(); | |||
var lastday = arrangelessonlist.Last(); | |||
var monday = firstday.LessonDate.Value.AddDays(-Convert.ToInt32(firstday.LessonDate.Value.DayOfWeek) + 1); | |||
var sunday = lastday.LessonDate.Value.AddDays(7 - Convert.ToInt32(lastday.LessonDate.Value.DayOfWeek)); | |||
//总周数 | |||
var weekCount = Math.Ceiling(Convert.ToDouble((sunday - monday).Days + 1) / 7); | |||
for (var i = 0; i < weekCount; i++) | |||
{ | |||
var wentity = new WeekDate(); | |||
wentity.week = i + 1; | |||
wentity.startdate = monday.AddDays(i * 7).ToString("yyyy-MM-dd"); | |||
wentity.enddate = monday.AddDays(i * 7 + 6).ToString("yyyy-MM-dd"); | |||
wentity.textweek = "第" + wentity.week + "周 (" + wentity.startdate + "~" + wentity.enddate + ")"; | |||
weekdatelist.Add(wentity); | |||
} | |||
return Success(weekdatelist); | |||
} | |||
else | |||
return Success(new { }); | |||
} | |||
/// <summary> | |||
/// 获取当前日期是第几周 | |||
/// </summary> | |||
/// <returns></returns> | |||
public Response GetCurrentWeek(dynamic _) | |||
{ | |||
var yearsemester = Common.GetSemesterAndYear(); | |||
var arrangelessonlist = arrangeLessonTermIBLL.GetListForTimeTable("{\"AcademicYearNo\":\"" + yearsemester.AcademicYearShort + "\",\"Semester\":\"" + yearsemester.Semester + "\"}").OrderBy(m => m.LessonDate); | |||
if (arrangelessonlist.Any()) | |||
{ | |||
var firstday = arrangelessonlist.First(); | |||
var lastday = arrangelessonlist.Last(); | |||
var monday = firstday.LessonDate.Value.AddDays(-(Convert.ToInt32(firstday.LessonDate.Value.DayOfWeek) == 0 ? 7 : Convert.ToInt32(firstday.LessonDate.Value.DayOfWeek)) + 1); | |||
var sunday = lastday.LessonDate.Value.AddDays(7 - (Convert.ToInt32(lastday.LessonDate.Value.DayOfWeek) == 0 ? 7 : Convert.ToInt32(lastday.LessonDate.Value.DayOfWeek))); | |||
var currentweek = Util.Time.GetWeekOfDay(monday, sunday); | |||
return Success(new {currentweek}); | |||
} | |||
return Success(new {currentweek=1}); | |||
} | |||
/// <summary> | |||
/// 课程表【教师功能、学生功能】 | |||
/// </summary> | |||
@@ -18,11 +18,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
#region 获取数据 | |||
public List<TreeModel> GetClassTree() | |||
public List<TreeModel> GetClassTree(string DeptNo) | |||
{ | |||
try | |||
{ | |||
var list = exam_ArrangeExamTermNewService.GetClassTree(); | |||
var list = exam_ArrangeExamTermNewService.GetClassTree(DeptNo); | |||
List<TreeModel> treeList = new List<TreeModel>(); | |||
foreach (var item in list) | |||
{ | |||
@@ -15,7 +15,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
#region 获取数据 | |||
List<TreeModel> GetClassTree(); | |||
List<TreeModel> GetClassTree(string DeptNo); | |||
List<TreeModel> GetClassRoomTree(string AcademicYearNo, string Semester); | |||
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson); | |||
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetItemPageList(Pagination pagination, string queryJson); | |||
@@ -19,11 +19,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
public class Exam_ArrangeExamTermNewService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
public IEnumerable<ClassInfoEntity> GetClassTree() | |||
public IEnumerable<ClassInfoEntity> GetClassTree(string DeptNo) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>("select ClassNo,ClassName from Exam_ArrangeExamTermItemNew where ClassNo is not null group by ClassNo,ClassName order by ClassNo"); | |||
return this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>($@"select ClassNo,ClassName from Exam_ArrangeExamTermItemNew t | |||
left join Exam_ExamPlan e on t.EPId = e.EPId where ClassNo is not null and e.importdeptno='{DeptNo}' group by ClassNo,ClassName order by ClassNo"); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -109,6 +110,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); | |||
} | |||
if (!queryParam["ImportDeptNo"].IsEmpty()) | |||
{ | |||
if (queryParam["ImportDeptNo"].ToString() == "0") | |||
{ | |||
strSql.Append(" AND e.ImportDeptNo='' "); | |||
} | |||
else | |||
{ | |||
strSql.Append(" AND e.ImportDeptNo ='"+ queryParam["ImportDeptNo"].ToString() + "'"); | |||
} | |||
} | |||
strSql.Append(@" group by AcademicYearNo, Semester, ExamDate, ExamTime,LessonNo, LessonName,ClassRoomNo,ClassRoomName,EmpNo, EmpName, ClassNo,ClassName,t.EPId | |||
having count(StuNo)>0"); | |||
@@ -180,6 +192,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
strSql.Append(" AND ( t.ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND t.ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); | |||
} | |||
if (!queryParam["ImportDeptNo"].IsEmpty()) | |||
{ | |||
if (queryParam["ImportDeptNo"].ToString() == "0") | |||
{ | |||
strSql.Append(" AND e.ImportDeptNo='' "); | |||
} | |||
else | |||
{ | |||
strSql.Append(" AND e.ImportDeptNo ='"+ queryParam["ImportDeptNo"].ToString() + "' "); | |||
} | |||
} | |||
strSql.Append(@"group by t.lessonName,t.lessonno,t.Examdate,t.examtime,t.EmpName,t.EmpNo,t.ClassroomNo,t.ClassroomName ,l.TeachMajorNo,e.AcademicYearNo ,e.Semester "); | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>(strSql.ToString(), pagination); | |||
} | |||
@@ -256,7 +280,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); | |||
} | |||
if (!queryParam["ImportDeptNo"].IsEmpty()) | |||
{ | |||
if (queryParam["ImportDeptNo"].ToString() == "0") | |||
{ | |||
strSql.Append(" AND e.ImportDeptNo='' "); | |||
} | |||
else | |||
{ | |||
strSql.Append(" AND e.ImportDeptNo ='" + queryParam["ImportDeptNo"].ToString() + "' "); | |||
} | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>(strSql.ToString(), null, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -329,6 +364,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); | |||
} | |||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||
{ | |||
strSql.Append(" and e.AcademicYearNo='" + queryParam["AcademicYearNo"].ToString() + "' "); | |||
} | |||
if (!queryParam["Semester"].IsEmpty()) | |||
{ | |||
strSql.Append(" and e.Semester='" + queryParam["Semester"].ToString() + "' "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermNewEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -546,7 +546,7 @@ left join CdLessonType ltype on info.LessonTypeId=ltype.LTId | |||
where t.EPId='{ExamPlanLesson.EPId}' and info.CheckMark=1 "); | |||
} | |||
var EPLesson = EPLessonList.Where(x => x.EPLId == ExamPlanLesson.EPLId).FirstOrDefault(); | |||
if (EPLessonList.ToList().Exists(x => x.EPLId != entity.EPLId && x.TeachMajorNo == EPLesson.TeachMajorNo && x.ExamLength == EPLesson.ExamLength && x.ExamDate != null && x.ExamDate == entity.ExamDate && x.ExamTime == entity.ExamTime)) | |||
if (EPLessonList.ToList().Exists(x => x.EPLId != entity.EPLId && x.TeachMajorNo == EPLesson.TeachMajorNo&&x.Grade== ExamPlanLesson.Grade && x.ExamLength == EPLesson.ExamLength && x.ExamDate != null && x.ExamDate == entity.ExamDate && x.ExamTime == entity.ExamTime)) | |||
{ | |||
return (false, "同专业同时段只能安排一门课程!"); | |||
} | |||
@@ -420,6 +420,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <returns></returns> | |||
[NotMapped] | |||
public string LessonSortName { get; set; } | |||
[NotMapped] | |||
public string LessonTypeName { get; set; } | |||
/// <summary> | |||
/// 专业名称 | |||
/// </summary> | |||
@@ -2215,7 +2215,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||
tableName = queryParam["TableName"].ToString(); | |||
} | |||
var strSql = new StringBuilder(); | |||
strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName,bb.MajorNo,bb.ClassNo,li.StudyScore,ls.LessonSortName,bb.Score,(case when sp.Score>=60 then 60 else sp.score end) as ScoreOfNotPass,(case when spt.Score>=60 then 60 else spt.Score end) as ScoreOfNotPassTwo,cm.MajorName,ci.ClassName "); | |||
strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName,bb.MajorNo,bb.ClassNo,li.StudyScore,ls.LessonSortName,lt.LessonTypeName,bb.Score,(case when sp.Score>=60 then 60 else sp.score end) as ScoreOfNotPass,(case when spt.Score>=60 then 60 else spt.Score end) as ScoreOfNotPassTwo,cm.MajorName,ci.ClassName "); | |||
strSql.Append(" from ( "); | |||
strSql.Append($"select s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo,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' "); | |||
@@ -2246,6 +2246,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||
strSql.Append(" left join LessonInfo li on bb.LessonNo= li.LessonNo and li.CheckMark='1' "); | |||
strSql.Append(" left join CdMajor cm on bb.MajorNo= cm.MajorNo and cm.CheckMark='1' "); | |||
strSql.Append(" left join ClassInfo ci on bb.ClassNo= ci.ClassNo and ci.CheckMark='1' "); | |||
strSql.Append(" left join CdLessonType lt on li.LessonTypeId=lt.ltid and lt.LTEnabled='1' "); | |||
var result = this.BaseRepository("CollegeMIS").FindList<StuScoreEntity>(strSql.ToString(), dp); | |||
@@ -16,7 +16,7 @@ export default { | |||
// "http://localhost:8088/" | |||
// ], | |||
"apiHost": [ | |||
"http://localhost:31173/" | |||
"http://10.30.0.10:9002/" | |||
// "/api/", | |||
], | |||
"webHost":"http://10.30.0.10:8000/", | |||
@@ -102,10 +102,12 @@ | |||
import set from 'lodash/set' | |||
import pickBy from 'lodash/pickBy' | |||
import mapValues from 'lodash/mapValues' | |||
import common from '@/common/js/common.js' | |||
export default { | |||
data() { | |||
return { | |||
semester:'', | |||
// 数据项的数据类型、结构 | |||
scheme: { | |||
ClassroomName: { | |||
@@ -182,6 +184,7 @@ | |||
}, | |||
async onLoad() { | |||
this.semester = common.judgeDate(); | |||
await this.init() | |||
}, | |||
onUnload() { | |||
@@ -217,7 +220,11 @@ | |||
// 拉取列表 | |||
async fetchList(isConcat = true) { | |||
// if (this.page > this.total) { return } | |||
let AcademicYearNo = '',Semester = ''; | |||
if(this.semester){ | |||
AcademicYearNo = this.semester.substring(2,4) + '-' +this.semester.substring(7,9) | |||
Semester = this.semester.substring(12,13) == '二'?'2':'1' | |||
} | |||
const result = await this.HTTP_GET( | |||
'learun/ask/teststulist', { | |||
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序) | |||
@@ -228,7 +235,7 @@ | |||
sidx: 'ExamDate desc,ExamTime asc,LessonNo asc,ClassroomNo asc', | |||
sord: 'DESC' | |||
}, | |||
queryJson: JSON.stringify(this.searchData) | |||
queryJson: JSON.stringify({...this.searchData,AcademicYearNo,Semester}) | |||
}, | |||
'加载数据时出错' | |||
) | |||
@@ -91,10 +91,12 @@ | |||
import set from 'lodash/set' | |||
import pickBy from 'lodash/pickBy' | |||
import mapValues from 'lodash/mapValues' | |||
import common from '@/common/js/common.js' | |||
export default { | |||
data() { | |||
return { | |||
semester:'', | |||
// 数据项的数据类型、结构 | |||
scheme: { | |||
ClassroomName: { | |||
@@ -164,6 +166,7 @@ | |||
}, | |||
async onLoad() { | |||
this.semester = common.judgeDate(); | |||
await this.init() | |||
}, | |||
onUnload() { | |||
@@ -193,7 +196,12 @@ | |||
// 拉取列表 | |||
async fetchList(isConcat = true) { | |||
// if (this.page > this.total) { return } | |||
let AcademicYearNo = '',Semester = ''; | |||
if(this.semester){ | |||
console.log(this.semester) | |||
AcademicYearNo = this.semester.substring(2,4) + '-' +this.semester.substring(7,9) | |||
Semester = this.semester.substring(12,13) == '二'?'2':'1' | |||
} | |||
const result = await this.HTTP_GET( | |||
'learun/ask/testlist', { | |||
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序) | |||
@@ -204,7 +212,7 @@ | |||
sidx: 'ExamDate desc,ExamTime asc,LessonNo asc,ClassroomNo asc', | |||
sord: 'DESC' | |||
}, | |||
queryJson: JSON.stringify(this.searchData) | |||
queryJson: JSON.stringify({...this.searchData,AcademicYearNo,Semester}) | |||
}, | |||
'加载数据时出错' | |||
) | |||
@@ -6,12 +6,21 @@ | |||
<text>{{ semester }}</text> | |||
</view> | |||
<!--<span class="tSec1Line"></span>--> | |||
<view class="tSec1Box" id="weekTime"> | |||
<!-- <view class="tSec1Box" id="weekTime"> | |||
<text class="text-xxl cuIcon cuIcon-back" @click="timeTap(1)"></text> | |||
<text>{{todayWeek.Monday}}</text> | |||
- | |||
<text>{{todayWeek.Sunday}}</text> | |||
<text class="text-xxl cuIcon cuIcon-right" @click="timeTap(2)"></text> | |||
</view> --> | |||
<view class="timeSelectBox"> | |||
<!-- 单选和选择 radio select --> | |||
<l-select | |||
@input="timeChange" | |||
:value="timeValue" | |||
:range="timeOptions" | |||
title="" | |||
/> | |||
</view> | |||
</view> | |||
<view class="timeTable_sec2"> | |||
@@ -56,6 +65,9 @@ import common from '@/common/js/common.js' | |||
export default { | |||
data() { | |||
return { | |||
timeValue:'', | |||
timeOptions:[], | |||
semester: '', | |||
num: 0, | |||
user: null, | |||
@@ -99,10 +111,8 @@ export default { | |||
}, | |||
methods: { | |||
async init(obj) { | |||
//console.log(obj) | |||
let _this = this; | |||
_this.todayWeek = common.weekday(obj); | |||
//console.log(_this.todayWeek) | |||
_this.semester = common.judgeDate(obj); | |||
_this.weekDayTime = 7 * common.oneDayTime(); | |||
_this.user = _this.GET_GLOBAL('loginUser'); | |||
@@ -126,14 +136,31 @@ export default { | |||
_this.semester = common.judgeDate(_this.todayWeek.SundayTime); | |||
_this.loadData(_this.todayWeek.Monday, _this.todayWeek.Sunday); | |||
}, | |||
loadData(start, end) { | |||
let param = { StartDate: start, EndDate: end }; | |||
// let param = { StartDate: '2018-11-05', EndDate: '2018-11-11' }; | |||
async loadData(start, end) { | |||
// let param = { StartDate: start, EndDate: end }; | |||
let _this = this; | |||
_this.LOADING('加载数据中…'); | |||
if(!this.timeValue){ | |||
// 加载下拉框 | |||
let timeOptionRes = await this.HTTP_GET('learun/adms/timetable/weeklist', {}, '加载数据时出错') | |||
if(!timeOptionRes){ | |||
this.HIDE_LOADING(); | |||
return | |||
} | |||
this.timeOptions = timeOptionRes.map(e=>{return {value:e.startdate+'~'+e.enddate,text:e.textweek}}) | |||
// 加载当前周次 | |||
let currentWeekres = await this.HTTP_GET('learun/adms/timetable/currentweek', {}, '加载数据时出错') | |||
if(!currentWeekres){ | |||
this.HIDE_LOADING(); | |||
return | |||
} | |||
let currentweek = currentWeekres.currentweek | |||
let obj = timeOptionRes.find(e=>e.week == currentweek) | |||
this.timeValue = obj.startdate + '~' + obj.enddate | |||
} | |||
let param = { StartDate: this.timeValue.split('~')[0], EndDate: this.timeValue.split('~')[1] }; | |||
_this.HTTP_GET('learun/adms/timetable/list', param, '加载数据时出错').then(res => { | |||
this.HIDE_LOADING(); | |||
// console.log(res); | |||
_this.ProcessingData(res); | |||
}); | |||
@@ -191,14 +218,10 @@ export default { | |||
}, | |||
classTap(data) { | |||
let _this = this; | |||
// console.log(_this.user) | |||
if (_this.user.Description == "教师") { | |||
//console.log("教师"); | |||
} else if (_this.user.Description == "学生") { | |||
let LeaveType = data.LeaveType; | |||
//console.log(LeaveType); | |||
let IsCheck = data.IsCheck; | |||
//console.log(IsCheck); | |||
if (LeaveType == "1") { | |||
let msg = "请假申请中"; | |||
if (IsCheck == "1") { | |||
@@ -216,6 +239,13 @@ export default { | |||
}, | |||
onfun(obj){ | |||
this.init(obj); | |||
}, | |||
getTimeOptions(){ | |||
return this.HTTP_GET('learun/adms/timetable/weeklist', {}, '加载数据时出错') | |||
}, | |||
timeChange(e){ | |||
this.timeValue = e | |||
this.loadData() | |||
} | |||
}, | |||
created() { | |||
@@ -382,4 +412,11 @@ export default { | |||
text-align: center; | |||
font-size: 14px; | |||
} | |||
.timeSelectBox .cu-form-group{ | |||
background-color: unset; | |||
border-bottom:none; | |||
width: calc(100% - 80px); | |||
margin: 0 auto; | |||
} | |||
</style> |