瀏覽代碼

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

娄底高职分支
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",
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",


+ 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);
}
//最大节次
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 formatData = from d in timeTables
@@ -398,7 +398,8 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
;

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



+ 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) {
// 数据处理
var html = '';
var weekLists = data.weekList;
var allList = data.weekList[0].list;
var weekLists = [];
$.each(allList)
for (var i = 1; i < 11; i++) {
(function (arg) {
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>(
@"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
LEFT JOIN tb_clazz c ON c.id = a.`clazzid`
LEFT JOIN tb_classroom r ON r.id = a.`classroomid`
@@ -787,26 +787,28 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
else
{
//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 *
FROM TeachClass
WHERE (AcademicYearNo = '" + entity.AcademicYearNo + "') and semester='" + entity.Semester + "' and F_SchoolId='" + entity.F_SchoolId + "' ")).ToList();


Loading…
取消
儲存