|
|
@ -6,6 +6,7 @@ import java.text.DecimalFormat;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.jlw.util.ToolUtils;
|
|
|
|
import cn.jlw.util.ToolUtils;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
@ -16,6 +17,7 @@ import com.ibeetl.admin.core.web.JsonResult;
|
|
|
|
import com.ibeetl.admin.core.web.JsonReturnCode;
|
|
|
|
import com.ibeetl.admin.core.web.JsonReturnCode;
|
|
|
|
import com.ibeetl.jlw.dao.HandsOnDao;
|
|
|
|
import com.ibeetl.jlw.dao.HandsOnDao;
|
|
|
|
import com.ibeetl.jlw.entity.HandsOn;
|
|
|
|
import com.ibeetl.jlw.entity.HandsOn;
|
|
|
|
|
|
|
|
import com.ibeetl.jlw.entity.HandsOnSimulationTasks;
|
|
|
|
import com.ibeetl.jlw.web.query.HandsOnQuery;
|
|
|
|
import com.ibeetl.jlw.web.query.HandsOnQuery;
|
|
|
|
import com.ibeetl.jlw.entity.FileEntity;
|
|
|
|
import com.ibeetl.jlw.entity.FileEntity;
|
|
|
|
|
|
|
|
|
|
|
@ -46,6 +48,7 @@ import javax.annotation.Resource;
|
|
|
|
public class HandsOnService extends CoreBaseService<HandsOn>{
|
|
|
|
public class HandsOnService extends CoreBaseService<HandsOn>{
|
|
|
|
|
|
|
|
|
|
|
|
@Resource private HandsOnDao handsOnDao;
|
|
|
|
@Resource private HandsOnDao handsOnDao;
|
|
|
|
|
|
|
|
@Resource private HandsOnSimulationTasksService handsOnSimulationTasksService;
|
|
|
|
|
|
|
|
|
|
|
|
public PageQuery<HandsOn>queryByCondition(PageQuery query){
|
|
|
|
public PageQuery<HandsOn>queryByCondition(PageQuery query){
|
|
|
|
PageQuery ret = handsOnDao.queryByCondition(query);
|
|
|
|
PageQuery ret = handsOnDao.queryByCondition(query);
|
|
|
@ -156,4 +159,22 @@ public class HandsOnService extends CoreBaseService<HandsOn>{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 学生端-查询课程实操首页
|
|
|
|
|
|
|
|
* @param teacherOpenCourseId
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public void getHandonListByTeacherOpenCourseId(Long teacherOpenCourseId) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HandsOnQuery handsOnQuery = new HandsOnQuery();
|
|
|
|
|
|
|
|
handsOnQuery.setTeacherOpenCourseId(teacherOpenCourseId);
|
|
|
|
|
|
|
|
List<HandsOn> handsOnList = handsOnDao.getValuesByQuery(handsOnQuery);
|
|
|
|
|
|
|
|
List<Long> handsOnIds = handsOnList.stream().map(HandsOn::getHandsOnId).distinct().collect(Collectors.toList());
|
|
|
|
|
|
|
|
List<HandsOnSimulationTasks> handsOnSimulationTasks = handsOnSimulationTasksService.queryObjectByHandsOnIds(handsOnIds);
|
|
|
|
|
|
|
|
for (HandsOn handsOn : handsOnList) {
|
|
|
|
|
|
|
|
List<HandsOnSimulationTasks> collect = handsOnSimulationTasks.stream().filter(v -> v.getHandsOnId().equals(handsOn.getHandsOnId())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
handsOn.set("handsOnSimulationTasks", collect);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|