@@ -0,0 +1,117 @@ | |||
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 V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2025-01-14 15:43 | |||
/// 描 述:考察课等级分数范围 | |||
/// </summary> | |||
public class CourseScoreOptionsController : MvcControllerBase | |||
{ | |||
private CourseScoreOptionsIBLL courseScoreOptionsIBLL = new CourseScoreOptionsBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = courseScoreOptionsIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var CourseScoreOptionsData = courseScoreOptionsIBLL.GetCourseScoreOptionsEntity( keyValue ); | |||
var jsonData = new { | |||
CourseScoreOptions = CourseScoreOptionsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
courseScoreOptionsIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
CourseScoreOptionsEntity entity = strEntity.ToObject<CourseScoreOptionsEntity>(); | |||
courseScoreOptionsIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -32,6 +32,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
private StuScoreNotPassIBLL stuScoreNotPassIBLL = new StuScoreNotPassBLL(); | |||
private StuScoreNotPassTwoIBLL stuScoreNotPassTwoIBLL = new StuScoreNotPassTwoBLL(); | |||
private EADateArrangeIBLL eADateArrangeIBLL = new EADateArrangeBLL(); | |||
private CourseScoreOptionsIBLL courseScoreOptionsIBLL = new CourseScoreOptionsBLL(); | |||
#region 视图功能 | |||
@@ -813,11 +814,29 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult GetScoreListByStuInfo(string queryJson) | |||
{ | |||
var data = stuScoreIBLL.GetScoreListByStuInfo(queryJson); | |||
var kck = courseScoreOptionsIBLL.GetNoPageList().ToList(); | |||
if (data.Any()) | |||
{ | |||
data = data.OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.LessonSortNo).ThenBy(x => x.LessonNo); | |||
data = data.OrderByDescending(x => x.AcademicYearNo) | |||
.ThenByDescending(x => x.Semester) | |||
.ThenBy(x => x.LessonSortNo) | |||
.ThenBy(x => x.LessonNo); | |||
foreach (var stuScoreEntity in data) | |||
{ | |||
if (stuScoreEntity.ExamType!="1") | |||
{ | |||
stuScoreEntity.ScoreMark = "无效分数"; | |||
var kckmark = kck.FirstOrDefault(x => | |||
x.Max >= stuScoreEntity.Score && x.Min < stuScoreEntity.Score); | |||
if (kckmark!=null) | |||
{ | |||
stuScoreEntity.ScoreMark = kckmark.Mark; | |||
} | |||
} | |||
} | |||
} | |||
return Success(data); | |||
} | |||
@@ -0,0 +1,22 @@ | |||
@{ | |||
ViewBag.Title = "考察课等级分数范围"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" style="padding:0;line-height:38px;text-align:center;font-size:20px;font-weight:bold;color:#333;" > | |||
<span>考察课等级分数范围</span> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="CourseScoreOptions" > | |||
<div class="lr-form-item-title">等级标识<font face="宋体">*</font></div> | |||
<input id="Mark" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CourseScoreOptions" > | |||
<div class="lr-form-item-title">最大分数<font face="宋体">*</font></div> | |||
<input id="Max" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="CourseScoreOptions" > | |||
<div class="lr-form-item-title">最小分数<font face="宋体">*</font></div> | |||
<input id="Min" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CourseScoreOptions/Form.js") |
@@ -0,0 +1,50 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2025-01-14 15:43 | |||
* 描 述:考察课等级分数范围 | |||
*/ | |||
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 () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/CourseScoreOptions/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/CourseScoreOptions/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,26 @@ | |||
@{ | |||
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> | |||
<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_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CourseScoreOptions/Index.js") |
@@ -0,0 +1,86 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2025-01-14 15:43 | |||
* 描 述:考察课等级分数范围 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/CourseScoreOptions/Form', | |||
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/CourseScoreOptions/Form?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/CourseScoreOptions/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/CourseScoreOptions/GetPageList', | |||
headData: [ | |||
{ label: "等级标识", name: "Mark", width: 100, align: "left"}, | |||
{ label: "最大分数", name: "Max", width: 100, align: "left"}, | |||
{ label: "最小分数", name: "Min", width: 100, align: "left"}, | |||
], | |||
mainId:'ID', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -80,6 +80,15 @@ var bootstrap = function ($, learun) { | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 50, align: "left" }, | |||
{ label: '科目类型', name: 'LessonSortName', width: 60, align: "left" }, | |||
{ | |||
label: '课程类型', name: 'ExamType', width: 60, align: "left", | |||
formatter: function (value, row) { | |||
if (value === "1") { | |||
return "考试课"; | |||
} else { | |||
return "考察课"; | |||
} | |||
} }, | |||
{ label: '科目', name: 'LessonName', width: 300, align: "left" }, | |||
{ label: '学分', name: 'StudyScore', width: 50, align: "left" }, | |||
{ | |||
@@ -88,17 +97,7 @@ var bootstrap = function ($, learun) { | |||
if (row.ExamType ==="1") { | |||
return value; | |||
} else { | |||
if (value >= 80 && value <= 100) { | |||
return 'A'; | |||
} else if (value >= 60 && value < 80) { | |||
return 'B'; | |||
} else if (value >= 40 && value < 60) { | |||
return 'C'; | |||
} else if (value >= 0 && value < 40) { | |||
return 'D'; | |||
} else { | |||
return '无效分数'; // 处理无效分数 | |||
} | |||
return row.ScoreMark; | |||
} | |||
} | |||
}, | |||
@@ -903,6 +903,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\OfficermailpageController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\OfficerexamManageController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\OfficerScoreManageController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\CourseScoreOptionsController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -6614,6 +6615,10 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\OfficerScoreManage\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OfficerScoreManage\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OfficerScoreManage\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CourseScoreOptions\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CourseScoreOptions\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CourseScoreOptions\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CourseScoreOptions\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2025-01-14 15:43 | |||
/// 描 述:考察课等级分数范围 | |||
/// </summary> | |||
public class CourseScoreOptionsMap : EntityTypeConfiguration<CourseScoreOptionsEntity> | |||
{ | |||
public CourseScoreOptionsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("COURSESCOREOPTIONS"); | |||
//主键 | |||
this.HasKey(t => t.ID); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -655,6 +655,7 @@ | |||
<Compile Include="EducationalAdministration\OfficermailpageMap.cs" /> | |||
<Compile Include="EducationalAdministration\OfficerexamManageMap.cs" /> | |||
<Compile Include="EducationalAdministration\OfficerScoreManageMap.cs" /> | |||
<Compile Include="EducationalAdministration\CourseScoreOptionsMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,145 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2025-01-14 15:43 | |||
/// 描 述:考察课等级分数范围 | |||
/// </summary> | |||
public class CourseScoreOptionsBLL : CourseScoreOptionsIBLL | |||
{ | |||
private CourseScoreOptionsService courseScoreOptionsService = new CourseScoreOptionsService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<CourseScoreOptionsEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return courseScoreOptionsService.GetPageList(pagination, queryJson).OrderByDescending(x=>x.Max); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<CourseScoreOptionsEntity> GetNoPageList() | |||
{ | |||
try | |||
{ | |||
return courseScoreOptionsService.GetNoPageList(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取CourseScoreOptions表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public CourseScoreOptionsEntity GetCourseScoreOptionsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return courseScoreOptionsService.GetCourseScoreOptionsEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
courseScoreOptionsService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, CourseScoreOptionsEntity entity) | |||
{ | |||
try | |||
{ | |||
courseScoreOptionsService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,60 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2025-01-14 15:43 | |||
/// 描 述:考察课等级分数范围 | |||
/// </summary> | |||
public class CourseScoreOptionsEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 主键 | |||
/// </summary> | |||
[Column("ID")] | |||
public string ID { get; set; } | |||
/// <summary> | |||
/// 标识 | |||
/// </summary> | |||
[Column("MARK")] | |||
public string Mark { get; set; } | |||
/// <summary> | |||
/// 最大值 | |||
/// </summary> | |||
[Column("MAX")] | |||
public decimal? Max { get; set; } | |||
/// <summary> | |||
/// 最小值 | |||
/// </summary> | |||
[Column("MIN")] | |||
public decimal? Min { 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 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,49 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2025-01-14 15:43 | |||
/// 描 述:考察课等级分数范围 | |||
/// </summary> | |||
public interface CourseScoreOptionsIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<CourseScoreOptionsEntity> GetPageList(Pagination pagination, string queryJson); | |||
IEnumerable<CourseScoreOptionsEntity> GetNoPageList(); | |||
/// <summary> | |||
/// 获取CourseScoreOptions表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
CourseScoreOptionsEntity GetCourseScoreOptionsEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, CourseScoreOptionsEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,182 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2025-01-14 15:43 | |||
/// 描 述:考察课等级分数范围 | |||
/// </summary> | |||
public class CourseScoreOptionsService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<CourseScoreOptionsEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.ID, | |||
t.Mark, | |||
t.Max, | |||
t.Min | |||
"); | |||
strSql.Append(" FROM CourseScoreOptions t "); | |||
strSql.Append(" WHERE 1=1"); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
return this.BaseRepository("CollegeMIS").FindList<CourseScoreOptionsEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据不分页 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<CourseScoreOptionsEntity> GetNoPageList() | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.ID, | |||
t.Mark, | |||
t.Max, | |||
t.Min | |||
"); | |||
strSql.Append(" FROM CourseScoreOptions t "); | |||
strSql.Append(" WHERE 1=1 ORDER BY t.Max DESC"); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
return this.BaseRepository("CollegeMIS").FindList<CourseScoreOptionsEntity>(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取CourseScoreOptions表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public CourseScoreOptionsEntity GetCourseScoreOptionsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<CourseScoreOptionsEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<CourseScoreOptionsEntity>(t=>t.ID == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, CourseScoreOptionsEntity 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); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -438,6 +438,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[NotMapped] | |||
public string ExamType { get; set; } | |||
/// <summary> | |||
/// 考查课标识 | |||
/// </summary> | |||
[NotMapped] | |||
public string ScoreMark { get; set; } | |||
} | |||
@@ -2002,6 +2002,10 @@ | |||
<Compile Include="EducationalAdministration\OfficerScoreManage\OfficerScoreManageService.cs" /> | |||
<Compile Include="EducationalAdministration\OfficerScoreManage\OfficerScoreManageBLL.cs" /> | |||
<Compile Include="EducationalAdministration\OfficerScoreManage\OfficerScoreManageIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\CourseScoreOptions\CourseScoreOptionsEntity.cs" /> | |||
<Compile Include="EducationalAdministration\CourseScoreOptions\CourseScoreOptionsService.cs" /> | |||
<Compile Include="EducationalAdministration\CourseScoreOptions\CourseScoreOptionsBLL.cs" /> | |||
<Compile Include="EducationalAdministration\CourseScoreOptions\CourseScoreOptionsIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||