老师端新增参数

master
xiaoCJ 8 months ago
parent d5b93f8024
commit a66acfcf28

@ -554,7 +554,7 @@ public class TeaGradeManageController {
@ApiOperation("练习模式--成绩详情页面设置权重")
public void updateWeightByModule(@ApiParam("所有框必须传") @RequestBody SysWeight sysWeight) {
SysWeightExample sysWeightExample = new SysWeightExample();
sysWeightExample.createCriteria().andCourseIdEqualTo(sysWeight.getCourseId());
sysWeightExample.createCriteria().andCourseIdEqualTo(sysWeight.getCourseId()).andSystemOwnerEqualTo(sysWeight.getSystemOwner());
List<SysWeight> sysWeights = sysWeightMapper.selectByExample(sysWeightExample);
if (!sysWeights.isEmpty()) {//有 update
sysWeightMapper.updateByPrimaryKey(sysWeight);
@ -587,9 +587,10 @@ public class TeaGradeManageController {
@PostMapping("/getModuleByCourseId")
@ApiOperation("练习模式--权重回显")
public ResultEntity<SysWeight> getModuleByCourseId(@RequestParam String courseId,
@RequestParam String schoolId) {
@RequestParam String schoolId,
@RequestParam String systemOwner) {
SysWeightExample sysWeightExample = new SysWeightExample();
sysWeightExample.createCriteria().andSchoolIdEqualTo(schoolId).andCourseIdEqualTo(courseId);
sysWeightExample.createCriteria().andSchoolIdEqualTo(schoolId).andCourseIdEqualTo(courseId).andSystemOwnerEqualTo(systemOwner);
List<SysWeight> sysWeights = sysWeightMapper.selectByExample(sysWeightExample);
if (sysWeights.isEmpty()) {
//todo 是否需要设置默认权重
@ -606,8 +607,9 @@ public class TeaGradeManageController {
@RequestParam Integer size,
@RequestParam String schoolId,
@RequestParam(required = false) String classId,
@ApiParam("学号/姓名搜索框") @RequestParam(required = false) String keyWord) {
return new ResultEntity<>(iTeaGradeManageService.getTheoryInfo(index, size, schoolId, classId, keyWord));
@ApiParam("学号/姓名搜索框") @RequestParam(required = false) String keyWord,
@RequestParam String systemOwner) {
return new ResultEntity<>(iTeaGradeManageService.getTheoryInfo(index, size, schoolId, classId, keyWord,systemOwner));
}

@ -28,7 +28,7 @@ public interface ITeaGradeManageService {
PageInfo<StuUserDto> getReportCorrect(String schoolId, Integer index, Integer size, String module, String classId, String keyWord);
PageInfo<StuTheoryRecord> getTheoryInfo(Integer index, Integer size, String schoolId, String classId, String keyWord);
PageInfo<StuTheoryRecord> getTheoryInfo(Integer index, Integer size, String schoolId, String classId, String keyWord,String systemOwner);
void exportTheoryExamInfo(HttpServletResponse response,String classId, String schoolId);
}

@ -51,8 +51,8 @@ public class TeaGradeManageServiceImpl implements ITeaGradeManageService {
@Override
public PageInfo<TeaTrainingInfoDTO> getTrainingInfo(Integer index, Integer size, String schoolId, String keyWord, String classId,String systemOwner) {
List<TeaTrainingInfoDTO> list = getTeaTrainingInfoDTOS(schoolId, keyWord, classId,systemOwner);
public PageInfo<TeaTrainingInfoDTO> getTrainingInfo(Integer index, Integer size, String schoolId, String keyWord, String classId, String systemOwner) {
List<TeaTrainingInfoDTO> list = getTeaTrainingInfoDTOS(schoolId, keyWord, classId, systemOwner);
assert !list.isEmpty();
list.sort(new TotalScoreComparator());
int i = 0;
@ -71,8 +71,8 @@ public class TeaGradeManageServiceImpl implements ITeaGradeManageService {
* @Date 2024/3/19
*/
@Override
public void exportTrainingInfo(HttpServletResponse response, String schoolId, String keyWord, String classId,String systemOwner) {
List<TeaTrainingInfoDTO> list = getTeaTrainingInfoDTOS(schoolId, keyWord, classId,systemOwner);
public void exportTrainingInfo(HttpServletResponse response, String schoolId, String keyWord, String classId, String systemOwner) {
List<TeaTrainingInfoDTO> list = getTeaTrainingInfoDTOS(schoolId, keyWord, classId, systemOwner);
//导出的表名
String title = IdUtil.simpleUUID();
//表中第一行表头字段
@ -229,20 +229,20 @@ public class TeaGradeManageServiceImpl implements ITeaGradeManageService {
}
@Override
public PageInfo<StuTheoryRecord> getTheoryInfo(Integer index, Integer size, String schoolId, String classId, String keyWord) {
public PageInfo<StuTheoryRecord> getTheoryInfo(Integer index, Integer size, String schoolId, String classId, String keyWord, String systemOwner) {
PageHelper.startPage(index, size);
List<StuTheoryRecord> list = getStuTheoryRecordPageInfo(schoolId, classId, keyWord);
List<StuTheoryRecord> list = getStuTheoryRecordPageInfo(schoolId, classId, keyWord, systemOwner);
PageInfo<StuTheoryRecord> pageInfo = new PageInfo<>(list);
return pageInfo;
}
//查询方法
private List<StuTheoryRecord> getStuTheoryRecordPageInfo(String schoolId, String classId, String keyWord) {
private List<StuTheoryRecord> getStuTheoryRecordPageInfo(String schoolId, String classId, String keyWord, String systemOwner) {
StuTheoryRecordExample s = new StuTheoryRecordExample();
StuTheoryRecordExample.Criteria criteria = s.createCriteria();
StuTheoryRecordExample.Criteria orCriteria = s.createCriteria();
criteria.andSchoolIdEqualTo(schoolId);
orCriteria.andSchoolIdEqualTo(schoolId);
criteria.andSchoolIdEqualTo(schoolId).andSystemOwnerEqualTo(systemOwner);
orCriteria.andSchoolIdEqualTo(schoolId).andSystemOwnerEqualTo(systemOwner);
if (StringUtils.isNotBlank(classId)) {
criteria.andClassIdEqualTo(classId);
orCriteria.andClassIdEqualTo(classId);
@ -288,7 +288,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.Criteria criteria = userExample.createCriteria();
criteria.andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4);
@ -317,7 +317,7 @@ public class TeaGradeManageServiceImpl implements ITeaGradeManageService {
StuTrainingExample stuTrainingExample = new StuTrainingExample();
stuTrainingExample.createCriteria().andUserIdIn(new ArrayList<>(userIds));
List<StuTrainingWithBLOBs> stuTrainingsWithBLOBs = trainingMapper.selectByExampleWithBLOBs(stuTrainingExample);
if (stuTrainingsWithBLOBs.isEmpty()){
if (stuTrainingsWithBLOBs.isEmpty()) {
return Collections.emptyList();
}
// 实训记录按用户ID分组

Loading…
Cancel
Save