老师端新增参数

master
xiaoCJ 8 months ago
parent 5372e08600
commit 5bb8d57c43

@ -4,12 +4,14 @@ 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.dto.SysObjectiveQuestionsDto;
import com.sztzjy.financial_bigdata.entity.tea_dto.TeaExamManageCountDto;
import com.sztzjy.financial_bigdata.entity.tea_dto.TeaExamManageDto;
import com.sztzjy.financial_bigdata.entity.tea_dto.TrainingDto;
import com.sztzjy.financial_bigdata.mapper.*;
import com.sztzjy.financial_bigdata.mapper.StuClassMapper;
import com.sztzjy.financial_bigdata.mapper.StuStudentExamMapper;
import com.sztzjy.financial_bigdata.mapper.TeaAndStudentExamMapper;
import com.sztzjy.financial_bigdata.mapper.TeaExamManageMapper;
import com.sztzjy.financial_bigdata.resourceCenterAPI.CaseApi;
import com.sztzjy.financial_bigdata.resourceCenterAPI.ObjectiveApi;
import com.sztzjy.financial_bigdata.service.tea.ITeaExamManageService;
@ -70,7 +72,7 @@ public class TeaExamManageController {
@AnonymousAccess
@PostMapping("/getAllCount")
@ApiOperation("***新增考试--获取题目总数量")
public ResultEntity<TeaExamManageCountDto> getAllCount(@RequestParam String schoolId,@RequestParam String systemOwner) {
public ResultEntity<TeaExamManageCountDto> getAllCount(@RequestParam String schoolId, @RequestParam String systemOwner) {
try {
Integer single = ObjectiveApi.selectCountSingle(schoolId, systemOwner);
Integer many = ObjectiveApi.selectCountMany(schoolId, systemOwner);
@ -89,7 +91,7 @@ public class TeaExamManageController {
@PostMapping("/selectObjectivityByType")
@ApiOperation("***新增考试--选择客观题时展示")
public ResultEntity<List<SysObjectiveQuestionsDto>> selectObjectivityByType(@ApiParam("0单选 1多选 2判断") @RequestParam String type,
@RequestParam String schoolId,@RequestParam String systemOwner) {
@RequestParam String schoolId, @RequestParam String systemOwner) {
List<SysObjectiveQuestionsDto> list = null;
try {
list = ObjectiveApi.selectObjByType(type, schoolId, systemOwner);
@ -127,11 +129,12 @@ public class TeaExamManageController {
public ResultEntity<PageInfo<TeaExamManageWithBLOBs>> selectExamList(@RequestParam Integer index,
@RequestParam Integer size,
@RequestParam(required = false) @ApiParam("考试名称") String examName,
@RequestParam String schoolId) {
@RequestParam String schoolId,
@RequestParam String systemOwner) {
PageHelper.startPage(index, size);
TeaExamManageExample teaExamManageExample = new TeaExamManageExample();
TeaExamManageExample.Criteria criteria = teaExamManageExample.createCriteria();
criteria.andSchoolIdEqualTo(schoolId);
criteria.andSchoolIdEqualTo(schoolId).andSystemOwnerEqualTo(systemOwner);
if (StringUtils.isNotBlank(examName)) {
criteria.andExamNameEqualTo(examName);
}

@ -41,7 +41,6 @@ import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@ -78,9 +77,10 @@ public class TeaGradeManageController {
@ApiOperation("考试模式--页面展示(学生端实战考核复用)")
public ResultEntity<PageInfo<TeaExamManageCountDto>> getExamInfo(@RequestParam Integer index,
@RequestParam Integer size,
@ApiParam("ManyAnswer为考试时间JudgeAnswer为发布人") @RequestParam String schoolId) {
@ApiParam("ManyAnswer为考试时间JudgeAnswer为发布人") @RequestParam String schoolId,
@ApiParam("系统名称")@RequestParam String systemOwner) {
List<TeaExamManage> teaExamManages = teaExamManageMapper.selectBySchoolId(schoolId);
List<TeaExamManage> teaExamManages = teaExamManageMapper.selectBySchoolIdAndSystemOwner(schoolId,systemOwner);
if (teaExamManages.isEmpty()) {
return null;
}
@ -149,7 +149,7 @@ public class TeaGradeManageController {
@RequestParam(required = false) String classId,
@RequestParam(required = false) String examManageId) {
List<TeaExamAndUserDto> list = getTeaExamAndUserDtos(schoolId, keyWord, classId, examManageId);
if (list == null||list.isEmpty()) {
if (list == null || list.isEmpty()) {
return new ResultEntity<PageInfo<TeaExamAndUserDto>>(new PageInfo<>());
}
// 先对列表按照 totalScore 进行降序排序
@ -416,7 +416,7 @@ public class TeaGradeManageController {
@ApiParam("学号或姓名搜索框") @RequestParam(required = false) String keyWord,
@RequestParam(required = false) String classId,
@RequestParam String systemOwner) {
return new ResultEntity<PageInfo<TeaTrainingInfoDTO>>(iTeaGradeManageService.getTrainingInfo(index, size, schoolId, keyWord, classId,systemOwner));
return new ResultEntity<PageInfo<TeaTrainingInfoDTO>>(iTeaGradeManageService.getTrainingInfo(index, size, schoolId, keyWord, classId, systemOwner));
}
@AnonymousAccess
@ -427,7 +427,7 @@ public class TeaGradeManageController {
@ApiParam("学号或姓名搜索框") @RequestParam(required = false) String keyWord,
@RequestParam(required = false) String classId,
@RequestParam String systemOwner) {
iTeaGradeManageService.exportTrainingInfo(response, schoolId, keyWord, classId,systemOwner);
iTeaGradeManageService.exportTrainingInfo(response, schoolId, keyWord, classId, systemOwner);
}
@AnonymousAccess
@ -496,7 +496,7 @@ public class TeaGradeManageController {
@AnonymousAccess
@PostMapping("/getChapterName")
@ApiOperation("***评阅-章节下拉框")
public ResultEntity<List<String>> getReportCorrect(String schoolId,String systemOwner) {
public ResultEntity<List<String>> getReportCorrect(String schoolId, String systemOwner) {
List<String> list = null;
try {
list = CourseAPI.selectNameByCourseID(schoolId, systemOwner);
@ -566,14 +566,14 @@ public class TeaGradeManageController {
@AnonymousAccess
@PostMapping("/getModuleBySchoolId")
@ApiOperation("***练习模式--权重页面下拉选择模块框")
public ResultEntity<List<Map<String, String>>> getModuleBySchoolId(@RequestParam String schoolId,@RequestParam String systemOwner) {
List<Map<String,String>> list= null;
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());
hashMap.put(sysTwoCatalog.getTwoId(), sysTwoCatalog.getTwoName());
list.add(hashMap);
}
} catch (IOException e) {

@ -87,6 +87,9 @@ public class TeaExamManageDto {
@ApiModelProperty("判断题答案(id, answer)")
private String judgeAnswer;
@ApiModelProperty("系统名称")
private String systemOwner;
@Nullable
private MultipartFile file;
}

@ -3,16 +3,14 @@ package com.sztzjy.financial_bigdata.mapper;
import com.sztzjy.financial_bigdata.entity.TeaExamManage;
import com.sztzjy.financial_bigdata.entity.TeaExamManageExample;
import com.sztzjy.financial_bigdata.entity.TeaExamManageWithBLOBs;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import com.sztzjy.financial_bigdata.entity.stu_dto.ReceiveDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
@Mapper
public interface TeaExamManageMapper {
long countByExample(TeaExamManageExample example);
@ -49,10 +47,11 @@ public interface TeaExamManageMapper {
List<TeaExamManageWithBLOBs> selectByUserId(@Param("userId") String userId);
List<TeaExamManage> selectBySchoolId(@Param("schoolId")String schoolId);
List<TeaExamManage> selectBySchoolIdAndSystemOwner(@Param("schoolId") String schoolId,
@Param("systemOwner") String systemOwner);
@Select("select exam_name,exam_manage_id from tea_exam_manage where school_id =#{schoolId}")
List<Map<String, String>> selectNameAndIdBySchoolId(@Param("schoolId")String schoolId);
List<Map<String, String>> selectNameAndIdBySchoolId(@Param("schoolId") String schoolId);
ReceiveDto getLastExamScore(@Param("userId")String userId);
ReceiveDto getLastExamScore(@Param("userId") String userId);
}

@ -66,6 +66,7 @@ public class TeaExamManageServiceImpl implements ITeaExamManageService {
teaAndStudentExam.setExamManageId(examManageId);
teaAndStudentExam.setClassId(teaExamManagedto.getClassId());
teaAndStudentExam.setClassName(teaExamManagedto.getClassName());
teaAndStudentExam.setSystemOwner(teaExamManagedto.getSystemOwner());
teaAndStudentExam.setId(IdUtil.randomUUID());
teaAndStudentExamMapper.insert(teaAndStudentExam);
teaExamManageWithBLOBs.setExamManageId(examManageId);

@ -541,11 +541,12 @@
where exam_manage_id = #{examManageId,jdbcType=VARCHAR}
</update>
<select id="selectBySchoolId" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
<select id="selectBySchoolIdAndSystemOwner" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
from tea_exam_manage
where school_id = #{schoolId,jdbcType=VARCHAR}
and system_owner = #{systemOwner,jdbcType=VARCHAR}
</select>
<resultMap id="ReceiveDto" type="com.sztzjy.financial_bigdata.entity.stu_dto.ReceiveDto">

Loading…
Cancel
Save