From 28abc052d537ea1eb06eac464083b52b88152bf0 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 18 Jan 2022 18:24:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E8=AF=BE=E7=AE=A1=E7=90=86=20=20?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E5=AF=BC=E8=88=AA+=E5=91=A8=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArrangeLessonTermController.cs | 176 ++++++++++++ .../ArrangeLessonTerm/IndexLessonTerm.cshtml | 182 ++++++++++++ .../ArrangeLessonTerm/IndexLessonTerm.js | 266 ++++++++++++++++++ .../Learun.Application.Web.csproj | 4 +- .../ArrangeLessonTerm/ArrangeLessonTermBLL.cs | 73 +++++ .../ArrangeLessonTermIBLL.cs | 2 + .../CdDept/CdDeptService.cs | 19 ++ .../CdMajor/CdMajorService.cs | 18 ++ .../ClassInfo/ClassInfoService.cs | 18 ++ 9 files changed, 757 insertions(+), 1 deletion(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs index 2b643cac9..a170c31c2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs @@ -26,10 +26,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public class ArrangeLessonTermController : MvcControllerBase { private ArrangeLessonTermIBLL arrangeLessonTermIBLL = new ArrangeLessonTermBLL(); + private ArrangeLessonTermOfElectiveIBLL arrangeLessonTermOfElectiveIBLL = new ArrangeLessonTermOfElectiveBLL(); private Sys_InformationPushIBLL sys_InformationPushIBLL = new Sys_InformationPushBLL(); private UserIBLL userIbll = new UserBLL(); private WeChatConfigIBLL weChatConfigIbll = new WeChatConfigBLL(); private WeChatTempletIBLL weChatTempletIbll = new WeChatTempletBLL(); + private SchoolCalendarIBLL schoolCalendarIbll = new SchoolCalendarBLL(); #region 视图功能 @@ -74,6 +76,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + [HttpGet] + public ActionResult IndexLessonTerm() + { + return View(); + } #endregion #region 获取数据 @@ -110,6 +117,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 排课管理 获取左侧树结构 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetTree() + { + var data = arrangeLessonTermIBLL.GetTree(); + return Success(data); + } + /// /// 获取表单数据 /// 主键 @@ -122,6 +142,162 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers var data = arrangeLessonTermIBLL.GetEntity(keyValue); return Success(data); } + + /// + /// 获取周次 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetWeekTime() + { + int weekTimes = 0; + int curWeek = 0; + //开始时间 + var startdate = DateTime.Today; + var startDate = Common.CalculateFirstDateOfWeek(startdate).ToString("yyyy-MM-dd"); + //var endDate = Common.CalculateLastDateOfWeek(startdate).ToString("yyyy-MM-dd"); + + var semesterAndYear = Common.GetSemesterAndYear(startDate); + //var strAcademicYear = semesterAndYear.AcademicYearShort; + //var strSemester = semesterAndYear.Semester; + var entity = schoolCalendarIbll.GetSchoolCalendarEntityByNo(semesterAndYear.AcademicYearShort, semesterAndYear.Semester); + if (entity.StartTime.HasValue && entity.EndTime.HasValue) + { + weekTimes = GetYearWeekCount(entity.StartTime.Value, entity.EndTime.Value); + curWeek = WeekOfYear(startdate, entity.StartTime.Value, entity.EndTime.Value); + } + + var listObj = new List(); + for (int i = 1; i <= weekTimes; i++) + { + listObj.Add(new { text = "第" + i + "周", value = i }); + } + var jsonData = new + { + weekList = listObj, + curWeek = curWeek, + }; + return Success(jsonData); + } + /// + /// 有多少周 + /// 返回 int + /// + /// int + private static int GetYearWeekCount(DateTime startTime, DateTime endTime) + { + string returnStr = ""; + var startDate = DateTime.Parse(Common.CalculateFirstDateOfWeek(startTime).ToString("yyyy-MM-dd")); + int k = Convert.ToInt32(startTime.DayOfWeek);//得到开始时间的第一天是周几 + int countDay = endTime.Subtract(startDate).Days; //endTime.DayOfYear; + int countWeek = countDay / 14 + 1; + return countWeek; + + } + /// + /// 求当前日期是第几周 + /// + /// + /// + private static int WeekOfYear(DateTime curDay, DateTime startTime, DateTime endTime) + { + int firstdayofweek = Convert.ToInt32(startTime.DayOfWeek); + var startDate = DateTime.Parse(Common.CalculateFirstDateOfWeek(startTime).ToString("yyyy-MM-dd")); + int k = Convert.ToInt32(startTime.DayOfWeek);//得到开始时间的第一天是周几 + int days = curDay.Subtract(startTime).Days; + //int days = curDay.DayOfYear; + int daysOutOneWeek = days - (14 - firstdayofweek); + + if (daysOutOneWeek <= 0) + { + return 1; + } + else + { + int weeks = daysOutOneWeek / 14; + if (daysOutOneWeek % 14 != 0) + weeks++; + + return weeks + 1; + + } + + } + + + /// + /// 课程表【教务】 + /// + /// 班级 + /// 当前第几周 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetDataInEducation(string classNo, string curWeek) + { + var userInfo = LoginUserInfo.Get(); + //开始时间 + var startdate = string.IsNullOrEmpty(startTime) ? DateTime.Today : Convert.ToDateTime(startTime); + var startDate = Common.CalculateFirstDateOfWeek(startdate).ToString("yyyy-MM-dd"); + var endDate = Common.CalculateLastDateOfWeek(startdate).ToString("yyyy-MM-dd"); + + var semesterAndYear = Common.GetSemesterAndYear(startDate); + var strAcademicYear = semesterAndYear.AcademicYearLong; + var strSemester = semesterAndYear.Semester; + + var timeTableList = new List(); + //课程表 + var data = arrangeLessonTermIBLL.GetTimeTableInEducation(startDate, endDate, classNo, empNo, schoolId); + timeTableList.AddRange(data); + //选修课课程表 + var dataOfElective = arrangeLessonTermOfElectiveIBLL.GetTimeTableInEducation(startDate, endDate, classNo, empNo, schoolId); + timeTableList.AddRange(dataOfElective); + + var timeTables = timeTableList.ToList(); + var noDataResult = new + { schoolName = "课程表", semester = $"{strAcademicYear}学年度 第{strSemester}学期", weekList = "" }; + if (!timeTables.Any()) + { + return JsonResult(noDataResult); + } + var formatData = from d in timeTables + let tt = d.LessonTime.Substring(1) + group d by tt into g + orderby g.Key + select new + { + time = g.Key, + list = from e in timeTables + let ee = e.LessonTime.Substring(1) + where ee == g.Key + select new + { + day = e.LessonTime.ToCharArray()[0], + curriculum = e.LessonSortNo == "2" ? e.LessonName + "[选修]" : e.LessonName, + teacher = e?.EmpName, + classRoom = string.IsNullOrEmpty(e.ClassroomName) ? "" : e.ClassroomName.Trim(), + academicyear = semesterAndYear.AcademicYearShort, + semester = strSemester, + lessonNo = e?.LessonNo, + teachClassNo = e?.TeachClassNo, + empno = e?.EmpNo, + lessonTime = e.LessonTime, + lessonDate = e.LessonDate.ToString("yyyy-MM-dd"), + classRoomNo = string.IsNullOrEmpty(e.ClassRoomNo) ? "" : e.ClassRoomNo.Trim(), + lessonSortNo = e.LessonSortNo, + e?.OLPEId, + className = string.IsNullOrEmpty(e.ClassName) ? "" : e.ClassName + } + } + ; + + var result = new + { schoolName = "课程表", semester = $"{strAcademicYear}学年度 第{strSemester}学期", weekList = formatData }; + return JsonResult(result); + } + + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.cshtml new file mode 100644 index 000000000..21330dde4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.cshtml @@ -0,0 +1,182 @@ +@{ + ViewBag.Title = "课程表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + + + + +
+
+
+
班级信息
+
+
+
+ +
+
+
+
+
+
+
+ @*
*@ +
+ @*
*@ +
周次:
+
    +
  • 节次/星期
  • +
  • 星期一
  • +
  • 星期二
  • +
  • 星期三
  • +
  • 星期四
  • +
  • 星期五
  • +
  • 星期六
  • +
  • 星期日
  • +
  • 星期八
  • +
  • 星期九
  • +
  • 星期十
  • +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js") + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js new file mode 100644 index 000000000..a07100e45 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js @@ -0,0 +1,266 @@ +var refreshGirdData; +var bootstrap = function ($, learun) { + var startTime = '2022-01-17'; + var endTime = '2022-01-23'; + var classNo; + var curWeek; + var page = { + init: function () { + page.bind(); + page.bindSelect(); + }, + loadData: function (param) { + $.lrSetFormWithParam(top.$.rootUrl + '/PersonnelManagement/TimeTable/GetDataInEducation', param, + function (data) { + console.log('res', data); + // 数据处理 + var html = ''; + var weekLists = data.weekList; + //十节课 + for (var i = 1; i < 11; i++) { + (function (arg) { + //console.log('arg', arg); + var args = arg - 1; + var datas = flogs(arg, weekLists, 'time'); + //console.log('datas', datas); + html += ' ' + arg + '节'; + if (datas) { + var lists = datas.list; + html += tdHandles(lists); + } else { + html += tdHandle(arg); + } + html += ''; + })(i); //调用时参数 + } + $('.personT').text(data.schoolName); + $('.perSemester').text(data.semester); + $('.perFestivalsBox table').html(html); + + function flogs(num, data, obj) { + var flog = false; + $.each(data, + function (i, n) { + if (n[obj] == num) { + flog = n; + return; + } + }) + return flog; + } + function flogs2(num, data, obj) { + var arr = new Array(); + $.each(data, + function (i, n) { + if (n[obj] == num) { + arr.push(n); + } + }) + return arr; + } + + //某节课空 + function tdHandle() { + var html = ''; + for (var j = 0; j < 10; j++) { + html += '
'; + } + return html; + } + + //某节课不空 + function tdHandles(lists) { + var html = ''; + for (var k = 1; k < 11; k++) { + (function (arg) { + var args = arg - 1; + var datas = flogs2(arg, lists, 'day'); + if (datas.length > 0) { + html += ''; + $.each(datas, function (i, item) { + if (i > 0) { + html += '
'; + } + html += '
课程:' + + item.curriculum + + '
' + + '
教师:' + + item.teacher + + '
' + + '
班级:' + + item.className + + '
' + + '
教室:' + + item.classRoom + + '
'; + }); + html += ''; + + } else { + html += '
'; + } + + })(k); + } + return html; + } + }); + }, + bind: function () { + //左侧树形导航 + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetTree', + nodeClick: function (item) { + if (item && item.value) { + classNo = item.value; + } + page.search({ classNo: item.value }); + } + }); + //获取周次 + learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetWeekTime', function (res) { + if (res.code == 200) { + $('#WeekTimes').lrRadioCheckbox({ + type: 'radio', + data: res.data.weekList, + //data: [{ text: '分析清晰', value: '1' }, { text: '需要改进', value: '2' }] + select: function(item) { + console.log(item); + } + }); + if (!$('#WeekTimes').find('input[value="' + res.data.curWeek + '"]').is(":checked")) { + $('#WeekTimes').find('input[value="' + res.data.curWeek + '"]').trigger('click'); + } + } + + }); + + $('#WeekTimes').change(function() { + curWeek = $('#WeekTimes input[name="WeekTimes"]:checked ').val(); + page.search(); + }); + + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + //查询 + //$('#lr_search').on('click', function () { + // var p = {}; + // p.schoolId = $('#F_SchoolId').lrselectGet(); + // p.ClassNo = $('#ClassNo').lrselectGet(); + // p.EmpNo = $('#EmpNo').lrselectGet(); + // page.search(p); + //}); + + //打印课程表 + $('#perBtn').on('click', + function () { + AddPrintContent(); + }); + var LODOP, P_ID = "", TaskID1, TaskID2, t, waiting = false, c = 0, loop = 0; //声明为全局变量 + + function AddPrintContent() { + var myHtml = myHtml = $('.personalBox').html(); + var strBodyStyle = ""; + var strFormHtml = strBodyStyle + "" + myHtml + ""; + + LODOP = getLodop(); + LODOP.PRINT_INIT("个人授课表"); + LODOP.SET_PRINT_PAGESIZE(2, 0, 0, "A4"); + + LODOP.SET_PRINT_MODE("PRINT_DUPLEX", 2); + LODOP.SET_PRINT_MODE("PRINT_DEFAULTSOURCE", 7); + + LODOP.ADD_PRINT_HTM(10, 10, '284mm', '185mm', strFormHtml); + //打印预览 + LODOP.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1); //横向时的正向显示 + var TaskID1 = LODOP.PREVIEW(); + // 直接打印 + // var TaskID1=LODOP.PRINT(); + + } + }, + bindSelect: function () { + ////校区 + //$('#F_SchoolId').lrDataSourceSelect({ + // code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { + // if (!!item) { + // // 班级 + // $('#ClassNo').lrselectRefresh({ + // placeholder: "请选择班级", + // allowSearch: true, + // url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetClassData', + // param: { schoolId: item.f_companyid }, + // value: 'value', + // text: 'text' + // }); + // // 教师 + // $('#EmpNo').lrselectRefresh({ + // placeholder: "请选择教师", + // allowSearch: true, + // url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetTeacherData', + // param: { schoolId: item.f_companyid }, + // value: 'value', + // text: 'text' + // }); + // } else { + // //班级 + // $('#ClassNo').lrselectRefresh({ + // placeholder: "请选择班级", + // allowSearch: true, + // url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetClassData', + // param: { schoolId: "" }, + // value: 'value', + // text: 'text' + // }); + // //教师 + // $('#EmpNo').lrselectRefresh({ + // placeholder: "请选择教师", + // allowSearch: true, + // url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetTeacherData', + // param: { schoolId: "" }, + // value: 'value', + // text: 'text' + // }); + // } + // } + //}); + ////班级 + //$('#ClassNo').lrselect({ + // placeholder: "请选择班级", + // allowSearch: true, + // url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetClassData', + // value: 'value', + // text: 'text' + //}); + //教师 + $('#EmpNo').lrselect({ + placeholder: "请选择教师", + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetTeacherData', + value: 'value', + text: 'text' + }); + //教师 + $('#EmpNo1').lrselect({ + placeholder: "请选择教师", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetWeekTime', + value: 'value', + text: 'text' + }); + + }, + search: function (param) { + param = param || {}; + //当前第几周 + param.curWeek = curWeek; + //班级 + param.classNo = classNo; + page.loadData(param); + } + }; + 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 4be1bf804..75b9fc77e 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 @@ - + @@ -981,6 +981,7 @@ + @@ -7479,6 +7480,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs index d3c1b684a..809b3b941 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs @@ -18,6 +18,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public class ArrangeLessonTermBLL : ArrangeLessonTermIBLL { private ArrangeLessonTermService arrangeLessonTermService = new ArrangeLessonTermService(); + private CdDeptService cdDeptService = new CdDeptService(); + private CdMajorService cdMajorService = new CdMajorService(); + private ClassInfoService classInfoService = new ClassInfoService(); #region 获取数据 @@ -68,6 +71,76 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + + /// + /// 获取左侧树形数据 + /// + /// + public List GetTree() + { + try + { + DataTable cdDeptlist = cdDeptService.GetSqlTree(); + DataTable cdMajorlist = cdMajorService.GetSqlTree(); + DataTable classInfolist = classInfoService.GetSqlTree(); + List treeList = new List(); + foreach (DataRow item in cdDeptlist.Rows) + { + TreeModel node = new TreeModel + { + id = item["DeptNo"].ToString(), + text = item["DeptName"].ToString(), + value = item["DeptNo"].ToString(), + showcheck = false, + checkstate = 0, + isexpand = false, + parentId = "0" + }; + treeList.Add(node); + } + foreach (DataRow item in cdMajorlist.Rows) + { + TreeModel node = new TreeModel + { + id = item["MajorNo"].ToString(), + text = item["MajorName"].ToString(), + value = item["MajorNo"].ToString(), + showcheck = false, + checkstate = 0, + isexpand = false, + parentId = item["DeptNo"].ToString() + }; + treeList.Add(node); + } + foreach (DataRow item in classInfolist.Rows) + { + TreeModel node = new TreeModel + { + id = item["ClassNo"].ToString(), + text = item["ClassName"].ToString(), + value = item["ClassNo"].ToString(), + showcheck = false, + checkstate = 0, + isexpand = false, + parentId = item["MajorNo"].ToString() + }; + treeList.Add(node); + } + return treeList.ToTree(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 获取实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs index 0e921fd08..498e1a8f4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs @@ -68,6 +68,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// IEnumerable GetPageList(Pagination pagination, string queryJson); + + List GetTree(); /// /// 获取实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptService.cs index c0fb85a26..dc46d1853 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptService.cs @@ -138,6 +138,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public DataTable GetSqlTree() + { + try + { + return this.BaseRepository("CollegeMIS").FindTable("select * from CdDept order by DeptSort "); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorService.cs index a9e9214c0..99b7bdfdc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorService.cs @@ -290,6 +290,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public DataTable GetSqlTree() + { + try + { + return this.BaseRepository("CollegeMIS").FindTable("select * from CdMajor where CheckMark=1 "); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoService.cs index 156a27e93..0e7308ed8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoService.cs @@ -207,6 +207,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public DataTable GetSqlTree() + { + try + { + return this.BaseRepository("CollegeMIS").FindTable("select * from ClassInfo where CheckMark=1 "); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 提交数据