@@ -3,6 +3,7 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -68,6 +69,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 初始化线上课程成绩 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult InitScoreForm() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -123,6 +133,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取选课情况里的课程信息 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetSelectLessonInfo(string academicYearNo, string semester) | |||
{ | |||
var Data = stuSelectLessonListOfElectiveOnlineIBLL.GetSelectLessonInfo(academicYearNo, semester).OrderBy(x => x.LessonNo); | |||
return Success(Data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -238,7 +261,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Fail("当前选课的课程人数已满!"); | |||
} | |||
//选课的课程报名人数加1 | |||
olpeEntity.StuNum = olpeEntity.StuNum.HasValue ? olpeEntity.StuNum.Value + 1 : 1 ; | |||
olpeEntity.StuNum = olpeEntity.StuNum.HasValue ? olpeEntity.StuNum.Value + 1 : 1; | |||
lessonInfoOfElectiveOnlineIBLL.SaveEntity(olpeEntity.Id, olpeEntity); | |||
//报名成功 | |||
sslleEntity.Status = 2; | |||
@@ -253,6 +276,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
stuSelectLessonListOfElectiveOnlineIBLL.SaveEntity(keyValue, sslleEntity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 初始化线上课程成绩 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoInitScore(StuSelectLessonListOfElectiveOnlineEntity entity) | |||
{ | |||
stuSelectLessonListOfElectiveOnlineIBLL.DoInitScore(entity); | |||
return Success("初始化成功!"); | |||
} | |||
#endregion | |||
} | |||
@@ -175,8 +175,7 @@ var bootstrap = function ($, learun) { | |||
$('#Semester').lrselectSet(Semester); | |||
var param = { "AcademicYearNo": data.AcademicYearShort, "Semester": data.Semester }; | |||
//todo:等待最后解除注释 | |||
//page.search(param); | |||
page.search(param); | |||
} | |||
}, | |||
error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
@@ -264,7 +263,7 @@ var bootstrap = function ($, learun) { | |||
isMultiselect: true, | |||
sidx: 'AcademicYearNo DESC, Semester DESC, LessonNo ASC,EmpNo ASC' | |||
}); | |||
page.search(); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
@@ -273,7 +272,8 @@ var bootstrap = function ($, learun) { | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
var param = { "AcademicYearNo": $('#AcademicYearNo').lrselectGet(), "Semester": $('#Semester').lrselectGet() }; | |||
page.search(param); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,15 @@ | |||
@{ | |||
ViewBag.Title = "初始化线上课程成绩"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/InitScoreForm.js") |
@@ -0,0 +1,53 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-02-27 11:05 | |||
* 描 述:按条件同步排课数据 | |||
*/ | |||
var acceptClick; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//学年 | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "请选择学期", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
}, | |||
initData: function () { | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
var postData = $('#form').lrGetFormData(); | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/DoInitScore', postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -2,7 +2,7 @@ | |||
ViewBag.Title = "选修课课程"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
@@ -16,36 +16,40 @@ | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester" class="form-control"></div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学号</div> | |||
<input id="StuNo" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">姓名</div> | |||
<input id="StuName" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程名称</div> | |||
<div id="LessonNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">建课教师</div> | |||
<input id="EmpName" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">校区</div> | |||
<div id="F_SchoolId"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div class="lr-form-item-title">院系</div> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">教师</div> | |||
<div id="EmpNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">选修课程</div> | |||
<div id="LessonNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">选课状态</div> | |||
<div id="ElectiveSelectStatus"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">报名状态</div> | |||
<div id="ElectiveSignUpStatus"></div> | |||
@@ -53,15 +57,21 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div style="height:28px;line-height:28px;">提示:请输入学年和学期进行查询</div> | |||
</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 class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_initScore" class="btn btn-default"><i class="fa fa-plus"></i> 初始化线上课程成绩</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResult.js") | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResult.js") |
@@ -24,7 +24,7 @@ var bootstrap = function ($, learun) { | |||
return; | |||
} | |||
page.search(queryJson); | |||
}, 330, 400); | |||
}, 330, 500); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
@@ -40,34 +40,95 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ElectiveSelectStatus').lrDataItemSelect({ code: 'ElectiveSelectStatus' }); | |||
$('#ElectiveSignUpStatus').lrDataItemSelect({ code: 'ElectiveSignUpStatus' }); | |||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||
//数据集不选择线上课程信息,选择选课情况里的课程信息 | |||
$('#LessonNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', | |||
param: { strWhere: "1=1 AND LessonSortNo='2' " }, | |||
value: "lessonno", | |||
text: "lessonname" | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/GetSelectLessonInfo', | |||
value: "LessonNo", | |||
text: "LessonName" | |||
}); | |||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#DeptNo').lrDataSourceSelect({ | |||
code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { | |||
if (!!item) { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "deptno='" + item.deptno + "' order by majorno " }, | |||
}); | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "1=1 order by majorno " }, | |||
}); | |||
} | |||
} | |||
}); | |||
$('#MajorNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "1=1 order by majorno " }, | |||
value: "majorno", | |||
text: "majorname", | |||
select: function (item) { | |||
if (!!item) { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "majorno='" + item.majorno + "' order by classno " }, | |||
}); | |||
} else { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "1=1 order by classno " }, | |||
}); | |||
} | |||
} | |||
}); | |||
$('#ClassNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: "1=1 order by classno " }, | |||
value: "classno", | |||
text: "classname" | |||
}); | |||
$('#ElectiveSignUpStatus').lrDataItemSelect({ code: 'ElectiveSignUpStatus' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
//初始化线上课程成绩 | |||
$('#lr_initScore').on('click', function () { | |||
learun.layerForm({ | |||
id: 'InitScoreForm', | |||
title: '初始化线上课程成绩', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/InitScoreForm', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(); | |||
} | |||
}); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetQueryStuSelectResultList', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/GetQueryStuSelectResultList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 60, align: "left" }, | |||
{ label: "学年", name: "AcademicYearNo", width: 50, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 50, align: "left" }, | |||
{ label: "学号", name: "StuNo", width: 120, align: "left" }, | |||
{ label: "姓名", name: "StuName", width: 180, align: "left" }, | |||
{ label: "课程编号", name: "LessonNo", width: 100, align: "left" }, | |||
{ | |||
label: "课程名称", name: "LessonName", width: 150, align: "left" | |||
}, | |||
//{ label: "教师编号", name: "EmpNo", width: 100, align: "left" }, | |||
{ | |||
label: "校区", name: "F_SchoolId", width: 200, align: "left", | |||
label: "建课教师", name: "EmpName", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "建课学校", name: "F_SchoolId", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
@@ -80,7 +141,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "系所", name: "DeptNo", width: 100, align: "left", | |||
label: "院系", name: "DeptNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
@@ -118,24 +179,6 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "GenderNo", width: 80, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "男" : "女"; | |||
} | |||
}, | |||
{ | |||
label: "选课状态", name: "Id", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == null || cellvalue == undefined || cellvalue == "") { | |||
return '<span class=\"label label-default\">未报名</span>'; | |||
} else { | |||
return '<span class=\"label label-success\">已报名</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "报名状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
@@ -150,62 +193,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ label: "所选课程号", name: "LessonNo", width: 100, align: "left" }, | |||
{ | |||
label: "所选课程名称", name: "LessonName", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', | |||
key: row.LessonNo, | |||
keyId: 'lessonno', | |||
callback: function (_data) { | |||
callback(_data['lessonname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "课程学分", name: "StudyScore", width: 100, align: "left" }, | |||
{ label: "教师编号", name: "EmpNo", width: 100, align: "left" }, | |||
{ | |||
label: "教师姓名", name: "EmpName", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: row.EmpNo, | |||
keyId: 'empno', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "上课节次", name: "LessonSection", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue != "" && cellvalue != undefined && cellvalue != null) { | |||
if (cellvalue.indexOf(',') == -1) { | |||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; | |||
} else { | |||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; | |||
} | |||
} | |||
} | |||
}, | |||
{ label: "上课时间", name: "LessonTime", width: 180, align: "left" }, | |||
{ | |||
label: "教室名称", name: "ClassRoomName", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo', | |||
key: row.ClassRoomNo, | |||
keyId: 'classroomno', | |||
callback: function (_data) { | |||
callback(_data['classroomname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||
], | |||
mainId: 'StuId', | |||
isPage: true, | |||
@@ -215,7 +203,6 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
//param.SqlParameter = " and a.ChangeStatus<>1 "; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -1036,6 +1036,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\QueryStuSelectResult.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\QueryStuSelectResultForTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\InitScoreForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\AnalysisByMonthForStudent.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\ManageIndexTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\IndexForTeacher.js" /> | |||
@@ -8212,6 +8213,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\QueryStuSelectResult.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\QueryStuSelectResultForTeacher.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\StudentIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\InitScoreForm.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -14,7 +14,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
public class StuSelectLessonListOfElectiveOnlineBLL : StuSelectLessonListOfElectiveOnlineIBLL | |||
{ | |||
private StuSelectLessonListOfElectiveOnlineService stuSelectLessonListOfElectiveService = new StuSelectLessonListOfElectiveOnlineService(); | |||
private StuSelectLessonListOfElectiveOnlineService stuSelectLessonListOfElectiveOnlineService = new StuSelectLessonListOfElectiveOnlineService(); | |||
#region 获取数据 | |||
@@ -27,7 +27,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetPageList(pagination, queryJson); | |||
return stuSelectLessonListOfElectiveOnlineService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -51,7 +51,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineEntity(keyValue); | |||
return stuSelectLessonListOfElectiveOnlineService.GetStuSelectLessonListOfElectiveOnlineEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -79,7 +79,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
stuSelectLessonListOfElectiveService.DeleteEntity(keyValue); | |||
stuSelectLessonListOfElectiveOnlineService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -103,7 +103,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
stuSelectLessonListOfElectiveService.SaveEntity(keyValue, entity); | |||
stuSelectLessonListOfElectiveOnlineService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -130,7 +130,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(stuno, olpeid); | |||
return stuSelectLessonListOfElectiveOnlineService.GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(stuno, olpeid); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -150,7 +150,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineEntityByLessonInfo(lessonNo, lessonTime, stuNo); | |||
return stuSelectLessonListOfElectiveOnlineService.GetStuSelectLessonListOfElectiveOnlineEntityByLessonInfo(lessonNo, lessonTime, stuNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -173,7 +173,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineListByStuNo(stuno); | |||
return stuSelectLessonListOfElectiveOnlineService.GetStuSelectLessonListOfElectiveOnlineListByStuNo(stuno); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -192,7 +192,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetQueryStuSelectResultList(pagination, queryJson); | |||
return stuSelectLessonListOfElectiveOnlineService.GetQueryStuSelectResultList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -210,7 +210,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
stuSelectLessonListOfElectiveService.Pass(stulist, olpentity); | |||
stuSelectLessonListOfElectiveOnlineService.Pass(stulist, olpentity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -228,7 +228,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
stuSelectLessonListOfElectiveService.UnPass(stulist, olpentity); | |||
stuSelectLessonListOfElectiveOnlineService.UnPass(stulist, olpentity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -246,7 +246,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
stuSelectLessonListOfElectiveService.UnPassOfFinish(stulist, olpentity); | |||
stuSelectLessonListOfElectiveOnlineService.UnPassOfFinish(stulist, olpentity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -260,12 +260,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetAllElectiveLesson(string academicYearNo, string semester) | |||
/// <summary> | |||
/// 获取选课情况里的课程信息 | |||
/// </summary> | |||
/// <param name="academicYearNo"></param> | |||
/// <param name="semester"></param> | |||
/// <returns></returns> | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetSelectLessonInfo(string academicYearNo, string semester) | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetAllElectiveLesson(academicYearNo, semester); | |||
return stuSelectLessonListOfElectiveOnlineService.GetSelectLessonInfo(academicYearNo, semester); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -289,7 +294,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineListByOLPEId(olpeid); | |||
return stuSelectLessonListOfElectiveOnlineService.GetStuSelectLessonListOfElectiveOnlineListByOLPEId(olpeid); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 初始化线上课程成绩 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void DoInitScore(StuSelectLessonListOfElectiveOnlineEntity entity) | |||
{ | |||
try | |||
{ | |||
stuSelectLessonListOfElectiveOnlineService.DoInitScore(entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -71,6 +71,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
void Pass(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity); | |||
void UnPass(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity); | |||
void UnPassOfFinish(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity); | |||
IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetAllElectiveLesson(string academicYearNo, string semester); | |||
/// <summary> | |||
/// 获取选课情况里的课程信息 | |||
/// </summary> | |||
/// <param name="academicYearNo"></param> | |||
/// <param name="semester"></param> | |||
/// <returns></returns> | |||
IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetSelectLessonInfo(string academicYearNo, string semester); | |||
/// <summary> | |||
/// 初始化线上课程成绩 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
void DoInitScore(StuSelectLessonListOfElectiveOnlineEntity entity); | |||
} | |||
} |
@@ -92,7 +92,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("LIOEOId", queryParam["LIOEOId"].ToString(), DbType.String); | |||
strSql.Append(" AND t.LIOEOId = @LIOEOId "); | |||
} | |||
var list= this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveOnlineEntity>(strSql.ToString(), dp, pagination); | |||
var list = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveOnlineEntity>(strSql.ToString(), dp, pagination); | |||
foreach (var item in list) | |||
{ | |||
//模式二:正式选课 | |||
@@ -272,7 +272,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
//修改LessonInfoOfElectiveOnline通过人数 | |||
if (count > 0) | |||
{ | |||
olpentity.StuNum = olpentity.StuNum.HasValue ? olpentity.StuNum.Value - count : 0 ; | |||
olpentity.StuNum = olpentity.StuNum.HasValue ? olpentity.StuNum.Value - count : 0; | |||
db.Update(olpentity); | |||
} | |||
db.Commit(); | |||
@@ -405,34 +405,33 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
#endregion | |||
/// <summary> | |||
/// 线上选课情况 | |||
/// </summary> | |||
/// <param name="pagination"></param> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetQueryStuSelectResultList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var queryParam = queryJson.ToJObject(); | |||
var strSql = new StringBuilder(); | |||
strSql.Append("select a.StuNo,a.StuName,a.GenderNo,a.DeptNo,a.MajorNo,a.F_SchoolId,a.ClassNo,b.remark,b.Status,b.Id,"); | |||
strSql.Append("select a.StuNo,a.StuName,a.DeptNo,a.MajorNo,a.F_SchoolId,a.ClassNo,b.Status,b.Id,"); | |||
strSql.Append("'" + queryParam["AcademicYearNo"].ToString() + "' as AcademicYearNo,'" + queryParam["Semester"].ToString() + "' as Semester,"); | |||
//strSql.Append("b.AcademicYearNo,b.Semester,"); | |||
strSql.Append("c.LessonSection,c.LessonTime,c.StudyScore,c.LessonNo,c.LessonName,c.EmpNo,c.EmpName,c.ClassRoomNo,c.ClassRoomName"); | |||
//strSql.Append(@"c.LessonSection,c.LessonTime,c.StudyScore,c.LessonNo,c.LessonName,c.EmpNo,c.EmpName,c.ClassRoomNo,c.ClassRoomName from stuinfobasic a | |||
//left join StuSelectLessonListOfElectiveOnline | |||
// b on a.stuno = b.stuno left join LessonInfoOfElectiveOnline c | |||
//on b.OLPEId = c.Id AND c.AcademicYearNo = '" + queryParam["AcademicYearNo"].ToString() + "' AND c.Semester = '" + queryParam["Semester"].ToString() + "' "); | |||
strSql.Append("b.LessonNo,b.LessonName,b.EmpNo,b.EmpName"); | |||
strSql.Append(" from stuinfobasic a"); | |||
strSql.Append(" left join StuSelectLessonListOfElectiveOnline b on a.stuno = b.stuno and b.AcademicYearNo = '" + queryParam["AcademicYearNo"].ToString() + "' AND b.Semester = '" + queryParam["Semester"].ToString() + "' "); | |||
strSql.Append(" left join LessonInfoOfElectiveOnline c on b.OLPEId = c.Id and c.AcademicYearNo = '" + queryParam["AcademicYearNo"].ToString() + "' AND c.Semester = '" + queryParam["Semester"].ToString() + "' "); | |||
strSql.Append(" where 1=1 "); | |||
//未选课的学分为空导出报错liang 为了导出数据零时增加了条件 此处暂放待处理 and c.LessonNo is not null | |||
//去掉转校、休学 退学的学生 | |||
strSql.Append(" and a.StuNo not in (SELECT distinct StuNo FROM StuInfoBasicChange where stuchangetype in ('06','04','05') and checkstatus=1) "); | |||
strSql.Append(" and a.StuNo not in (SELECT distinct StuNo FROM StuInfoBasic where ChangeStatus=1) "); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["StuNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); | |||
strSql.Append(" AND a.StuNo = @StuNo "); | |||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND a.StuNo like @StuNo "); | |||
} | |||
//if (!queryParam["AcademicYearNo"].IsEmpty()) | |||
//{ | |||
@@ -462,22 +461,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
if (!queryParam["LessonNo"].IsEmpty()) | |||
{ | |||
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); | |||
strSql.Append(" AND c.LessonNo = @LessonNo "); | |||
strSql.Append(" AND b.LessonNo = @LessonNo "); | |||
} | |||
if (!queryParam["LessonName"].IsEmpty()) | |||
{ | |||
dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND c.LessonName Like @LessonName "); | |||
strSql.Append(" AND b.LessonName Like @LessonName "); | |||
} | |||
if (!queryParam["EmpNo"].IsEmpty()) | |||
{ | |||
dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); | |||
strSql.Append(" AND c.EmpNo = @EmpNo "); | |||
strSql.Append(" AND b.EmpNo = @EmpNo "); | |||
} | |||
if (!queryParam["EmpName"].IsEmpty()) | |||
{ | |||
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND c.EmpName Like @EmpName "); | |||
strSql.Append(" AND b.EmpName Like @EmpName "); | |||
} | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
@@ -487,7 +486,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
if (!queryParam["Status"].IsEmpty()) | |||
{ | |||
dp.Add("Status", queryParam["Status"].ToInt(), DbType.Int32); | |||
strSql.Append(" AND Status = @Status "); | |||
strSql.Append(" AND b.Status = @Status "); | |||
} | |||
if (!queryParam["F_SchoolId"].IsEmpty()) | |||
{ | |||
@@ -531,12 +530,58 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取选课情况里的课程信息 | |||
/// </summary> | |||
/// <param name="academicYearNo"></param> | |||
/// <param name="semester"></param> | |||
/// <returns></returns> | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetSelectLessonInfo(string academicYearNo, string semester) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(academicYearNo) && !string.IsNullOrEmpty(semester)) | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveOnlineEntity>($"select distinct t.LessonNo,t.LessonName from StuSelectLessonListOfElectiveOnline t where t.AcademicYearNo='{academicYearNo}' and t.Semester='{semester}' "); | |||
} | |||
else | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveOnlineEntity>("select distinct t.LessonNo,t.LessonName from StuSelectLessonListOfElectiveOnline t where 1=1 "); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetAllElectiveLesson(string academicYearNo, string semester) | |||
/// <summary> | |||
/// 初始化线上课程成绩 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void DoInitScore(StuSelectLessonListOfElectiveOnlineEntity entity) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveOnlineEntity>("select * from StuSelectLessonListOfElectiveOnline where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "'"); | |||
string sql = @"insert into StuScoreOnline(NoticeBookNo,StuNo,DeptNo,MajorNo,ClassNo,StuName,GenderNo,AcademicYearNo,Semester,LessonNo,LessonName,Grade,TermEndScore,Remark,CheckMark,EmpNo,IsEditable,F_SchoolId) | |||
select NoticeBookNo,StuNo,DeptNo,MajorNo,ClassNo,StuName,GenderNo,AcademicYearNo,Semester,LessonNo,LessonName,Grade,'0',Remark,0,EmpNo,IsEditable=1,F_SchoolId from | |||
(select s.NoticeBookNo,s.StuNo,s.DeptNo,s.MajorNo,s.ClassNo,s.StuName,s.GenderNo,s.AcademicYearNo,s.Semester,s.LessonNo,s.LessonName,s.Grade,s.Remark,s.EmpNo,s.F_SchoolId | |||
from StuSelectLessonListOfElectiveOnline s | |||
where s.Status='2' | |||
) as sl | |||
where StuNo not in(Select StuNo from StuScoreOnline s where s.AcademicYearNo=sl.AcademicYearNo | |||
and s.Semester=sl.Semester and s.LessonNo=sl.LessonNo and s.LessonName=sl.LessonName and s.EmpNo=sl.EmpNo | |||
and s.AcademicYearNo='" + entity.AcademicYearNo + "' and s.Semester='" + entity.Semester + "') and sl.AcademicYearNo='" + entity.AcademicYearNo + "' and sl.Semester='" + entity.Semester + "'"; | |||
BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -550,5 +595,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
} | |||
} |