Browse Source

Merge branch '西昌分支' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 西昌分支

西昌缴费二期
zhangli 2 years ago
parent
commit
a222a70a54
18 changed files with 970 additions and 11 deletions
  1. +88
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs
  2. +47
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.cshtml
  3. +62
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.js
  4. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.cshtml
  5. +152
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.js
  6. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.cshtml
  7. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js
  8. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  9. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs
  10. +111
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs
  11. +26
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs
  12. +21
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs
  13. +295
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs
  14. +10
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs
  15. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveBLL.cs
  16. +5
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveEntity.cs
  17. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveIBLL.cs
  18. +54
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveService.cs

+ 88
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs View File

@@ -79,6 +79,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 获取数据
@@ -153,6 +171,59 @@ 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);
}

/// <summary>
/// 获取表单数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetOpenLessonPlanEntityByJson(string queryJson)
{
var OpenLessonPlanData = openLessonPlanOfElectiveIBLL.GetOpenLessonPlanEntityByJson(queryJson);
var jsonData = new
{
OpenLessonPlanOfElective = OpenLessonPlanData,
};
return Success(jsonData);
}

/// <summary>
/// 获取表单数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetStuSelectLessonListEntityByJson(string queryJson)
{
var StuSelectLessonListData = openLessonPlanOfElectiveIBLL.GetStuSelectLessonListEntityByJson(queryJson);
var jsonData = new
{
StuSelectLessonListOfElective = StuSelectLessonListData,
};
return Success(jsonData);
}
#endregion

#region 提交数据
@@ -242,6 +313,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success("保存成功!");
}


/// <summary>
/// 设置成绩比例
/// </summary>
/// <param name="queryJson"></param>
/// <param name="strEntity"></param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveFormOfElective(string keyValue, string strEntity)
{
OpenLessonPlanOfElectiveEntity entity = strEntity.ToObject<OpenLessonPlanOfElectiveEntity>();
openLessonPlanOfElectiveIBLL.SaveFormOfElective(keyValue, entity);

return Success("保存成功!");
}
#endregion

#region 扩展数据


+ 47
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.cshtml View File

@@ -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/FormOfElective.js")

+ 62
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.js View File

@@ -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/OpenLessonPlanOfElective/SaveFormOfElective?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 50
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.cshtml View File

