jeecg datagrid做的一个课表查看,报空指针,datagridNoPage为空
@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);
var end = getCourseOrder(courseOrderList);
//开始输出
if(end-lastNumber> 1){
setVal(text,week,start,lastNumber);
start = end;
}
lastNumber = getCourseOrder(courseOrderList);
}
if(end >= start ){
setVal(text,week,start,end);
}
}
}
});
}
实体扫描路径配置了吗
页:
[1]