|
|
|
@ -14,6 +14,7 @@ import com.yipin.liuwanr.entity.Attendance; |
|
|
|
|
import com.yipin.liuwanr.entity.Project_Management; |
|
|
|
|
import com.yipin.liuwanr.mapper.ExperimentallearningMapper; |
|
|
|
|
import com.yipin.liuwanr.mapper.TeacherProjectAndCourseMapper; |
|
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 学生端_实验学习 |
|
|
|
@ -41,7 +42,7 @@ public class ExperimentallearningService { |
|
|
|
|
public HashMap<String, Object> queryProject(Integer studentId, Integer courseId) { |
|
|
|
|
HashMap<String, Object> resp = new HashMap<String, Object>(); |
|
|
|
|
try { |
|
|
|
|
if(studentId!=null&&courseId!=null){ |
|
|
|
|
if(!StringUtils.isEmpty(courseId)&&!StringUtils.isEmpty(studentId)){ |
|
|
|
|
List<Integer> projectIds = mapper.queryIsAttendance(studentId, courseId); |
|
|
|
|
List<Project_Management> projects = mapper2.getBySystemId(courseId, 0, null); |
|
|
|
|
for (int i = 0; i < projects.size(); i++) { |
|
|
|
@ -103,7 +104,7 @@ public class ExperimentallearningService { |
|
|
|
|
public HashMap<String, Object> queryStudentName(Integer courseId) { |
|
|
|
|
HashMap<String, Object> resp = new HashMap<String, Object>(); |
|
|
|
|
try { |
|
|
|
|
if(courseId!=null){ |
|
|
|
|
if(!StringUtils.isEmpty(courseId)){ |
|
|
|
|
resp.put("retvalue", mapper.queryStudentName(courseId)); |
|
|
|
|
} |
|
|
|
|
resp.put("retcode", 200); |
|
|
|
@ -122,7 +123,7 @@ public class ExperimentallearningService { |
|
|
|
|
public HashMap<String, Object> queryTeacherName(Integer courseId) { |
|
|
|
|
HashMap<String, Object> resp = new HashMap<String, Object>(); |
|
|
|
|
try { |
|
|
|
|
if(courseId!=null){ |
|
|
|
|
if(!StringUtils.isEmpty(courseId)){ |
|
|
|
|
resp.put("retvalue", mapper.queryTeacherName(courseId)); |
|
|
|
|
} |
|
|
|
|
resp.put("retcode", 200); |
|
|
|
@ -142,7 +143,10 @@ public class ExperimentallearningService { |
|
|
|
|
HashMap<String, Object> resp = new HashMap<String, Object>(); |
|
|
|
|
HashMap<String, Object> val = new HashMap<String, Object>(); |
|
|
|
|
try { |
|
|
|
|
List<Assesment> assesments = mapper.queryAssesment(courseId); |
|
|
|
|
List<Assesment> assesments=null; |
|
|
|
|
if(!StringUtils.isEmpty(courseId)) { |
|
|
|
|
assesments = mapper.queryAssesment(courseId); |
|
|
|
|
} |
|
|
|
|
// 查询出来该课程有多个考核开启,则不符合逻辑(一门课程一次只能开启一个考核,不能有多个)
|
|
|
|
|
if(!assesments.isEmpty()&&assesments.size()>0){ |
|
|
|
|
if (assesments.size() > 1) { |
|
|
|
@ -161,13 +165,13 @@ public class ExperimentallearningService { |
|
|
|
|
val.put("assesmentId", assesmentId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
resp.put("retvalue", val); |
|
|
|
|
} |
|
|
|
|
resp.put("retcode", 200); |
|
|
|
|
resp.put("retvalue", val); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
logger.error(e.getMessage()); |
|
|
|
|
resp.put("retcode", 500); |
|
|
|
|
resp.put("retvalue", "Inquiry Failed"); |
|
|
|
|
resp.put("retvalue", "查询考核信息失败"); |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
return resp; |
|
|
|
|