|
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.IdUtil;
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
import com.sztzjy.resource_center.annotation.AnonymousAccess;
|
|
|
|
import com.sztzjy.resource_center.annotation.AnonymousAccess;
|
|
|
|
import com.sztzjy.resource_center.entity.*;
|
|
|
|
import com.sztzjy.resource_center.entity.*;
|
|
|
|
|
|
|
|
import com.sztzjy.resource_center.entity.dto.TrainingDto;
|
|
|
|
import com.sztzjy.resource_center.mapper.SysCaseQuestionMapper;
|
|
|
|
import com.sztzjy.resource_center.mapper.SysCaseQuestionMapper;
|
|
|
|
import com.sztzjy.resource_center.mapper.SysCaseQuestionStepMapper;
|
|
|
|
import com.sztzjy.resource_center.mapper.SysCaseQuestionStepMapper;
|
|
|
|
import com.sztzjy.resource_center.mapper.SysOneCatalogMapper;
|
|
|
|
import com.sztzjy.resource_center.mapper.SysOneCatalogMapper;
|
|
|
@ -71,8 +72,7 @@ public class CaseApi {
|
|
|
|
sysTopicAndCourse.setId(IdUtil.randomUUID());
|
|
|
|
sysTopicAndCourse.setId(IdUtil.randomUUID());
|
|
|
|
sysTopicAndCourse.setTopicType("1");
|
|
|
|
sysTopicAndCourse.setTopicType("1");
|
|
|
|
sysTopicAndCourse.setTopicId(uuid);
|
|
|
|
sysTopicAndCourse.setTopicId(uuid);
|
|
|
|
SysOneCatalog sysOneCatalogs = getSysOneCatalogs(sysCaseQuestion.getOneName());
|
|
|
|
String oneId = sysOneCatalogs1.getOneId();
|
|
|
|
String oneId = sysOneCatalogs.getOneId();
|
|
|
|
|
|
|
|
sysTopicAndCourse.setOneId(oneId);
|
|
|
|
sysTopicAndCourse.setOneId(oneId);
|
|
|
|
sysTopicAndCourse.setOneName(sysCaseQuestion.getOneName());
|
|
|
|
sysTopicAndCourse.setOneName(sysCaseQuestion.getOneName());
|
|
|
|
if (StringUtils.isNotBlank(sysCaseQuestion.getTwoId())) {
|
|
|
|
if (StringUtils.isNotBlank(sysCaseQuestion.getTwoId())) {
|
|
|
@ -98,11 +98,11 @@ public class CaseApi {
|
|
|
|
@AnonymousAccess
|
|
|
|
@AnonymousAccess
|
|
|
|
@ApiOperation("案例题页面查询")
|
|
|
|
@ApiOperation("案例题页面查询")
|
|
|
|
@PostMapping("selectCaseList")
|
|
|
|
@PostMapping("selectCaseList")
|
|
|
|
public PageInfo<SysCaseQuestion> selectCaseByConditions(@RequestParam Integer index,
|
|
|
|
public PageInfo<SysCaseQuestion> selectCaseList(@RequestParam Integer index,
|
|
|
|
@RequestParam Integer size,
|
|
|
|
@RequestParam Integer size,
|
|
|
|
@RequestParam(required = false) String keyword,
|
|
|
|
@RequestParam(required = false) String keyword,
|
|
|
|
@RequestParam(required = false) String systemOwner,
|
|
|
|
@RequestParam(required = false) String systemOwner,
|
|
|
|
@RequestParam(required = false) String schoolId) {
|
|
|
|
@RequestParam(required = false) String schoolId) {
|
|
|
|
SysOneCatalog sysOneCatalogs = getSysOneCatalogs(systemOwner);
|
|
|
|
SysOneCatalog sysOneCatalogs = getSysOneCatalogs(systemOwner);
|
|
|
|
String oneId = sysOneCatalogs.getOneId();
|
|
|
|
String oneId = sysOneCatalogs.getOneId();
|
|
|
|
List<SysCaseQuestion> list = caseQuestionMapper.selectCaseByConditions(keyword, oneId, schoolId);
|
|
|
|
List<SysCaseQuestion> list = caseQuestionMapper.selectCaseByConditions(keyword, oneId, schoolId);
|
|
|
@ -114,9 +114,21 @@ public class CaseApi {
|
|
|
|
@AnonymousAccess
|
|
|
|
@AnonymousAccess
|
|
|
|
@ApiOperation("案例题详细内容展示")
|
|
|
|
@ApiOperation("案例题详细内容展示")
|
|
|
|
@PostMapping("selectCaseDetails")
|
|
|
|
@PostMapping("selectCaseDetails")
|
|
|
|
public SysCaseQuestion selectCaseByConditionsByID(@RequestParam String caseId) {
|
|
|
|
public SysCaseQuestion selectCaseByConditionsByID(@RequestParam String caseId,
|
|
|
|
return caseQuestionMapper.selectByPrimaryKey(caseId);
|
|
|
|
@RequestParam String oneId) {
|
|
|
|
|
|
|
|
SysTopicAndCourseExample example = new SysTopicAndCourseExample();
|
|
|
|
|
|
|
|
example.createCriteria().andOneIdEqualTo(oneId).andTopicIdEqualTo(caseId);
|
|
|
|
|
|
|
|
List<SysTopicAndCourse> sysTopicAndCourses = topicAndCourseMapper.selectByExample(example);
|
|
|
|
|
|
|
|
if (sysTopicAndCourses != null && !sysTopicAndCourses.isEmpty()) {
|
|
|
|
|
|
|
|
SysTopicAndCourse sysTopicAndCourse = sysTopicAndCourses.get(0);
|
|
|
|
|
|
|
|
SysCaseQuestion sysCaseQuestion = caseQuestionMapper.selectByPrimaryKey(caseId);
|
|
|
|
|
|
|
|
sysCaseQuestion.setTwoId(sysTopicAndCourse.getTwoId());
|
|
|
|
|
|
|
|
sysCaseQuestion.setTwoName(sysTopicAndCourse.getTwoName());
|
|
|
|
|
|
|
|
sysCaseQuestion.setThreeId(sysTopicAndCourse.getThreeId());
|
|
|
|
|
|
|
|
sysCaseQuestion.setThreeName(sysTopicAndCourse.getThreeName());
|
|
|
|
|
|
|
|
return sysCaseQuestion;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -256,6 +268,7 @@ public class CaseApi {
|
|
|
|
//案例题步骤内容查看 caseStepId
|
|
|
|
//案例题步骤内容查看 caseStepId
|
|
|
|
@PostMapping("selectCaseStepDetails")
|
|
|
|
@PostMapping("selectCaseStepDetails")
|
|
|
|
@ApiOperation("案例题步骤内容查看")
|
|
|
|
@ApiOperation("案例题步骤内容查看")
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
public SysCaseQuestionStepWithBLOBs selectCaseStepDetails(@ApiParam("案例题步骤ID") @RequestParam String caseStepId) {
|
|
|
|
public SysCaseQuestionStepWithBLOBs selectCaseStepDetails(@ApiParam("案例题步骤ID") @RequestParam String caseStepId) {
|
|
|
|
return caseQuestionStepMapper.selectByPrimaryKey(caseStepId);
|
|
|
|
return caseQuestionStepMapper.selectByPrimaryKey(caseStepId);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -270,10 +283,17 @@ public class CaseApi {
|
|
|
|
//案例题步骤内容查看 caseStepId
|
|
|
|
//案例题步骤内容查看 caseStepId
|
|
|
|
@PostMapping("selectCaseByChapterId")
|
|
|
|
@PostMapping("selectCaseByChapterId")
|
|
|
|
@ApiOperation("根据三级ID查询案例题集合")
|
|
|
|
@ApiOperation("根据三级ID查询案例题集合")
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
public List<SysCaseQuestion> selectCaseByChapterId(@RequestParam String threeId) {
|
|
|
|
public List<SysCaseQuestion> selectCaseByChapterId(@RequestParam String threeId) {
|
|
|
|
SysCaseQuestionExample example = new SysCaseQuestionExample();
|
|
|
|
SysTopicAndCourseExample example = new SysTopicAndCourseExample();
|
|
|
|
example.createCriteria().andThreeIdEqualTo(threeId);
|
|
|
|
example.createCriteria().andThreeIdEqualTo(threeId);
|
|
|
|
List<SysCaseQuestion> list = caseQuestionMapper.selectByExample(example);
|
|
|
|
List<SysTopicAndCourse> sysTopicAndCourses = topicAndCourseMapper.selectByExample(example);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> collect = sysTopicAndCourses.stream().map(SysTopicAndCourse::getTopicId).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SysCaseQuestionExample example1 = new SysCaseQuestionExample();
|
|
|
|
|
|
|
|
example1.createCriteria().andCaseIdIn(collect).andSourceEqualTo("管理员");
|
|
|
|
|
|
|
|
List<SysCaseQuestion> list = caseQuestionMapper.selectByExampleWithBLOBs(example1);
|
|
|
|
return list;
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -286,7 +306,8 @@ public class CaseApi {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("selectCaseStepListBatchByIdListAndSort")
|
|
|
|
@PostMapping("selectCaseStepListBatchByIdListAndSort")
|
|
|
|
@ApiOperation("查询案例题步骤并排序")
|
|
|
|
@ApiOperation("查询案例题步骤并排序")
|
|
|
|
public List<SysCaseQuestionStepWithBLOBs> selectCaseByChapterId(@RequestParam List<String> caseIdList) {
|
|
|
|
@AnonymousAccess
|
|
|
|
|
|
|
|
public List<SysCaseQuestionStepWithBLOBs> selectCaseStepListBatchByIdListAndSort(@RequestBody List<String> caseIdList) {
|
|
|
|
SysCaseQuestionStepExample example = new SysCaseQuestionStepExample();
|
|
|
|
SysCaseQuestionStepExample example = new SysCaseQuestionStepExample();
|
|
|
|
example.createCriteria().andCaseIdIn(caseIdList);
|
|
|
|
example.createCriteria().andCaseIdIn(caseIdList);
|
|
|
|
example.setOrderByClause("sort");
|
|
|
|
example.setOrderByClause("sort");
|
|
|
@ -303,7 +324,8 @@ public class CaseApi {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("selectCaseByChapterIdList")
|
|
|
|
@PostMapping("selectCaseByChapterIdList")
|
|
|
|
@ApiOperation("根据章节IdList查询案例题")
|
|
|
|
@ApiOperation("根据章节IdList查询案例题")
|
|
|
|
public List<SysCaseQuestion> selectCaseByChapterIdList(@RequestParam List<String> chapterIdList) {
|
|
|
|
@AnonymousAccess
|
|
|
|
|
|
|
|
public List<SysCaseQuestion> selectCaseByChapterIdList(@RequestBody List<String> chapterIdList) {
|
|
|
|
SysTopicAndCourseExample example = new SysTopicAndCourseExample();
|
|
|
|
SysTopicAndCourseExample example = new SysTopicAndCourseExample();
|
|
|
|
example.createCriteria().andThreeIdIn(chapterIdList);
|
|
|
|
example.createCriteria().andThreeIdIn(chapterIdList);
|
|
|
|
List<SysTopicAndCourse> sysTopicAndCourses = topicAndCourseMapper.selectByExample(example);
|
|
|
|
List<SysTopicAndCourse> sysTopicAndCourses = topicAndCourseMapper.selectByExample(example);
|
|
|
@ -318,11 +340,46 @@ public class CaseApi {
|
|
|
|
//*考试模式--成绩报告案例题question0riginal所属章节,contentOriginal为考核点数量,Sort为序号
|
|
|
|
//*考试模式--成绩报告案例题question0riginal所属章节,contentOriginal为考核点数量,Sort为序号
|
|
|
|
@PostMapping("getGradeReportCase")
|
|
|
|
@PostMapping("getGradeReportCase")
|
|
|
|
@ApiOperation("考试模式/成绩报告/案例题")
|
|
|
|
@ApiOperation("考试模式/成绩报告/案例题")
|
|
|
|
public List<SysCaseQuestionStepWithBLOBs> getGradeReportCase(@RequestParam List<String> caseIdList,
|
|
|
|
@AnonymousAccess
|
|
|
|
|
|
|
|
public List<SysCaseQuestionStepWithBLOBs> getGradeReportCase(@RequestBody List<String> caseIdList,
|
|
|
|
@RequestParam String schoolId,
|
|
|
|
@RequestParam String schoolId,
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
SysOneCatalog sysOneCatalogs = getSysOneCatalogs(systemOwner);
|
|
|
|
SysOneCatalog sysOneCatalogs = getSysOneCatalogs(systemOwner);
|
|
|
|
String oneId = sysOneCatalogs.getOneId();
|
|
|
|
String oneId = sysOneCatalogs.getOneId();
|
|
|
|
return caseQuestionStepMapper.getGradeReportCase(caseIdList, schoolId, oneId);
|
|
|
|
return caseQuestionStepMapper.getGradeReportCase(caseIdList, schoolId, oneId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//根据课程ID查询案例题
|
|
|
|
|
|
|
|
@PostMapping("selectCaseByCourseId")
|
|
|
|
|
|
|
|
@ApiOperation("根据课程ID查询案例题")
|
|
|
|
|
|
|
|
@AnonymousAccess //只查学校新增的
|
|
|
|
|
|
|
|
public List<SysCaseQuestion> selectCaseByCourseId(@RequestParam String courseId,
|
|
|
|
|
|
|
|
@RequestParam String systemOwner,
|
|
|
|
|
|
|
|
@RequestParam String schoolId) {
|
|
|
|
|
|
|
|
SysOneCatalog sysOneCatalogs = getSysOneCatalogs(systemOwner);
|
|
|
|
|
|
|
|
String oneId = sysOneCatalogs.getOneId();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SysTopicAndCourseExample example = new SysTopicAndCourseExample();
|
|
|
|
|
|
|
|
example.createCriteria().andTwoIdEqualTo(courseId).andOneIdEqualTo(oneId);
|
|
|
|
|
|
|
|
List<SysTopicAndCourse> sysTopicAndCourses = topicAndCourseMapper.selectByExample(example);
|
|
|
|
|
|
|
|
if (!sysTopicAndCourses.isEmpty()) {
|
|
|
|
|
|
|
|
List<String> collect = sysTopicAndCourses.stream().map(SysTopicAndCourse::getTopicId).collect(Collectors.toList());
|
|
|
|
|
|
|
|
SysCaseQuestionExample example1 = new SysCaseQuestionExample();
|
|
|
|
|
|
|
|
example1.createCriteria().andCaseIdIn(collect).andSourceEqualTo(schoolId);
|
|
|
|
|
|
|
|
List<SysCaseQuestion> list = caseQuestionMapper.selectByExampleWithBLOBs(example1);
|
|
|
|
|
|
|
|
return list;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//* 单独接口
|
|
|
|
|
|
|
|
//* 展示案例题详细信息
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
|
|
|
@ApiOperation("展示案例题详细信息")
|
|
|
|
|
|
|
|
@PostMapping("selectTrainingByIds")
|
|
|
|
|
|
|
|
public List<TrainingDto> selectTrainingByIds(@RequestBody List<String> caseStepIdList) {
|
|
|
|
|
|
|
|
List<TrainingDto> trainingDtos = caseQuestionStepMapper.selectTrainingByIds(caseStepIdList);
|
|
|
|
|
|
|
|
return trainingDtos;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|