分管校长
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js
index 222bbfc67..1f06e8ae0 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js
@@ -37,6 +37,13 @@ var bootstrap = function ($, learun) {
}
}
});
+ //部门负责人
+ $("#F_Manager").lrformselect({
+ layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm',
+ layerUrlW: 400,
+ layerUrlH: 300,
+ dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds'
+ });
$('#NoticeCategory').lrDataItemSelect({ code: 'NoticeCategory', type: 'multiple', allowSearch:true });
},
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js
index c104c04d9..6ea627085 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js
@@ -112,10 +112,22 @@ var bootstrap = function ($, learun) {
{ label: "部门编号", name: "F_EnCode", width: 100, align: "left" },
{ label: "部门简称", name: "F_ShortName", width: 100, align: "left" },
{ label: "部门性质", name: "F_Nature", width: 100, align: "left" },
- { label: "负责人", name: "F_Manager", width: 100, align: "left" },
+ {
+ label: "负责人", name: "F_Manager", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op, $cell) {
+ learun.clientdata.getAsync('custmerData', {
+ url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
+ key: value,
+ keyId: 'f_userid',
+ callback: function (_data) {
+ callback(_data['f_realname']);
+ }
+ });
+ }
+ },
{ label: "分管校长", name: "F_SchoolMaster", width: 100, align: "left" },
{
- label: "公告类别", name: "NoticeCategory", width: 200, align: "left" ,
+ label: "公告类别", name: "NoticeCategory", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getsAsync('dataItem', {
key: value,
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js
index 5067e8d74..2488e7e83 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js
@@ -357,6 +357,7 @@ var bootstrap = function ($, learun) {
}
}
},
+ { label: "排序", name: "F_Order", index: "F_Order", width: 50, align: "center"},
{
label: "最后登录时间", name: "F_UserId_Log", width: 200, align: "left", formatterAsync: function (callback, value, row) {
learun.httpAsyncGet(top.$.rootUrl + '/LR_OrganizationModule/User/GetLastLoginTime?userId=' + value, function (res) {
@@ -372,6 +373,7 @@ var bootstrap = function ($, learun) {
isPage: true,
reloadSelected: true,
mainId: 'F_UserId',
+ sidx: 'F_Order asc',
isMultiselect: true
});
},
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js
index a9c03936c..7f027b26c 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js
@@ -160,7 +160,7 @@
}
d.write("
");
d.write("
");
- d.write("
西昌民族幼儿师范高等专科学校 收文 (办件)处理笺
");
+ //d.write("
西昌民族幼儿师范高等专科学校 收文 (办件)处理笺
");
var $table = a('
');
var num = 24;
var $tr = a('
|
');
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 6714c3fed..8b1fa0e0d 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
@@ -1,4 +1,4 @@
-
+
@@ -319,6 +319,7 @@
+
@@ -819,6 +820,7 @@
+
@@ -928,6 +930,8 @@
+
+
@@ -943,6 +947,8 @@
+
+
@@ -1076,6 +1082,7 @@
+
@@ -6263,6 +6270,10 @@
+
+
+
+
@@ -7461,6 +7472,11 @@
+
+
+
+
+
@@ -7585,10 +7601,10 @@
False
- True
- 20472
+ True
+ 20472
/
- http://localhost:20873/
+ http://localhost:20873/
False
False
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config
index ca0d018a1..2429bf817 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config
@@ -1,37 +1,42 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
-
-
-
+
-
-
-
+
-
-
+
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
index 28fd8c9e0..0907e0fdb 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
@@ -1,175 +1,178 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
index 1a2d19159..1bfa10fb1 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
@@ -195,6 +195,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/ArrangeExamTermNewApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/ArrangeExamTermNewApi.cs
new file mode 100644
index 000000000..9e63736a4
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/ArrangeExamTermNewApi.cs
@@ -0,0 +1,47 @@
+using Learun.Application.Organization;
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using Learun.Application.TwoDevelopment.EvaluationTeach;
+using Learun.Util;
+using Nancy;
+using System.Collections.Generic;
+using Learun.Application.TwoDevelopment.Ask;
+
+namespace Learun.Application.WebApi.Modules
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创建人:数字化智慧校园-框架开发组
+ /// 日 期:2018.01.04
+ /// 描 述:部门管理
+ ///
+ public class ArrangeExamTermNewApi : BaseApi
+ {
+ public ArrangeExamTermNewApi()
+ : base("/learun/ask")
+ {
+ Get["/testlist"] = GetPageList;
+ }
+
+ private ArrangeExamTermNewIBLL AeTerm = new ArrangeExamTermNewBLL();
+
+ ///
+ /// 获取问卷列表
+ ///
+ ///
+ ///
+ public Response GetPageList(dynamic _)
+ {
+ ReqPageParam parameter = this.GetReqData();
+ var data = AeTerm.GetPageList(parameter.pagination, parameter.queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = parameter.pagination.total,
+ page = parameter.pagination.page,
+ records = parameter.pagination.records
+ };
+ return Success(jsonData);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermItemNewMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermItemNewMap.cs
new file mode 100644
index 000000000..d5bc86e8d
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermItemNewMap.cs
@@ -0,0 +1,28 @@
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-12-09 14:27
+ /// 描 述:排考明细
+ ///
+ public class ArrangeExamTermItemNewMap : EntityTypeConfiguration
+ {
+ public ArrangeExamTermItemNewMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("ARRANGEEXAMTERMITEMNEW");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermNewMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermNewMap.cs
new file mode 100644
index 000000000..8b2d3e607
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermNewMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-12-08 12:19
+ /// 描 述:排考2021新
+ ///
+ public class ArrangeExamTermNewMap : EntityTypeConfiguration
+ {
+ public ArrangeExamTermNewMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("ARRANGEEXAMTERMNEW");
+ //主键
+ this.HasKey(t => t.AETId);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
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 e84d2aed3..e366181a5 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
@@ -67,6 +67,7 @@
+
@@ -565,6 +566,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermBLL.cs
index a2879c3b7..26737cdd1 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermBLL.cs
@@ -148,6 +148,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
#region 扩展数据
+ public async Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity)
+ {
+ try
+ {
+ return await arrangeExamTermService.AsyncArrangeExamDataNew(entity);
+ }
+ catch (Exception ex)
+ {
+ throw ex;
+ }
+ }
///
/// 排考数据同步
///
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermIBLL.cs
index ba37dea28..6946ca13e 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermIBLL.cs
@@ -61,6 +61,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
Task AsyncArrangeExamData();
+ Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity);
+
///
/// 考试表
///
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs
index b77159025..929387918 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs
@@ -190,6 +190,123 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
#region 扩展数据
+ ///
+ /// 2021新排考接口
+ ///
+ ///
+ ///
+ public async Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity)
+ {
+ bool result = false;
+ try
+ {
+ //清空本学年本学期排考数据
+ var academicYearNo =entity.AcademicYearNo;
+ var semester =entity.Semester;
+ var schoolid = entity.F_SchoolId;
+ this.BaseRepository("CollegeMIS").ExecuteBySql($"delete from ArrangeExamTermNew where AcademicYearNo='{academicYearNo}' and Semester='{semester}' and F_SchoolId='{schoolid}'");
+ this.BaseRepository("CollegeMIS").ExecuteBySql($"delete from ArrangeExamTermItemNew where AcademicYearNo='{academicYearNo}' and Semester='{semester}' and F_SchoolId='{schoolid}'");
+ //排考数据处理
+ var insertList = new List();
+ var arrangeExamTermData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList();
+ var classinfoData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList();
+ var studentData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList();
+ HttpContent httpContent = new StringContent("{\"school\":\"" + entity.F_SchoolId + "\",\"year\":\"" + entity.AcademicYearNo + "\",\"number\":\"" + entity.Semester + "\"}");
+ httpContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json");
+ var apiData = await Client.PostAsync(Config.GetValue("ArrangeExamAPINew"), httpContent).Result.Content.ReadAsStringAsync();
+ //明细接口
+ //Client.PostAsync(Config.GetValue("ArrangeExamItemAPINew"), httpContent);
+ if (!string.IsNullOrEmpty(apiData))
+ {
+ var data = JsonConvert.DeserializeObject(apiData);
+ if (!data.success)
+ {
+ return result;
+ }
+ var dataList = data.entity.list;
+ if (dataList.Any())
+ {
+ var insertDataList = new List();
+ foreach (var item in dataList)
+ {
+ var insertData = new ArrangeExamTermNewEntity
+ {
+ AETId = Guid.NewGuid().ToString(),
+ AcademicYearNo = academicYearNo,
+ Semester = semester,
+ F_SchoolId = schoolid,
+ ExamDate = Convert.ToDateTime(item.date).Date,
+ ExamTime = Convert.ToDateTime(item.date).ToShortTimeString()+"~"+Convert.ToDateTime(item.time).ToShortTimeString(),
+ LessonNo =item.lessonNo,
+ LessonName=item.lessonName,
+ EmpNo=item.empNo,
+ EmpName = item.empName,
+ ClassRoomNo=item.classroomNo,
+ ClassRoomName = item.classroomName
+ };
+ if (arrangeExamTermData.Count(x => x.ExamDate == insertData.ExamDate && x.LessonNo == insertData.LessonNo && x.EmpNo == insertData.EmpNo && x.ClassRoomNo == insertData.ClassRoomNo) == 0
+ && insertDataList.Count(x => x.ExamDate == insertData.ExamDate && x.LessonNo == insertData.LessonNo && x.EmpNo == insertData.EmpNo && x.ClassRoomNo == insertData.ClassRoomNo) == 0)
+ {
+ insertDataList.Add(insertData);
+ }
+ }
+ insertList.AddRange(insertDataList);
+ result = await BaseRepository("CollegeMIS").InsertAsync(insertList)>0;
+ }
+ }
+ //明细对接
+ string sql = @"SELECT semester.year AS 'AcademicYearNo',semester.number AS 'Semester',currid.number AS 'LessonNo',currid.name AS 'LessonName',
+ student.name AS 'StuName',student.number AS 'StuNo',classroom.name 'ClassRoomName',classroom.number AS 'ClassRoomNo',
+ paikao.time AS 'StartDate',paikao.endtime 'EndDate',a.number 'SitNumber',
+ (SELECT GROUP_CONCAT(teachername) FROM tb_paikao WHERE currid = a.`currid` AND classroomid = a.`classroom`) AS EmpName,
+ (SELECT GROUP_CONCAT(number) FROM tb_teacher WHERE id IN
+ (SELECT teacherid FROM tb_paikao WHERE currid = a.`currid` AND classroomid = a.`classroom`) ) AS EmpNo
+ FROM tb_studentpaikao a
+
+ LEFT JOIN tb_student student ON student.id = a.student
+ LEFT JOIN tb_classroom classroom ON classroom.id = a.classroom
+ LEFT JOIN tb_curriculum currid ON currid.id = a.currid
+ LEFT JOIN tb_semester semester ON semester.id = a.semester
+ LEFT JOIN tb_paikaorule paikao ON paikao.currid = a.currid where semester.year='"+academicYearNo+ "' and semester.number='"+semester+"'";
+ var list= BaseRepository("paikeDbString").FindList(sql);
+ var listsqlserver =new List();
+ foreach (var item in list)
+ {
+ ArrangeExamTermItemNewEntity aetitem = new ArrangeExamTermItemNewEntity();
+ aetitem.Create();
+ aetitem.AcademicYearNo = item.AcademicYearNo;
+ aetitem.Semester = item.Semester;
+ aetitem.LessonNo = item.LessonNo;
+ aetitem.LessonName = item.LessonName;
+ item.ExamDate = Convert.ToDateTime(item.StartDate);
+ aetitem.ExamDate = item.ExamDate;
+ item.ExamTime = Convert.ToDateTime(item.StartDate).ToShortTimeString() + "~" + Convert.ToDateTime(item.EndDate).ToShortTimeString();
+ aetitem.ExamTime = item.ExamTime;
+ aetitem.ClassNo = item.ClassNo;
+ aetitem.ClassName = item.ClassName;
+ aetitem.EmpNo = item.EmpNo;
+ aetitem.EmpName = item.EmpName;
+ aetitem.ClassRoomNo = item.ClassRoomNo;
+ aetitem.ClassRoomName = item.ClassRoomName;
+ aetitem.F_SchoolId = schoolid;
+ aetitem.SitNumber = item.SitNumber;
+ aetitem.StuNo = item.StuNo;
+ aetitem.StuName = item.StuName;
+ var classitem = studentData.Find(m => m.StuNo == item.StuNo);
+ item.ClassNo = classitem?.ClassNo;
+ aetitem.ClassNo = item.ClassNo;
+ aetitem.ClassName = classinfoData.Find(m=>m.ClassNo==aetitem.ClassNo)?.ClassName;
+ listsqlserver.Add(aetitem);
+ }
+ BaseRepository("CollegeMIS").Insert(listsqlserver);
+ }
+ catch (Exception ex)
+ {
+ throw ex;
+ }
+ return result;
+ }
+
///
/// 排考数据同步
///
@@ -708,8 +825,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
public string time { get; set; }
public string date { get; set; }
public string classroomId { get; set; }
+ public string classroomNo { get; set; }
public string classroomName { get; set; }
public string kaoshis { get; set; }
+ public string lessonNo { get; set; }
+ public string lessonName { get; set; }
+ public string empNo { get; set; }
+ public string empName { get; set; }
}
public class ArrangeExamEntity
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewBLL.cs
new file mode 100644
index 000000000..798b43b91
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewBLL.cs
@@ -0,0 +1,148 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-12-09 14:27
+ /// 描 述:排考明细
+ ///
+ public class ArrangeExamTermItemNewBLL : ArrangeExamTermItemNewIBLL
+ {
+ private ArrangeExamTermItemNewService arrangeExamTermItemNewService = new ArrangeExamTermItemNewService();
+
+ #region 获取数据
+
+ ///
+ /// 获取列表数据
+ ///
+ /// 查询参数
+ ///
+ public IEnumerable GetList(string queryJson)
+ {
+ try
+ {
+ return arrangeExamTermItemNewService.GetList(queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取列表分页数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return arrangeExamTermItemNewService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取实体数据
+ ///
+ /// 主键
+ ///
+ public ArrangeExamTermItemNewEntity GetEntity(string keyValue)
+ {
+ try
+ {
+ return arrangeExamTermItemNewService.GetEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ arrangeExamTermItemNewService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, ArrangeExamTermItemNewEntity entity)
+ {
+ try
+ {
+ arrangeExamTermItemNewService.SaveEntity(keyValue, entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ }
+}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewEntity.cs
new file mode 100644
index 000000000..91e88c9a7
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewEntity.cs
@@ -0,0 +1,145 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-12-09 14:27
+ /// 描 述:排考明细
+ ///
+ public class ArrangeExamTermItemNewEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// AcademicYearNo
+ ///
+ ///
+ [Column("ACADEMICYEARNO")]
+ public string AcademicYearNo { get; set; }
+ ///
+ /// Semester
+ ///
+ ///
+ [Column("SEMESTER")]
+ public string Semester { get; set; }
+ ///
+ /// ExamDate
+ ///
+ ///
+ [Column("EXAMDATE")]
+ public DateTime? ExamDate { get; set; }
+ ///
+ /// ExamTime
+ ///
+ ///
+ [Column("EXAMTIME")]
+ public string ExamTime { get; set; }
+ ///
+ /// ClassNo
+ ///
+ ///
+ [Column("CLASSNO")]
+ public string ClassNo { get; set; }
+ ///
+ /// ClassName
+ ///
+ ///
+ [Column("CLASSNAME")]
+ public string ClassName { get; set; }
+ ///
+ /// LessonNo
+ ///
+ ///
+ [Column("LESSONNO")]
+ public string LessonNo { get; set; }
+ ///
+ /// LessonName
+ ///
+ ///
+ [Column("LESSONNAME")]
+ public string LessonName { get; set; }
+ ///
+ /// EmpNo
+ ///
+ ///
+ [Column("EMPNO")]
+ public string EmpNo { get; set; }
+ ///
+ /// EmpName
+ ///
+ ///
+ [Column("EMPNAME")]
+ public string EmpName { get; set; }
+ ///
+ /// ClassRoomNo
+ ///
+ ///
+ [Column("CLASSROOMNO")]
+ public string ClassRoomNo { get; set; }
+ ///
+ /// ClassRoomName
+ ///
+ ///
+ [Column("CLASSROOMNAME")]
+ public string ClassRoomName { get; set; }
+ ///
+ /// F_SchoolId
+ ///
+ ///
+ [Column("F_SCHOOLID")]
+ public string F_SchoolId { get; set; }
+ ///
+ /// SitNumber
+ ///
+ ///
+ [Column("SITNUMBER")]
+ public string SitNumber { get; set; }
+ ///
+ /// StuNo
+ ///
+ ///
+ [Column("STUNO")]
+ public string StuNo { get; set; }
+ ///
+ /// StuName
+ ///
+ ///
+ [Column("STUNAME")]
+ public string StuName { get; set; }
+
+ [NotMapped]
+ public string StartDate { get; set; }
+ [NotMapped]
+ public string EndDate { get; set; }
+
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewIBLL.cs
new file mode 100644
index 000000000..bd8f19f4e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewIBLL.cs
@@ -0,0 +1,55 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-12-09 14:27
+ /// 描 述:排考明细
+ ///
+ public interface ArrangeExamTermItemNewIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetList(string queryJson);
+ ///
+ /// 获取列表分页数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取实体数据
+ ///
+ /// 主键
+ ///
+ ArrangeExamTermItemNewEntity GetEntity(string keyValue);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, ArrangeExamTermItemNewEntity entity);
+ #endregion
+
+ }
+}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewService.cs
new file mode 100644
index 000000000..8462c44c4
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewService.cs
@@ -0,0 +1,235 @@
+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
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-12-09 14:27
+ /// 描 述:排考明细
+ ///
+ public class ArrangeExamTermItemNewService : RepositoryFactory
+ {
+ #region 构造函数和属性
+
+ private string fieldSql;
+ ///
+ /// 构造方法
+ ///
+ public ArrangeExamTermItemNewService()
+ {
+ fieldSql = @"
+ t.Id,
+ t.AcademicYearNo,
+ t.Semester,
+ t.ExamDate,
+ t.ExamTime,
+ t.ClassNo,
+ t.ClassName,
+ t.LessonNo,
+ t.LessonName,
+ t.EmpNo,
+ t.EmpName,
+ t.ClassRoomNo,
+ t.ClassRoomName,
+ t.F_SchoolId,
+ t.SitNumber,
+ t.StuNo,
+ t.StuName
+ ";
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取列表数据
+ ///
+ /// 条件参数
+ ///
+ public IEnumerable GetList(string queryJson)
+ {
+ try
+ {
+ //参考写法
+ //var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ //var dp = new DynamicParameters(new { });
+ //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(fieldSql);
+ strSql.Append(" FROM ArrangeExamTermItemNew t ");
+
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString());
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取列表分页数据
+ ///
+ /// 分页参数
+ /// 条件参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(fieldSql);
+ strSql.Append(" FROM ArrangeExamTermItemNew t where 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ if (!queryParam["AcademicYearNo"].IsEmpty())
+ {
+ strSql.Append(" and t.AcademicYearNo='" + queryParam["AcademicYearNo"].ToString() + "' ");
+ }
+ if (!queryParam["Semester"].IsEmpty())
+ {
+ strSql.Append(" and t.Semester='" + queryParam["Semester"].ToString() + "' ");
+ }
+ if (!queryParam["LessonNo"].IsEmpty())
+ {
+ strSql.Append(" and t.LessonNo='" + queryParam["LessonNo"].ToString() + "' ");
+ }
+ if (!queryParam["ClassNo"].IsEmpty())
+ {
+ strSql.Append(" and t.ClassNo='" + queryParam["ClassNo"].ToString() + "' ");
+ }
+ if (!queryParam["StuNo"].IsEmpty())
+ {
+ strSql.Append(" and t.StuNo='" + queryParam["StuNo"].ToString() + "' ");
+ }
+ if (!queryParam["EmpNo"].IsEmpty())
+ {
+ strSql.Append(" and t.EmpNo='" + queryParam["EmpNo"].ToString() + "' ");
+ }
+ if (!queryParam["ClassRoomNo"].IsEmpty())
+ {
+ strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' ");
+ }
+ if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
+ {
+ strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["StartTime"].ToString() + "' ) ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),null,pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取实体数据
+ ///
+ /// 主键
+ ///
+ public ArrangeExamTermItemNewEntity GetEntity(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, ArrangeExamTermItemNewEntity 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
+
+ }
+}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs
new file mode 100644
index 000000000..f3d4459a4
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs
@@ -0,0 +1,202 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-12-08 12:19
+ /// 描 述:排考2021新
+ ///
+ public class ArrangeExamTermNewBLL : ArrangeExamTermNewIBLL
+ {
+ private ArrangeExamTermNewService arrangeExamTermNewService = new ArrangeExamTermNewService();
+
+ #region 获取数据
+
+ ///
+ /// 获取列表数据
+ ///
+ /// 查询参数
+ ///
+ public IEnumerable GetList(string queryJson)
+ {
+ try
+ {
+ return arrangeExamTermNewService.GetList(queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取列表分页数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return arrangeExamTermNewService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ public IEnumerable GetItemPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return arrangeExamTermNewService.GetItemPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取实体数据
+ ///
+ /// 主键
+ ///
+ public ArrangeExamTermNewEntity GetEntity(string keyValue)
+ {
+ try
+ {
+ return arrangeExamTermNewService.GetEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ arrangeExamTermNewService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, ArrangeExamTermNewEntity entity)
+ {
+ try
+ {
+ arrangeExamTermNewService.SaveEntity(keyValue, entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ public List GetClassTree()
+ {
+ try
+ {
+ var list = arrangeExamTermNewService.GetClassTree();
+ List treeList = new List();
+ foreach (var item in list)
+ {
+ TreeModel node = new TreeModel
+ {
+ id = item.ClassNo,
+ text = item.ClassName,
+ value = item.ClassNo,
+ showcheck = false,
+ checkstate = 0,
+ isexpand = true,
+ parentId = "0"
+ };
+ treeList.Add(node);
+ }
+ return treeList.ToTree();
+ }
+ 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/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewEntity.cs
new file mode 100644
index 000000000..9601c6899
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewEntity.cs
@@ -0,0 +1,139 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-12-08 12:19
+ /// 描 述:排考2021新
+ ///
+ public class ArrangeExamTermNewEntity
+ {
+ #region 实体成员
+ ///
+ /// AETId
+ ///
+ ///
+ [Column("AETID")]
+ public string AETId { get; set; }
+ ///
+ /// AcademicYearNo
+ ///
+ ///
+ [Column("ACADEMICYEARNO")]
+ public string AcademicYearNo { get; set; }
+ ///
+ /// Semester
+ ///
+ ///
+ [Column("SEMESTER")]
+ public string Semester { get; set; }
+ ///
+ /// ExamDate
+ ///
+ ///
+ [Column("EXAMDATE")]
+ public DateTime? ExamDate { get; set; }
+ ///
+ /// ExamTime
+ ///
+ ///
+ [Column("EXAMTIME")]
+ public string ExamTime { get; set; }
+ ///
+ /// ClassNo
+ ///
+ ///
+ [Column("CLASSNO")]
+ public string ClassNo { get; set; }
+ ///
+ /// ClassName
+ ///
+ ///
+ [Column("CLASSNAME")]
+ public string ClassName { get; set; }
+ ///
+ /// LessonNo
+ ///
+ ///
+ [Column("LESSONNO")]
+ public string LessonNo { get; set; }
+ ///
+ /// LessonName
+ ///
+ ///
+ [Column("LESSONNAME")]
+ public string LessonName { get; set; }
+ ///
+ /// EmpNo
+ ///
+ ///
+ [Column("EMPNO")]
+ public string EmpNo { get; set; }
+ ///
+ /// EmpName
+ ///
+ ///
+ [Column("EMPNAME")]
+ public string EmpName { get; set; }
+ ///
+ /// ClassRoomNo
+ ///
+ ///
+ [Column("CLASSROOMNO")]
+ public string ClassRoomNo { get; set; }
+ ///
+ /// ClassRoomName
+ ///
+ ///
+ [Column("CLASSROOMNAME")]
+ public string ClassRoomName { get; set; }
+ ///
+ /// F_SchoolId
+ ///
+ ///
+ [Column("F_SCHOOLID")]
+ public string F_SchoolId { get; set; }
+
+ ///
+ /// 座位编号
+ ///
+ [NotMapped]
+ public string SitNumber { get; set; }
+ [NotMapped]
+ public string StuNo { get; set; }
+ [NotMapped]
+ public string StuName { get; set; }
+ [NotMapped]
+ public string StartDate { get; set; }
+ [NotMapped]
+ public string EndDate { get; set; }
+ [NotMapped]
+ public string Teacher { get; set; }
+
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.AETId = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.AETId = keyValue;
+ }
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs
new file mode 100644
index 000000000..2a7018854
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs
@@ -0,0 +1,57 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-12-08 12:19
+ /// 描 述:排考2021新
+ ///
+ public interface ArrangeExamTermNewIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetList( string queryJson );
+ ///
+ /// 获取列表分页数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ IEnumerable GetItemPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取实体数据
+ ///
+ /// 主键
+ ///
+ ArrangeExamTermNewEntity GetEntity(string keyValue);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, ArrangeExamTermNewEntity entity);
+ #endregion
+
+ List GetClassTree();
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs
new file mode 100644
index 000000000..4ce6b0d75
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs
@@ -0,0 +1,299 @@
+using Dapper;
+using Learun.DataBase.Repository;
+using Learun.Util;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-12-08 12:19
+ /// 描 述:排考2021新
+ ///
+ public class ArrangeExamTermNewService : RepositoryFactory
+ {
+ #region 构造函数和属性
+
+ private string fieldSql;
+ ///
+ /// 构造方法
+ ///
+ public ArrangeExamTermNewService()
+ {
+ fieldSql = @"*";
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取列表数据
+ ///
+ /// 条件参数
+ ///
+ public IEnumerable GetList(string queryJson)
+ {
+ try
+ {
+ //参考写法
+ //var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ //var dp = new DynamicParameters(new { });
+ //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(fieldSql);
+ strSql.Append(" FROM ArrangeExamTermNew t ");
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString());
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取列表分页数据
+ ///
+ /// 分页参数
+ /// 条件参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(fieldSql);
+ strSql.Append(" FROM ArrangeExamTermNew t where 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["AcademicYearNo"].IsEmpty())
+ {
+ strSql.Append(" and t.AcademicYearNo=@AcademicYearNo ");
+ dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
+ }
+ if (!queryParam["Semester"].IsEmpty())
+ {
+ strSql.Append(" and t.Semester=@Semester ");
+ dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
+ }
+ if (!queryParam["EmpNo"].IsEmpty())
+ {
+ strSql.Append(" and t.EmpNo=@EmpNo ");
+ dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String);
+ }
+ if (!queryParam["LessonNo"].IsEmpty())
+ {
+ strSql.Append(" and t.LessonNo=@LessonNo ");
+ dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String);
+ }
+ if (!queryParam["ClassNo"].IsEmpty())
+ {
+ strSql.Append(" and t.ClassNo=@ClassNo ");
+ dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
+ }
+ if (!queryParam["ClassRoomNo"].IsEmpty())
+ {
+ strSql.Append(" and t.ClassRoomNo=@ClassRoomNo ");
+ dp.Add("ClassRoomNo", queryParam["ClassRoomNo"].ToString(), DbType.String);
+ }
+ if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
+ {
+ dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
+ dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
+ strSql.Append(" AND ( ExamDate >= @startTime AND ExamDate <= @endTime ) ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ ///
+ /// 获取排考详情
+ ///
+ ///
+ ///
+ ///
+ public IEnumerable GetItemPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append(@"select * from ArrangeExamTermItemNew t where 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ if (!queryParam["AcademicYearNo"].IsEmpty())
+ {
+ strSql.Append(" and t.AcademicYearNo='"+ queryParam["AcademicYearNo"].ToString() + "' ");
+ }
+ if (!queryParam["Semester"].IsEmpty())
+ {
+ strSql.Append(" and t.Semester='" + queryParam["Semester"].ToString() + "' ");
+ }
+ if (!queryParam["LessonNo"].IsEmpty())
+ {
+ strSql.Append(" and t.LessonNo='" + queryParam["LessonNo"].ToString() + "' ");
+ }
+ if (!queryParam["ClassNo"].IsEmpty())
+ {
+ strSql.Append(" and t.ClassNo='" + queryParam["ClassNo"].ToString() + "' ");
+ }
+ if (!queryParam["StuNo"].IsEmpty())
+ {
+ strSql.Append(" and t.StuNo='" + queryParam["StuNo"].ToString() + "' ");
+ }
+ if (!queryParam["EmpNo"].IsEmpty())
+ {
+ strSql.Append(" and t.EmpNo like '%" + queryParam["EmpNo"].ToString() + "%' ");
+ }
+ if (!queryParam["ClassRoomNo"].IsEmpty())
+ {
+ strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' ");
+ }
+ if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
+ {
+ strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) ");
+ }
+
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), null, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ ///
+ /// 获取实体数据
+ ///
+ /// 主键
+ ///
+ public ArrangeExamTermNewEntity GetEntity(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.AETId == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, ArrangeExamTermNewEntity 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
+
+ public IEnumerable GetClassTree()
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindList("select ClassNo,ClassName from ArrangeExamTermItemNew group by ClassNo,ClassName order by ClassNo");
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanBLL.cs
index 1489602ef..44d709d8a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanBLL.cs
@@ -120,5 +120,107 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
#endregion
+
+ #region 扩展数据
+ ///
+ /// 去重
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept,
+ string Major, string Grade, string Lesson)
+ {
+ try
+ {
+ return classPlanService.GetRepetitions(School, Year, Semester, Dept, Major, Grade, Lesson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DelRelation(string keyValue)
+ {
+ try
+ {
+ classPlanService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 主键
+ ///
+ ///
+ public List GetListById(string keyValue)
+ {
+ try
+ {
+ return classPlanService.GetListById(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ public void SaveEntityList(string keyValue, List entity)
+ {
+ try
+ {
+ classPlanService.SaveEntityList(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/EducationalAdministration/ClassPlan/ClassPlanIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanIBLL.cs
index 6ba71a1e2..012eb2fa5 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanIBLL.cs
@@ -44,5 +44,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
void SaveEntity(string keyValue, OpenLessonPlanEntity entity);
#endregion
+ #region 扩展数据
+
+ ///
+ /// 去重
+ ///
+ /// 主键
+ /// 校区
+ /// 学年
+ /// 学期
+ /// 系部
+ /// 专业
+ /// 年级
+ /// 课程
+ ///
+ OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept, string Major, string Grade, string Lesson);
+
+ ///
+ /// 编辑时删除关联数据
+ ///
+ ///
+ void DelRelation(string keyValue);
+
+ ///
+ /// 获取TeachClass表实体数据
+ /// 主键
+ ///
+ ///
+ List GetListById(string keyValue);
+
+ void SaveEntityList(string keyValue, List entity);
+ #endregion
}
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanService.cs
index 184b03de9..822519c21 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanService.cs
@@ -122,13 +122,57 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 主键
public void DeleteEntity(string keyValue)
{
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
- var keyvalue = Convert.ToInt32(keyValue);
- this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyvalue);
+ var keyvalue = keyValue.Split(',');
+ foreach (var items in keyvalue)
+ {
+ var OpList = this.BaseRepository("CollegeMIS").FindEntity(t => t.ID.ToString() == items);
+ if (OpList != null)
+ {
+ var TeachList = this.BaseRepository("CollegeMIS").FindList(
+ x => x.DeptNo == OpList.DeptNo &&
+ x.MajorNo == OpList.MajorNo &&
+ x.Grade == OpList.Grade &&
+ x.Semester == OpList.Semester &&
+ x.LessonNo == OpList.LessonNo &&
+ x.AcademicYearNo == OpList.AcademicYearNo
+ ).ToList();
+ List StrTeach = null;
+ if (TeachList.Count > 0)
+ {
+ StrTeach = TeachList.Select(x => x.TeachClassNo).ToList();
+ if (StrTeach.Count() > 0)
+ {
+ var LessonList = this.BaseRepository("CollegeMIS").FindList(
+ y => y.DeptNo == OpList.DeptNo &&
+ y.MajorNo == OpList.MajorNo &&
+ y.Grade == OpList.Grade &&
+ y.Semester == OpList.Semester &&
+ y.LessonNo == OpList.LessonNo &&
+ y.AcademicYearNo == OpList.AcademicYearNo &&
+ StrTeach.Contains(y.ClassNo)
+ );
+ foreach (var item in LessonList)
+ {
+ db.Delete(m => m.SelectId == Convert.ToInt32(item.SelectId));
+ }
+
+ foreach (var item in TeachList)
+ {
+ db.Delete(m => m.ID == item.ID);
+ }
+ }
+ }
+ }
+ db.Delete(m => m.ID.ToString() == items);
+ }
+ db.Commit();
}
catch (Exception ex)
{
+ db.Rollback();
if (ex is ExceptionEx)
{
throw;
@@ -175,5 +219,160 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
#endregion
+
+ #region 扩展数据
+ ///
+ /// 去重
+ ///
+ /// 主键
+ /// 校区
+ /// 学年
+ /// 学期
+ /// 系部
+ /// 专业
+ /// 年级
+ /// 课程
+ ///
+ public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept,
+ string Major, string Grade, string Lesson)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(
+ x => x.F_SchoolId == School
+ && x.AcademicYearNo == Year
+ && x.Semester == Semester
+ && x.DeptNo == Dept
+ && x.MajorNo == Major
+ && x.Grade == Grade
+ && x.LessonNo == Lesson
+ );
+
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e);
+ throw;
+ }
+ }
+
+ public void DelRelation(string keyValue)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ var keyvalue = Convert.ToInt32(keyValue);
+ var OpList = this.BaseRepository("CollegeMIS").FindEntity(t => t.ID == keyvalue);
+ if (OpList != null)
+ {
+ var TeachList = this.BaseRepository("CollegeMIS").FindList(
+ x => x.DeptNo == OpList.DeptNo &&
+ x.MajorNo == OpList.MajorNo &&
+ x.Grade == OpList.Grade &&
+ x.Semester == OpList.Semester &&
+ x.LessonNo == OpList.LessonNo &&
+ x.AcademicYearNo == OpList.AcademicYearNo
+ ).ToList();
+ List StrTeach = null;
+ if (TeachList.Count > 0)
+ {
+ StrTeach = TeachList.Select(x => x.TeachClassNo).ToList();
+ if (StrTeach.Count > 0)
+ {
+ var LessonList = this.BaseRepository("CollegeMIS").FindList(
+ y => y.DeptNo == OpList.DeptNo &&
+ y.MajorNo == OpList.MajorNo &&
+ y.Grade == OpList.Grade &&
+ y.Semester == OpList.Semester &&
+ y.LessonNo == OpList.LessonNo &&
+ y.AcademicYearNo == OpList.AcademicYearNo &&
+ StrTeach.Contains(y.ClassNo)
+ );
+ foreach (var item in LessonList)
+ {
+ db.Delete(m => m.SelectId == Convert.ToInt32(item.SelectId));
+ }
+
+ foreach (var item in TeachList)
+ {
+ db.Delete(m => m.ID == item.ID);
+ }
+ }
+ }
+
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取OpenLessonPlan表实体数据
+ /// 主键
+ ///
+ ///
+ public List GetListById(string keyValue)
+ {
+ try
+ {
+ var id = keyValue.Split(',');
+ return this.BaseRepository("CollegeMIS")
+ .FindList(x => id.Contains(x.ID.ToString())).ToList();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+
+ public void SaveEntityList(string keyValue, List entity)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ var keyvalue = keyValue.Split(',');
+ foreach (var item in keyvalue)
+ {
+ var entityList = this.BaseRepository("CollegeMIS").FindEntity(x => x.ID.ToString() == item);
+ entityList.State = 1;
+ db.Update(entityList);
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
}
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs
index ed9380366..4aaae7b41 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs
@@ -527,7 +527,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
[Column("WORKERTECHNOLOGYSTATUS")]
public bool? WorkerTechnologyStatus { get; set; }
-
+
///
/// 任同职级职务时间
///
@@ -585,6 +585,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("ISINACTIVETIME")]
public DateTime? IsInActiveTime { get; set; }
+ ///
+ /// 排序
+ ///
+ [Column("F_ORDER")]
+ public int? F_Order { get; set; }
+
+
#endregion
#region 扩展操作
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs
index b03e465b3..924390e69 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs
@@ -434,6 +434,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi
userbase.F_CompanyId = tEntity.F_CompanyId;
userbase.F_DepartmentId = tEntity.F_DepartmentId;
userbase.F_IdentityCardNo = tEntity.IdentityCardNo;
+ userbase.F_Order = tEntity.F_Order;
userIBLL.SaveEntity(null, userbase);
studentList.Add(userbase);
}
@@ -545,7 +546,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
- db.ExecuteBySql("update EmpInfo set CheckMark=1 where EmpId='" + item + "'");
+ db.ExecuteBySql("update EmpInfo set CheckMark=1 where EmpId='" + item + "'");
}
db.Commit();
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlan/OpenLessonPlanEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlan/OpenLessonPlanEntity.cs
index 2f3a5cfc6..0ebadc6b6 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlan/OpenLessonPlanEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlan/OpenLessonPlanEntity.cs
@@ -270,6 +270,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
[Column("ISALLOWEDIT")]
public bool? IsAllowEdit { get; set; }
+ ///
+ /// 排课标识
+ ///
+ [Column("STATE")]
+ public int? State { get; set; }
#endregion
#region 扩展操作
@@ -305,6 +310,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
[NotMapped]
public string MajorName { get; set; }
+ ///
+ /// 教师
+ ///
+ [NotMapped]
+ public string TeachNo { get; set; }
+
#endregion
}
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListBLL.cs
new file mode 100644
index 000000000..9fbfaf9a7
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListBLL.cs
@@ -0,0 +1,164 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-01 11:49
+ /// 描 述:收文报告
+ ///
+ public class StuSelectLessonListBLL : StuSelectLessonListIBLL
+ {
+ private StuSelectLessonListService stuSelectLessonListService = new StuSelectLessonListService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return stuSelectLessonListService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Dispatch表实体数据
+ ///
+ /// 主键
+ ///
+ public StuSelectLessonListEntity GetListEntity(string keyValue)
+ {
+ try
+ {
+ return stuSelectLessonListService.GetListEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ stuSelectLessonListService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, StuSelectLessonListEntity entity)
+ {
+ try
+ {
+ stuSelectLessonListService.SaveEntity(keyValue, entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 扩展数据
+ public void SaveEntityList(List entity)
+ {
+ try
+ {
+ stuSelectLessonListService.SaveEntityList(entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ public IEnumerable GetAllList()
+ {
+ try
+ {
+ return stuSelectLessonListService.GetAllList();
+ }
+ 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/EducationalAdministration/StuSelectLessonList/StuSelectLessonListIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListIBLL.cs
new file mode 100644
index 000000000..9d90b7f5d
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListIBLL.cs
@@ -0,0 +1,53 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-01 11:49
+ /// 描 述:收文报告
+ ///
+ public interface StuSelectLessonListIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取Dispatch表实体数据
+ ///
+ /// 主键
+ ///
+ StuSelectLessonListEntity GetListEntity(string keyValue);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, StuSelectLessonListEntity entity);
+ void SaveEntityList(List entity);
+
+ IEnumerable GetAllList();
+
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListService.cs
new file mode 100644
index 000000000..c3dfede79
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListService.cs
@@ -0,0 +1,242 @@
+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
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-06-01 11:49
+ /// 描 述:收文报告
+ ///
+ public class StuSelectLessonListService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@" * ");
+ strSql.Append(" FROM StuSelectLessonList t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["keyword"].IsEmpty())
+ {
+ dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.DisFrom like @keyword ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Dispatch表实体数据
+ ///
+ /// 主键
+ ///
+ public StuSelectLessonListEntity GetListEntity(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)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ //this.BaseRepository("CollegeMIS").Delete(t => t.StuId == keyValue);
+
+ //多个删除
+ var keyValueArr = keyValue.Split(',');
+ foreach (var item in keyValueArr)
+ {
+ db.Delete(t => t.SelectId.ToString() == item);
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, StuSelectLessonListEntity entity)
+ {
+ try
+ {
+ if (!string.IsNullOrEmpty(keyValue))
+ {
+ var keyvalue = Convert.ToInt32(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 扩展数据
+ public void SaveEntityList(List entity)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ foreach (var item in entity)
+ {
+ StuSelectLessonListEntity stuLessonList = new StuSelectLessonListEntity();
+ stuLessonList.F_SchoolId = item.F_SchoolId;
+ stuLessonList.NoticeBookNo = item.NoticeBookNo;
+ stuLessonList.StuNo = item.StuNo;
+ stuLessonList.DeptNo = item.DeptNo;
+ stuLessonList.MajorNo = item.MajorNo;
+ stuLessonList.ClassNo = item.ClassNo;
+ stuLessonList.MajorDetailNo = item.MajorDetailNo;
+ stuLessonList.MajorDetailName = item.MajorDetailName;
+ stuLessonList.StuName = item.StuName;
+ stuLessonList.TeachClassNo = item.TeachClassNo;
+ stuLessonList.GenderNo = item.GenderNo;
+ stuLessonList.AcademicYearNo = item.AcademicYearNo;
+ stuLessonList.Semester = item.Semester;
+ stuLessonList.OpenLessonDeptNo = item.OpenLessonDeptNo;
+ stuLessonList.OpenLessonMajorNo = item.OpenLessonMajorNo;
+ stuLessonList.LessonNo = item.LessonNo;
+ stuLessonList.LessonName = item.LessonName;
+ stuLessonList.PartCode = item.PartCode;
+ stuLessonList.LessonNameEng = item.LessonNameEng;
+ stuLessonList.OrdinaryScoreScale = item.OrdinaryScoreScale;
+ stuLessonList.TermInScoreScale = item.TermInScoreScale;
+ stuLessonList.TermEndScoreScale = item.TermEndScoreScale;
+ stuLessonList.OtherScoreScale = item.OtherScoreScale;
+ stuLessonList.LessonSortNo = item.LessonSortNo;
+ stuLessonList.StuSortNo = item.StuSortNo;
+ stuLessonList.Grade = item.Grade;
+ stuLessonList.StudyScore = item.StudyScore;
+ stuLessonList.TotalStudyHour = item.TotalStudyHour;
+ stuLessonList.IsInEffect = item.IsInEffect;
+ stuLessonList.Remark = item.Remark;
+ stuLessonList.ConflictLessonNo = item.ConflictLessonNo;
+ stuLessonList.EmpNo = item.EmpNo;
+ stuLessonList.TeachPlanNo = item.TeachPlanNo;
+ stuLessonList.IsPitchOn = item.IsPitchOn;
+ stuLessonList.CheckMark = item.CheckMark;
+ stuLessonList.InsertTime = item.InsertTime;
+ stuLessonList.CheckMark = "1";
+ db.Insert(stuLessonList);
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ public IEnumerable GetAllList()
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindList(m => m.CheckMark == "1");
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassBLL.cs
new file mode 100644
index 000000000..8e07b0437
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassBLL.cs
@@ -0,0 +1,233 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2019-01-29 11:08
+ /// 描 述:班级信息管理
+ ///
+ public class TeachClassBLL : TeachClassIBLL
+ {
+ private TeachClassService teachClassEntity = new TeachClassService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return teachClassEntity.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ public bool GetAny()
+ {
+ try
+ {
+ return teachClassEntity.GetAny();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取ClassInfo表实体数据
+ /// 主键
+ ///
+ ///
+ public TeachClassEntity GetTeachClassEntity(string keyValue)
+ {
+ try
+ {
+ return teachClassEntity.GetTeachClassEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+ ///
+ /// 获取ClassInfo表实体数据
+ /// 班级编号
+ ///
+ ///
+
+ #endregion
+
+ #region 提交数据
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ teachClassEntity.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 主键
+ ///
+ ///
+ public void SaveEntity(string keyValue, TeachClassEntity entity)
+ {
+ try
+ {
+ teachClassEntity.SaveEntity(keyValue, entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ public void SaveEntityList(List entity)
+ {
+ try
+ {
+ teachClassEntity.SaveEntityList(entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+ #endregion
+
+ #region 扩展数据
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 主键
+ ///
+ ///
+ public List GetTeachListById(string keyValue)
+ {
+ try
+ {
+ return teachClassEntity.GetTeachListById(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+ ///
+ /// 查询条件
+ ///
+ ///
+ public IEnumerable GetAllClass()
+ {
+ try
+ {
+ return teachClassEntity.GetAllClass();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 主键
+ ///
+ ///
+ public void UpEmpNo(string keyValue, string EmpNo)
+ {
+ try
+ {
+ teachClassEntity.UpEmpNo(keyValue, EmpNo);
+ }
+ 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/EducationalAdministration/TeachClass/TeachClassIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassIBLL.cs
new file mode 100644
index 000000000..27aeb4551
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassIBLL.cs
@@ -0,0 +1,76 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2019-01-29 11:08
+ /// 描 述:班级信息管理
+ ///
+ public interface TeachClassIBLL
+ {
+ #region 获取数据
+ bool GetAny();
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取ClassInfo表实体数据
+ /// 主键
+ ///
+ ///
+ TeachClassEntity GetTeachClassEntity(string keyValue);
+ #endregion
+
+ #region 提交数据
+ ///
+ /// 删除实体数据
+ /// 主键
+ ///
+ ///
+ void DeleteEntity(string keyValue);
+
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 主键
+ ///
+ ///
+ void SaveEntity(string keyValue, TeachClassEntity entity);
+
+
+ #endregion
+
+ #region 扩展数据
+
+ ///
+ /// 获取ClassTeach表实体数据
+ /// 主键
+ ///
+ ///
+ List GetTeachListById(string keyValue);
+ ///
+ /// 保存数据
+ ///
+ ///
+ void SaveEntityList(List entity);
+ ///
+ /// 去重
+ ///
+ ///
+ IEnumerable GetAllClass();
+ ///
+ /// 保存/修改教师
+ ///
+ ///
+ ///
+ void UpEmpNo(string keyvalue, string EmpNo);
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs
new file mode 100644
index 000000000..6798daddd
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs
@@ -0,0 +1,331 @@
+using Dapper;
+using Learun.DataBase.Repository;
+using Learun.Util;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2019-01-29 11:08
+ /// 描 述:班级信息管理
+ ///
+ public class TeachClassService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@" * ");
+ strSql.Append(" FROM TeachClass t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["F_SchoolId"].IsEmpty())
+ {
+ dp.Add("F_SchoolId", queryParam["F_SchoolId"].ToString(), DbType.String);
+ strSql.Append(" AND t.F_SchoolId = @F_SchoolId ");
+ }
+ if (!queryParam["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["DeptNo"].IsEmpty())
+ {
+ dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
+ strSql.Append(" AND t.DeptNo = @DeptNo ");
+ }
+ if (!queryParam["MajorNo"].IsEmpty())
+ {
+ dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
+ strSql.Append(" AND t.MajorNo = @MajorNo ");
+ }
+ if (!queryParam["Grade"].IsEmpty())
+ {
+ dp.Add("Grade", "%" + queryParam["Grade"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.Grade Like @Grade ");
+ }
+ 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);
+ }
+ }
+ }
+
+ internal bool GetAny()
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindList().ToList().Count > 0 ? true : false;
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取ClassInfo表实体数据
+ /// 主键
+ ///
+ ///
+ public TeachClassEntity GetTeachClassEntity(string keyValue)
+ {
+ try
+ {
+ int ID = Convert.ToInt32(keyValue);
+ return this.BaseRepository("CollegeMIS").FindEntity(ID);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+
+ #region 提交数据
+ ///
+ /// 删除实体数据
+ /// 主键
+ ///
+ ///
+ public void DeleteEntity(string keyValue)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ //修改
+ var keyValueArr = keyValue.Split(',');
+ foreach (var item in keyValueArr)
+ {
+ var entity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ID == Convert.ToInt32(item));
+ if (entity != null)
+ {
+ entity.EmpNo = "";
+ db.Update(entity);
+ }
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 主键
+ ///
+ ///
+ public void SaveEntity(string keyValue, TeachClassEntity entity)
+ {
+ try
+ {
+ var keyvalue = Convert.ToInt32(keyValue);
+ 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 扩展数据
+ public IEnumerable GetAllClass()
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindList();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取ClassInfo表实体数据
+ /// 主键
+ ///
+ ///
+ public List GetTeachListById(string keyValue)
+ {
+ try
+ {
+ var id = keyValue.Split(',');
+ return this.BaseRepository("CollegeMIS")
+ .FindList(x => id.Contains(x.ID.ToString())).ToList();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ ///
+ /// 保存数据
+ ///
+ /// 主键
+ ///
+ public void SaveEntityList(List List)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ foreach (var item in List)
+ {
+ TeachClassEntity Teach = new TeachClassEntity();
+ Teach.TeachClassNo = item.TeachClassNo;
+ Teach.AcademicYearNo = item.AcademicYearNo;
+ Teach.DeptNo = item.DeptNo;
+ Teach.MajorNo = item.MajorNo;
+ Teach.Grade = item.Grade;
+ Teach.Semester = item.Semester;
+ Teach.LessonNo = item.LessonNo;
+ Teach.StuNum = item.StuNum;
+ Teach.LessonSortNo = item.LessonSortNo;
+ Teach.F_SchoolId = item.F_SchoolId;
+ db.Insert(Teach);
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ ///
+ /// 保存或修改教师
+ ///
+ ///
+ ///
+ public void UpEmpNo(string keyValue, string EmpNo)
+ {
+ var db = this.BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ var keyarray = keyValue.Split(',');
+ foreach (var item in keyarray)
+ {
+ var entityList = this.GetTeachClassEntity(item);
+ entityList.EmpNo = EmpNo;
+ db.Update(entityList);
+
+ }
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+ #endregion
+ }
+}
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 81e4aa5aa..18945acac 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
@@ -91,6 +91,10 @@
+
+
+
+
@@ -211,6 +215,9 @@
+
+
+
@@ -228,6 +235,9 @@
+
+
+
@@ -1705,6 +1715,10 @@
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs
index a30cccfe6..a10328c61 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs
@@ -795,6 +795,52 @@ namespace Learun.Application.WorkFlow
});
}
+ }
+ break;
+ case 8://liang 20210706新增部门负责人判断
+ //获取流程创建用户的分管领导
+ //判断用户所在部门是否有上级部门:如果有,找到上级部门的负责人;如果没有,找本部门的分管校长;
+ string deptMasterId = "";
+ var selfDepart2 = departmentIBLL.GetEntity(paramConfig.CreateUser.DepartmentId);
+ if (selfDepart2 != null)
+ {
+ //本部门存在部门负责人
+ if (!string.IsNullOrEmpty(selfDepart2.F_Manager))
+ {
+ deptMasterId = selfDepart2.F_Manager;
+ }
+ else
+ {
+ //本部门不存在就找上级部门
+ var parentDepart = departmentIBLL.GetEntity(selfDepart2.F_ParentId);
+ if (parentDepart != null)
+ {
+ if (!string.IsNullOrEmpty(selfDepart2.F_Manager))
+ {
+ deptMasterId = parentDepart.F_Manager;
+ }
+ }
+ }
+ }
+ //找到部门负责人就增加审批人
+ if (!string.IsNullOrEmpty(deptMasterId))
+ {
+ var userEntity7 = userIBLL.GetEntityByUserId(deptMasterId);
+
+ if (null != userEntity7)
+ {
+ if (!list.Exists(m => m.Id == userEntity7.F_UserId))
+ {
+ list.Add(new NWFUserInfo()
+ {
+ Id = userEntity7.F_UserId,
+ Account = userEntity7.F_Account,
+ Name = userEntity7.F_RealName
+ });
+ }
+
+ }
+
}
break;
}