|
|
@ -3,6 +3,7 @@ package com.yipin.liuwanr.service; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.yipin.liuwanr.mapper.ExperimentallearningMapper; |
|
|
|
import com.yipin.liuwanr.vo.CourseAndProjectVo; |
|
|
|
import com.yipin.liuwanr.vo.CourseAndProjectVo; |
|
|
|
import org.jboss.logging.Logger; |
|
|
|
import org.jboss.logging.Logger; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -24,7 +25,8 @@ public class ProjectAndCourseService { |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private TeacherProjectAndCourseMapper mapper; |
|
|
|
private TeacherProjectAndCourseMapper mapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private ExperimentallearningMapper experimentallearningMapper; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 根据课程查询实验项目信息 |
|
|
|
* 根据课程查询实验项目信息 |
|
|
@ -80,21 +82,29 @@ public class ProjectAndCourseService { |
|
|
|
return resp; |
|
|
|
return resp; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public HashMap<String, Object> getCourseSchedule(Integer courseId,Integer experimentalClassId) { |
|
|
|
public HashMap<String, Object> getCourseSchedule(Integer courseId,Integer experimentalClassId,Integer studentId) { |
|
|
|
HashMap<String, Object> resp = new HashMap<String, Object>(); |
|
|
|
HashMap<String, Object> resp = new HashMap<String, Object>(); |
|
|
|
HashMap<String, Integer> obj = new HashMap<String, Integer>(); |
|
|
|
HashMap<String, Integer> obj = new HashMap<String, Integer>(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
if(!StringUtils.isEmpty(courseId)){ |
|
|
|
if(!StringUtils.isEmpty(courseId)){ |
|
|
|
//完成的课程项目
|
|
|
|
if(StringUtils.isEmpty(experimentalClassId)){ |
|
|
|
Integer number=mapper.getCourseSchedule(courseId); |
|
|
|
if(!StringUtils.isEmpty(studentId)){ |
|
|
|
//总项目数量
|
|
|
|
experimentalClassId=experimentallearningMapper.queryExperimentalClassId(courseId,studentId); |
|
|
|
List<Project_Management> project=mapper.getBySystemId(courseId,experimentalClassId); |
|
|
|
} |
|
|
|
obj.put("total",project.size()); |
|
|
|
|
|
|
|
if(number!=null){ |
|
|
|
|
|
|
|
obj.put("number",number); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
obj.put("number",0); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(!StringUtils.isEmpty(experimentalClassId)){ |
|
|
|
|
|
|
|
//完成的课程项目
|
|
|
|
|
|
|
|
Integer number=mapper.getCourseSchedule(courseId); |
|
|
|
|
|
|
|
//总项目数量
|
|
|
|
|
|
|
|
List<Project_Management> project=mapper.getBySystemId(courseId,experimentalClassId); |
|
|
|
|
|
|
|
obj.put("total",project.size()); |
|
|
|
|
|
|
|
if(number!=null){ |
|
|
|
|
|
|
|
obj.put("number",number); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
obj.put("number",0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
resp.put("retcode", 200); |
|
|
|
resp.put("retcode", 200); |
|
|
|
resp.put("retvalue",obj); |
|
|
|
resp.put("retvalue",obj); |
|
|
|