develop
hhb@hotmail.com 2 months ago
parent b68b576b8c
commit a5d404a025

@ -49,4 +49,11 @@ public class ExamController {
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> getExamSimpleAnalysis(FindExamDto findExamDto, 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.config.exception.ServiceException;
import cn.teammodel.controller.admin.service.ExamService;
import cn.teammodel.model.dto.admin.exam.AnalysisDto;
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.dto.admin.exam.*;
import cn.teammodel.model.entity.common.Exam;
import cn.teammodel.model.entity.school.School;
import cn.teammodel.repository.ExamRepository;
@ -95,4 +92,17 @@ public class ExamServiceImpl implements ExamService {
}
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;
}

@ -20,23 +20,23 @@ spring:
# 大小限制
max-file-size: 10MB
#测试站数据库
env: dev
cloud:
azure:
cosmos:
endpoint: https://cdhabookdep-free.documents.azure.cn:443
database: TEAMModelOS
key: JTUVk92Gjsx17L0xqxn0X4wX2thDPMKiw4daeTyV1HzPb6JmBeHdtFY1MF1jdctW1ofgzqkDMFOtcqS46by31A==
populate-query-metrics: true
#正式站数据库
# env: prod
# env: dev
# cloud:
# azure:
# cosmos:
# endpoint: https://teammodelos.documents.azure.cn:443
# endpoint: https://cdhabookdep-free.documents.azure.cn:443
# database: TEAMModelOS
# key: clF73GwPECfP1lKZTCvs8gLMMyCZig1HODFbhDUsarsAURO7TcOjVz6ZFfPqr1HzYrfjCXpMuVD5TlEG5bFGGg==
# key: JTUVk92Gjsx17L0xqxn0X4wX2thDPMKiw4daeTyV1HzPb6JmBeHdtFY1MF1jdctW1ofgzqkDMFOtcqS46by31A==
# populate-query-metrics: true
#正式站数据库
env: prod
cloud:
azure:
cosmos:
endpoint: https://teammodelos.documents.azure.cn:443
database: TEAMModelOS
key: clF73GwPECfP1lKZTCvs8gLMMyCZig1HODFbhDUsarsAURO7TcOjVz6ZFfPqr1HzYrfjCXpMuVD5TlEG5bFGGg==
populate-query-metrics: true
security:
oauth2:
resourceserver:
@ -80,4 +80,5 @@ ies:
server-url-blob-sas-rcwld: /blob/sas-rcwld
server-url-exam-analysis-list: /common/exam/find-by-analysis
server-url-exam-find-record: /common/exam/find-summary-record
server-url-analysis-simple: /analysis/simple
server-url-analysis-simple: /analysis/simple
server-url-find-summary-by-student: /common/exam/find-summary-by-student
Loading…
Cancel
Save