|
|
|
@ -5,9 +5,15 @@ import com.github.pagehelper.PageHelper;
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
|
import com.sztzjy.financial_bigdata.annotation.AnonymousAccess;
|
|
|
|
|
import com.sztzjy.financial_bigdata.entity.*;
|
|
|
|
|
import com.sztzjy.financial_bigdata.entity.resource_entity.SysObjectiveQuestions;
|
|
|
|
|
import com.sztzjy.financial_bigdata.entity.resource_entity.SysTwoCatalog;
|
|
|
|
|
import com.sztzjy.financial_bigdata.entity.resource_entity.TestTestSysCaseQuestionStepWithBLOBs;
|
|
|
|
|
import com.sztzjy.financial_bigdata.entity.stu_dto.StuUserDto;
|
|
|
|
|
import com.sztzjy.financial_bigdata.entity.tea_dto.*;
|
|
|
|
|
import com.sztzjy.financial_bigdata.mapper.*;
|
|
|
|
|
import com.sztzjy.financial_bigdata.resourceCenterAPI.CaseApi;
|
|
|
|
|
import com.sztzjy.financial_bigdata.resourceCenterAPI.CourseAPI;
|
|
|
|
|
import com.sztzjy.financial_bigdata.resourceCenterAPI.ObjectiveApi;
|
|
|
|
|
import com.sztzjy.financial_bigdata.service.tea.ITeaGradeManageService;
|
|
|
|
|
import com.sztzjy.financial_bigdata.service.tea.impl.TeaGradeManageServiceImpl;
|
|
|
|
|
import com.sztzjy.financial_bigdata.util.PageUtil;
|
|
|
|
@ -63,16 +69,9 @@ public class TeaGradeManageController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private TeaAndStudentExamMapper teaAndStudentExamMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private SysCourseMapper sysCourseMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private SysWeightMapper sysWeightMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StuTheoryExamMapper stuTheoryExamMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private SysCaseQuestionStepMapper sysCaseQuestionStepMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private SysObjectiveQuestionMapper sysObjectiveQuestionMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@PostMapping("/getExamInfo")
|
|
|
|
@ -234,16 +233,23 @@ public class TeaGradeManageController {
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@PostMapping("/getGradeReportCase")
|
|
|
|
|
@ApiOperation("考试模式--成绩报告案例题questionOriginal所属章节,contentOriginal为考核点数量,Sort为序号") //TODO 案例题正确率字段暂无
|
|
|
|
|
@ApiOperation("***考试模式--成绩报告案例题questionOriginal所属章节,contentOriginal为考核点数量,Sort为序号") //TODO 案例题正确率字段暂无
|
|
|
|
|
public ResultEntity<PageInfo<SysCaseQuestion>> getGradeReportCase(@RequestParam Integer index,
|
|
|
|
|
@RequestParam Integer size,
|
|
|
|
|
@RequestParam String examManageId) {
|
|
|
|
|
@RequestParam String examManageId,
|
|
|
|
|
@RequestParam String schoolId,
|
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
|
TeaExamManageWithBLOBs teaExamManageWithBLOBs = teaExamManageMapper.selectByPrimaryKey(examManageId);
|
|
|
|
|
String caseIdList = teaExamManageWithBLOBs.getCaseIdlist();
|
|
|
|
|
List<String> list = Arrays.asList(caseIdList.split(","));
|
|
|
|
|
List<SysCaseQuestionStep> resultList = sysCaseQuestionStepMapper.getGradeReportCase(list);
|
|
|
|
|
List<TestTestSysCaseQuestionStepWithBLOBs> resultList = null;
|
|
|
|
|
try {
|
|
|
|
|
resultList = CaseApi.getGradeReportCase(list, schoolId, systemOwner);
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心接口异常");
|
|
|
|
|
}
|
|
|
|
|
int i = 1;
|
|
|
|
|
for (SysCaseQuestionStep sysCaseQuestionStep : resultList) {
|
|
|
|
|
for (TestTestSysCaseQuestionStepWithBLOBs sysCaseQuestionStep : resultList) {
|
|
|
|
|
sysCaseQuestionStep.setSort(i);
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
@ -279,10 +285,15 @@ public class TeaGradeManageController {
|
|
|
|
|
list.addAll(Arrays.asList(split));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
List<SysObjectiveQuestion> resultList = sysObjectiveQuestionMapper.getGradeReportObjective(list);
|
|
|
|
|
List<SysObjectiveQuestions> resultList = null;
|
|
|
|
|
try {
|
|
|
|
|
resultList = ObjectiveApi.selectBatchByIdList(list);
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心接口异常");
|
|
|
|
|
}
|
|
|
|
|
if (!resultList.isEmpty()) {
|
|
|
|
|
int i = 0;
|
|
|
|
|
for (SysObjectiveQuestion sysObjectiveQuestion : resultList) {
|
|
|
|
|
for (SysObjectiveQuestions sysObjectiveQuestion : resultList) {
|
|
|
|
|
i++;
|
|
|
|
|
sysObjectiveQuestion.setObjectiveId(Integer.toString(i));
|
|
|
|
|
}
|
|
|
|
@ -398,37 +409,47 @@ public class TeaGradeManageController {
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@PostMapping("/getTrainingInfo")
|
|
|
|
|
@ApiOperation("练习模式--页面展示")
|
|
|
|
|
@ApiOperation("***练习模式--页面展示")
|
|
|
|
|
public ResultEntity<PageInfo<TeaTrainingInfoDTO>> getTrainingInfo(@RequestParam Integer index,
|
|
|
|
|
@RequestParam Integer size,
|
|
|
|
|
@RequestParam String schoolId,
|
|
|
|
|
@ApiParam("学号或姓名搜索框") @RequestParam(required = false) String keyWord,
|
|
|
|
|
@RequestParam(required = false) String classId) {
|
|
|
|
|
return new ResultEntity<PageInfo<TeaTrainingInfoDTO>>(iTeaGradeManageService.getTrainingInfo(index, size, schoolId, keyWord, classId));
|
|
|
|
|
@RequestParam(required = false) String classId,
|
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
|
return new ResultEntity<PageInfo<TeaTrainingInfoDTO>>(iTeaGradeManageService.getTrainingInfo(index, size, schoolId, keyWord, classId,systemOwner));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@GetMapping("/exportTrainingInfo")
|
|
|
|
|
@ApiOperation("练习模式--页面导出")
|
|
|
|
|
@ApiOperation("***练习模式--页面导出")
|
|
|
|
|
public void exportTrainingInfo(HttpServletResponse response,
|
|
|
|
|
@RequestParam String schoolId,
|
|
|
|
|
@ApiParam("学号或姓名搜索框") @RequestParam(required = false) String keyWord,
|
|
|
|
|
@RequestParam(required = false) String classId) {
|
|
|
|
|
iTeaGradeManageService.exportTrainingInfo(response, schoolId, keyWord, classId);
|
|
|
|
|
@RequestParam(required = false) String classId,
|
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
|
iTeaGradeManageService.exportTrainingInfo(response, schoolId, keyWord, classId,systemOwner);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@PostMapping("/getTrainingDetailsInfo")
|
|
|
|
|
@ApiOperation("练习模式--详情页面展示")
|
|
|
|
|
public ResultEntity<List<TeaTrainingDto>> getTrainingDetailsInfo(@RequestParam String userId) {
|
|
|
|
|
try {
|
|
|
|
|
return new ResultEntity<>(iTeaGradeManageService.getTrainingDetailsInfo(userId));
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心异常");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@GetMapping("/exportTrainingDetailsInfo")
|
|
|
|
|
@ApiOperation("练习模式--详情页面导出")
|
|
|
|
|
public void exportTrainingDetailsInfo(HttpServletResponse response, @RequestParam String userId) {
|
|
|
|
|
try {
|
|
|
|
|
iTeaGradeManageService.exportTrainingDetailsInfo(response, userId);
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
@ -474,9 +495,14 @@ public class TeaGradeManageController {
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@PostMapping("/getChapterName")
|
|
|
|
|
@ApiOperation("评阅-章节下拉框")
|
|
|
|
|
public ResultEntity<List<String>> getReportCorrect() {
|
|
|
|
|
List<String> list = sysCourseMapper.selectNameByCourseID();
|
|
|
|
|
@ApiOperation("***评阅-章节下拉框")
|
|
|
|
|
public ResultEntity<List<String>> getReportCorrect(String schoolId,String systemOwner) {
|
|
|
|
|
List<String> list = null;
|
|
|
|
|
try {
|
|
|
|
|
list = CourseAPI.selectNameByCourseID(schoolId, systemOwner);
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心异常");
|
|
|
|
|
}
|
|
|
|
|
return new ResultEntity<>(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -539,16 +565,27 @@ public class TeaGradeManageController {
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@PostMapping("/getModuleBySchoolId")
|
|
|
|
|
@ApiOperation("练习模式--权重页面下拉选择模块框")
|
|
|
|
|
public ResultEntity<List<Map<String, String>>> getModuleBySchoolId(@RequestParam String schoolId) {
|
|
|
|
|
List<Map<String, String>> moduleBySchoolId = sysCourseMapper.getModuleBySchoolId(schoolId);
|
|
|
|
|
return new ResultEntity<>(moduleBySchoolId);
|
|
|
|
|
@ApiOperation("***练习模式--权重页面下拉选择模块框")
|
|
|
|
|
public ResultEntity<List<Map<String, String>>> getModuleBySchoolId(@RequestParam String schoolId,@RequestParam String systemOwner) {
|
|
|
|
|
List<Map<String,String>> list= null;
|
|
|
|
|
try {
|
|
|
|
|
List<SysTwoCatalog> twoCatalogs = CourseAPI.selectCourseList(systemOwner, schoolId);
|
|
|
|
|
for (int i = 0; i < twoCatalogs.size(); i++) {
|
|
|
|
|
HashMap<String, String> hashMap = new HashMap<>();
|
|
|
|
|
SysTwoCatalog sysTwoCatalog = twoCatalogs.get(i);
|
|
|
|
|
hashMap.put(sysTwoCatalog.getTwoId(),sysTwoCatalog.getTwoName());
|
|
|
|
|
list.add(hashMap);
|
|
|
|
|
}
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心异常");
|
|
|
|
|
}
|
|
|
|
|
return new ResultEntity<>(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@PostMapping("/getModuleByCourseId")
|
|
|
|
|
@ApiOperation("练习模式--权重回显")
|
|
|
|
|
public ResultEntity<SysWeight> getModuleBySchoolId(@RequestParam String courseId,
|
|
|
|
|
public ResultEntity<SysWeight> getModuleByCourseId(@RequestParam String courseId,
|
|
|
|
|
@RequestParam String schoolId) {
|
|
|
|
|
SysWeightExample sysWeightExample = new SysWeightExample();
|
|
|
|
|
sysWeightExample.createCriteria().andSchoolIdEqualTo(schoolId).andCourseIdEqualTo(courseId);
|
|
|
|
|