老师端新增参数

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.github.pagehelper.PageInfo;
import com.sztzjy.financial_bigdata.annotation.AnonymousAccess; import com.sztzjy.financial_bigdata.annotation.AnonymousAccess;
import com.sztzjy.financial_bigdata.entity.*; 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.resource_entity.dto.SysObjectiveQuestionsDto;
import com.sztzjy.financial_bigdata.entity.tea_dto.TeaExamManageCountDto; 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.TeaExamManageDto;
import com.sztzjy.financial_bigdata.entity.tea_dto.TrainingDto; 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.CaseApi;
import com.sztzjy.financial_bigdata.resourceCenterAPI.ObjectiveApi; import com.sztzjy.financial_bigdata.resourceCenterAPI.ObjectiveApi;
import com.sztzjy.financial_bigdata.service.tea.ITeaExamManageService; import com.sztzjy.financial_bigdata.service.tea.ITeaExamManageService;
@ -127,11 +129,12 @@ public class TeaExamManageController {
public ResultEntity<PageInfo<TeaExamManageWithBLOBs>> selectExamList(@RequestParam Integer index, public ResultEntity<PageInfo<TeaExamManageWithBLOBs>> selectExamList(@RequestParam Integer index,
@RequestParam Integer size, @RequestParam Integer size,
@RequestParam(required = false) @ApiParam("考试名称") String examName, @RequestParam(required = false) @ApiParam("考试名称") String examName,
@RequestParam String schoolId) { @RequestParam String schoolId,
@RequestParam String systemOwner) {
PageHelper.startPage(index, size); PageHelper.startPage(index, size);
TeaExamManageExample teaExamManageExample = new TeaExamManageExample(); TeaExamManageExample teaExamManageExample = new TeaExamManageExample();
TeaExamManageExample.Criteria criteria = teaExamManageExample.createCriteria(); TeaExamManageExample.Criteria criteria = teaExamManageExample.createCriteria();
criteria.andSchoolIdEqualTo(schoolId); criteria.andSchoolIdEqualTo(schoolId).andSystemOwnerEqualTo(systemOwner);
if (StringUtils.isNotBlank(examName)) { if (StringUtils.isNotBlank(examName)) {
criteria.andExamNameEqualTo(examName); criteria.andExamNameEqualTo(examName);
} }

@ -41,7 +41,6 @@ import javax.servlet.http.HttpServletResponse;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -78,9 +77,10 @@ public class TeaGradeManageController {
@ApiOperation("考试模式--页面展示(学生端实战考核复用)") @ApiOperation("考试模式--页面展示(学生端实战考核复用)")
public ResultEntity<PageInfo<TeaExamManageCountDto>> getExamInfo(@RequestParam Integer index, public ResultEntity<PageInfo<TeaExamManageCountDto>> getExamInfo(@RequestParam Integer index,
@RequestParam Integer size, @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()) { if (teaExamManages.isEmpty()) {
return null; return null;
} }

@ -87,6 +87,9 @@ public class TeaExamManageDto {
@ApiModelProperty("判断题答案(id, answer)") @ApiModelProperty("判断题答案(id, answer)")
private String judgeAnswer; private String judgeAnswer;
@ApiModelProperty("系统名称")
private String systemOwner;
@Nullable @Nullable
private MultipartFile file; 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.TeaExamManage;
import com.sztzjy.financial_bigdata.entity.TeaExamManageExample; import com.sztzjy.financial_bigdata.entity.TeaExamManageExample;
import com.sztzjy.financial_bigdata.entity.TeaExamManageWithBLOBs; 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 com.sztzjy.financial_bigdata.entity.stu_dto.ReceiveDto;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
@Mapper @Mapper
public interface TeaExamManageMapper { public interface TeaExamManageMapper {
long countByExample(TeaExamManageExample example); long countByExample(TeaExamManageExample example);
@ -49,7 +47,8 @@ public interface TeaExamManageMapper {
List<TeaExamManageWithBLOBs> selectByUserId(@Param("userId") String userId); 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}") @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);

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

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

Loading…
Cancel
Save