@@ -16,6 +16,12 @@ | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<div id="LessonNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | <div id="LessonNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | ||||
</div> | </div> | ||||
<div class="lr-layout-tool-item"> | |||||
<div id="ClassRoomNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="EmpNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<div id="datesearch" class="datetime"></div> | <div id="datesearch" class="datetime"></div> | ||||
</div> | </div> | ||||
@@ -47,7 +47,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
// 查询 | // 查询 | ||||
$('#btn_Search').on('click', function () { | $('#btn_Search').on('click', function () { | ||||
page.search({ AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet() }); | |||||
page.search({ AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); | |||||
}); | }); | ||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
@@ -70,25 +70,27 @@ var bootstrap = function ($, learun) { | |||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
//课程 | //课程 | ||||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonid', text: 'lessonname' }); | |||||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder:'请选择课程' }); | |||||
$('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); | |||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); | |||||
}, | }, | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetItemPageList', | url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetItemPageList', | ||||
headData: [ | headData: [ | ||||
{ label: '学年', name: 'AcademicYearNo', width: 80, align: "left" }, | |||||
{ label: '学期', name: 'Semester', width: 80, align: "left" }, | |||||
{ label: '考试日期', name: 'ExamDate', width: 100, align: "left" }, | |||||
{ label: '考试时间', name: 'ExamTime', width: 100, align: "left" }, | |||||
{ label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, | |||||
{ label: '学期', name: 'Semester', width: 60, align: "left" }, | |||||
{ label: '考试开始时间', name: 'StartDate', width: 120, align: "left" }, | |||||
{ label: '考试结束时间', name: 'EndDate', width: 120, align: "left" }, | |||||
{ label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, | { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, | ||||
{ label: '课程名称', name: 'LessonName', width: 200, align: "left" }, | { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, | ||||
{ label: '监考教师编号', name: 'EmpNo', width: 100, align: "left" }, | |||||
{ label: '监考教师姓名', name: 'EmpName', width: 100, align: "left" }, | |||||
{ label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, | |||||
{ label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" }, | |||||
{ label: '教室编号', name: 'ClassRoomNo', width: 100, align: "left" }, | { label: '教室编号', name: 'ClassRoomNo', width: 100, align: "left" }, | ||||
{ label: '教室名称', name: 'ClassRoomName', width: 100, align: "left" }, | { label: '教室名称', name: 'ClassRoomName', width: 100, align: "left" }, | ||||
{ label: '座位编号', name: 'SitNumber', width: 100, align: "left" }, | |||||
{ label: '学生编号', name: 'StuNo', width: 100, align: "left" }, | { label: '学生编号', name: 'StuNo', width: 100, align: "left" }, | ||||
{ label: '学生姓名', name: 'StuName', width: 100, align: "left" } | |||||
{ label: '学生姓名', name: 'StuName', width: 200, align: "left" }, | |||||
{ label: '座位编号', name: 'SitNumber', width: 100, align: "left" } | |||||
], | ], | ||||
mainId: 'AETId', | mainId: 'AETId', | ||||
isPage: true | isPage: true | ||||
@@ -99,6 +101,7 @@ var bootstrap = function ($, learun) { | |||||
param = param || {}; | param = param || {}; | ||||
param.StartTime = datebegin; | param.StartTime = datebegin; | ||||
param.EndTime = dateend; | param.EndTime = dateend; | ||||
console.log(param); | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -380,9 +380,9 @@ var bootstrap = function ($, learun) { | |||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | ||||
key: value, | key: value, | ||||
keyId: 'f_departmentid', | |||||
keyId: 'id', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data['f_fullname']); | |||||
callback(_data['name']); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -116,6 +116,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <returns></returns> | /// <returns></returns> | ||||
[Column("STUNAME")] | [Column("STUNAME")] | ||||
public string StuName { get; set; } | public string StuName { get; set; } | ||||
[NotMapped] | |||||
public string StartDate { get; set; } | |||||
[NotMapped] | |||||
public string EndDate { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||
@@ -142,15 +142,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
try | try | ||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append(@"select * from(select a.student,b.name as StuName,b.number as StuNo,a.number as SitNumber,c.name as ClassRoomName,c.number as ClassRoomNo, | |||||
d.name as LessonName,d.number as LessonNo,e.`year` as AcademicYearNo,e.number as Semester, | |||||
f.time as StartDate,f.endtime as EndDate,g.teacher | |||||
from tb_paikaorule f left join tb_studentpaikao a on f.currid=a.currid | |||||
left join tb_paikaoroom g on f.id=g.paikaoruleid | |||||
left join tb_student b on a.student=b.id and a.semester=b.semester | |||||
left join tb_classroom c on a.classroom=c.id left join tb_curriculum d on a.currid=d.id | |||||
left join tb_semester e on a.semester=e.id | |||||
where a.student is not null and a.currid is not null) t where 1=1 "); | |||||
strSql.Append(@"select * from(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 ) t where 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
if (!queryParam["AcademicYearNo"].IsEmpty()) | if (!queryParam["AcademicYearNo"].IsEmpty()) | ||||
{ | { | ||||
@@ -172,13 +176,17 @@ where a.student is not null and a.currid is not null) t where 1=1 "); | |||||
{ | { | ||||
strSql.Append(" and t.StuNo='" + queryParam["StuNo"].ToString() + "' "); | 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()) | if (!queryParam["ClassRoomNo"].IsEmpty()) | ||||
{ | { | ||||
strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); | strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); | ||||
} | } | ||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | ||||
{ | { | ||||
strSql.Append(" AND ( StartDate >= '" + queryParam["StartTime"].ToString() + "' AND StartDate <= '" + queryParam["StartTime"].ToString() + "' ) "); | |||||
strSql.Append(" AND ( StartDate >= '" + queryParam["StartTime"].ToString() + "' AND StartDate <= '" + queryParam["EndTime"].ToString() + "' ) "); | |||||
} | } | ||||
return this.BaseRepository("paikeDbString").FindList<ArrangeExamTermItemNewEntity>(strSql.ToString(), null, pagination); | return this.BaseRepository("paikeDbString").FindList<ArrangeExamTermItemNewEntity>(strSql.ToString(), null, pagination); | ||||