|
|
|
@ -39,11 +39,10 @@ public class ExperimentallearningService { |
|
|
|
|
* @param courseId |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
public HashMap<String, Object> queryProject(Integer studentId, Integer courseId,Integer pageNo,Integer pageSize) { |
|
|
|
|
public HashMap<String, Object> queryProject(Integer studentId, Integer courseId) { |
|
|
|
|
HashMap<String, Object> resp = new HashMap<String, Object>(); |
|
|
|
|
try { |
|
|
|
|
if(!StringUtils.isEmpty(courseId)&&!StringUtils.isEmpty(studentId)){ |
|
|
|
|
PageHelper.startPage(pageNo, pageSize); |
|
|
|
|
Integer experimentalClassId=mapper.queryExperimentalClassId(courseId,studentId); |
|
|
|
|
List<Integer> projectIds = mapper.queryIsAttendance(studentId, courseId); |
|
|
|
|
List<Project_Management> projects = mapper.getBycourseId(experimentalClassId,courseId); |
|
|
|
@ -60,16 +59,7 @@ public class ExperimentallearningService { |
|
|
|
|
projects.set(i, project); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
PageInfo<Project_Management> info=new PageInfo<Project_Management>(projects); |
|
|
|
|
int total1 = (int) info.getTotal(); |
|
|
|
|
int totalPages; |
|
|
|
|
totalPages = total1 / pageSize; |
|
|
|
|
if (total1 % pageSize != 0){ |
|
|
|
|
totalPages ++; |
|
|
|
|
} |
|
|
|
|
long total = total1; |
|
|
|
|
resp.put("retvalue", new PageResult(total,projects,totalPages)); |
|
|
|
|
resp.put("retvalue", projects); |
|
|
|
|
} |
|
|
|
|
resp.put("retcode", 200); |
|
|
|
|
}catch(Exception e){ |
|
|
|
|