develop
CrazyIter_Bin 2 months ago
parent 8100e15948
commit 0d4864f7f7

@ -49,4 +49,11 @@ public class ExamController {
return R.success(res); return R.success(res);
} }
@PostMapping("getExamByStudent")
@ApiOperation("获取单个学生的简易分析结果")
public R<Map<String, Object>> getExamByStudent(@Valid @RequestBody FindByStudentDto findByStudentDto, HttpServletRequest request) {
Map<String, Object> res = examService.getExamByStudent(findByStudentDto,request);
return R.success(res);
}
} }

@ -10,4 +10,5 @@ public interface ExamService {
Map<String,Object> getExamList(AnalysisDto analysisDto, HttpServletRequest request); Map<String,Object> getExamList(AnalysisDto analysisDto, HttpServletRequest request);
Map<String,Object> getExamSimpleAnalysis(FindExamDto findExamDto, HttpServletRequest request); Map<String,Object> getExamSimpleAnalysis(FindExamDto findExamDto, HttpServletRequest request);
Map<String,Object> getExamRecord(ExamRecordDto examRecordDto, HttpServletRequest request); Map<String,Object> getExamRecord(ExamRecordDto examRecordDto, HttpServletRequest request);
Map<String,Object> getExamByStudent(FindByStudentDto findByStudentDto, HttpServletRequest request);
} }

@ -3,10 +3,7 @@ package cn.teammodel.controller.admin.service.impl;
import cn.teammodel.common.ErrorCode; import cn.teammodel.common.ErrorCode;
import cn.teammodel.config.exception.ServiceException; import cn.teammodel.config.exception.ServiceException;
import cn.teammodel.controller.admin.service.ExamService; import cn.teammodel.controller.admin.service.ExamService;
import cn.teammodel.model.dto.admin.exam.AnalysisDto; import cn.teammodel.model.dto.admin.exam.*;
import cn.teammodel.model.dto.admin.exam.ExamRecordDto;
import cn.teammodel.model.dto.admin.exam.FindExamDto;
import cn.teammodel.model.dto.admin.exam.OverViewDto;
import cn.teammodel.model.entity.common.Exam; import cn.teammodel.model.entity.common.Exam;
import cn.teammodel.model.entity.school.School; import cn.teammodel.model.entity.school.School;
import cn.teammodel.repository.ExamRepository; import cn.teammodel.repository.ExamRepository;
@ -95,4 +92,17 @@ public class ExamServiceImpl implements ExamService {
} }
return record; return record;
} }
@Override
public Map<String, Object> getExamByStudent(FindByStudentDto findByStudentDto, HttpServletRequest request) {
Map<String, Object> studentView;
String url = env.getProperty("ies.server-url-find-summary-by-student");
try {
studentView = GroupUtil.getGroupId(findByStudentDto,new GroupUtil(env), request,url);
}catch (Exception e) {
throw new ServiceException(ErrorCode.SYSTEM_ERROR.getCode(), "数据转换错误");
}
return studentView;
}
} }

@ -0,0 +1,16 @@
package cn.teammodel.model.dto.admin.exam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class FindByStudentDto {
@ApiModelProperty("该活动唯一ID")
private String id;
@ApiModelProperty("学校编码")
private String code;
@ApiModelProperty("学生ID")
private String studentId;
@ApiModelProperty("原本活动的完成code,在返回的列表数据中应该有类似Exam-hbcn的字段")
private String scode;
}
Loading…
Cancel
Save