@@ -308,6 +308,7 @@ var bootstrap = function ($, learun) { | |||
search: function (param) { | |||
param = param || {}; | |||
param.IsTeacher = "1";//控制老师查看的参数 | |||
param.Status = "2";//审核通过 | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -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 | |||
{ | |||
@@ -16,6 +17,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public class LessonInfoOfElectiveOnlineController : MvcControllerBase | |||
{ | |||
private LessonInfoOfElectiveOnlineIBLL lessonInfoOfElectiveOnlineIBLL = new LessonInfoOfElectiveOnlineBLL(); | |||
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | |||
CdMajorIBLL CdMajorIBLL = new CdMajorBLL(); | |||
#region 视图功能 | |||
@@ -56,6 +59,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 学子在线-线上课程选课 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult StudentIndex() | |||
{ | |||
var loginuser = LoginUserInfo.Get(); | |||
var studentinfo = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(loginuser.account); | |||
if (studentinfo != null) | |||
{ | |||
ViewBag.StuMajorNo = CdMajorIBLL.GetCdMajorEntityByMajorNo(studentinfo.MajorNo)?.ID; | |||
ViewBag.StuGrade = studentinfo.Grade; | |||
} | |||
ViewBag.WebApiUrl = Config.GetValue("WebApi"); | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -97,6 +117,27 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据【学子在线-线上课程选课】 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListOfStudent(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = lessonInfoOfElectiveOnlineIBLL.GetPageListOfStudent(paginationobj, queryJson).OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.LessonNo).ThenBy(x => x.EmpNo); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -125,10 +166,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
LessonInfoOfElectiveOnlineEntity entity = strEntity.ToObject<LessonInfoOfElectiveOnlineEntity>(); | |||
lessonInfoOfElectiveOnlineIBLL.SaveEntity(keyValue, entity); | |||
var model = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntityByLessonNo(entity.LessonNo); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
if (model != null) | |||
{ | |||
return Fail("课程编号已存在!"); | |||
} | |||
} | |||
else | |||
{ | |||
if (model != null && model.Id != keyValue) | |||
{ | |||
return Fail("课程编号已存在!"); | |||
} | |||
} | |||
lessonInfoOfElectiveOnlineIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
@@ -172,6 +226,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 判断选课是否开始 | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult IsSelectElectiveLesson() | |||
{ | |||
var entity = lessonInfoOfElectiveOnlineIBLL.GetEADateArrangeEntityAboutElective(); | |||
if (entity != null) | |||
{ | |||
return Fail("线上选课已经开始!"); | |||
} | |||
return Success("线上选课还未开始!"); | |||
} | |||
#endregion | |||
} | |||
@@ -0,0 +1,259 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-05-15 10:33 | |||
/// 描 述:选修课课程 | |||
/// </summary> | |||
public class StuSelectLessonListOfElectiveOnlineController : MvcControllerBase | |||
{ | |||
private StuSelectLessonListOfElectiveOnlineIBLL stuSelectLessonListOfElectiveOnlineIBLL = new StuSelectLessonListOfElectiveOnlineBLL(); | |||
private LessonInfoOfElectiveOnlineIBLL lessonInfoOfElectiveOnlineIBLL = new LessonInfoOfElectiveOnlineBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult QueryStuSelectResult() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult QueryStuSelectResultForTeacher() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 教务-审核表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult AuditForm() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 教务-审核页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult AuditIndex() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 教务-报名结果页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FinishIndex() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = stuSelectLessonListOfElectiveOnlineIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetQueryStuSelectResultList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = stuSelectLessonListOfElectiveOnlineIBLL.GetQueryStuSelectResultList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var StuSelectLessonListOfElectiveOnlineData = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
StuSelectLessonListOfElectiveOnline = StuSelectLessonListOfElectiveOnlineData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
stuSelectLessonListOfElectiveOnlineIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Pass(string keyValue, string LIOEOId) | |||
{ | |||
var stulist = keyValue.Split(','); | |||
var olpentity = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntity(LIOEOId); | |||
if (olpentity != null) | |||
{ | |||
if (olpentity.StuNum + stulist.Length > olpentity.StuNumMax) | |||
{ | |||
return Fail("当前选课人数已超出限制,请减少审批量!"); | |||
} | |||
else | |||
{ | |||
stuSelectLessonListOfElectiveOnlineIBLL.Pass(stulist, olpentity); | |||
} | |||
} | |||
else | |||
{ | |||
return Fail("当前选课数据不存在!"); | |||
} | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 批量拒绝【审核学生页面】 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="OLPEId"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult UnPass(string keyValue, string LIOEOId) | |||
{ | |||
var stulist = keyValue.Split(','); | |||
var olpentity = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntity(LIOEOId); | |||
if (olpentity != null) | |||
{ | |||
stuSelectLessonListOfElectiveOnlineIBLL.UnPass(stulist, olpentity); | |||
} | |||
else | |||
{ | |||
return Fail("当前选课数据不存在!"); | |||
} | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 批量拒绝【已审学生页面】 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="OLPEId"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult UnPassOfFinish(string keyValue, string LIOEOId) | |||
{ | |||
var stulist = keyValue.Split(','); | |||
var olpentity = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntity(LIOEOId); | |||
if (olpentity != null) | |||
{ | |||
stuSelectLessonListOfElectiveOnlineIBLL.UnPassOfFinish(stulist, olpentity); | |||
} | |||
else | |||
{ | |||
return Fail("当前选课数据不存在!"); | |||
} | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
var sslleEntity = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineEntity(keyValue); | |||
if (sslleEntity == null) | |||
{ | |||
return Fail("当前选课数据不存在!"); | |||
} | |||
var olpeEntity = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntity(sslleEntity.LIOEOId); | |||
if (olpeEntity == null) | |||
{ | |||
return Fail("当前选课的课程不存在!"); | |||
} | |||
StuSelectLessonListOfElectiveOnlineEntity entity = strEntity.ToObject<StuSelectLessonListOfElectiveOnlineEntity>(); | |||
var aa = entity.Status; | |||
if (aa == 1)//是 | |||
{ | |||
//判断选课的课程的报名人数是否已满 | |||
if (olpeEntity.StuNum >= olpeEntity.StuNumMax) | |||
{ | |||
return Fail("当前选课的课程人数已满!"); | |||
} | |||
//选课的课程报名人数加1 | |||
olpeEntity.StuNum = olpeEntity.StuNum + 1; | |||
lessonInfoOfElectiveOnlineIBLL.SaveEntity(olpeEntity.Id, olpeEntity); | |||
//报名成功 | |||
sslleEntity.Status = 2; | |||
sslleEntity.Remark = entity.Remark; | |||
} | |||
else | |||
{ | |||
//报名失败 | |||
sslleEntity.Status = 3; | |||
sslleEntity.Remark = entity.Remark; | |||
} | |||
stuSelectLessonListOfElectiveOnlineIBLL.SaveEntity(keyValue, sslleEntity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -190,7 +190,7 @@ var bootstrap = function ($, learun) { | |||
mainId: 'Id', | |||
isPage: true, | |||
isMultiselect: true, | |||
sidx: 'MakeDate desc' | |||
sidx: 'AcademicYearNo DESC, Semester DESC, LessonNo ASC,EmpNo ASC' | |||
}); | |||
page.search(); | |||
}, | |||
@@ -96,14 +96,18 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
//查看已审学生-----todo:待看 | |||
//查看已审学生 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行查看!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '查看学生', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/FinishIndex?OLPEId=' + keyValue, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/FinishIndex?LIOEOId=' + keyValue, | |||
width: 1000, | |||
height: 700, | |||
btn: null, | |||
@@ -113,14 +117,18 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//审核学生------todo:待看 | |||
//审核学生 | |||
$('#lr_audit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行查看!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '审核学生', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/AuditIndex?OLPEId=' + keyValue, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/AuditIndex?LIOEOId=' + keyValue, | |||
width: 1000, | |||
height: 700, | |||
btn: null, | |||
@@ -254,8 +262,7 @@ var bootstrap = function ($, learun) { | |||
mainId: 'Id', | |||
isPage: true, | |||
isMultiselect: true, | |||
sidx: 'AcademicYearNo DESC, Semester DESC, LessonName ASC', | |||
sord: 'desc' | |||
sidx: 'AcademicYearNo DESC, Semester DESC, LessonNo ASC,EmpNo ASC' | |||
}); | |||
page.search(); | |||
}, | |||
@@ -0,0 +1,48 @@ | |||
@{ | |||
ViewBag.Title = "选课中心"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<script type="text/javascript"> | |||
var StuMajorNo = "@ViewBag.StuMajorNo"; | |||
var StuGrade = "@ViewBag.StuGrade"; | |||
var WebApiUrl = "@ViewBag.WebApiUrl"; | |||
</script> | |||
<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="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="LessonNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程名称</div> | |||
<input id="LessonName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@*<div class="lr-layout-tool-item"> | |||
选课要求:至少需要选择3门不同的课程 | |||
</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 btnBox" learun-authorize="yes"> | |||
<a id="lr_apply" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 报名</a> | |||
<a id="lr_cancel" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 取消报名</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/StudentIndex.js") | |||
<script src="~/Content/jquery/plugin/layer/layer.js"></script> |
@@ -0,0 +1,213 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-05-14 10:02 | |||
* 描 述:选课中心 | |||
*/ | |||
var weekChina = ["一", "二", "三", "四", "五", "六", "日"]; | |||
var refreshGirdData; | |||
//点击课程名称 | |||
function LessonIntroduction(lessonno) { | |||
var html = ""; | |||
top.learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/LessonInfo/GetLessonInfoEntityByLessonNo?lessonNo=' + lessonno, function (result) { | |||
if (result.code == 200) { | |||
if (result.data.Introduction == null) { | |||
top.learun.alert.warning("暂无课程简介。"); | |||
return; | |||
} | |||
html = result.data.Introduction; | |||
layer.open({ | |||
type: 1, | |||
closeBtn: 2, | |||
title: "课程简介", | |||
area: ['800px', '60%'], | |||
content: html | |||
}); | |||
} else { | |||
top.learun.alert.warning("暂无课程简介。"); | |||
} | |||
}); | |||
} | |||
//点击教师名称 | |||
function EmpIntroduction(empno) { | |||
var html = ""; | |||
top.learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/EmpInfo/GetEmpInfoEntityByEmpNo?empNo=' + empno, function (result) { | |||
if (result.code == 200) { | |||
if (result.data.resume == null) { | |||
top.learun.alert.warning("暂无教师简介。"); | |||
return; | |||
} | |||
html = result.data.resume; | |||
layer.open({ | |||
type: 1, | |||
closeBtn: 2, | |||
title: "教师简介", | |||
area: ['800px', '60%'], | |||
content: html | |||
}); | |||
} else { | |||
top.learun.alert.warning("暂无教师简介。"); | |||
} | |||
}); | |||
} | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
//是否为选课时间 | |||
learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/IsSelectElectiveLesson', function (result) { | |||
if (result.code == 200) {//选课还未开始 | |||
learun.alert.warning("当前时间不是线上选课时间!"); | |||
return; | |||
} else {//选课已经开始 | |||
page.initGird(); | |||
} | |||
}); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
//todo:待一个个查看 | |||
// 报名 | |||
$('#lr_apply').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var Status = $('#gridtable').jfGridValue('Status'); | |||
if (Status == "1" || Status == "2") {//审核中、报名成功 | |||
learun.alert.warning("系统不记录重复报名数据!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认报名该课程!', function (res) { | |||
if (res) { | |||
//模式二: | |||
var _postData = {}; | |||
_postData.keyValue = keyValue; | |||
_postData.StuNo = learun.clientdata.get(['userinfo']).enCode; | |||
$.ajax({ | |||
url: WebApiUrl + '/Learun/LessonInfoOfElectiveOnlineStudent/SignIn', | |||
data: _postData, | |||
type: "POST", | |||
dataType: "json", | |||
async: false, | |||
cache: false, | |||
success: function (res) { | |||
if (res.code == 200) { | |||
learun.loading(true, '正在提交报名数据'); | |||
//判断队列结果 | |||
var timer = setInterval(function () { | |||
$.ajax({ | |||
url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/GetApplyResult', | |||
data: { keyValue: keyValue }, | |||
type: "POST", | |||
dataType: "json", | |||
async: false, | |||
cache: false, | |||
success: function (res) { | |||
if (res.code == 200) { | |||
refreshGirdData(); | |||
clearInterval(timer); | |||
learun.loading(false); | |||
learun.alert.warning(res.info); | |||
} | |||
}, | |||
error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
learun.alert.warning("网络出错,请刷新!"); | |||
}, | |||
}); | |||
}, 5000); | |||
} else { | |||
learun.alert.warning("系统异常,请稍后!"); | |||
return false; | |||
} | |||
}, | |||
error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
learun.alert.warning("网络出错,请刷新!"); | |||
}, | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//取消报名 | |||
$('#lr_cancel').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认取消报名该课程!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/CancelApply', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/GetPageListOfStudent', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ label: "课程编号", name: "LessonNo", width: 150, align: "left" }, | |||
{ label: "课程名称", name: "LessonName", width: 150, align: "left" }, | |||
{ label: "建课教师", name: "EmpName", width: 100, align: "left" }, | |||
{ | |||
label: "建课学校", name: "F_SchoolId", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
//{ label: "报名人数上限", name: "StuNumMax", width: 100, align: "left" }, | |||
{ label: "已报人数", name: "StuNumOfApply", width: 100, align: "left" }, | |||
{ | |||
label: "报名状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-primary\">审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\">已报名</span>'; | |||
} else if (cellvalue == 3) { | |||
return '<span class=\"label label-warning\">报名失败</span>'; | |||
} else { | |||
return '<span class=\"label label-default\">未报名</span>'; | |||
} | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
sidx: 'AcademicYearNo DESC, Semester DESC, LessonNo ASC,EmpNo ASC' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StuNo = learun.clientdata.get(['userinfo']).enCode; | |||
param.StuMajorNo = StuMajorNo; | |||
param.StuGrade = StuGrade; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,15 @@ | |||
@{ | |||
ViewBag.Title = "选修课报名审核表单"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="StuSelectLessonListOfElectiveOnline"> | |||
<div class="lr-form-item-title">审核通过</div> | |||
<div id="Status"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuSelectLessonListOfElectiveOnline"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" type="text" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditForm.js") |
@@ -0,0 +1,54 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-05-15 10:33 | |||
* 描 述:选修课报名审核表单 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#Status').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,40 @@ | |||
@{ | |||
ViewBag.Title = "选修课报名审核"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<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="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> | |||
</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=""> | |||
<a id="lr_audit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 单个审核</a> | |||
<a id="lr_auditpass" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 批量审核通过</a> | |||
<a id="lr_auditunpass" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 批量拒绝</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditIndex.js") |
@@ -0,0 +1,156 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-05-15 10:33 | |||
* 描 述:选修课报名审核 | |||
*/ | |||
var refreshGirdData; | |||
var LIOEOId = request("LIOEOId"); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
//审核 | |||
$('#lr_audit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行此操作!"); | |||
return; | |||
} | |||
var status = $('#gridtable').jfGridValue('Status'); | |||
if (status != 1) { | |||
learun.alert.warning("当前项目已完成审核!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'StuSelectLessonListOfElectiveOnlineAuditform', | |||
title: '审核', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/AuditForm?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
//批量审核通过 | |||
$('#lr_auditpass').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认通过?', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/Pass', { keyValue: keyValue, LIOEOId: LIOEOId }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//批量拒绝 | |||
$('#lr_auditunpass').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认拒绝?', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/UnPass', { keyValue: keyValue, LIOEOId: LIOEOId }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/GetPageList', | |||
headData: [ | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "姓名", name: "StuName", 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', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "ClassNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "报名状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span >审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span >报名成功</span>'; | |||
} else if (cellvalue == 3) { | |||
return '<span >报名失败</span>'; | |||
} else { | |||
return '<span >未报名</span>'; | |||
} | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
isMultiselect: true, | |||
sidx: 'StuNo', | |||
sord: 'asc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.Status = 1;//审核中 | |||
param.LIOEOId = LIOEOId; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,38 @@ | |||
@{ | |||
ViewBag.Title = "选修课报名结果统计"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<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="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> | |||
</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=""> | |||
<a id="lr_auditunpass" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 批量拒绝</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/FinishIndex.js") |
@@ -0,0 +1,105 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-05-15 10:33 | |||
* 描 述:选修课报名结果统计 | |||
*/ | |||
var refreshGirdData; | |||
var LIOEOId = request("LIOEOId"); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
//批量拒绝 | |||
$('#lr_auditunpass').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认拒绝?', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/UnPassOfFinish', { keyValue: keyValue, LIOEOId: LIOEOId }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/GetPageList', | |||
headData: [ | |||
{ label: "学号", name: "StuNo", width: 100, align: "left"}, | |||
{ label: "姓名", name: "StuName", 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', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "ClassNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
], | |||
mainId:'Id', | |||
isPage: true, | |||
isMultiselect: true, | |||
sidx: 'StuNo', | |||
sord:'asc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.Status = 2;//报名成功 | |||
param.LIOEOId = LIOEOId; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,39 @@ | |||
@{ | |||
ViewBag.Title = "选修课课程"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<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="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="AcademicYearNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<input id="Semester" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
选课要求:至少需要选择3门不同的课程 | |||
</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/StuSelectLessonListOfElective/Index.js") | |||
<script src="~/Content/jquery/plugin/layer/layer.js"></script> |
@@ -0,0 +1,178 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-05-15 10:33 | |||
* 描 述:选修课课程 | |||
*/ | |||
var weekChina = ["一", "二", "三", "四", "五", "六", "日"]; | |||
var refreshGirdData; | |||
//点击课程名称 | |||
function LessonIntroduction(lessonno) { | |||
var html = ""; | |||
top.learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/LessonInfo/GetLessonInfoEntityByLessonNo?lessonNo=' + lessonno, function (result) { | |||
if (result.code == 200) { | |||
if (result.data.Introduction == null) { | |||
top.learun.alert.warning("暂无课程简介。"); | |||
return; | |||
} | |||
html = result.data.Introduction; | |||
layer.open({ | |||
type: 1, | |||
closeBtn: 2, | |||
title: "课程简介", | |||
area: ['800px', '60%'], | |||
content: html | |||
}); | |||
} else { | |||
top.learun.alert.warning("暂无课程简介。"); | |||
} | |||
}); | |||
} | |||
//点击教师名称 | |||
function EmpIntroduction(empno) { | |||
var html = ""; | |||
top.learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/EmpInfo/GetEmpInfoEntityByEmpNo?empNo=' + empno, function (result) { | |||
if (result.code == 200) { | |||
if (result.data.resume == null) { | |||
top.learun.alert.warning("暂无教师简介。"); | |||
return; | |||
} | |||
html = result.data.resume; | |||
layer.open({ | |||
type: 1, | |||
closeBtn: 2, | |||
title: "教师简介", | |||
area: ['800px', '60%'], | |||
content: html | |||
}); | |||
} else { | |||
top.learun.alert.warning("暂无教师简介。"); | |||
} | |||
}); | |||
} | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left"}, | |||
{ label: "学期", name: "Semester", width: 100, align: "left"}, | |||
{ | |||
label: "课程名称", name: "LessonName", width: 200, 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']); | |||
callback('<span style="color:blue;" onclick="LessonIntroduction(\'' + row.LessonNo + '\');">' + _data['lessonname'] + '</span>'); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "课程类型", name: "LessonTypeId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
console.log(row.LessonTypeId); | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonType', | |||
key: row.LessonTypeId, | |||
keyId: 'ltid', | |||
callback: function (_data) { | |||
callback(_data['lessontypename']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "上课节次", name: "LessonSection", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
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: "StudyScore", width: 80, 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']); | |||
callback('<span style="color:blue;" onclick="EmpIntroduction(\'' + row.EmpNo + '\');">' + _data['empname'] + '</span>'); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "教室名称", name: "ClassRoomNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo', | |||
key: value, | |||
keyId: 'classroomno', | |||
callback: function (_data) { | |||
callback(_data['classroomname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "开始周", name: "StartWeek", width: 80, align: "left"}, | |||
{ label: "结束周", name: "EndWeek", width: 80, align: "left"}, | |||
{ label: "开始日期", name: "StartDate", width: 100, align: "left"}, | |||
{ label: "结束日期", name: "EndDate", width: 100, align: "left" }, | |||
{ | |||
label: "报名状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-primary\">审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\">报名成功</span>'; | |||
} else if (cellvalue == 3) { | |||
return '<span class=\"label label-warning\">报名失败</span>'; | |||
} else { | |||
return '<span class=\"label label-default\">未报名</span>'; | |||
} | |||
} | |||
}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||
], | |||
mainId:'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StuNo = learun.clientdata.get(['userinfo']).enCode; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,67 @@ | |||
@{ | |||
ViewBag.Title = "选修课课程"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<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="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester" class="form-control"></div> | |||
</div> | |||
<div class="col-xs-12 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 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="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> | |||
</div> | |||
</div> | |||
</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> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResult.js") |
@@ -0,0 +1,226 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-05-15 10:33 | |||
* 描 述:选修课课程 | |||
*/ | |||
var weekChina = ["一", "二", "三", "四", "五", "六", "日"]; | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
if ($("#AcademicYearNo").lrselectGet() == "" || $("#AcademicYearNo").lrselectGet() == null || $("#AcademicYearNo").lrselectGet() == undefined) { | |||
top.learun.alert.warning("请先选择学年!"); | |||
return false; | |||
} | |||
if ($("#Semester").lrselectGet() == "" || $("#Semester").lrselectGet() == null || $("#Semester").lrselectGet() == undefined) { | |||
top.learun.alert.warning("请先选择学期!"); | |||
return; | |||
} | |||
page.search(queryJson); | |||
}, 330, 400); | |||
$('#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' | |||
}); | |||
$('#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" | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetQueryStuSelectResultList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 60, 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', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
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', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "ClassNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ 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) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-primary\">审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\">报名成功</span>'; | |||
} else if (cellvalue == 3) { | |||
return '<span class=\"label label-warning\">报名失败</span>'; | |||
} else { | |||
return '<span class=\"label label-default\">未报名</span>'; | |||
} | |||
} | |||
}, | |||
{ 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, | |||
sidx: 'StuNo', | |||
sord: 'asc' | |||
}); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
//param.SqlParameter = " and a.ChangeStatus<>1 "; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,59 @@ | |||
@{ | |||
ViewBag.Title = "选修课课程"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<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="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester" class="form-control"></div> | |||
</div> | |||
<div class="col-xs-12 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 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="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></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> | |||
</div> | |||
</div> | |||
</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> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResultForTeacher.js") |
@@ -0,0 +1,218 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-05-15 10:33 | |||
* 描 述:选修课课程 | |||
*/ | |||
var weekChina = ["一", "二", "三", "四", "五", "六", "日"]; | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
if ($("#AcademicYearNo").lrselectGet() == "" || $("#AcademicYearNo").lrselectGet() == null || $("#AcademicYearNo").lrselectGet() == undefined) { | |||
top.learun.alert.warning("请先选择学年!"); | |||
return false; | |||
} | |||
if ($("#Semester").lrselectGet() == "" || $("#Semester").lrselectGet() == null || $("#Semester").lrselectGet() == undefined) { | |||
top.learun.alert.warning("请先选择学期!"); | |||
return; | |||
} | |||
page.search(queryJson); | |||
}, 300, 400); | |||
$('#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' | |||
}); | |||
$('#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' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetQueryStuSelectResultList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 60, 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', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
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', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "ClassNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ 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) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-primary\">审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\">报名成功</span>'; | |||
} else if (cellvalue == 3) { | |||
return '<span class=\"label label-warning\">报名失败</span>'; | |||
} else { | |||
return '<span class=\"label label-default\">未报名</span>'; | |||
} | |||
} | |||
}, | |||
{ 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, | |||
sidx: 'StuNo', | |||
sord: 'asc' | |||
}); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.EmpNo = learun.clientdata.get(['userinfo']).enCode; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -340,6 +340,7 @@ | |||
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_UserChangeInfoController.cs" /> | |||
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_WarningController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ElectiveMajorOnlineController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuSelectLessonListOfElectiveOnlineController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\YKTStateMentController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonSyncController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonTermAttemperController.cs" /> | |||
@@ -1011,6 +1012,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexClassRoom.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\FormNum.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\SetIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\StudentIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\PsychologyInfo\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\IndexOfStudent.js" /> | |||
@@ -1028,6 +1030,12 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\IndexUnpassOfElective.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\InputScoreIndexOfElectiveInTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\InputScoreIndexOfElective.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" /> | |||
<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\YKTStateMent\AnalysisByMonthForStudent.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\ManageIndexTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\IndexForTeacher.js" /> | |||
@@ -8197,6 +8205,13 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\ElectiveMajorOnline\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ElectiveMajorOnline\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CdMajor\IndexOfElectiveOnline.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\AuditForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\AuditIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\FinishIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\QueryStuSelectResult.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\QueryStuSelectResultForTeacher.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\StudentIndex.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-05-15 10:33 | |||
/// 描 述:选修课课程 | |||
/// </summary> | |||
public class StuSelectLessonListOfElectiveOnlineMap : EntityTypeConfiguration<StuSelectLessonListOfElectiveOnlineEntity> | |||
{ | |||
public StuSelectLessonListOfElectiveOnlineMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("STUSELECTLESSONLISTOFELECTIVEONLINE"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -113,6 +113,7 @@ | |||
<Compile Include="EducationalAdministration\StuInfoFreshMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuInfoFreshOnlineServiceMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuScoreNotPassMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectiveOnlineMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePreMap.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfigMap.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_PsychologicalCounseMap.cs" /> | |||
@@ -109,6 +109,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
dp.Add("DepreciationStatus", queryParam["DepreciationStatus"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DepreciationStatus = @DepreciationStatus "); | |||
} | |||
if (!queryParam["Status"].IsEmpty()) | |||
{ | |||
dp.Add("Status", queryParam["Status"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Status = @Status "); | |||
} | |||
//判断是否是普通教师的列表:若是,则二级判断;若不是,则无; | |||
//二级判断登录用户是否是部门负责人:若是,则使用部门=本部门,或者使用人=本人;若不是,则使用人=本人; | |||
@@ -67,6 +67,55 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 获取LessonInfoOfElectiveOnline表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntityByLessonNo(string lessonNo) | |||
{ | |||
try | |||
{ | |||
return lessonInfoOfElectiveOnlineService.GetLessonInfoOfElectiveOnlineEntityByLessonNo(lessonNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据【学子在线-线上课程选课】 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<LessonInfoOfElectiveOnlineEntity> GetPageListOfStudent(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return lessonInfoOfElectiveOnlineService.GetPageListOfStudent(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -194,6 +243,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 获取选课时间管理 | |||
/// </summary> | |||
/// <returns></returns> | |||
public EADateArrangeEntity GetEADateArrangeEntityAboutElective() | |||
{ | |||
try | |||
{ | |||
return lessonInfoOfElectiveOnlineService.GetEADateArrangeEntityAboutElective(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
@@ -281,6 +281,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[NotMapped] | |||
public List<ElectiveMajorOnlineEntity> ElectiveMajorOnlineList { get; set; } | |||
[NotMapped] | |||
public string StuNo { get; set; } | |||
[NotMapped] | |||
public string StuName { get; set; } | |||
/// <summary> | |||
/// 报名状态 | |||
/// </summary> | |||
[NotMapped] | |||
public int Status { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -27,6 +27,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntity(string keyValue); | |||
/// <summary> | |||
/// 获取LessonInfoOfElectiveOnline表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntityByLessonNo(string lessonNo); | |||
/// <summary> | |||
/// 获取页面显示列表数据【学子在线-线上课程选课】 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<LessonInfoOfElectiveOnlineEntity> GetPageListOfStudent(Pagination pagination, string queryJson); | |||
#endregion | |||
#region 提交数据 | |||
@@ -66,6 +80,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="StuNumMax"></param> | |||
void SaveStuNumMax(string keyValue, int StuNumMax); | |||
/// <summary> | |||
/// 获取选课时间管理 | |||
/// </summary> | |||
/// <returns></returns> | |||
EADateArrangeEntity GetEADateArrangeEntityAboutElective(); | |||
#endregion | |||
} | |||
} |
@@ -108,7 +108,131 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<LessonInfoOfElectiveOnlineEntity>(keyValue); | |||
var opeentity = BaseRepository("CollegeMIS").FindEntity<LessonInfoOfElectiveOnlineEntity>(keyValue); | |||
if (opeentity != null) | |||
{ | |||
//模式二:正式选课 | |||
var aa = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveOnlineEntity>(x => x.LIOEOId == opeentity.Id); | |||
//已报名人数 | |||
opeentity.StuNumOfApply = aa.Where(x => (x.Status == 1 || x.Status == 2)).Count(); | |||
} | |||
return opeentity; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取LessonInfoOfElectiveOnline表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntityByLessonNo(string lessonNo) | |||
{ | |||
try | |||
{ | |||
return BaseRepository("CollegeMIS").FindEntity<LessonInfoOfElectiveOnlineEntity>(x => x.LessonNo == lessonNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据【学子在线-线上课程选课】 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<LessonInfoOfElectiveOnlineEntity> GetPageListOfStudent(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
//学号 | |||
if (!queryParam["StuNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); | |||
} | |||
//教学工作安排中“线上选课”工作设置的学年学期 | |||
var now = DateTime.Now; | |||
var EADateArrangeEntityAboutElective = this.BaseRepository("CollegeMIS").FindEntity<EADateArrangeEntity>(x => x.WorkName == "线上选课" && x.MakeDate <= now && x.EndDate >= now && x.CheckMark == "1"); | |||
if (EADateArrangeEntityAboutElective == null) | |||
{ | |||
return new List<LessonInfoOfElectiveOnlineEntity>(); | |||
} | |||
var strSql = new StringBuilder(); | |||
strSql.Append(@"select b.*,c.StuNo,c.StuName,c.Status from ElectiveMajorOnline a | |||
left join LessonInfoOfElectiveOnline b on a.LIOEOId=b.Id | |||
left join StuSelectLessonListOfElectiveOnline c on b.Id=c.LIOEOId and c.StuNo=@StuNo | |||
where not exists ( "); | |||
//不显示与已选课程 相同课程名称相同教师的课程 | |||
strSql.Append(" select * from StuSelectLessonListOfElectiveOnline s where s.AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and s.Semester='" + EADateArrangeEntityAboutElective.Semester + "' and s.StuNo=@StuNo and s.Status <>3 and s.LessonName=b.LessonName and s.EmpNo=b.EmpNo and s.LIOEOId!=b.Id "); | |||
strSql.Append(" ) "); | |||
//管理选课专业不为空 | |||
strSql.Append(" and a.MajorId is not null and a.Grade is not null "); | |||
strSql.Append(" AND b.CheckMark='1' "); | |||
strSql.Append(" AND b.AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and b.Semester='" + EADateArrangeEntityAboutElective?.Semester + "' "); | |||
//学生选课显示‘是否可选’为‘是’的课程信息 | |||
strSql.Append(" and b.IsAllowSelect=1 "); | |||
if (!queryParam["StuMajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuMajorNo", queryParam["StuMajorNo"].ToString(), DbType.String); | |||
strSql.Append(" and a.MajorId=@StuMajorNo "); | |||
} | |||
else | |||
{ | |||
strSql.Append(" and a.MajorId='' "); | |||
} | |||
if (!queryParam["StuGrade"].IsEmpty()) | |||
{ | |||
dp.Add("StuGrade", queryParam["StuGrade"].ToString(), DbType.String); | |||
strSql.Append(" and a.Grade=@StuGrade "); | |||
} | |||
else | |||
{ | |||
strSql.Append(" and a.Grade='' "); | |||
} | |||
if (!queryParam["LessonNo"].IsEmpty()) | |||
{ | |||
dp.Add("LessonNo", "%" + queryParam["LessonNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND b.LessonNo like @LessonNo "); | |||
} | |||
if (!queryParam["LessonName"].IsEmpty()) | |||
{ | |||
dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND b.LessonName Like @LessonName "); | |||
} | |||
var list = this.BaseRepository("CollegeMIS").FindList<LessonInfoOfElectiveOnlineEntity>(strSql.ToString(), dp, pagination); | |||
foreach (var item in list) | |||
{ | |||
//模式二:正式选课 | |||
var aa = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveOnlineEntity>(x => x.LIOEOId == item.Id); | |||
//已报名人数 | |||
item.StuNumOfApply = aa.Where(x => (x.Status == 1 || x.Status == 2)).Count(); | |||
} | |||
return list; | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -217,7 +341,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
keyValue = string.Join("','", keyValue.Split(',')); | |||
} | |||
string sql = $"update LessonInfoOfElectiveOnline set IsAllowSelect='{status}' where Id in ('{keyValue}')"; | |||
string sql = $"update LessonInfoOfElectiveOnline set CheckMark='{status}' where Id in ('{keyValue}')"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
@@ -291,6 +415,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 获取选课时间管理 | |||
/// </summary> | |||
/// <returns></returns> | |||
public EADateArrangeEntity GetEADateArrangeEntityAboutElective() | |||
{ | |||
try | |||
{ | |||
var semesterAndYear = Common.GetSemesterAndYear(); | |||
var strAcademicYear = semesterAndYear.AcademicYearShort; | |||
var strSemester = semesterAndYear.Semester; | |||
var now = DateTime.Now; | |||
//不判断学年学期 | |||
return this.BaseRepository("CollegeMIS").FindEntity<EADateArrangeEntity>(x => x.WorkName == "线上选课" && x.MakeDate <= now && x.EndDate >= now && x.CheckMark == "1"); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -0,0 +1,309 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-05-15 10:33 | |||
/// 描 述:选修课课程 | |||
/// </summary> | |||
public class StuSelectLessonListOfElectiveOnlineBLL : StuSelectLessonListOfElectiveOnlineIBLL | |||
{ | |||
private StuSelectLessonListOfElectiveOnlineService stuSelectLessonListOfElectiveService = new StuSelectLessonListOfElectiveOnlineService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取StuSelectLessonListOfElectiveOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
stuSelectLessonListOfElectiveService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, StuSelectLessonListOfElectiveOnlineEntity entity) | |||
{ | |||
try | |||
{ | |||
stuSelectLessonListOfElectiveService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 获取StuSelectLessonListOfElectiveOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(string stuno, string olpeid) | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(stuno, olpeid); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntityByLessonInfo(string lessonNo, string lessonTime, string stuNo) | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineEntityByLessonInfo(lessonNo, lessonTime, stuNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取StuSelectLessonListOfElectiveOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetStuSelectLessonListOfElectiveOnlineListByStuNo(string stuno) | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineListByStuNo(stuno); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetQueryStuSelectResultList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetQueryStuSelectResultList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void Pass(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity) | |||
{ | |||
try | |||
{ | |||
stuSelectLessonListOfElectiveService.Pass(stulist, olpentity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void UnPass(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity) | |||
{ | |||
try | |||
{ | |||
stuSelectLessonListOfElectiveService.UnPass(stulist, olpentity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void UnPassOfFinish(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity) | |||
{ | |||
try | |||
{ | |||
stuSelectLessonListOfElectiveService.UnPassOfFinish(stulist, olpentity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetAllElectiveLesson(string academicYearNo, string semester) | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetAllElectiveLesson(academicYearNo, semester); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取StuSelectLessonListOfElectiveOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetStuSelectLessonListOfElectiveOnlineListByOLPEId(string olpeid) | |||
{ | |||
try | |||
{ | |||
return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineListByOLPEId(olpeid); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,229 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-05-15 10:33 | |||
/// 描 述:选修课课程 | |||
/// </summary> | |||
public class StuSelectLessonListOfElectiveOnlineEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// LIOEOId | |||
/// </summary> | |||
[Column("LIOEOID")] | |||
public string LIOEOId { get; set; } | |||
/// <summary> | |||
/// NoticeBookNo | |||
/// </summary> | |||
[Column("NOTICEBOOKNO")] | |||
public string NoticeBookNo { get; set; } | |||
/// <summary> | |||
/// StuNo | |||
/// </summary> | |||
[Column("STUNO")] | |||
public string StuNo { get; set; } | |||
/// <summary> | |||
/// DeptNo | |||
/// </summary> | |||
[Column("DEPTNO")] | |||
public string DeptNo { get; set; } | |||
/// <summary> | |||
/// MajorNo | |||
/// </summary> | |||
[Column("MAJORNO")] | |||
public string MajorNo { get; set; } | |||
/// <summary> | |||
/// ClassNo | |||
/// </summary> | |||
[Column("CLASSNO")] | |||
public string ClassNo { get; set; } | |||
/// <summary> | |||
/// MajorDetailNo | |||
/// </summary> | |||
[Column("MAJORDETAILNO")] | |||
public string MajorDetailNo { get; set; } | |||
/// <summary> | |||
/// MajorDetailName | |||
/// </summary> | |||
[Column("MAJORDETAILNAME")] | |||
public string MajorDetailName { get; set; } | |||
/// <summary> | |||
/// StuName | |||
/// </summary> | |||
[Column("STUNAME")] | |||
public string StuName { get; set; } | |||
/// <summary> | |||
/// GenderNo | |||
/// </summary> | |||
[Column("GENDERNO")] | |||
public bool? GenderNo { get; set; } | |||
/// <summary> | |||
/// Grade | |||
/// </summary> | |||
[Column("GRADE")] | |||
public string Grade { get; set; } | |||
/// <summary> | |||
/// AcademicYearNo | |||
/// </summary> | |||
[Column("ACADEMICYEARNO")] | |||
public string AcademicYearNo { get; set; } | |||
/// <summary> | |||
/// Semester | |||
/// </summary> | |||
[Column("SEMESTER")] | |||
public string Semester { get; set; } | |||
/// <summary> | |||
/// LessonNo | |||
/// </summary> | |||
[Column("LESSONNO")] | |||
public string LessonNo { get; set; } | |||
/// <summary> | |||
/// LessonName | |||
/// </summary> | |||
[Column("LESSONNAME")] | |||
public string LessonName { get; set; } | |||
/// <summary> | |||
/// LessonSortNo | |||
/// </summary> | |||
[Column("LESSONSORTNO")] | |||
public string LessonSortNo { get; set; } | |||
/// <summary> | |||
/// LessonSection | |||
/// </summary> | |||
[Column("LESSONSECTION")] | |||
public string LessonSection { get; set; } | |||
/// <summary> | |||
/// LessonTime | |||
/// </summary> | |||
[Column("LESSONTIME")] | |||
public string LessonTime { get; set; } | |||
/// <summary> | |||
/// EmpNo | |||
/// </summary> | |||
[Column("EMPNO")] | |||
public string EmpNo { get; set; } | |||
/// <summary> | |||
/// EmpName | |||
/// </summary> | |||
[Column("EMPNAME")] | |||
public string EmpName { get; set; } | |||
/// <summary> | |||
/// ClassRoomNo | |||
/// </summary> | |||
[Column("CLASSROOMNO")] | |||
public string ClassRoomNo { get; set; } | |||
/// <summary> | |||
/// ClassRoomName | |||
/// </summary> | |||
[Column("CLASSROOMNAME")] | |||
public string ClassRoomName { get; set; } | |||
/// <summary> | |||
/// StudyScore | |||
/// </summary> | |||
[Column("STUDYSCORE")] | |||
public decimal? StudyScore { get; set; } | |||
/// <summary> | |||
/// StartWeek | |||
/// </summary> | |||
[Column("STARTWEEK")] | |||
public int? StartWeek { get; set; } | |||
/// <summary> | |||
/// EndWeek | |||
/// </summary> | |||
[Column("ENDWEEK")] | |||
public int? EndWeek { get; set; } | |||
/// <summary> | |||
/// StartDate | |||
/// </summary> | |||
[Column("STARTDATE")] | |||
public DateTime? StartDate { get; set; } | |||
/// <summary> | |||
/// EndDate | |||
/// </summary> | |||
[Column("ENDDATE")] | |||
public DateTime? EndDate { get; set; } | |||
/// <summary> | |||
/// CreateTime | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// Remark | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// Status:1审核中,2报名成功,3报名失败 | |||
/// </summary> | |||
[Column("STATUS")] | |||
public int? Status { get; set; } | |||
/// <summary> | |||
/// F_SchoolId | |||
/// </summary> | |||
[Column("F_SCHOOLID")] | |||
public string F_SchoolId { get; set; } | |||
/// <summary> | |||
/// OrdinaryScoreScale | |||
/// </summary> | |||
[Column("ORDINARYSCORESCALE")] | |||
public decimal? OrdinaryScoreScale { get; set; } | |||
/// <summary> | |||
/// TermInScoreScale | |||
/// </summary> | |||
[Column("TERMINSCORESCALE")] | |||
public decimal? TermInScoreScale { get; set; } | |||
/// <summary> | |||
/// TermEndScoreScale | |||
/// </summary> | |||
[Column("TERMENDSCORESCALE")] | |||
public decimal? TermEndScoreScale { get; set; } | |||
/// <summary> | |||
/// OtherScoreScale | |||
/// </summary> | |||
[Column("OTHERSCORESCALE")] | |||
public decimal? OtherScoreScale { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
[NotMapped] public string LessonTypeId { get; set; } | |||
/// <summary> | |||
/// 已报名人数 | |||
/// </summary> | |||
[NotMapped] | |||
public int? StuNumOfApply { get; set; } | |||
[NotMapped] | |||
public int? StuNumMax { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,76 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-05-15 10:33 | |||
/// 描 述:选修课课程 | |||
/// </summary> | |||
public interface StuSelectLessonListOfElectiveOnlineIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取StuSelectLessonListOfElectiveOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
void SaveEntity(string keyValue, StuSelectLessonListOfElectiveOnlineEntity entity); | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 获取StuSelectLessonListOfElectiveOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(string stuno, string olpeid); | |||
StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntityByLessonInfo(string lessonNo, string lessonTime, string account); | |||
/// <summary> | |||
/// 获取StuSelectLessonListOfElectiveOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetStuSelectLessonListOfElectiveOnlineListByStuNo(string stuno); | |||
/// <summary> | |||
/// 获取StuSelectLessonListOfElectiveOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetStuSelectLessonListOfElectiveOnlineListByOLPEId(string olpeid); | |||
#endregion | |||
IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetQueryStuSelectResultList(Pagination pagination, string queryJson); | |||
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); | |||
} | |||
} |
@@ -0,0 +1,554 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-05-15 10:33 | |||
/// 描 述:选修课课程 | |||
/// </summary> | |||
public class StuSelectLessonListOfElectiveOnlineService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT t.*,b.StuNumMax,b.StuNum "); | |||
strSql.Append(" FROM StuSelectLessonListOfElectiveOnline t left join LessonInfoOfElectiveOnline b on t.LIOEOId=b.id "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["StuNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.StuNo = @StuNo "); | |||
} | |||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||
{ | |||
dp.Add("AcademicYearNo", "%" + queryParam["AcademicYearNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.AcademicYearNo Like @AcademicYearNo "); | |||
} | |||
if (!queryParam["Semester"].IsEmpty()) | |||
{ | |||
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Semester = @Semester "); | |||
} | |||
if (!queryParam["LessonNo"].IsEmpty()) | |||
{ | |||
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.LessonNo = @LessonNo "); | |||
} | |||
if (!queryParam["LessonName"].IsEmpty()) | |||
{ | |||
dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.LessonName Like @LessonName "); | |||
} | |||
if (!queryParam["EmpNo"].IsEmpty()) | |||
{ | |||
dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.EmpNo = @EmpNo "); | |||
} | |||
if (!queryParam["EmpName"].IsEmpty()) | |||
{ | |||
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.EmpName Like @EmpName "); | |||
} | |||
if (!queryParam["StuNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.StuNo = @StuNo "); | |||
} | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuName Like @StuName "); | |||
} | |||
if (!queryParam["Status"].IsEmpty()) | |||
{ | |||
dp.Add("Status", queryParam["Status"].ToInt(), DbType.Int32); | |||
strSql.Append(" AND t.Status = @Status "); | |||
} | |||
if (!queryParam["LIOEOId"].IsEmpty()) | |||
{ | |||
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); | |||
foreach (var item in list) | |||
{ | |||
//模式二:正式选课 | |||
var aa = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveOnlineEntity>(x => x.LIOEOId == item.LIOEOId); | |||
//已报名人数 | |||
item.StuNumOfApply = aa.Where(x => (x.Status == 1 || x.Status == 2)).Count(); | |||
} | |||
return list; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取StuSelectLessonListOfElectiveOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<StuSelectLessonListOfElectiveOnlineEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<StuSelectLessonListOfElectiveOnlineEntity>(t => t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, StuSelectLessonListOfElectiveOnlineEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public void Pass(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity) | |||
{ | |||
var db = BaseRepository("CollegeMIS"); | |||
try | |||
{ | |||
db.BeginTrans(); | |||
foreach (var item in stulist) | |||
{ | |||
db.ExecuteBySql("update StuSelectLessonListOfElectiveOnline set Status=2 where Id='" + item + "'"); | |||
} | |||
olpentity.StuNum += stulist.Length; | |||
db.Update(olpentity); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public void UnPass(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity) | |||
{ | |||
var db = BaseRepository("CollegeMIS"); | |||
try | |||
{ | |||
db.BeginTrans(); | |||
foreach (var item in stulist) | |||
{ | |||
db.ExecuteBySql("update StuSelectLessonListOfElectiveOnline set Status=3 where Id='" + item + "'"); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public void UnPassOfFinish(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity) | |||
{ | |||
var db = BaseRepository("CollegeMIS"); | |||
try | |||
{ | |||
db.BeginTrans(); | |||
int count = 0;//待拒绝学生数量 | |||
foreach (var item in stulist) | |||
{ | |||
var model = db.FindEntity<StuSelectLessonListOfElectiveOnlineEntity>(item); | |||
if (model != null) | |||
{ | |||
count++; | |||
db.ExecuteBySql("update StuSelectLessonListOfElectiveOnline set Status=3 where Id='" + item + "'"); | |||
} | |||
} | |||
//修改LessonInfoOfElectiveOnline通过人数 | |||
if (count > 0) | |||
{ | |||
olpentity.StuNum = olpentity.StuNum - count; | |||
db.Update(olpentity); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 获取StuSelectLessonListOfElectiveOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(string stuno, string olpeid) | |||
{ | |||
try | |||
{ | |||
//本学年本学期 | |||
var semesterAndYear = Common.GetSemesterAndYear(); | |||
var strAcademicYear = semesterAndYear.AcademicYearShort; | |||
var strSemester = semesterAndYear.Semester; | |||
var data = new StuSelectLessonListOfElectiveOnlineEntity(); | |||
if (string.IsNullOrEmpty(olpeid)) | |||
{ | |||
data = this.BaseRepository("CollegeMIS").FindEntity<StuSelectLessonListOfElectiveOnlineEntity>(x => x.StuNo == stuno && x.AcademicYearNo == strAcademicYear && x.Semester == strSemester); | |||
} | |||
else | |||
{ | |||
data = this.BaseRepository("CollegeMIS").FindEntity<StuSelectLessonListOfElectiveOnlineEntity>(x => x.StuNo == stuno && x.LIOEOId == olpeid); | |||
} | |||
return data; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取StuSelectLessonListOfElectiveOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntityByLessonInfo(string lessonNo, string lessonTime, string stuNo) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<StuSelectLessonListOfElectiveOnlineEntity>(x => x.LessonNo == lessonNo && x.LessonSection == lessonTime && x.StuNo == stuNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取StuSelectLessonListOfElectiveOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetStuSelectLessonListOfElectiveOnlineListByStuNo(string stuno) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveOnlineEntity>(x => x.StuNo == stuno); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取StuSelectLessonListOfElectiveOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetStuSelectLessonListOfElectiveOnlineListByOLPEId(string olpeid) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveOnlineEntity>(x => x.LIOEOId == olpeid); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
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("'" + 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(" 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) "); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["StuNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); | |||
strSql.Append(" AND a.StuNo = @StuNo "); | |||
} | |||
//if (!queryParam["AcademicYearNo"].IsEmpty()) | |||
//{ | |||
// dp.Add("AcademicYearNo", "" + queryParam["AcademicYearNo"].ToString() + "", DbType.String); | |||
// strSql.Append(" AND b.AcademicYearNo = @AcademicYearNo "); | |||
//} | |||
//if (!queryParam["Semester"].IsEmpty()) | |||
//{ | |||
// dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); | |||
// strSql.Append(" AND b.Semester = @Semester "); | |||
//} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND a.DeptNo = @DeptNo "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND a.MajorNo = @MajorNo "); | |||
} | |||
if (!queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||
strSql.Append(" AND a.ClassNo = @ClassNo "); | |||
} | |||
if (!queryParam["LessonNo"].IsEmpty()) | |||
{ | |||
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); | |||
strSql.Append(" AND c.LessonNo = @LessonNo "); | |||
} | |||
if (!queryParam["LessonName"].IsEmpty()) | |||
{ | |||
dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND c.LessonName Like @LessonName "); | |||
} | |||
if (!queryParam["EmpNo"].IsEmpty()) | |||
{ | |||
dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); | |||
strSql.Append(" AND c.EmpNo = @EmpNo "); | |||
} | |||
if (!queryParam["EmpName"].IsEmpty()) | |||
{ | |||
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND c.EmpName Like @EmpName "); | |||
} | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND a.StuName Like @StuName "); | |||
} | |||
if (!queryParam["Status"].IsEmpty()) | |||
{ | |||
dp.Add("Status", queryParam["Status"].ToInt(), DbType.Int32); | |||
strSql.Append(" AND Status = @Status "); | |||
} | |||
if (!queryParam["F_SchoolId"].IsEmpty()) | |||
{ | |||
dp.Add("F_SchoolId", queryParam["F_SchoolId"].ToString(), DbType.String); | |||
strSql.Append(" AND a.F_SchoolId = @F_SchoolId "); | |||
} | |||
if (!queryParam["ElectiveSelectStatus"].IsEmpty()) | |||
{ | |||
if (queryParam["ElectiveSelectStatus"].ToString() == "1") | |||
strSql.Append(" AND b.id is not null "); | |||
else | |||
strSql.Append(" AND b.id is null "); | |||
} | |||
if (!queryParam["ElectiveSignUpStatus"].IsEmpty()) | |||
{ | |||
if (queryParam["ElectiveSignUpStatus"].ToString() != "0") | |||
{ | |||
dp.Add("Status", queryParam["ElectiveSignUpStatus"].ToString(), DbType.String); | |||
strSql.Append(" AND b.Status = @Status "); | |||
} | |||
else | |||
{ | |||
strSql.Append(" AND b.Status is null "); | |||
} | |||
} | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveOnlineEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<StuSelectLessonListOfElectiveOnlineEntity> GetAllElectiveLesson(string academicYearNo, string semester) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveOnlineEntity>("select * from StuSelectLessonListOfElectiveOnline where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "'"); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
} | |||
} |
@@ -95,6 +95,10 @@ | |||
<Compile Include="EducationalAdministration\ElectiveMajorOnline\ElectiveMajorOnlineEntity.cs" /> | |||
<Compile Include="EducationalAdministration\ElectiveMajorOnline\ElectiveMajorOnlineIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\ElectiveMajorOnline\ElectiveMajorOnlineService.cs" /> | |||
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectiveOnline\StuSelectLessonListOfElectiveOnlineBLL.cs" /> | |||
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectiveOnline\StuSelectLessonListOfElectiveOnlineEntity.cs" /> | |||
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectiveOnline\StuSelectLessonListOfElectiveOnlineIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectiveOnline\StuSelectLessonListOfElectiveOnlineService.cs" /> | |||
<Compile Include="EducationalAdministration\YKTStateMent\YKTStateMentBLL.cs" /> | |||
<Compile Include="EducationalAdministration\YKTStateMent\YKTStateMentEntity.cs" /> | |||
<Compile Include="EducationalAdministration\YKTStateMent\YKTStateMentIBLL.cs" /> | |||
@@ -20,7 +20,7 @@ namespace Learun.Application.WorkFlow | |||
} | |||
else | |||
{ | |||
asset.ChangeStatusByProcessId(parameter.processId, 3); | |||
asset.ChangeStatusByProcessId(parameter.processId, 0); | |||
} | |||
} | |||
} | |||