Переглянути джерело

对接排课 接口 班级开课数据回显

娄底高职分支
ndbs 3 місяці тому
джерело
коміт
22324e1018
4 змінених файлів з 58 додано та 33 видалено
  1. +28
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js
  2. +3
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs
  3. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.js
  4. +24
    -22
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs

+ 28
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js Переглянути файл

@@ -228,15 +228,35 @@ var bootstrap = function ($, learun) {
{ {
label: "教师名称", name: "EmpNo", width: 80, align: "left", label: "教师名称", name: "EmpNo", width: 80, align: "left",
formatterAsync: function (callback, value, row, op, $cell) { formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_encode',
callback: function (_data) {
callback(_data['f_realname']);
if (value && value.indexOf(',') != -1) {
var content = '';
var deptarr = value.split(',');
for (var i = 0; i < deptarr.length; i++) {
learun.clientdata.getAsync('custmerData',
{
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: deptarr[i],
keyId: 'f_encode',
callback: function (_data) {
content += _data['f_realname'];
}

});
} }
});
}
content = content.substring(0, content.length - 1);
callback(content);
} else {
learun.clientdata.getAsync('custmerData',
{
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_encode',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
}
}, },
{ {
label: "考试类型", name: "ExamType", width: 80, align: "left", label: "考试类型", name: "ExamType", width: 80, align: "left",


+ 3
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs Переглянути файл

@@ -363,7 +363,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
return JsonResult(noDataResult); return JsonResult(noDataResult);
} }
//最大节次 //最大节次
int maxlessontime = timeTables.Max(m =>Convert.ToInt32(m.LessonTime.Substring(1)));
//int maxlessontime = timeTables.Max(m =>Convert.ToInt32(m.LessonTime.Substring(1)));
//班级列表 //班级列表
var classinfolist = timeTables.Select(m => new { m.TeachClassNo, m.ClassName}).OrderBy(m => m.TeachClassNo).GroupBy(m=>new {m.TeachClassNo,m.ClassName}); var classinfolist = timeTables.Select(m => new { m.TeachClassNo, m.ClassName}).OrderBy(m => m.TeachClassNo).GroupBy(m=>new {m.TeachClassNo,m.ClassName});
var formatData = from d in timeTables var formatData = from d in timeTables
@@ -398,7 +398,8 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
; ;


var result = new var result = new
{ schoolName = "课程表", semester = $"{strAcademicYear}学年度 第{strSemester}学期", maxlessontime, classinfolist, weekList = formatData };
//{ schoolName = "课程表", semester = $"{strAcademicYear}学年度 第{strSemester}学期", maxlessontime, classinfolist, weekList = formatData };
{ schoolName = "课程表", semester = $"{strAcademicYear}学年度 第{strSemester}学期", classinfolist, weekList = formatData };
return JsonResult(result); return JsonResult(result);
} }




+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.js Переглянути файл

