Bläddra i källkod

Merge branch '长阳分支中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 长阳分支中职

临城职教中职
ndbs 2 år sedan
förälder
incheckning
429d873a95
9 ändrade filer med 757 tillägg och 1 borttagningar
  1. +176
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs
  2. +182
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.cshtml
  3. +266
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js
  4. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  5. +73
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs
  6. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs
  7. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptService.cs
  8. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorService.cs
  9. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoService.cs

+ 176
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs Visa fil

@@ -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);
}

/// <summary>
/// 排课管理 获取左侧树结构
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetTree()
{
var data = arrangeLessonTermIBLL.GetTree();
return Success(data);
}

/// <summary>
/// 获取表单数据
/// <param name="keyValue">主键</param>
@@ -122,6 +142,162 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
var data = arrangeLessonTermIBLL.GetEntity(keyValue);
return Success(data);
}

/// <summary>
/// 获取周次
/// <summary>
/// <returns></returns>
[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<Object>();
for (int i = 1; i <= weekTimes; i++)
{
listObj.Add(new { text = "第" + i + "周", value = i });
}
var jsonData = new
{
weekList = listObj,
curWeek = curWeek,
};
return Success(jsonData);
}
/// <summary>
/// 有多少周
/// 返回 int
/// </summary>
/// <returns>int</returns>
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;

}
/// <summary>
/// 求当前日期是第几周
/// </summary>
/// <param name="date"></param>
/// <returns></returns>
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;

}

}


/// <summary>
/// 课程表【教务】
/// </summary>
/// <param name="classNo">班级</param>
/// <param name="curWeek">当前第几周</param>
/// <returns></returns>
[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<TimeTable>();
//课程表
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 提交数据


+ 182
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.cshtml Visa fil

@@ -0,0 +1,182 @@
@{
ViewBag.Title = "课程表";
Layout = "~/Views/Shared/_Index.cshtml";
}
<link href="~/Content/static/css/TimeTable.css" rel="stylesheet" />
<script src="~/Content/static/js/LodopFuncs.js"></script>
<style id="style1" media="print">
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

ul {
margin: 0px;
padding: 0px;
list-style: none;
}

li {
list-style: none;
}

table, tr, td {
cellspacing: 0px;
cellpadding: 0px;
padding: 0;
margin: 0;
}

body {
font-family: "Microsoft YaHei", "微软雅黑" !important;
padding: 10px;
color: #333;
font-size: 12px;
margin: 0;
}

.personalBox {
padding: 10px;
}

.personT {
font-size: 24px;
text-align: center;
margin-bottom: 15px
}

.perSemester {
text-align: center;
border: 1px solid #333;
line-height: 25px;
height: 30px;
}

.perWeek {
overflow: hidden;
line-height: 26px;
height: 30px;
text-align: center;
border-left: 1px solid #333;
border-right: 1px solid #333;
}

/*.perWeek li {
width: 12.5%;
float: left;
border-left: 1px solid #dfdfdf;
}*/
.perFestivalsBox {
border-left: 1px solid #333;
border-right: 1px solid #333;
border-bottom: 1px solid #333;
text-align: center;
}
.perFestivalsBox td {
border-left: 1px solid #333;
border-top: 1px solid #333;
padding: 1px;
width: 9%;
font-size: 12px;
}
.perFestivalsBox table {
display: block;
width: 100%;
text-align: center;
}


.perFestivalsBox td div {
min-height: 16px;
line-height: 16px;
}

.perFestivalsBox td:first-child, .perWeek li:first-child {
border-left: 0;
}

</style>
<style>
.lr-select {
width: 150px;
}
.perWeek1 li {
width: 9%;
float: left;
/*border-left: 1px solid #333;*/
height: 100%;
}
.leftDiv {
width: 80%;
float: left;
}
.rightDiv {
width: 20%;
float: right;
}


.perFestivalsBox td {
padding: 1px;
width: 9%;
}
.WeekTimes {
text-align: left;
border: 1px solid #dfdfdf;
line-height: 25px;
height: 30px;
}

</style>
<div class="lr-layout lr-layout-left-center">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlt ">班级信息</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>

<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
</div>
<div class="lr-layout-body" style="overflow: auto;">
<div class="warpper">
<div class="personalBox">
@*<div class="personT"></div>*@
<div class="leftDiv">
@*<div class="perSemester"></div>*@
<div class="WeekTimes" id="WeekTimes">周次:</div>
<ul class="perWeek perWeek1">
<li>节次/星期</li>
<li>星期一</li>
<li>星期二</li>
<li>星期三</li>
<li>星期四</li>
<li>星期五</li>
<li>星期六</li>
<li>星期日</li>
<li>星期八</li>
<li>星期九</li>
<li>星期十</li>
</ul>
<div class="perFestivalsBox">
<table cellspacing="0" border="0"></table>
</div>
</div>
<div class="rightDiv">
<div id="EmpNo"></div>
<div id="EmpNo1"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js")



+ 266
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js Visa fil

@@ -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 += ' <tr><td>' + arg + '节</td>';
if (datas) {
var lists = datas.list;
html += tdHandles(lists);
} else {
html += tdHandle(arg);
}
html += '</tr>';
})(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 += '<td><div></div><div></div><div></div><div></div></td>';
}
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 += '<td class="active">';
$.each(datas, function (i, item) {
if (i > 0) {
html += '<hr>';
}
html += '<div>课程:' +
item.curriculum +
'</div>' +
'<div>教师:' +
item.teacher +
'</div>' +
'<div>班级:' +
item.className +
'</div>' +
'<div>教室:' +
item.classRoom +
'</div>';
});
html += '</td>';

} else {
html += '<td><div></div><div></div><div></div><div></div></td>';
}

})(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 = "<style>" + document.getElementById("style1").innerHTML + "</style>";
var strFormHtml = strBodyStyle + "<body>" + myHtml + "</body>";

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();
};

