修改老师端bug ,添加system参数

master
xiaoCJ 7 months ago
parent 221963af3b
commit 9b1168fb27

@ -81,8 +81,8 @@ public class TeaGradeManageController {
@ApiParam("系统名称") @RequestParam String systemOwner) { @ApiParam("系统名称") @RequestParam String systemOwner) {
List<TeaExamManage> teaExamManages = teaExamManageMapper.selectBySchoolIdAndSystemOwner(schoolId, systemOwner); List<TeaExamManage> teaExamManages = teaExamManageMapper.selectBySchoolIdAndSystemOwner(schoolId, systemOwner);
if (teaExamManages.isEmpty()) { if (teaExamManages == null || teaExamManages.isEmpty()) {
return null; return new ResultEntity<>(new PageInfo<>());
} }
List<TeaExamManageCountDto> teaExamManageCountDtos = new ArrayList<>(); List<TeaExamManageCountDto> teaExamManageCountDtos = new ArrayList<>();
Map<String, StuUser> userMap = new HashMap<>(); Map<String, StuUser> userMap = new HashMap<>();
@ -244,7 +244,7 @@ public class TeaGradeManageController {
List<String> list = Arrays.asList(caseIdList.split(",")); List<String> list = Arrays.asList(caseIdList.split(","));
List<TestTestSysCaseQuestionStepWithBLOBs> resultList = null; List<TestTestSysCaseQuestionStepWithBLOBs> resultList = null;
try { try {
resultList = CaseApi.getGradeReportCase(list, schoolId,systemOwner); resultList = CaseApi.getGradeReportCase(list, schoolId, systemOwner);
} catch (IOException e) { } catch (IOException e) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心接口异常"); return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心接口异常");
} }
@ -574,8 +574,8 @@ public class TeaGradeManageController {
for (int i = 0; i < twoCatalogs.size(); i++) { for (int i = 0; i < twoCatalogs.size(); i++) {
HashMap<String, String> hashMap = new HashMap<>(); HashMap<String, String> hashMap = new HashMap<>();
SysTwoCatalog sysTwoCatalog = twoCatalogs.get(i); SysTwoCatalog sysTwoCatalog = twoCatalogs.get(i);
hashMap.put("course_id",sysTwoCatalog.getTwoId()); hashMap.put("course_id", sysTwoCatalog.getTwoId());
hashMap.put("course_name",sysTwoCatalog.getTwoName()); hashMap.put("course_name", sysTwoCatalog.getTwoName());
list.add(hashMap); list.add(hashMap);
} }
} catch (IOException e) { } catch (IOException e) {
@ -610,7 +610,7 @@ public class TeaGradeManageController {
@RequestParam(required = false) String classId, @RequestParam(required = false) String classId,
@ApiParam("学号/姓名搜索框") @RequestParam(required = false) String keyWord, @ApiParam("学号/姓名搜索框") @RequestParam(required = false) String keyWord,
@RequestParam String systemOwner) { @RequestParam String systemOwner) {
return new ResultEntity<>(iTeaGradeManageService.getTheoryInfo(index, size, schoolId, classId, keyWord,systemOwner)); return new ResultEntity<>(iTeaGradeManageService.getTheoryInfo(index, size, schoolId, classId, keyWord, systemOwner));
} }

@ -363,8 +363,8 @@ public class UserController {
@AnonymousAccess @AnonymousAccess
@PostMapping("/selectAllClassNameBySchoolId") @PostMapping("/selectAllClassNameBySchoolId")
@ApiOperation("班级下拉框") @ApiOperation("班级下拉框")
public ResultEntity<List<Map<String, String>>> selectAllClassNameBySchoolId(@RequestParam String schoolId) { public ResultEntity<List<Map<String, String>>> selectAllClassNameBySchoolId(@RequestParam String schoolId,@RequestParam String systemOwner) {
return new ResultEntity<>(classMapper.selectAllClassNameBySchoolId(schoolId)); return new ResultEntity<>(classMapper.selectAllClassNameBySchoolId(schoolId,systemOwner));
} }

@ -33,8 +33,8 @@ public interface StuClassMapper {
int updateByPrimaryKey(StuClass record); int updateByPrimaryKey(StuClass record);
@Select("SELECT DISTINCT s.class_name, s.class_id FROM stu_class s, stu_userinfo u WHERE #{schoolId}= u.school_id;") @Select("SELECT DISTINCT s.class_name, s.class_id FROM stu_class s, stu_userinfo u WHERE #{schoolId}= u.school_id and system_owner =#{systemOwner}")
List<Map<String,String>> selectAllClassNameBySchoolId(@Param("schoolId")String schoolId); List<Map<String,String>> selectAllClassNameBySchoolId(@Param("schoolId")String schoolId,@Param("systemOwner")String systemOwner);
@Select("SELECT s.class_name FROM stu_class s, stu_userinfo u WHERE s.class_id = u.class_id and s.class_id = #{classId};") @Select("SELECT s.class_name FROM stu_class s, stu_userinfo u WHERE s.class_id = u.class_id and s.class_id = #{classId};")
String selectClassNameByClassId(@Param("classId")String classId); String selectClassNameByClassId(@Param("classId")String classId);

@ -291,7 +291,7 @@ public class TeaGradeManageServiceImpl implements ITeaGradeManageService {
private List<TeaTrainingInfoDTO> getTeaTrainingInfoDTOS(String schoolId, String keyWord, String classId, String systemOwner) { private List<TeaTrainingInfoDTO> getTeaTrainingInfoDTOS(String schoolId, String keyWord, String classId, String systemOwner) {
StuUserExample userExample = new StuUserExample(); StuUserExample userExample = new StuUserExample();
StuUserExample.Criteria criteria = userExample.createCriteria(); StuUserExample.Criteria criteria = userExample.createCriteria();
criteria.andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4); criteria.andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4).andSystemOnwerEqualTo(systemOwner);
if (StringUtils.isNotBlank(classId)) { if (StringUtils.isNotBlank(classId)) {
criteria.andClassIdEqualTo(classId); criteria.andClassIdEqualTo(classId);
} }

Loading…
Cancel
Save