@@ -12,7 +12,9 @@ var bootstrap = function ($, learun) {
function (data) { function (data) {
// 数据处理 // 数据处理
var html = ''; var html = '';
var weekLists = data.weekList;
var allList = data.weekList[0].list;
var weekLists = [];
$.each(allList)
for (var i = 1; i < 11; i++) { for (var i = 1; i < 11; i++) {
(function (arg) { (function (arg) {
var args = arg - 1; var args = arg - 1;


+ 24
- 22
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs Переглянути файл

@@ -725,8 +725,8 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
{ {
var LessonList = BaseRepository("paikeDbString").FindList<paikeList>( var LessonList = BaseRepository("paikeDbString").FindList<paikeList>(
@"SELECT a.WEEK AS 'week', a.section AS 'sectoin', a.timetext AS 'timetext', c.NAME AS 'classname', c.number AS 'classnumber', @"SELECT a.WEEK AS 'week', a.section AS 'sectoin', a.timetext AS 'timetext', c.NAME AS 'classname', c.number AS 'classnumber',
r.NAME AS 'roomname', r.number AS 'roomnunber', GROUP_CONCAT(t.name) AS 'teachername', GROUP_CONCAT(t.number) AS 'teachernumber',
cu.NAME AS 'currname', cu.number AS 'currnumber', s.YEAR AS 'semesteryear', s.number AS 'semesternumber'
r.NAME AS 'roomname', r.number AS 'ClassroomNo', GROUP_CONCAT(t.name) AS 'teachername', GROUP_CONCAT(t.number) AS 'teacherNumber',
cu.NAME AS 'curriculunName', cu.number AS 'curriculunNumber', s.YEAR AS 'year', s.number AS 'semester'
FROM tb_paike a FROM tb_paike a
LEFT JOIN tb_clazz c ON c.id = a.`clazzid` LEFT JOIN tb_clazz c ON c.id = a.`clazzid`
LEFT JOIN tb_classroom r ON r.id = a.`classroomid` LEFT JOIN tb_classroom r ON r.id = a.`classroomid`
@@ -787,26 +787,28 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
else else
{ {
//TeachClass数据处理 20211214改为直接读取mysql库 //TeachClass数据处理 20211214改为直接读取mysql库
var teachclasslist = BaseRepository("paikeDbString").FindList<TeachClassEntity>(@"SELECT clazz.name AS 'clazzname',
clazz.number AS 'TeachClassNo',
curriculum.name AS 'curriculumname',
curriculum.number AS 'LessonNo',
semester.year AS 'AcademicYearNo',
semester.number AS 'Semester',
a.jointclass AS 'jointclass',
a.type AS 'LessonSortNo',
a.classhour AS 'classhour',
room.name AS 'roomname',
room.number AS 'roomnumber',
teacher.name AS 'teachername',
teacher.number AS 'EmpNo'
FROM tb_class_plan a
LEFT JOIN tb_clazz clazz ON clazz.id = a.clazzid
LEFT JOIN tb_semester semester ON semester.id = clazz.semester
LEFT JOIN tb_curriculum curriculum ON curriculum.id = a.curriculum
LEFT JOIN tb_classroom room ON room.id = a.classroom
LEFT JOIN tb_teacher teacher ON teacher.id = a.teacher
WHERE a.type='1' and semester.year = '" + entity.AcademicYearNo + "' AND semester.number = '" + entity.Semester + "'");
var teachclasslist = BaseRepository("paikeDbString").FindList<TeachClassEntity>(@"SELECT
clazz.NAME AS 'clazzname',
clazz.number AS 'TeachClassNo',
curriculum.NAME AS 'curriculumname',
curriculum.number AS 'LessonNo',
semester.YEAR AS 'AcademicYearNo',
semester.number AS 'Semester',
a.jointclass AS 'jointclass',
a.type AS 'LessonSortNo',
a.classhour AS 'classhour',
room.NAME AS 'roomname',
room.number AS 'roomnumber',
GROUP_CONCAT(teacher.name) AS 'teachername',
GROUP_CONCAT(teacher.number) AS 'EmpNo'
FROM
tb_class_plan a
LEFT JOIN tb_clazz clazz ON clazz.id = a.clazzid
LEFT JOIN tb_semester semester ON semester.id = clazz.semester
LEFT JOIN tb_curriculum curriculum ON curriculum.id = a.curriculum
LEFT JOIN tb_classroom room ON room.id = a.classroom
LEFT JOIN tb_teacher teacher ON FIND_IN_SET(teacher.id,a.teacher)
WHERE a.type='1' and semester.year = '" + entity.AcademicYearNo + "' AND semester.number = '" + entity.Semester + "' group by a.id");
var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT * var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
FROM TeachClass FROM TeachClass
WHERE (AcademicYearNo = '" + entity.AcademicYearNo + "') and semester='" + entity.Semester + "' and F_SchoolId='" + entity.F_SchoolId + "' ")).ToList(); WHERE (AcademicYearNo = '" + entity.AcademicYearNo + "') and semester='" + entity.Semester + "' and F_SchoolId='" + entity.F_SchoolId + "' ")).ToList();


Завантаження…
Відмінити
Зберегти