|
|
|
@ -6,12 +6,14 @@ import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
import cn.jlw.util.ToolUtils;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.ibeetl.admin.core.entity.CoreUser;
|
|
|
|
|
import com.ibeetl.admin.core.service.CoreBaseService;
|
|
|
|
|
import com.ibeetl.admin.core.util.PlatformException;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonResult;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonReturnCode;
|
|
|
|
|
import com.ibeetl.jlw.dao.StudentHandsOnTaskReportDao;
|
|
|
|
|
import com.ibeetl.jlw.dao.TeacherOpenCourseHandsOnSimulationTasksDao;
|
|
|
|
|
import com.ibeetl.jlw.entity.Student;
|
|
|
|
|
import com.ibeetl.jlw.entity.StudentHandsOnTaskReport;
|
|
|
|
|
import com.ibeetl.jlw.entity.TeacherOpenCourseHandsOnSimulationTasks;
|
|
|
|
|
import com.ibeetl.jlw.web.query.StudentHandsOnTaskReportQuery;
|
|
|
|
@ -43,6 +45,9 @@ public class StudentHandsOnTaskReportService extends CoreBaseService<StudentHand
|
|
|
|
|
@Autowired
|
|
|
|
|
private TeacherOpenCourseHandsOnSimulationTasksDao tasksService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private StudentService studentService;
|
|
|
|
|
|
|
|
|
|
public PageQuery<StudentHandsOnTaskReport>queryByCondition(PageQuery query){
|
|
|
|
|
PageQuery ret = studentHandsOnTaskReportDao.queryByCondition(query);
|
|
|
|
|
queryListAfter(ret.getList());
|
|
|
|
@ -96,7 +101,13 @@ public class StudentHandsOnTaskReportService extends CoreBaseService<StudentHand
|
|
|
|
|
return msg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public JsonResult add(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery){
|
|
|
|
|
public JsonResult add(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery, CoreUser coreUser){
|
|
|
|
|
if (!coreUser.isStudent()) {
|
|
|
|
|
return JsonResult.fail("");
|
|
|
|
|
}
|
|
|
|
|
Student student = studentService.getByUserId(coreUser.getId());
|
|
|
|
|
studentHandsOnTaskReportQuery.setStudentId(student.getId());
|
|
|
|
|
|
|
|
|
|
String msg = "";
|
|
|
|
|
StudentHandsOnTaskReport studentHandsOnTaskReport = studentHandsOnTaskReportQuery.pojo();
|
|
|
|
|
Long handsOnTaskId = studentHandsOnTaskReport.getHandsOnTaskId();
|
|
|
|
@ -142,7 +153,15 @@ public class StudentHandsOnTaskReportService extends CoreBaseService<StudentHand
|
|
|
|
|
return jsonResult;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String edit(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery){
|
|
|
|
|
public String edit(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery, CoreUser coreUser){
|
|
|
|
|
if (!coreUser.isStudent()) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
Student student = studentService.getByUserId(coreUser.getId());
|
|
|
|
|
studentHandsOnTaskReportQuery.setStudentId(student.getStudentId());
|
|
|
|
|
if (studentHandsOnTaskReportQuery.getHandsOnTaskId() ==null) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
String msg = "";
|
|
|
|
|
StudentHandsOnTaskReport studentHandsOnTaskReport = studentHandsOnTaskReportQuery.pojo();
|
|
|
|
|
|
|
|
|
@ -186,7 +205,15 @@ public class StudentHandsOnTaskReportService extends CoreBaseService<StudentHand
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public StudentHandsOnTaskReport getInfo (StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery){
|
|
|
|
|
public StudentHandsOnTaskReport getInfo (StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery, CoreUser coreUser){
|
|
|
|
|
if (!coreUser.isStudent()) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
if (studentHandsOnTaskReportQuery.getHandsOnTaskId() == null) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
Student student = studentService.getByUserId(coreUser.getId());
|
|
|
|
|
studentHandsOnTaskReportQuery.setStudentId(student.getStudentId());
|
|
|
|
|
List<StudentHandsOnTaskReport> list = studentHandsOnTaskReportDao.getValuesByQuery(studentHandsOnTaskReportQuery);
|
|
|
|
|
if(null != list && list.size()>0){
|
|
|
|
|
return list.get(0);
|
|
|
|
|