|
|
|
@ -5,20 +5,16 @@ import cn.jlw.util.ToolUtils;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
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.HandsOnSimulationTasksDao;
|
|
|
|
|
import com.ibeetl.jlw.dao.ResourcesQuestionDao;
|
|
|
|
|
import com.ibeetl.jlw.entity.HandsOnSimulationTasks;
|
|
|
|
|
import com.ibeetl.jlw.entity.HandsOnSimulationTasksAssessment;
|
|
|
|
|
import com.ibeetl.jlw.entity.HandsOnSimulationTasksFile;
|
|
|
|
|
import com.ibeetl.jlw.entity.ResourcesQuestion;
|
|
|
|
|
import com.ibeetl.jlw.entity.*;
|
|
|
|
|
import com.ibeetl.jlw.entity.vo.HandsOnTaskProblemVO;
|
|
|
|
|
import com.ibeetl.jlw.web.query.HandsOnSimulationTasksAssessmentQuery;
|
|
|
|
|
import com.ibeetl.jlw.web.query.HandsOnSimulationTasksFileQuery;
|
|
|
|
|
import com.ibeetl.jlw.web.query.HandsOnSimulationTasksQuery;
|
|
|
|
|
import com.ibeetl.jlw.web.query.*;
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.beetl.sql.core.SqlId;
|
|
|
|
@ -45,7 +41,7 @@ public class HandsOnSimulationTasksService extends CoreBaseService<HandsOnSimula
|
|
|
|
|
@Autowired private HandsOnSimulationTasksDao handsOnSimulationTasksDao;
|
|
|
|
|
@Autowired private HandsOnSimulationTasksFileService handsOnSimulationTasksFileService;
|
|
|
|
|
@Autowired private HandsOnSimulationTasksAssessmentService handsOnSimulationTasksAssessmentService;
|
|
|
|
|
@Autowired private ResourcesQuestionDao mergeResourcesQuestionService;
|
|
|
|
|
@Autowired private ResourcesQuestionDao resourcesQuestionDao;
|
|
|
|
|
public PageQuery<HandsOnSimulationTasks>queryByCondition(PageQuery query){
|
|
|
|
|
//查询任务排序
|
|
|
|
|
query.setOrderBy("task_order+0, add_time");
|
|
|
|
@ -319,7 +315,7 @@ public class HandsOnSimulationTasksService extends CoreBaseService<HandsOnSimula
|
|
|
|
|
}
|
|
|
|
|
HandsOnSimulationTasks info = taskId == null ? null : getInfo(taskId);
|
|
|
|
|
List<ResourcesQuestion> resourcesQuestions = StringUtils.isNotEmpty(problemIds)
|
|
|
|
|
? mergeResourcesQuestionService.getByIds(problemIds) : null;
|
|
|
|
|
? resourcesQuestionDao.getByIds(problemIds) : null;
|
|
|
|
|
if (CollectionUtils.isEmpty(resourcesQuestions)) {
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
}
|
|
|
|
@ -358,4 +354,27 @@ public class HandsOnSimulationTasksService extends CoreBaseService<HandsOnSimula
|
|
|
|
|
});
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<HandsOnSimulationTasks> getValuesByQueryNotPermission(HandsOnSimulationTasksQuery tasksQuery) {
|
|
|
|
|
return handsOnSimulationTasksDao.getValuesByQueryNotPermission(tasksQuery);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public JsonResult<List<ResourcesQuestion>> getHandsOnTaskkTheoryCenterByTaskId(Long taskId, CoreUser coreUser) {
|
|
|
|
|
HandsOnSimulationTasksQuery tasksQuery = new HandsOnSimulationTasksQuery();
|
|
|
|
|
tasksQuery.setTaskId(taskId);
|
|
|
|
|
List<HandsOnSimulationTasks> tasksList = handsOnSimulationTasksDao.getValuesByQueryNotPermission(tasksQuery);
|
|
|
|
|
if (CollectionUtils.isEmpty(tasksList)) {
|
|
|
|
|
return JsonResult.fail();
|
|
|
|
|
}
|
|
|
|
|
HandsOnSimulationTasks tasks = tasksList.get(0);
|
|
|
|
|
String taskList = tasks.getTaskList();
|
|
|
|
|
ResourcesQuestionQuery questionQuery = new ResourcesQuestionQuery();
|
|
|
|
|
questionQuery.setResourcesQuestionIds(taskList);
|
|
|
|
|
questionQuery.setQuestionStatus(1);
|
|
|
|
|
List<ResourcesQuestion> resourcesQuestions = resourcesQuestionDao.getValuesByQueryNotWithPermission(questionQuery);
|
|
|
|
|
if (CollectionUtils.isEmpty(resourcesQuestions)) {
|
|
|
|
|
return JsonResult.success(resourcesQuestions);
|
|
|
|
|
}
|
|
|
|
|
return JsonResult.success(resourcesQuestions);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|