|
|
|
@ -5,11 +5,7 @@ import java.util.HashMap; |
|
|
|
|
import com.yipin.liuwanr.vo.CourseAndProjectVo; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import com.yipin.liuwanr.entity.Project_Management; |
|
|
|
|
import com.yipin.liuwanr.entity.Response; |
|
|
|
@ -29,7 +25,7 @@ public class ProjectAndCourseController { |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/queryProject") |
|
|
|
|
Response queryProject(Integer courseId,Integer experimentalClassId) { |
|
|
|
|
Response queryProject(@RequestParam Integer courseId,@RequestParam Integer experimentalClassId) { |
|
|
|
|
Response resp = new Response(); |
|
|
|
|
if(StringUtils.isEmpty(experimentalClassId)){ |
|
|
|
|
resp.setStatus(300); |
|
|
|
@ -100,22 +96,19 @@ public class ProjectAndCourseController { |
|
|
|
|
|
|
|
|
|
//课程进度
|
|
|
|
|
@GetMapping("/getCourseSchedule") |
|
|
|
|
Response getCourseSchedule(Integer courseId,Integer experimentalClassId) { |
|
|
|
|
Response getCourseSchedule(@RequestParam Integer courseId,@RequestParam Integer experimentalClassId,@RequestParam Integer studentId) { |
|
|
|
|
Response resp = new Response(); |
|
|
|
|
if(StringUtils.isEmpty(experimentalClassId)){ |
|
|
|
|
resp.setStatus(300); |
|
|
|
|
resp.setErrmessage("实验班级为空"); |
|
|
|
|
}else{ |
|
|
|
|
HashMap<String, Object> ret = service.getCourseSchedule(courseId,experimentalClassId); |
|
|
|
|
int status = (int) ret.get("retcode"); |
|
|
|
|
if (status == 200) { |
|
|
|
|
resp.setStatus(status); |
|
|
|
|
resp.setMessage(ret.get("retvalue")); |
|
|
|
|
} else { |
|
|
|
|
resp.setStatus(status); |
|
|
|
|
resp.setErrmessage(ret.get("retvalue").toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
HashMap<String, Object> ret = service.getCourseSchedule(courseId,experimentalClassId,studentId); |
|
|
|
|
int status = (int) ret.get("retcode"); |
|
|
|
|
if (status == 200) { |
|
|
|
|
resp.setStatus(status); |
|
|
|
|
resp.setMessage(ret.get("retvalue")); |
|
|
|
|
} else { |
|
|
|
|
resp.setStatus(status); |
|
|
|
|
resp.setErrmessage(ret.get("retvalue").toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|