|
@RequestMapping(params = "datagridNoPage")
public void datagridNoPage(CourseSchedule course,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
CriteriaQuery cq = new CriteriaQuery(course.getClass(), dataGrid);
TSUser teacher = ResourceUtil.getSessionUserName();
String realName = teacher.getRealName();
cq.like("otherTeachers", "%"+realName+"%");
cq.addOrder("courseDate", SortDirection.asc);
cq.add();
//查询条件组装器
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, course, request.getParameterMap());
this.systemService.getDataGridReturn(cq, false);
TagUtil.datagrid(response, dataGrid);
}
function dictGroupListsearch(){
$.ajax({
url:"teachCourseScheduleController.do?datagridNoPage",
type:"post",
data:{
page:1,
rows:10,
semester:$('#semester').val(),
weekNumber:$('#weekNumber').val(),
/* 'teacher.realName'('#realName').val(),
className('#className').val(),*/
'teachItem.itemName':$('#itemName').val()
},
success:function(data){
if(window.console)console.log(data);
$('.courseTableValueTD').html('<br><br><br>');
for(var i=0;i<data.rows.length;i++){
var item = data.rows;
var courseOrderList = item.courseOrder.split(",");
var start = null;
var lastNumber = null;
var text = item['lessonInfo.lessonName']+"<br>"+item["teachItem.itemName"]+"<br>"+ item.className
+"<br>"+item['otherTeachers']+"<br><br>";
var week = item.week;
if(week == ''){
var mydate = new Date(item.courseDate.substring(0,10));
week = mydate.getDay();
}
for(var j=0;j<courseOrderList.length;j++){
if(start == null) start = getCourseOrder(courseOrderList[j]);
var end = getCourseOrder(courseOrderList[j]);
//开始输出
if(end-lastNumber> 1){
setVal(text,week,start,lastNumber);
start = end;
}
lastNumber = getCourseOrder(courseOrderList[j]);
}
if(end >= start ){
setVal(text,week,start,end);
}
}
}
});
}
|
|