|
后台代码:
public static Table queryCourseCenterFile(String SPECIALTYNAME){
//String sql = "select t.name,t.path from T_file t join T_courseware m on t.id=m.file_id where m.courseid='"+courseNum+"' and m.session_nbr='"+courseQc+"'";
//查询专业ID
String sql = "select t.ID from CUX_EL2_MAJOR_V t where t.SPECIALTYNAME like '%"+SPECIALTYNAME+"%' ";
Table table1 = KSQL.select(sql, null, "/qydx/mobile/data", null);
Iterator<com.justep.system.data.Row> it = table.iterator();
String MAJORID = "";
while (it.hasNext()) {
com.justep.system.data.Row row = (com.justep.system.data.Row) it.next();
MAJORID += row.getString("ID")+",";
}
MAJORID = MAJORID.Substring(0,MAJORID.Length - 1);
////根据专业ID 查询课程ID
String sql = "select t.COURSE from CUX_COURSE_V t where t.MAJOR in("+MAJORID+")";
Table table2 = KSQL.select(sql, null, "/qydx/peoplesoft/data", null);
Iterator<com.justep.system.data.Row> it = table.iterator();
String COURSEID = "";
while (it.hasNext()) {
com.justep.system.data.Row row = (com.justep.system.data.Row) it.next();
COURSEID += row.getString("COURSE")+",";
}
COURSEID = COURSEID.Substring(0,COURSEID.Length - 1);
//根据课程ID,查询备案文件
String sql = "select t.courseid,t.file_id,t.name,t.type,t.category_full_name from T_courseware t where t.courseid in("+COURSEID+")";
Table table3 = KSQL.select(sql, null, "/qydx/dxyq/data", null);
return table3;
}
返回的table,前台怎么使用,想法是前台一个data组件,查询完成,装上table,有没有相关的实例。
|
|