+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Visa fil

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
@@ -981,6 +981,7 @@
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTermOfElective\SyncByConditionForm.js" />
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\ClearByConditionForm.js" />
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\EmptyByConditionForm.js" />
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\IndexLessonTerm.js" />
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\SyncByConditionForm.js" />
<Content Include="Areas\EducationalAdministration\Views\AwardAndPunishment\AwardForm.js" />
<Content Include="Areas\EducationalAdministration\Views\AwardAndPunishment\Form.js" />
@@ -7479,6 +7480,7 @@
<Content Include="Areas\EducationalAdministration\Views\ClassPlanTeach\TeachFormQZ.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\IndexLessonTerm.cshtml" />
<None Include="Areas\EducationalAdministration\Views\SchoolNews\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\StuTuition.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\IsHelpForm.cshtml" />


+ 73
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs Visa fil

@@ -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
}
}


/// <summary>
/// 获取左侧树形数据
/// <summary>
/// <returns></returns>
public List<TreeModel> GetTree()
{
try
{
DataTable cdDeptlist = cdDeptService.GetSqlTree();
DataTable cdMajorlist = cdMajorService.GetSqlTree();
DataTable classInfolist = classInfoService.GetSqlTree();
List<TreeModel> treeList = new List<TreeModel>();
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);
}
}
}

/// <summary>
/// 获取实体数据
/// <param name="keyValue">主键</param>


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs Visa fil

@@ -68,6 +68,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <summary>
/// <returns></returns>
IEnumerable<ArrangeLessonTermEntity> GetPageList(Pagination pagination, string queryJson);

List<TreeModel> GetTree();
/// <summary>
/// 获取实体数据
/// <param name="keyValue">主键</param>


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptService.cs Visa fil

@@ -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 提交数据


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorService.cs Visa fil

@@ -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 提交数据


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoService.cs Visa fil

@@ -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 提交数据


Laddar…
Avbryt
Spara