@@ -0,0 +1,136 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-05-29 14:28 | |||
/// 描 述:线上课程 | |||
/// </summary> | |||
public class LessonInfoOfElectiveOnlineController : MvcControllerBase | |||
{ | |||
private LessonInfoOfElectiveOnlineIBLL lessonInfoOfElectiveOnlineIBLL = new LessonInfoOfElectiveOnlineBLL(); | |||
#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 = lessonInfoOfElectiveOnlineIBLL.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 LessonInfoOfElectiveOnlineData = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
LessonInfoOfElectiveOnline = LessonInfoOfElectiveOnlineData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
lessonInfoOfElectiveOnlineIBLL.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) | |||
{ | |||
LessonInfoOfElectiveOnlineEntity entity = strEntity.ToObject<LessonInfoOfElectiveOnlineEntity>(); | |||
lessonInfoOfElectiveOnlineIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 启用/停用实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoLock(string keyValue, string status) | |||
{ | |||
lessonInfoOfElectiveOnlineIBLL.DoLock(keyValue, status); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,32 @@ | |||
@{ | |||
ViewBag.Title = "线上课程"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="LessonInfoOfElectiveOnline" > | |||
<div class="lr-form-item-title">课程编号<font face="宋体">*</font></div> | |||
<input id="LessonNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="LessonInfoOfElectiveOnline" > | |||
<div class="lr-form-item-title">课程名称<font face="宋体">*</font></div> | |||
<input id="LessonName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="LessonInfoOfElectiveOnline" > | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="LessonInfoOfElectiveOnline" > | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="LessonInfoOfElectiveOnline"> | |||
<div class="lr-form-item-title">建课教师<font face="宋体">*</font></div> | |||
<div id="EmpNo" isvalid="yes" checkexpession="NotNull"></div> | |||
<input id="EmpName" type="text" class="form-control hide"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="LessonInfoOfElectiveOnline" > | |||
<div class="lr-form-item-title">建课学校<font face="宋体">*</font></div> | |||
<div id="F_SchoolId" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.js") |
@@ -0,0 +1,73 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-05-29 14: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 () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#EmpNo').lrDataSourceSelect({ | |||
code: 'EmpInfo', value: 'empno', text: 'empname', select: function (item) { | |||
if (!!item) { | |||
$('#EmpName').val(item.empname); | |||
} | |||
} | |||
}); | |||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company',value: 'f_companyid',text: 'f_fullname' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/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/LessonInfoOfElectiveOnline/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,58 @@ | |||
@{ | |||
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> | |||
<input id="LessonNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">课程名称</div> | |||
<input id="LessonName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">建课教师</div> | |||
<div id="EmpNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">是否启用</div> | |||
<div id="CheckMark"></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_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> | |||
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | |||
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 停用</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js") |
@@ -0,0 +1,186 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-05-29 14:28 | |||
* 描 述:线上课程 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 300, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||
$('#CheckMark').lrDataItemSelect({ code: 'YesOrNoInt' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/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)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark === "1") { | |||
learun.alert.warning("当前课程已启用不能编辑!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/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)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark === "1") { | |||
learun.alert.warning("当前课程已启用不能删除!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//启用 | |||
$('#lr_lock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark == "1") { | |||
learun.alert.warning("当前课程已启用!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认启用该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DoLock', { keyValue: keyValue, status: "1" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//停用 | |||
$('#lr_unlock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark != "1") { | |||
learun.alert.warning("当前课程未启用无法停用!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认停用该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DoLock', { keyValue: keyValue, status: "0" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/GetPageList', | |||
headData: [ | |||
{ label: "课程编号", name: "LessonNo", width: 150, align: "left" }, | |||
{ label: "课程名称", name: "LessonName", width: 150, align: "left" }, | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ | |||
label: "建课教师", name: "EmpNo", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: value, | |||
keyId: 'empno', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "建课学校", name: "F_SchoolId", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "是否启用", name: "CheckMark", width: 80, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
sidx: 'MakeDate desc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -884,6 +884,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\SchoolLevelScholarshipController.cs" /> | |||
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_FixAssetsController.cs" /> | |||
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_FixAssetsApplyController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\LessonInfoOfElectiveOnlineController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -6770,6 +6771,10 @@ | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_FixAssetsApply\Index.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_FixAssetsApply\Form.cshtml" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_FixAssetsApply\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-05-29 14:28 | |||
/// 描 述:线上课程 | |||
/// </summary> | |||
public class LessonInfoOfElectiveOnlineMap : EntityTypeConfiguration<LessonInfoOfElectiveOnlineEntity> | |||
{ | |||
public LessonInfoOfElectiveOnlineMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("LESSONINFOOFELECTIVEONLINE"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -615,6 +615,7 @@ | |||
<Compile Include="EducationalAdministration\SchoolLevelScholarshipMap.cs" /> | |||
<Compile Include="AssetManagementSystem\Ass_FixAssetsMap.cs" /> | |||
<Compile Include="AssetManagementSystem\Ass_FixAssetsApplyMap.cs" /> | |||
<Compile Include="EducationalAdministration\LessonInfoOfElectiveOnlineMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,153 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-05-29 14:28 | |||
/// 描 述:线上课程 | |||
/// </summary> | |||
public class LessonInfoOfElectiveOnlineBLL : LessonInfoOfElectiveOnlineIBLL | |||
{ | |||
private LessonInfoOfElectiveOnlineService lessonInfoOfElectiveOnlineService = new LessonInfoOfElectiveOnlineService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<LessonInfoOfElectiveOnlineEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return lessonInfoOfElectiveOnlineService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取LessonInfoOfElectiveOnline表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return lessonInfoOfElectiveOnlineService.GetLessonInfoOfElectiveOnlineEntity(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 | |||
{ | |||
lessonInfoOfElectiveOnlineService.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, LessonInfoOfElectiveOnlineEntity entity) | |||
{ | |||
try | |||
{ | |||
lessonInfoOfElectiveOnlineService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 启用/停用实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DoLock(string keyValue, string status) | |||
{ | |||
try | |||
{ | |||
lessonInfoOfElectiveOnlineService.DoLock(keyValue, status); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,275 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-05-29 14:28 | |||
/// 描 述:线上课程 | |||
/// </summary> | |||
public class LessonInfoOfElectiveOnlineEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// MakeDate | |||
/// </summary> | |||
[Column("MAKEDATE")] | |||
public DateTime? MakeDate { get; set; } | |||
/// <summary> | |||
/// AcademicYearNo | |||
/// </summary> | |||
[Column("ACADEMICYEARNO")] | |||
public string AcademicYearNo { get; set; } | |||
/// <summary> | |||
/// Semester | |||
/// </summary> | |||
[Column("SEMESTER")] | |||
public string Semester { get; set; } | |||
/// <summary> | |||
/// LessonNo | |||
/// </summary> | |||
[Column("LESSONNO")] | |||
public string LessonNo { get; set; } | |||
/// <summary> | |||
/// PartCode | |||
/// </summary> | |||
[Column("PARTCODE")] | |||
public string PartCode { get; set; } | |||
/// <summary> | |||
/// LessonName | |||
/// </summary> | |||
[Column("LESSONNAME")] | |||
public string LessonName { get; set; } | |||
/// <summary> | |||
/// LessonSortNo | |||
/// </summary> | |||
[Column("LESSONSORTNO")] | |||
public string LessonSortNo { get; set; } | |||
/// <summary> | |||
/// LessonSortDetailNo | |||
/// </summary> | |||
[Column("LESSONSORTDETAILNO")] | |||
public string LessonSortDetailNo { get; set; } | |||
/// <summary> | |||
/// LessonSection | |||
/// </summary> | |||
[Column("LESSONSECTION")] | |||
public string LessonSection { get; set; } | |||
/// <summary> | |||
/// LessonTime | |||
/// </summary> | |||
[Column("LESSONTIME")] | |||
public string LessonTime { get; set; } | |||
/// <summary> | |||
/// StudyScore | |||
/// </summary> | |||
[Column("STUDYSCORE")] | |||
public decimal? StudyScore { get; set; } | |||
/// <summary> | |||
/// StartWeek | |||
/// </summary> | |||
[Column("STARTWEEK")] | |||
public int? StartWeek { get; set; } | |||
/// <summary> | |||
/// EndWeek | |||
/// </summary> | |||
[Column("ENDWEEK")] | |||
public int? EndWeek { get; set; } | |||
/// <summary> | |||
/// StartDate | |||
/// </summary> | |||
[Column("STARTDATE")] | |||
public DateTime? StartDate { get; set; } | |||
/// <summary> | |||
/// EndDate | |||
/// </summary> | |||
[Column("ENDDATE")] | |||
public DateTime? EndDate { get; set; } | |||
/// <summary> | |||
/// CheckStyleNo | |||
/// </summary> | |||
[Column("CHECKSTYLENO")] | |||
public string CheckStyleNo { get; set; } | |||
/// <summary> | |||
/// ScoreRecordStyleNo | |||
/// </summary> | |||
[Column("SCORERECORDSTYLENO")] | |||
public string ScoreRecordStyleNo { get; set; } | |||
/// <summary> | |||
/// EmpNo | |||
/// </summary> | |||
[Column("EMPNO")] | |||
public string EmpNo { get; set; } | |||
/// <summary> | |||
/// EmpName | |||
/// </summary> | |||
[Column("EMPNAME")] | |||
public string EmpName { get; set; } | |||
/// <summary> | |||
/// ClassRoomNo | |||
/// </summary> | |||
[Column("CLASSROOMNO")] | |||
public string ClassRoomNo { get; set; } | |||
/// <summary> | |||
/// ClassRoomName | |||
/// </summary> | |||
[Column("CLASSROOMNAME")] | |||
public string ClassRoomName { get; set; } | |||
/// <summary> | |||
/// CheckMark | |||
/// </summary> | |||
[Column("CHECKMARK")] | |||
public string CheckMark { get; set; } | |||
/// <summary> | |||
/// StuNumMax | |||
/// </summary> | |||
[Column("STUNUMMAX")] | |||
public int? StuNumMax { get; set; } | |||
/// <summary> | |||
/// StuNum | |||
/// </summary> | |||
[Column("STUNUM")] | |||
public int? StuNum { get; set; } | |||
/// <summary> | |||
/// ModifyTime | |||
/// </summary> | |||
[Column("MODIFYTIME")] | |||
public DateTime? ModifyTime { get; set; } | |||
/// <summary> | |||
/// ModifyUserId | |||
/// </summary> | |||
[Column("MODIFYUSERID")] | |||
public string ModifyUserId { get; set; } | |||
/// <summary> | |||
/// ModifyUserName | |||
/// </summary> | |||
[Column("MODIFYUSERNAME")] | |||
public string ModifyUserName { get; set; } | |||
/// <summary> | |||
/// F_SchoolId | |||
/// </summary> | |||
[Column("F_SCHOOLID")] | |||
public string F_SchoolId { get; set; } | |||
/// <summary> | |||
/// TeachMajorNo | |||
/// </summary> | |||
[Column("TEACHMAJORNO")] | |||
public string TeachMajorNo { 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> | |||
/// PracticeHour | |||
/// </summary> | |||
[Column("PRACTICEHOUR")] | |||
public string PracticeHour { get; set; } | |||
/// <summary> | |||
/// HaveBeforeLesson | |||
/// </summary> | |||
[Column("HAVEBEFORELESSON")] | |||
public string HaveBeforeLesson { get; set; } | |||
/// <summary> | |||
/// BeforeLesson | |||
/// </summary> | |||
[Column("BEFORELESSON")] | |||
public string BeforeLesson { get; set; } | |||
/// <summary> | |||
/// IsAllowEdit | |||
/// </summary> | |||
[Column("ISALLOWEDIT")] | |||
public bool? IsAllowEdit { get; set; } | |||
/// <summary> | |||
/// State | |||
/// </summary> | |||
[Column("STATE")] | |||
public int? State { get; set; } | |||
/// <summary> | |||
/// ClassroomType | |||
/// </summary> | |||
[Column("CLASSROOMTYPE")] | |||
public int? ClassroomType { get; set; } | |||
/// <summary> | |||
/// ClassroomPracticeType | |||
/// </summary> | |||
[Column("CLASSROOMPRACTICETYPE")] | |||
public int? ClassroomPracticeType { get; set; } | |||
/// <summary> | |||
/// CheckMarkDept | |||
/// </summary> | |||
[Column("CHECKMARKDEPT")] | |||
public string CheckMarkDept { get; set; } | |||
/// <summary> | |||
/// TeachingBookNo | |||
/// </summary> | |||
[Column("TEACHINGBOOKNO")] | |||
public string TeachingBookNo { get; set; } | |||
/// <summary> | |||
/// TestMark | |||
/// </summary> | |||
[Column("TESTMARK")] | |||
public int? TestMark { get; set; } | |||
/// <summary> | |||
/// StuSortNo | |||
/// </summary> | |||
[Column("STUSORTNO")] | |||
public string StuSortNo { get; set; } | |||
/// <summary> | |||
/// 是否可选 | |||
/// </summary> | |||
[Column("ISALLOWSELECT")] | |||
public int? IsAllowSelect { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.MakeDate = DateTime.Now; | |||
this.CheckMark = "0";//停用 | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
this.ModifyTime = DateTime.Now; | |||
this.ModifyUserId = LoginUserInfo.Get().userId; | |||
this.ModifyUserName = LoginUserInfo.Get().realName; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,58 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-05-29 14:28 | |||
/// 描 述:线上课程 | |||
/// </summary> | |||
public interface LessonInfoOfElectiveOnlineIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<LessonInfoOfElectiveOnlineEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取LessonInfoOfElectiveOnline表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntity(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, LessonInfoOfElectiveOnlineEntity entity); | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 启用/停用实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DoLock(string keyValue, string status); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,199 @@ | |||
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 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-05-29 14:28 | |||
/// 描 述:线上课程 | |||
/// </summary> | |||
public class LessonInfoOfElectiveOnlineService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<LessonInfoOfElectiveOnlineEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT t.* "); | |||
strSql.Append(" FROM LessonInfoOfElectiveOnline t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["LessonNo"].IsEmpty()) | |||
{ | |||
dp.Add("LessonNo", "%" + queryParam["LessonNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.LessonNo Like @LessonNo "); | |||
} | |||
if (!queryParam["LessonName"].IsEmpty()) | |||
{ | |||
dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.LessonName Like @LessonName "); | |||
} | |||
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["EmpNo"].IsEmpty()) | |||
{ | |||
dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.EmpNo = @EmpNo "); | |||
} | |||
if (!queryParam["CheckMark"].IsEmpty()) | |||
{ | |||
dp.Add("CheckMark", queryParam["CheckMark"].ToString(), DbType.String); | |||
strSql.Append(" AND t.CheckMark = @CheckMark "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<LessonInfoOfElectiveOnlineEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取LessonInfoOfElectiveOnline表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<LessonInfoOfElectiveOnlineEntity>(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<LessonInfoOfElectiveOnlineEntity>(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, LessonInfoOfElectiveOnlineEntity 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 | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 启用/停用实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DoLock(string keyValue, string status) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql($"update LessonInfoOfElectiveOnline set CheckMark='{status}' where Id='{keyValue}' "); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -1883,6 +1883,10 @@ | |||
<Compile Include="AssetManagementSystem\Ass_FixAssetsApply\Ass_FixAssetsApplyService.cs" /> | |||
<Compile Include="AssetManagementSystem\Ass_FixAssetsApply\Ass_FixAssetsApplyBLL.cs" /> | |||
<Compile Include="AssetManagementSystem\Ass_FixAssetsApply\Ass_FixAssetsApplyIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\LessonInfoOfElectiveOnline\LessonInfoOfElectiveOnlineEntity.cs" /> | |||
<Compile Include="EducationalAdministration\LessonInfoOfElectiveOnline\LessonInfoOfElectiveOnlineService.cs" /> | |||
<Compile Include="EducationalAdministration\LessonInfoOfElectiveOnline\LessonInfoOfElectiveOnlineBLL.cs" /> | |||
<Compile Include="EducationalAdministration\LessonInfoOfElectiveOnline\LessonInfoOfElectiveOnlineIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||