@@ -149,6 +149,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
} | |||
entity.State = 0; | |||
entity.IsAllowEdit = true; | |||
entity.LessonSortNo = "1"; | |||
entity.CheckMark = "1"; | |||
entity.MakeDate = DateTime.Now; | |||
var model = classPlanIBLL.GetRepetitions(entity.F_SchoolId, entity.AcademicYearNo, entity.Semester, entity.DeptNo, entity.MajorNo, entity.Grade, entity.LessonNo); | |||
if (model != null) | |||
@@ -177,6 +179,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
var entity = classPlanIBLL.GetListById(keyValue); | |||
List<TeachClassEntity> TeachList = new List<TeachClassEntity>(); | |||
for (int i = 0; i < entity.Count; i++) | |||
{ | |||
var lessonList = classInfoIBLL.GetAllClass(). | |||
@@ -197,6 +200,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
TeachEntity.StuNum = entity[i].StuNum; | |||
TeachEntity.LessonSortNo = entity[i].LessonSortNo; | |||
TeachEntity.F_SchoolId = entity[i].F_SchoolId; | |||
TeachList.Add(TeachEntity); | |||
} | |||
} | |||
@@ -23,6 +23,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
private StuSelectLessonListIBLL StuSelectLesson = new StuSelectLessonListBLL(); | |||
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | |||
private StuScoreIBLL stuScoreIBLL = new StuScoreBLL(); | |||
private LessonInfoIBLL lessonInfoIBLL = new LessonInfoBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
@@ -150,7 +152,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult SetTeach(string keyValue, string EmpNo) | |||
{ | |||
var entityList = teachClassIBLL.GetTeachListById(keyValue); | |||
var lessonData = lessonInfoIBLL.GetAllLesson(); | |||
List<StuSelectLessonListEntity> TeachList = new List<StuSelectLessonListEntity>(); | |||
for (int i = 0; i < entityList.Count; i++) | |||
{ | |||
var stuDataList = stuInfoBasicIBLL.GetAllList().Where(s => s.DeptNo == entityList[i].DeptNo | |||
@@ -162,31 +167,33 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
for (int j = 0; j < stuDataList.Count; j++) | |||
{ | |||
StuSelectLessonListEntity TeachEntity = new StuSelectLessonListEntity(); | |||
TeachEntity.NoticeBookNo = stuDataList[j].StuNo; | |||
TeachEntity.StuNo = stuDataList[j].StuNo; | |||
TeachEntity.DeptNo = entityList[i].DeptNo; | |||
TeachEntity.MajorNo = entityList[i].MajorNo; | |||
TeachEntity.ClassNo = stuDataList[j].ClassNo; | |||
TeachEntity.MajorDetailNo = entityList[i].MajorDetailNo; | |||
TeachEntity.MajorDetailName = entityList[i].MajorDetailName; | |||
TeachEntity.StuName = stuDataList[j].StuName; | |||
TeachEntity.GenderNo = Convert.ToInt32(stuDataList[j].GenderNo).ToString(); | |||
TeachEntity.AcademicYearNo = entityList[i].AcademicYearNo; | |||
TeachEntity.Semester = entityList[i].Semester; | |||
TeachEntity.OpenLessonDeptNo = entityList[i].DeptNo; | |||
TeachEntity.OpenLessonMajorNo = entityList[i].MajorNo; | |||
TeachEntity.LessonNo = entityList[i].LessonNo; | |||
TeachEntity.PartCode = entityList[i].PartCode; | |||
TeachEntity.LessonName = lessonData.FirstOrDefault(m => m.LessonNo == TeachEntity.LessonNo)?.LessonName; | |||
TeachEntity.PartCode = ""; | |||
TeachEntity.OrdinaryScoreScale = 0; | |||
TeachEntity.TermInScoreScale = 0; | |||
TeachEntity.TermEndScoreScale = 0; | |||
TeachEntity.OtherScoreScale = 0; | |||
TeachEntity.TeachClassNo = entityList[i].TeachClassNo; | |||
TeachEntity.LessonSortNo = entityList[i].LessonSortNo; | |||
TeachEntity.StuSortNo = entityList[i].LessonSortNo; | |||
TeachEntity.StuSortNo = "02"; | |||
TeachEntity.Grade = entityList[i].Grade; | |||
TeachEntity.StudyScore = 2; | |||
TeachEntity.TotalStudyHour = 2; | |||
TeachEntity.StudyScore = 0; | |||
TeachEntity.TotalStudyHour = 0; | |||
TeachEntity.IsInEffect = "1"; | |||
TeachEntity.IsPitchOn = "1"; | |||
TeachEntity.EmpNo = EmpNo; | |||
TeachEntity.F_SchoolId = entityList[i].F_SchoolId; | |||
TeachEntity.CheckMark = "1"; | |||
TeachEntity.InsertTime = DateTime.Now; | |||
@@ -87,6 +87,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 选 成绩比例设置 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexElective() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 选 成绩比例设置 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormOfElective() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -111,6 +129,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListElective(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = openLessonPlanOfElectiveIBLL.GetPageListElective(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListOfMerge(string pagination, string queryJson) | |||
@@ -32,10 +32,6 @@ | |||
<div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div> | |||
<input id="LessonName" type="hidden" /> | |||
</div> | |||
@*<div class="col-xs-4 lr-form-item" data-table="ClassPlan"> | |||
<div class="lr-form-item-title">课程类别码</div> | |||
<div id="LessonSortNo"></div> | |||
</div>*@ | |||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||
<div class="lr-form-item-title">课程细类码</div> | |||
<div id="LessonSortDetailNo"></div> | |||
@@ -89,7 +89,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
$('#StuSortNo').val('02'); | |||
$('#LessonSortNo').val('2'); | |||
$('#LessonSortNo').val('1'); | |||
$('#CheckStyleNo').val('1'); | |||
$('#ScoreRecordStyleNo').val('1'); | |||
$('#CheckMark').val('1'); | |||
@@ -39,14 +39,8 @@ var bootstrap = function ($, learun) { | |||
$('#EmpNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#LessonNo').lrselect({ | |||
placeholder: "请选择课程", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||
value: 'value', | |||
text: 'text', | |||
maxHeight: 200 | |||
}); | |||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -217,7 +211,7 @@ var bootstrap = function ($, learun) { | |||
{ label: "上机课时", name: "PracticeHour", width: 80, align: "left" }, | |||
{ label: "班级编号", name: "TeachClassNo", width: 80, align: "left" }, | |||
{ | |||
label: "班级名称", name: "TeachClassNo", width: 80, align: "left" , | |||
label: "班级名称", name: "TeachClassNo", width: 80, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
@@ -24,8 +24,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
var postData = $('#form').lrGetFormData(); | |||
var EmpNo = postData.EmpNo; | |||
console.log(EmpNo); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/SetTeach', { keyValue: keyValue, EmpNo: EmpNo}, function () { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/SetTeach', { keyValue: keyValue, EmpNo: EmpNo }, function () { | |||
}); | |||
}; | |||
page.init(); | |||
@@ -24,9 +24,9 @@ var bootstrap = function ($, learun) { | |||
} | |||
var postData = $('#form').lrGetFormData(); | |||
var EmpNo = postData.EmpNo; | |||
console.log(EmpNo); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/QZSetTeach', { keyValue: keyValue, EmpNo: EmpNo}, function () { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/QZSetTeach', { keyValue: keyValue, EmpNo: EmpNo }, function () { | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,47 @@ | |||
@{ | |||
ViewBag.Title = "成绩比例设置"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<style> | |||
.form-control{ | |||
width:90%; | |||
} | |||
.form-control + span{ | |||
position:absolute; | |||
top:0; | |||
right:0; | |||
width:10%; | |||
height:100%; | |||
line-height:38px; | |||
text-align:center; | |||
} | |||
</style> | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="OpenLessonPlanOfElective"> | |||
<div class="lr-form-item-title">平时成绩占比<font face="宋体">*</font></div> | |||
<input id="OrdinaryScoreScale" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatintZero" /> | |||
<span>%</span> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="OpenLessonPlanOfElective"> | |||
<div class="lr-form-item-title">期中成绩占比<font face="宋体">*</font></div> | |||
<input id="TermInScoreScale" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatintZero" /> | |||
<span>%</span> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="OpenLessonPlanOfElective"> | |||
<div class="lr-form-item-title">期末成绩占比<font face="宋体">*</font></div> | |||
<input id="TermEndScoreScale" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatintZero" /> | |||
<span>%</span> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="OpenLessonPlanOfElective"> | |||
<div class="lr-form-item-title">其他成绩占比<font face="宋体">*</font></div> | |||
<input id="OtherScoreScale" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatintZero" /> | |||
<span>%</span> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CdLessonType"> | |||
<div class="lr-form-item-title">是否允许编辑<font face="宋体">*</font></div> | |||
<div id="IsAllowEdit" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/Form.js") |
@@ -0,0 +1,62 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-08-21 17:28 | |||
* 描 述:成绩比例设置 | |||
*/ | |||
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 () { | |||
$('#IsAllowEdit').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/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 OrdinaryScoreScale = $('#OrdinaryScoreScale').val(); | |||
var TermInScoreScale = $('#TermInScoreScale').val(); | |||
var TermEndScoreScale = $('#TermEndScoreScale').val(); | |||
var OtherScoreScale = $('#OtherScoreScale').val(); | |||
var totalScale = Number(OrdinaryScoreScale) + Number(TermInScoreScale) + Number(TermEndScoreScale) + Number(OtherScoreScale); | |||
if (totalScale !== 100) { | |||
learun.alert.warning("成绩比例之和必须等于100!"); | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,42 @@ | |||
@{ | |||
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-12 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">课程</div> | |||
<div id="LessonNo" type="lrselect" class="lr-select"></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 class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_edit" 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/OpenLessonPlanOfElective/IndexElective.js") |
@@ -0,0 +1,134 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-08-21 17:28 | |||
* 描 述:成绩比例设置 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
page.bindSelect(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 200, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/FormOfElective', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '成绩比例设置', | |||
url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/FormOfElective?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
bindSelect: function () { | |||
//校区 | |||
$('#F_SchoolId').lrDataSourceSelect({ | |||
code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { } | |||
}); | |||
//学年 | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "请选择学期", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#LessonNo').lrselect({ | |||
placeholder: "请选择课程", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetPageListElective', | |||
headData: [ | |||
{ label: "校区", name: "F_School", width: 150, align: "left" }, | |||
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 80, align: "left" }, | |||
{ label: "课程编号", name: "LessonNo", width: 100, align: "left" }, | |||
{ label: "课程名称", name: "LessonName", width: 150, align: "left" }, | |||
{ label: "平时成绩占比", name: "OrdinaryScoreScale", width: 100, align: "left" }, | |||
{ label: "期中成绩占比", name: "TermInScoreScale", width: 100, align: "left" }, | |||
{ label: "期末成绩占比", name: "TermEndScoreScale", width: 100, align: "left" }, | |||
{ label: "其他成绩占比", name: "OtherScoreScale", width: 100, align: "left" }, | |||
{ | |||
label: "是否允许编辑", name: "IsAllowEdit", width: 100, align: "left", formatter: function (cellvalue) { | |||
return (cellvalue === true || cellvalue === "true") ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
isMultiselect: true, | |||
sidx: 'AcademicYearNo,Semester', | |||
sord: 'desc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -1035,6 +1035,8 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\BindAccountIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\FormElective.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\IndexElective.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\FormOfElective.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\PracticeBase\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\PracticeBase\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\R_EnterBuilding\ClassReport.js" /> | |||
@@ -7848,6 +7850,8 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\FormElective.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormExamTime.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\FormTime.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\IndexElective.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\FormOfElective.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -35,7 +35,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
strSql.Append(@" t.*,l.LessonTypeId "); | |||
strSql.Append(" FROM OpenLessonPlan t "); | |||
strSql.Append(" left join lessoninfo l on t.lessonno=l.lessonno "); | |||
strSql.Append(" WHERE 1=1 "); | |||
strSql.Append(" WHERE 1=1 and l.CheckMark=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
@@ -42,6 +42,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<OpenLessonPlanOfElectiveEntity> GetPageListElective(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return openLessonPlanOfElectiveService.GetPageListElective(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据【学子在线-选课中心】 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
@@ -141,7 +164,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public void AddForm(string keyValue, OpenLessonPlanOfElectiveEntity entity) | |||
{ | |||
try | |||
@@ -162,6 +162,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </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; } | |||
public bool? IsAllowEdit { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
@@ -182,6 +206,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
/// <summary> | |||
/// 校区名称 | |||
/// </summary> | |||
[NotMapped] | |||
public string F_School { get; set; } | |||
[NotMapped] | |||
public string StuNo { get; set; } | |||
@@ -22,6 +22,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <returns></returns> | |||
IEnumerable<OpenLessonPlanOfElectiveEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<OpenLessonPlanOfElectiveEntity> GetPageListElective(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取页面显示列表数据【学子在线-选课中心】 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
@@ -79,6 +79,93 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 选修成绩比例设置 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<OpenLessonPlanOfElectiveEntity> GetPageListElective(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var basedbname = BaseRepository().getDbConnection().Database; | |||
var strSql = new StringBuilder(); | |||
strSql.Append("select t.*,c.F_FullName as F_School from OpenLessonPlanOfElective t "); | |||
strSql.Append(" left join " + basedbname + ".dbo.LR_Base_Company c on t.F_SchoolId=c.f_CompanyId "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["F_SchoolId"].IsEmpty()) | |||
{ | |||
dp.Add("F_SchoolId", queryParam["F_SchoolId"].ToString(), DbType.String); | |||
strSql.Append(" AND t.F_SchoolId = @F_SchoolId "); | |||
} | |||
if (!queryParam["F_School"].IsEmpty()) | |||
{ | |||
dp.Add("F_School", "%" + queryParam["F_School"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND c.F_FullName Like @F_School "); | |||
} | |||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||
{ | |||
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); | |||
} | |||
if (!queryParam["Semester"].IsEmpty()) | |||
{ | |||
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Semester = @Semester "); | |||
} | |||
if (!queryParam["Grade"].IsEmpty()) | |||
{ | |||
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Grade = @Grade "); | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||
} | |||
if (!queryParam["DeptName"].IsEmpty()) | |||
{ | |||
dp.Add("DeptName", "%" + queryParam["DeptName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND d.DeptName Like @DeptName "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||
} | |||
if (!queryParam["MajorName"].IsEmpty()) | |||
{ | |||
dp.Add("MajorName", "%" + queryParam["MajorName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND m.MajorName Like @MajorName "); | |||
} | |||
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 "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<OpenLessonPlanOfElectiveEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据【学子在线-选课中心】 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
@@ -167,6 +167,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
stuLessonList.F_SchoolId = item.F_SchoolId; | |||
stuLessonList.NoticeBookNo = item.NoticeBookNo; | |||
stuLessonList.StuNo = item.StuNo; | |||
stuLessonList.StuNo = item.StuNo; | |||
stuLessonList.DeptNo = item.DeptNo; | |||
stuLessonList.MajorNo = item.MajorNo; | |||
stuLessonList.ClassNo = item.ClassNo; | |||
@@ -201,7 +202,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
stuLessonList.CheckMark = item.CheckMark; | |||
stuLessonList.InsertTime = item.InsertTime; | |||
stuLessonList.CheckMark = "1"; | |||
db.Insert(stuLessonList); | |||
if (db.FindEntity<StuSelectLessonListEntity>(x => x.AcademicYearNo == item.AcademicYearNo && x.Semester == item.Semester && x.DeptNo == item.DeptNo && x.StuNo == item.StuNo && x.EmpNo == item.EmpNo | |||
&& x.MajorNo == item.MajorNo && x.ClassNo == item.ClassNo && x.Grade == item.Grade && x.LessonNo == item.LessonNo && x.F_SchoolId == item.F_SchoolId) == null) | |||
{ | |||
db.Insert(stuLessonList); | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
@@ -305,12 +305,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
Teach.DeptNo = item.DeptNo; | |||
Teach.MajorNo = item.MajorNo; | |||
Teach.Grade = item.Grade; | |||
Teach.EmpNo = item.EmpNo; | |||
Teach.Semester = item.Semester; | |||
Teach.LessonNo = item.LessonNo; | |||
Teach.StuNum = item.StuNum; | |||
Teach.LessonSortNo = item.LessonSortNo; | |||
Teach.F_SchoolId = item.F_SchoolId; | |||
db.Insert(Teach); | |||
if (db.FindEntity<TeachClassEntity>(x => x.AcademicYearNo == Teach.AcademicYearNo && x.Semester == Teach.Semester | |||
&& x.DeptNo == Teach.DeptNo && x.TeachClassNo == Teach.TeachClassNo | |||
&& x.MajorNo == Teach.MajorNo && x.Grade == Teach.Grade | |||
&& x.LessonNo == Teach.LessonNo && x.F_SchoolId == Teach.F_SchoolId) == null) | |||
{ | |||
db.Insert(Teach); | |||
} | |||
} | |||
db.Commit(); | |||
} | |||