@@ -0,0 +1,50 @@
@{
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 class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教师</div>
<div id="EmpNo" type="lrselect" class="lr-select"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教室</div>
<div id="ClassRoomNo" 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>&nbsp;成绩比例设置</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.js")

+ 152
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.js View File

@@ -0,0 +1,152 @@
/* * 版 本 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'
});
$('#EmpNo').lrselect({
placeholder: "请选择老师",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetEmpNoData',
value: 'value',
text: 'text'
});
$('#ClassRoomNo').lrselect({
placeholder: "请选择教室",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetElectiveClassRoomNoData',
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: "LessonSection", width: 100, align: "left" },
{ label: "教室编号", name: "ClassRoomNo", width: 100, align: "left" },
{ label: "教室", name: "ClassRoomName", width: 100, align: "left" },
{ label: "教师编号", name: "EmpNo", width: 100, align: "left" },
{ label: "教师名称", name: "EmpName", 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();
}

+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.cshtml View File

@@ -86,17 +86,17 @@
<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">
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_input" class="btn btn-default"><i class="fa fa-edit">&nbsp;开始录入</i></a>
<a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit">&nbsp;提交成绩</i></a>
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock">&nbsp;提交教务处</i></a>
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock">&nbsp;去审核成绩</i></a>
<a id="lr_setScale" class="btn btn-default"><i class="fa fa-edit">&nbsp;设置成绩比例</i></a>
</div>*@
</div>
</div>

</div>
@*<div class="scaleRow divRow">
<div class="scaleRow divRow">
<span>比例设置:</span>
<span>平时成绩占比 <span id="OrdinaryScoreScale">0</span> %,</span>
<span>期中成绩占比 <span id="TermInScoreScale">0</span> %,</span>
@@ -108,7 +108,7 @@
<span id="minutes" data-minutes="30"></span>分钟(<span id="seconds" data-seconds="60"></span>秒)
<div id="addMinutesBtn" data-minutes="30">续时</div>
</div>
</div>*@
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js View File

@@ -198,10 +198,10 @@ var bootstrap = function ($, learun) {
$('#lr_setScale').on('click', function () {
var query = judgeSelect();
if (query) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetOpenLessonPlanEntityByJson?queryJson=' + JSON.stringify(query), function (data) {
if (data["OpenLessonPlan"] != null) {
if (data["OpenLessonPlan"].IsAllowEdit) { //教务允许成绩录入时编辑比例
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(query), function (data) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetOpenLessonPlanEntityByJson?queryJson=' + JSON.stringify(query), function (data) {
if (data["OpenLessonPlanOfElective"] != null) {
if (data["OpenLessonPlanOfElective"].IsAllowEdit) { //教务允许成绩录入时编辑比例
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(query), function (data) {
if (data["StuSelectLessonList"] != null) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) {
if (data != null) {


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -1035,6 +1035,8 @@
<Content Include="Areas\EducationalAdministration\Views\LoginUserBind\BindAccountIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\FormOfElective.js" />
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\IndexElective.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" />
@@ -7706,6 +7708,8 @@
<Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexForClass.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexItem.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\FormOfElective.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\IndexElective.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs View File

@@ -51,6 +51,7 @@ namespace Learun.Application.WebApi.Modules
Get["/teacherNotRecord"] = GetTeachersNotRecord;
Get["/classNotRecord"] = GetClassesNotRecord;
Get["/stuNotRecord"] = GetStusNotRecord;
Get["trantest"] = TranTest;
//按条件重置基础数据同步状态
Get["/initbasicdata"] = InitBasicData;

@@ -70,6 +71,11 @@ namespace Learun.Application.WebApi.Modules
private StuSelectLessonListOfElectiveIBLL stuSelectLessonListOfElectiveIbll =
new StuSelectLessonListOfElectiveBLL();

private Response TranTest(dynamic _)
{
return Success("ok");
}

private Response GetAllLesson(dynamic _)
{
var result = lessonInfoIbll.GetAllLesson();


+ 111
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs View File

@@ -88,7 +88,75 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

/// <summary>
/// 获取OpenLessonPlanOfElective表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <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>
/// 获取OpenLessonPlan表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public OpenLessonPlanOfElectiveEntity GetOpenLessonPlanEntityByJson(string queryJson)
{
try
{
return openLessonPlanOfElectiveService.GetOpenLessonPlanEntityByJson(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取StuSelectLessonListEntity表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public StuSelectLessonListOfElectiveEntity GetStuSelectLessonListEntityByJson(string queryJson)
{
try
{
return openLessonPlanOfElectiveService.GetStuSelectLessonListEntityByJson(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据
@@ -141,6 +209,48 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveFormOfElective(string keyValue, OpenLessonPlanOfElectiveEntity entity)
{
try
{
openLessonPlanOfElectiveService.SaveFormOfElective(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void SaveStuSelectLessonListScaleByJson(string queryJson, StuSelectLessonListOfElectiveEntity entity)
{
try
{
openLessonPlanOfElectiveService.SaveStuSelectLessonListScaleByJson(queryJson, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 扩展数据


+ 26
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs View File

@@ -162,6 +162,31 @@ 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; }
/// <summary>
/// IsAllowEdit
/// </summary>
[Column("IsAllowEdit")]
public bool? IsAllowEdit { get; set; }
#endregion

#region 扩展操作
@@ -223,6 +248,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[NotMapped] public string LessonNo2 { get; set; }
[NotMapped] public string EmpNo2 { get; set; }
[NotMapped] public string LessonTypeId { get; set; }
[NotMapped] public string F_School { get; set; }

/// <summary>
/// 选课专业列表


+ 21
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs View File

@@ -34,6 +34,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <summary>
/// <returns></returns>
OpenLessonPlanOfElectiveEntity GetOpenLessonPlanOfElectiveEntity(string keyValue);

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<OpenLessonPlanOfElectiveEntity> GetPageListElective(Pagination pagination, string queryJson);

/// <summary>
/// 获取OpenLessonPlanOfElectiveEntity表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
OpenLessonPlanOfElectiveEntity GetOpenLessonPlanEntityByJson(string queryJson);
/// <summary>
/// 获取StuSelectLessonListEntity表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
StuSelectLessonListOfElectiveEntity GetStuSelectLessonListEntityByJson(string queryJson);
#endregion

#region 提交数据
@@ -50,6 +70,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <summary>
/// <returns></returns>
void SaveEntity(string keyValue, OpenLessonPlanOfElectiveEntity entity);
void SaveFormOfElective(string keyValue, OpenLessonPlanOfElectiveEntity entity);
#endregion

#region 扩展数据


+ 295
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs View File

@@ -200,7 +200,178 @@ 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 ");
}
if (!queryParam["EmpNo"].IsEmpty())
{
dp.Add("EmpNo", "%" + queryParam["EmpNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.EmpNo Like @EmpNo ");
}
if (!queryParam["ClassRoomNo"].IsEmpty())
{
dp.Add("ClassRoomNo", "%" + queryParam["ClassRoomNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ClassRoomNo Like @ClassRoomNo ");
}
return this.BaseRepository("CollegeMIS").FindList<OpenLessonPlanOfElectiveEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取OpenLessonPlan表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public OpenLessonPlanOfElectiveEntity GetOpenLessonPlanEntityByJson(string queryJson)
{
try
{
var queryParam = queryJson.ToJObject();
var F_SchoolId = queryParam["F_SchoolId"].ToString();
var AcademicYearNo = queryParam["AcademicYearNo"].ToString();
var Semester = queryParam["Semester"].ToString();
var LessonNo = queryParam["LessonNo"].ToString();
var LessonSection = queryParam["LessonSection"].ToString();
var ClassRoomNo = queryParam["ClassRoomNo"].ToString();

var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(x => x.ClassroomNo == ClassRoomNo);
if (classInfoEntity == null)
{
return new OpenLessonPlanOfElectiveEntity();
}

return this.BaseRepository("CollegeMIS").FindEntity<OpenLessonPlanOfElectiveEntity>(x => x.F_SchoolId == F_SchoolId && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester && x.ClassRoomNo == classInfoEntity.ClassroomNo && x.LessonSection == LessonSection && x.LessonNo == LessonNo && x.LessonSortNo == "2");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取StuSelectLessonListEntity表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public StuSelectLessonListOfElectiveEntity GetStuSelectLessonListEntityByJson(string queryJson)
{
try
{
var queryParam = queryJson.ToJObject();
var F_SchoolId = queryParam["F_SchoolId"].ToString();
var AcademicYearNo = queryParam["AcademicYearNo"].ToString();
var Semester = queryParam["Semester"].ToString();
var LessonNo = queryParam["LessonNo"].ToString();
var LessonSection = queryParam["LessonSection"].ToString();
var ClassRoomNo = queryParam["ClassRoomNo"].ToString();

var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(x => x.ClassroomNo == ClassRoomNo);
if (classInfoEntity == null)
{
return new StuSelectLessonListOfElectiveEntity();
}

return this.BaseRepository("CollegeMIS").FindEntity<StuSelectLessonListOfElectiveEntity>(x => x.F_SchoolId == F_SchoolId && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester && x.LessonNo == LessonNo && x.LessonSortNo == "2" && x.ClassRoomNo == ClassRoomNo && x.LessonSection == LessonSection);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据
@@ -262,6 +433,130 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveFormOfElective(string keyValue, OpenLessonPlanOfElectiveEntity entity)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
if (!string.IsNullOrEmpty(keyValue))
{
//单个编辑
//entity.Modify(keyValue);
//this.BaseRepository("CollegeMIS").Update(entity);

//多个编辑
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var model = db.FindEntity<OpenLessonPlanOfElectiveEntity>(item);
if (model != null)
{
model.OrdinaryScoreScale = entity.OrdinaryScoreScale;
model.TermInScoreScale = entity.TermInScoreScale;
model.TermEndScoreScale = entity.TermEndScoreScale;
model.OtherScoreScale = entity.OtherScoreScale;
model.IsAllowEdit = entity.IsAllowEdit;
db.Update(model);

//修改StuSelectLessonList中的比例
db.ExecuteBySql("update StuSelectLessonListOfElective set OrdinaryScoreScale=" + entity.OrdinaryScoreScale + ",TermInScoreScale=" + entity.TermInScoreScale + ",TermEndScoreScale=" + entity.TermEndScoreScale + ",OtherScoreScale=" + entity.OtherScoreScale + " where AcademicYearNo='" + model.AcademicYearNo + "' and Semester='" + model.Semester + "' and LessonNo='" + model.LessonNo + "' and LessonSortNo='" + model.LessonSortNo + "' ");

//修改StuScore中的成绩
var beforeList = db.FindList<StuScoreEntity>(x => x.AcademicYearNo == model.AcademicYearNo && x.Semester == model.Semester && x.LessonNo == model.LessonNo && x.LessonSortNo == model.LessonSortNo);
if (beforeList.Any())
{
foreach (var stuScoreItem in beforeList)
{
if (stuScoreItem.Score != null)
{
stuScoreItem.Score = (stuScoreItem.OrdinaryScore * (model.OrdinaryScoreScale / 100) + stuScoreItem.TermInScore * (model.TermInScoreScale / 100) + stuScoreItem.TermEndScore * (model.TermEndScoreScale / 100) + stuScoreItem.OtherScore * (model.OtherScoreScale / 100)).ToDecimal(0);
db.Update(stuScoreItem);
}
}
}

}
}
}
else
{
entity.Create();
db.Insert(entity);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存StuSelectLessonList中的成绩比例
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveStuSelectLessonListScaleByJson(string queryJson, StuSelectLessonListOfElectiveEntity entity)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var queryParam = queryJson.ToJObject();
var F_SchoolId = queryParam["F_SchoolId"].ToString();
var AcademicYearNo = queryParam["AcademicYearNo"].ToString();
var Semester = queryParam["Semester"].ToString();
var LessonNo = queryParam["LessonNo"].ToString();
var ClassRoomNo = queryParam["ClassRoomNo"].ToString();
var LessonSection = queryParam["LessonSection"].ToString();

var classInfoEntity = db.FindEntity<ClassroomInfoEntity>(x => x.ClassroomNo == ClassRoomNo);
if (classInfoEntity != null)
{
db.ExecuteBySql("update StuSelectLessonListOfElective set OrdinaryScoreScale=" + entity.OrdinaryScoreScale + ",TermInScoreScale=" + entity.TermInScoreScale + ",TermEndScoreScale=" + entity.TermEndScoreScale + ",OtherScoreScale=" + entity.OtherScoreScale + " where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonSection='" + LessonSection + "' and ClassroomNo='" + classInfoEntity.ClassroomNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='2' ");

//修改StuScore中的成绩
var beforeList = db.FindList<StuScoreEntity>(x => x.F_SchoolId == F_SchoolId && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester && x.ClassRoomNo == classInfoEntity.ClassroomNo && x.LessonNo == LessonNo && x.LessonSortNo == "2" && x.LessonSection == LessonSection);
if (beforeList.Any())
{
foreach (var stuScoreItem in beforeList)
{
if (stuScoreItem.Score != null)
{
stuScoreItem.Score = (stuScoreItem.OrdinaryScore * (entity.OrdinaryScoreScale / 100) + stuScoreItem.TermInScore * (entity.TermInScoreScale / 100) + stuScoreItem.TermEndScore * (entity.TermEndScoreScale / 100) + stuScoreItem.OtherScore * (entity.OtherScoreScale / 100)).ToDecimal(0);
db.Update(stuScoreItem);
}
}
}

}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 扩展数据


+ 10
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs View File

@@ -374,7 +374,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
strSql.Append(" and t.ClassNo=@ClassNo ");
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
}

if (!queryParam["LessonSection"].IsEmpty())
{
strSql.Append(" and t.LessonSection=@LessonSection ");
dp.Add("LessonSection", queryParam["LessonSection"].ToString(), DbType.String);
}
if (!queryParam["ClassRoomNo"].IsEmpty())
{
strSql.Append(" and t.ClassRoomNo=@ClassRoomNo ");
dp.Add("ClassRoomNo", queryParam["ClassRoomNo"].ToString(), DbType.String);
}
return this.BaseRepository("CollegeMIS").FindEntity<StuScoreEntity>(strSql.ToString(), dp);
}
catch (Exception ex)


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveBLL.cs View File

@@ -117,6 +117,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveStuSelectLessonListScaleByJson(string queryJson, StuSelectLessonListOfElectiveEntity entity)
{
try
{
stuSelectLessonListOfElectiveService.SaveStuSelectLessonListScaleByJson(queryJson, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion



+ 5
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveEntity.cs View File

@@ -190,6 +190,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[Column("OTHERSCORESCALE")]
public decimal? OtherScoreScale { get; set; }
/// <summary>
/// F_SchoolId
/// </summary>
[Column("F_SCHOOLID")]
public string F_SchoolId { get; set; }
#endregion

#region 扩展操作
@@ -211,7 +216,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
#endregion
#region 扩展字段

[NotMapped] public string F_SchoolId { get; set; }
[NotMapped] public string LessonTypeId { get; set; }

#endregion


+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveIBLL.cs View File

@@ -43,6 +43,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <summary>
/// <returns></returns>
void SaveEntity(string keyValue, StuSelectLessonListOfElectiveEntity entity);

/// <summary>
/// 保存StuSelectLessonList中的成绩比例
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void SaveStuSelectLessonListScaleByJson(string queryJson, StuSelectLessonListOfElectiveEntity entity);
#endregion

#region 扩展数据


+ 54
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveService.cs View File

@@ -4,6 +4,7 @@ using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
@@ -280,7 +281,60 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
/// <summary>
/// 保存StuSelectLessonList中的成绩比例
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveStuSelectLessonListScaleByJson(string queryJson, StuSelectLessonListOfElectiveEntity entity)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var queryParam = queryJson.ToJObject();
var F_SchoolId = queryParam["F_SchoolId"].ToString();
var AcademicYearNo = queryParam["AcademicYearNo"].ToString();
var Semester = queryParam["Semester"].ToString();
var LessonNo = queryParam["LessonNo"].ToString();
var ClassRoomNo = queryParam["ClassRoomNo"].ToString();
var LessonSection = queryParam["LessonSection"].ToString();

var classInfoEntity = db.FindEntity<ClassroomInfoEntity>(x => x.ClassroomNo == ClassRoomNo);
if (classInfoEntity != null)
{
db.ExecuteBySql("update StuSelectLessonListOfElective set OrdinaryScoreScale=" + entity.OrdinaryScoreScale + ",TermInScoreScale=" + entity.TermInScoreScale + ",TermEndScoreScale=" + entity.TermEndScoreScale + ",OtherScoreScale=" + entity.OtherScoreScale + " where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonSection='" + LessonSection + "' and ClassroomNo='" + classInfoEntity.ClassroomNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='2' ");
db.ExecuteBySql("update OpenLessonPlanOfElective set OrdinaryScoreScale=" + entity.OrdinaryScoreScale + ",TermInScoreScale=" + entity.TermInScoreScale + ",TermEndScoreScale=" + entity.TermEndScoreScale + ",OtherScoreScale=" + entity.OtherScoreScale + " where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonSection='" + LessonSection + "' and ClassroomNo='" + classInfoEntity.ClassroomNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='2' ");

//修改StuScore中的成绩
var beforeList = db.FindList<StuScoreEntity>(x => x.F_SchoolId == F_SchoolId && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester && x.ClassRoomNo == classInfoEntity.ClassroomNo && x.LessonNo == LessonNo && x.LessonSortNo == "2" && x.LessonSection == LessonSection);
if (beforeList.Any())
{
foreach (var stuScoreItem in beforeList)
{
if (stuScoreItem.Score != null)
{
stuScoreItem.Score = (stuScoreItem.OrdinaryScore * (entity.OrdinaryScoreScale / 100) + stuScoreItem.TermInScore * (entity.TermInScoreScale / 100) + stuScoreItem.TermEndScore * (entity.TermEndScoreScale / 100) + stuScoreItem.OtherScore * (entity.OtherScoreScale / 100)).ToDecimal(0);
db.Update(stuScoreItem);
}
}
}

}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 扩展数据


Loading…
Cancel
Save