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