启用
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/FormManageView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/FormManageView.js
index 4ef2c76d7..d00a6b441 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/FormManageView.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/FormManageView.js
@@ -48,6 +48,7 @@ var bootstrap = function ($, learun) {
maxHeight: 200
});
+ $('#Dept').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#Major').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
$('#Enabled').lrRadioCheckbox({
type: 'radio',
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Index.js
index 743306daa..601efff9a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Index.js
@@ -26,8 +26,8 @@ var bootstrap = function ($, learun) {
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/TeachingPlan/Form',
- width: 600,
- height: 400,
+ width: 800,
+ height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -41,8 +41,8 @@ var bootstrap = function ($, learun) {
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TeachingPlan/Form?keyValue=' + keyValue,
- width: 600,
- height: 400,
+ width: 800,
+ height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -74,6 +74,19 @@ var bootstrap = function ($, learun) {
headData: [
{ label: "名称", name: "Name", width: 100, align: "left" },
{ label: "年级", name: "Grade", width: 100, align: "left" },
+ {
+ label: "专业部", name: "Dept", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op, $cell) {
+ learun.clientdata.getAsync('custmerData', {
+ url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
+ key: value,
+ keyId: 'deptno',
+ callback: function (_data) {
+ callback(_data['deptname']);
+ }
+ });
+ }
+ },
{
label: "专业", name: "Major", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
@@ -88,6 +101,7 @@ var bootstrap = function ($, learun) {
}
},
{ label: "学制", name: "SchoolSystem", width: 100, align: "left" },
+ { label: "学期课时量", name: "LessonTotal", width: 100, align: "left" },
{ label: "总学分", name: "Credit", width: 100, align: "left" },
{
label: "状态", name: "Enabled", width: 100, align: "left",
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/IndexManage.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/IndexManage.js
index e6436c59d..884134b97 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/IndexManage.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/IndexManage.js
@@ -30,8 +30,8 @@ var bootstrap = function ($, learun) {
url: top.$.rootUrl +
'/EducationalAdministration/TeachingPlan/FormManageView?keyValue=' +
keyValue,
- width: 600,
- height: 400,
+ width: 800,
+ height: 600,
btn: null,
callBack: function (id) {
//return top[id].acceptClick(refreshGirdData);
@@ -77,6 +77,19 @@ var bootstrap = function ($, learun) {
headData: [
{ label: "名称", name: "Name", width: 100, align: "left" },
{ label: "年级", name: "Grade", width: 100, align: "left" },
+ {
+ label: "专业部", name: "Dept", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op, $cell) {
+ learun.clientdata.getAsync('custmerData', {
+ url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
+ key: value,
+ keyId: 'deptno',
+ callback: function (_data) {
+ callback(_data['deptname']);
+ }
+ });
+ }
+ },
{
label: "专业", name: "Major", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
@@ -91,6 +104,7 @@ var bootstrap = function ($, learun) {
}
},
{ label: "学制", name: "SchoolSystem", width: 100, align: "left" },
+ { label: "学期课时量", name: "LessonTotal", width: 100, align: "left" },
{ label: "总学分", name: "Credit", width: 100, align: "left" },
{ label: "公开课", name: "Zyknum", width: 100, align: "left" },
{ label: "专业课", name: "Ggknum", width: 100, align: "left" },
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeachManagementController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeachManagementController.cs
new file mode 100644
index 000000000..05143c38e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeachManagementController.cs
@@ -0,0 +1,127 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.PersonnelManagement;
+using System.Web.Mvc;
+using System.Collections.Generic;
+using System;
+
+namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-08-16 17:42
+ /// 描 述:任教管理
+ ///
+ public class TeachManagementController : MvcControllerBase
+ {
+ private TeachManagementIBLL teachManagementIBLL = new TeachManagementBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = teachManagementIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var TeachManagementData = teachManagementIBLL.GetTeachManagementEntity( keyValue );
+ var jsonData = new {
+ TeachManagement = TeachManagementData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ teachManagementIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ TeachManagementEntity entity = strEntity.ToObject();
+ var loginUserInfo = LoginUserInfo.Get();
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ entity.CreateUserId = loginUserInfo.userId;
+ entity.CreateTime = DateTime.Now;
+ }
+ else
+ {
+ entity.ModifyUserId = loginUserInfo.userId;
+ entity.ModifyTime = DateTime.Now;
+ }
+ teachManagementIBLL.SaveEntity(keyValue,entity);
+
+ return Success("保存成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeachManagement/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeachManagement/Form.cshtml
new file mode 100644
index 000000000..aa961d318
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeachManagement/Form.cshtml
@@ -0,0 +1,31 @@
+@{
+ ViewBag.Title = "任教管理";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeachManagement/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeachManagement/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeachManagement/Form.js
new file mode 100644
index 000000000..2da222c5c
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeachManagement/Form.js
@@ -0,0 +1,69 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2022-08-16 17:42
+ * 描 述:任教管理
+ */
+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 () {
+ $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo',value: 'empno',text: 'empname' });
+ $('#ClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' });
+ $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
+ //学年
+ $('#AcademicYearNo').lrselect({
+ placeholder: "请选择学年",
+ allowSearch: true,
+ url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
+ value: 'value',
+ text: 'text'
+ });
+ //学期
+ $('#Semester').lrselect({
+ placeholder: "请选择学期",
+ allowSearch: true,
+ url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
+ value: 'value',
+ text: 'text'
+ });
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeachManagement/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 + '/PersonnelManagement/TeachManagement/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack();
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeachManagement/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeachManagement/Index.cshtml
new file mode 100644
index 000000000..da2fb28c7
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeachManagement/Index.cshtml
@@ -0,0 +1,52 @@
+@{
+ ViewBag.Title = "任教管理";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeachManagement/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeachManagement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeachManagement/Index.js
new file mode 100644
index 000000000..9927699df
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeachManagement/Index.js
@@ -0,0 +1,141 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2022-08-16 17:42
+ * 描 述:任教管理
+ */
+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);
+ $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo',value: 'empno',text: 'empname' });
+ $('#ClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' });
+ $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
+ //学年
+ $('#AcademicYearNo').lrselect({
+ placeholder: "请选择学年",
+ allowSearch: true,
+ url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
+ value: 'value',
+ text: 'text'
+ });
+ //学期
+ $('#Semester').lrselect({
+ placeholder: "请选择学期",
+ allowSearch: true,
+ url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
+ value: 'value',
+ text: 'text'
+ });
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ // 新增
+ $('#lr_add').on('click', function () {
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/PersonnelManagement/TeachManagement/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 + '/PersonnelManagement/TeachManagement/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 + '/PersonnelManagement/TeachManagement/DeleteForm', { keyValue: keyValue}, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').lrAuthorizeJfGrid({
+ url: top.$.rootUrl + '/PersonnelManagement/TeachManagement/GetPageList',
+ headData: [
+ { label: "教师姓名", name: "EmpNo", width: 100, 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: "AcademicYearNo", width: 100, align: "left"},
+ { label: "学期", name: "Semester", width: 100, align: "left"},
+ { label: "任课班级", name: "ClassNo", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op,$cell) {
+ learun.clientdata.getAsync('custmerData', {
+ url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
+ key: value,
+ keyId: 'classno',
+ callback: function (_data) {
+ callback(_data['classname']);
+ }
+ });
+ }},
+ { label: "任教课程", name: "LessonNo", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op,$cell) {
+ learun.clientdata.getAsync('custmerData', {
+ url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
+ key: value,
+ keyId: 'lessonno',
+ callback: function (_data) {
+ callback(_data['lessonname']);
+ }
+ });
+ }},
+ { label: "课时数", name: "LessonTotal", 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();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
index f4ff6a0dd..3326e43ef 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
@@ -860,6 +860,7 @@
+
@@ -6840,6 +6841,10 @@
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
index cdeaaa730..879d37b91 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
@@ -617,6 +617,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/TeachManagementMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/TeachManagementMap.cs
new file mode 100644
index 000000000..9dedec558
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/TeachManagementMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.PersonnelManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-08-16 17:42
+ /// 描 述:任教管理
+ ///
+ public class TeachManagementMap : EntityTypeConfiguration
+ {
+ public TeachManagementMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("TEACHMANAGEMENT");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanEntity.cs
index bf826840a..bea4bf427 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanEntity.cs
@@ -65,6 +65,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
+ ///
+ /// 专业部
+ ///
+ [Column("DEPT")]
+ public string Dept { get; set; }
+ ///
+ /// 学期课时量
+ ///
+ [Column("LESSONTOTAL")]
+ public string LessonTotal { get; set; }
#endregion
#region 扩展操作
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanService.cs
index 7641566ea..82c4ebd57 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanService.cs
@@ -31,17 +31,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
var strSql = new StringBuilder();
- strSql.Append("SELECT ");
- strSql.Append(@"
- t.Id,
- t.Name,
- t.Grade,
- t.Major,
- t.SchoolSystem,
- t.Credit,
- t.Enabled,
- t.Remark
- ");
+ strSql.Append("SELECT t.* ");
strSql.Append(" FROM TeachingPlan t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
index 365004bab..e917e5a8f 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
@@ -1894,6 +1894,10 @@
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeachManagement/TeachManagementBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeachManagement/TeachManagementBLL.cs
new file mode 100644
index 000000000..241b8519f
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeachManagement/TeachManagementBLL.cs
@@ -0,0 +1,125 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.PersonnelManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-08-16 17:42
+ /// 描 述:任教管理
+ ///
+ public class TeachManagementBLL : TeachManagementIBLL
+ {
+ private TeachManagementService teachManagementService = new TeachManagementService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return teachManagementService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取TeachManagement表实体数据
+ ///
+ /// 主键
+ ///
+ public TeachManagementEntity GetTeachManagementEntity(string keyValue)
+ {
+ try
+ {
+ return teachManagementService.GetTeachManagementEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ teachManagementService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, TeachManagementEntity entity)
+ {
+ try
+ {
+ teachManagementService.SaveEntity(keyValue, entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeachManagement/TeachManagementEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeachManagement/TeachManagementEntity.cs
new file mode 100644
index 000000000..bc98cba24
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeachManagement/TeachManagementEntity.cs
@@ -0,0 +1,95 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.PersonnelManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-08-16 17:42
+ /// 描 述:任教管理
+ ///
+ public class TeachManagementEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// EmpNo
+ ///
+ [Column("EMPNO")]
+ public string EmpNo { get; set; }
+ ///
+ /// AcademicYearNo
+ ///
+ [Column("ACADEMICYEARNO")]
+ public string AcademicYearNo { get; set; }
+ ///
+ /// Semester
+ ///
+ [Column("SEMESTER")]
+ public string Semester { get; set; }
+ ///
+ /// ClassNo
+ ///
+ [Column("CLASSNO")]
+ public string ClassNo { get; set; }
+ ///
+ /// LessonNo
+ ///
+ [Column("LESSONNO")]
+ public string LessonNo { get; set; }
+ ///
+ /// LessonTotal
+ ///
+ [Column("LESSONTOTAL")]
+ public decimal? LessonTotal { get; set; }
+ ///
+ /// CreateUserId
+ ///
+ [Column("CREATEUSERID")]
+ public string CreateUserId { get; set; }
+ ///
+ /// CreateTime
+ ///
+ [Column("CREATETIME")]
+ public DateTime? CreateTime { get; set; }
+ ///
+ /// ModifyUserId
+ ///
+ [Column("MODIFYUSERID")]
+ public string ModifyUserId { get; set; }
+ ///
+ /// ModifyTime
+ ///
+ [Column("MODIFYTIME")]
+ public DateTime? ModifyTime { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeachManagement/TeachManagementIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeachManagement/TeachManagementIBLL.cs
new file mode 100644
index 000000000..cacb7eafd
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeachManagement/TeachManagementIBLL.cs
@@ -0,0 +1,48 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.PersonnelManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-08-16 17:42
+ /// 描 述:任教管理
+ ///
+ public interface TeachManagementIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取TeachManagement表实体数据
+ ///
+ /// 主键
+ ///
+ TeachManagementEntity GetTeachManagementEntity(string keyValue);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, TeachManagementEntity entity);
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeachManagement/TeachManagementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeachManagement/TeachManagementService.cs
new file mode 100644
index 000000000..229c3c2ff
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeachManagement/TeachManagementService.cs
@@ -0,0 +1,166 @@
+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.PersonnelManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-08-16 17:42
+ /// 描 述:任教管理
+ ///
+ public class TeachManagementService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT t.*");
+ strSql.Append(" FROM TeachManagement t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["EmpNo"].IsEmpty())
+ {
+ dp.Add("EmpNo",queryParam["EmpNo"].ToString(), DbType.String);
+ strSql.Append(" AND t.EmpNo = @EmpNo ");
+ }
+ if (!queryParam["AcademicYearNo"].IsEmpty())
+ {
+ dp.Add("AcademicYearNo", "%" + queryParam["AcademicYearNo"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.AcademicYearNo Like @AcademicYearNo ");
+ }
+ if (!queryParam["Semester"].IsEmpty())
+ {
+ dp.Add("Semester", "%" + queryParam["Semester"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.Semester Like @Semester ");
+ }
+ if (!queryParam["ClassNo"].IsEmpty())
+ {
+ dp.Add("ClassNo",queryParam["ClassNo"].ToString(), DbType.String);
+ strSql.Append(" AND t.ClassNo = @ClassNo ");
+ }
+ if (!queryParam["LessonNo"].IsEmpty())
+ {
+ dp.Add("LessonNo",queryParam["LessonNo"].ToString(), DbType.String);
+ strSql.Append(" AND t.LessonNo = @LessonNo ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取TeachManagement表实体数据
+ ///
+ /// 主键
+ ///
+ public TeachManagementEntity GetTeachManagementEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, TeachManagementEntity 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
+
+ }
+}