|
@@ -1,148 +1,200 @@
|
|
package cn.com.qmth.examcloud.exchange.outer.api.provider;
|
|
package cn.com.qmth.examcloud.exchange.outer.api.provider;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.List;
|
|
|
|
-
|
|
|
|
-import cn.com.qmth.examcloud.commons.util.StringUtil;
|
|
|
|
-import io.swagger.annotations.Api;
|
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
|
-import io.swagger.annotations.ApiResponse;
|
|
|
|
-import io.swagger.annotations.ApiResponses;
|
|
|
|
-
|
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
-
|
|
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.ExamScoreDataCloudService;
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.ExamScoreDataCloudService;
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.bean.ScoreDataBean;
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.bean.ScoreDataBean;
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.request.GetScoreDataReq;
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.request.GetScoreDataReq;
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.request.QueryScoreDataReq;
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.request.QueryScoreDataReq;
|
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.api.request.QueryScoreListReq;
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.response.GetScoreDataResp;
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.response.GetScoreDataResp;
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.response.QueryScoreDataResp;
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.response.QueryScoreDataResp;
|
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.api.response.QueryScoreListResp;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.GetScoreDataService;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.GetScoreDataService;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.bean.OuterScoreDataBean;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.bean.OuterScoreDataBean;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.request.OuterGetScoreDataReq;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.request.OuterGetScoreDataReq;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.request.OuterQueryScoreDataReq;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.request.OuterQueryScoreDataReq;
|
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.request.OuterQueryScoreListReq;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.response.OuterGetScoreDataResp;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.response.OuterGetScoreDataResp;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.response.OuterQueryScoreDataResp;
|
|
import cn.com.qmth.examcloud.exchange.outer.api.response.OuterQueryScoreDataResp;
|
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.response.OuterQueryScoreListResp;
|
|
import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
import cn.com.qmth.examcloud.web.support.StatusResponse;
|
|
import cn.com.qmth.examcloud.web.support.StatusResponse;
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
+import io.swagger.annotations.ApiResponse;
|
|
|
|
+import io.swagger.annotations.ApiResponses;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
+
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
@Api("获取成绩服务")
|
|
@Api("获取成绩服务")
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("${$rmp.cloud.exchange.outer}/score")
|
|
@RequestMapping("${$rmp.cloud.exchange.outer}/score")
|
|
public class GetScoreDataServiceProvider extends ControllerSupport implements GetScoreDataService {
|
|
public class GetScoreDataServiceProvider extends ControllerSupport implements GetScoreDataService {
|
|
|
|
|
|
- /**
|
|
|
|
- *
|
|
|
|
- */
|
|
|
|
- private static final long serialVersionUID = 1857049574734356057L;
|
|
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
- private ExamScoreDataCloudService examScoreDataCloudService;
|
|
|
|
-
|
|
|
|
- @ApiOperation(value = "获取成绩数据", httpMethod = "POST")
|
|
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "成功", response = OuterGetScoreDataResp.class),
|
|
|
|
- @ApiResponse(code = 500, message = "系统异常(异常信息见响应体)", response = StatusResponse.class)})
|
|
|
|
- @PostMapping("/getScoreData")
|
|
|
|
- @Override
|
|
|
|
- public OuterGetScoreDataResp getScoreData(@RequestBody OuterGetScoreDataReq req) {
|
|
|
|
- if(req.getRootOrgId() == null){
|
|
|
|
- throw new StatusException("1000001", "rootOrgId不能为空");
|
|
|
|
- }
|
|
|
|
- if (!getEnterpriseRootOrgId().equals(req.getRootOrgId())) {
|
|
|
|
- throw new StatusException("1000002", "rootOrgId错误");
|
|
|
|
- }
|
|
|
|
- if (req.getExamRecordDataId()==null) {
|
|
|
|
- throw new StatusException("1000003", "examRecordDataId不能为空");
|
|
|
|
- }
|
|
|
|
- GetScoreDataReq getScoreDataReq = new GetScoreDataReq();
|
|
|
|
- getScoreDataReq.setExamRecordDataId(req.getExamRecordDataId());
|
|
|
|
- GetScoreDataResp scoreDataResp = examScoreDataCloudService.getScoreData(getScoreDataReq);
|
|
|
|
-
|
|
|
|
- OuterGetScoreDataResp outerGetScoreDataResp = new OuterGetScoreDataResp();
|
|
|
|
- OuterScoreDataBean outerScoreDataBean = new OuterScoreDataBean();
|
|
|
|
- outerScoreDataBean.setExamRecordDataId(scoreDataResp.getExamRecordDataId());
|
|
|
|
- outerScoreDataBean.setStudentCode(scoreDataResp.getStudentCode());
|
|
|
|
- outerScoreDataBean.setStudentName(scoreDataResp.getStudentName());
|
|
|
|
- outerScoreDataBean.setIdentityNumber(scoreDataResp.getIdentityNumber());
|
|
|
|
- outerScoreDataBean.setCourseCode(scoreDataResp.getCourseCode());
|
|
|
|
- outerScoreDataBean.setCourseName(scoreDataResp.getCourseName());
|
|
|
|
- outerScoreDataBean.setStartTime(scoreDataResp.getStartTime());
|
|
|
|
- outerScoreDataBean.setEndTime(scoreDataResp.getEndTime());
|
|
|
|
- outerScoreDataBean.setTotalScore(scoreDataResp.getTotalScore());
|
|
|
|
- outerScoreDataBean.setIsWarn(scoreDataResp.getIsWarn());
|
|
|
|
- outerScoreDataBean.setIsAudit(scoreDataResp.getIsAudit());
|
|
|
|
- outerScoreDataBean.setIsIllegality(scoreDataResp.getIsIllegality());
|
|
|
|
- outerGetScoreDataResp.setOuterScoreDataBean(outerScoreDataBean);
|
|
|
|
- return outerGetScoreDataResp;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @ApiOperation(value = "按考试名称,rootOrgId,courseCode,身份证号或学号获取成绩数据", httpMethod = "POST")
|
|
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "成功", response = OuterQueryScoreDataResp.class),
|
|
|
|
- @ApiResponse(code = 500, message = "系统异常(异常信息见响应体)", response = StatusResponse.class)})
|
|
|
|
- @PostMapping("/queryScoreData")
|
|
|
|
- @Override
|
|
|
|
- public OuterQueryScoreDataResp queryScoreData(@RequestBody OuterQueryScoreDataReq req) {
|
|
|
|
- if(req.getRootOrgId() == null){
|
|
|
|
- throw new StatusException("1000001", "rootOrgId不能为空");
|
|
|
|
- }
|
|
|
|
- if (!getEnterpriseRootOrgId().equals(req.getRootOrgId())) {
|
|
|
|
- throw new StatusException("1000002", "rootOrgId错误");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if(StringUtils.isBlank(req.getCourseCode())){
|
|
|
|
- throw new StatusException("1000004", "课程code不能为空");
|
|
|
|
- }
|
|
|
|
- if(req.getRootOrgId() == null){
|
|
|
|
- throw new StatusException("1000005", "rootOrgId不能为空");
|
|
|
|
- }
|
|
|
|
- if(StringUtils.isBlank(req.getIdentityNumber()) && StringUtils.isBlank(req.getStudentCode())){
|
|
|
|
- throw new StatusException("1000006", "身份证号和学号不能都为空");
|
|
|
|
- }
|
|
|
|
- QueryScoreDataReq queryScoreDataReq = new QueryScoreDataReq();
|
|
|
|
- queryScoreDataReq.setCourseCode(req.getCourseCode());
|
|
|
|
-
|
|
|
|
- //如果考试名称不为空,则把考试名称作为考试编码
|
|
|
|
- if (StringUtils.isNoneBlank(req.getExamName())) {
|
|
|
|
- queryScoreDataReq.setExamCode(req.getExamName());
|
|
|
|
- } else {
|
|
|
|
- queryScoreDataReq.setExamCode(req.getExamCode());
|
|
|
|
- }
|
|
|
|
- if(StringUtils.isBlank(queryScoreDataReq.getExamCode())){
|
|
|
|
- throw new StatusException("1000003", "考试代码不能为空");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- queryScoreDataReq.setExamName(req.getExamName());
|
|
|
|
- queryScoreDataReq.setIdentityNumber(req.getIdentityNumber());
|
|
|
|
- queryScoreDataReq.setRootOrgId(req.getRootOrgId());
|
|
|
|
- queryScoreDataReq.setStudentCode(req.getStudentCode());
|
|
|
|
- QueryScoreDataResp queryScoreDataResp = examScoreDataCloudService.queryScoreData(queryScoreDataReq);
|
|
|
|
- List<ScoreDataBean> scoreDataBeanList = queryScoreDataResp.getScoreDataBeanList();
|
|
|
|
- List<OuterScoreDataBean> outerScoreDataBeanList = new ArrayList<OuterScoreDataBean>();
|
|
|
|
- for(ScoreDataBean scoreDataBean:scoreDataBeanList){
|
|
|
|
- OuterScoreDataBean outerScoreDataBean = new OuterScoreDataBean();
|
|
|
|
- outerScoreDataBean.setCourseCode(scoreDataBean.getCourseCode());
|
|
|
|
- outerScoreDataBean.setCourseName(scoreDataBean.getCourseName());
|
|
|
|
- outerScoreDataBean.setEndTime(scoreDataBean.getEndTime());
|
|
|
|
- outerScoreDataBean.setExamRecordDataId(scoreDataBean.getExamRecordDataId());
|
|
|
|
- outerScoreDataBean.setIdentityNumber(scoreDataBean.getIdentityNumber());
|
|
|
|
- outerScoreDataBean.setIsAudit(scoreDataBean.getIsAudit());
|
|
|
|
- outerScoreDataBean.setIsWarn(scoreDataBean.getIsWarn());
|
|
|
|
- outerScoreDataBean.setIsIllegality(scoreDataBean.getIsIllegality());
|
|
|
|
- outerScoreDataBean.setStartTime(scoreDataBean.getStartTime());
|
|
|
|
- outerScoreDataBean.setStudentCode(scoreDataBean.getStudentCode());
|
|
|
|
- outerScoreDataBean.setStudentName(scoreDataBean.getStudentName());
|
|
|
|
- outerScoreDataBean.setTotalScore(scoreDataBean.getTotalScore());
|
|
|
|
- outerScoreDataBeanList.add(outerScoreDataBean);
|
|
|
|
- }
|
|
|
|
- OuterQueryScoreDataResp outerQueryScoreDataResp = new OuterQueryScoreDataResp();
|
|
|
|
- outerQueryScoreDataResp.setOuterScoreDataBeanList(outerScoreDataBeanList);
|
|
|
|
- return outerQueryScoreDataResp;
|
|
|
|
- }
|
|
|
|
|
|
+ private static final long serialVersionUID = 1857049574734356057L;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private ExamScoreDataCloudService examScoreDataCloudService;
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "获取成绩数据", httpMethod = "POST")
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "成功", response = OuterGetScoreDataResp.class),
|
|
|
|
+ @ApiResponse(code = 500, message = "系统异常(异常信息见响应体)", response = StatusResponse.class)})
|
|
|
|
+ @PostMapping("/getScoreData")
|
|
|
|
+ @Override
|
|
|
|
+ public OuterGetScoreDataResp getScoreData(@RequestBody OuterGetScoreDataReq req) {
|
|
|
|
+ if (req.getRootOrgId() == null) {
|
|
|
|
+ throw new StatusException("1000001", "rootOrgId不能为空");
|
|
|
|
+ }
|
|
|
|
+ if (!getEnterpriseRootOrgId().equals(req.getRootOrgId())) {
|
|
|
|
+ throw new StatusException("1000002", "rootOrgId错误");
|
|
|
|
+ }
|
|
|
|
+ if (req.getExamRecordDataId() == null) {
|
|
|
|
+ throw new StatusException("1000003", "examRecordDataId不能为空");
|
|
|
|
+ }
|
|
|
|
+ GetScoreDataReq getScoreDataReq = new GetScoreDataReq();
|
|
|
|
+ getScoreDataReq.setExamRecordDataId(req.getExamRecordDataId());
|
|
|
|
+ GetScoreDataResp scoreDataResp = examScoreDataCloudService.getScoreData(getScoreDataReq);
|
|
|
|
+
|
|
|
|
+ OuterGetScoreDataResp outerGetScoreDataResp = new OuterGetScoreDataResp();
|
|
|
|
+ OuterScoreDataBean outerScoreDataBean = new OuterScoreDataBean();
|
|
|
|
+ outerScoreDataBean.setExamRecordDataId(scoreDataResp.getExamRecordDataId());
|
|
|
|
+ outerScoreDataBean.setStudentCode(scoreDataResp.getStudentCode());
|
|
|
|
+ outerScoreDataBean.setStudentName(scoreDataResp.getStudentName());
|
|
|
|
+ outerScoreDataBean.setIdentityNumber(scoreDataResp.getIdentityNumber());
|
|
|
|
+ outerScoreDataBean.setCourseCode(scoreDataResp.getCourseCode());
|
|
|
|
+ outerScoreDataBean.setCourseName(scoreDataResp.getCourseName());
|
|
|
|
+ outerScoreDataBean.setStartTime(scoreDataResp.getStartTime());
|
|
|
|
+ outerScoreDataBean.setEndTime(scoreDataResp.getEndTime());
|
|
|
|
+ outerScoreDataBean.setTotalScore(scoreDataResp.getTotalScore());
|
|
|
|
+ outerScoreDataBean.setIsWarn(scoreDataResp.getIsWarn());
|
|
|
|
+ outerScoreDataBean.setIsAudit(scoreDataResp.getIsAudit());
|
|
|
|
+ outerScoreDataBean.setIsIllegality(scoreDataResp.getIsIllegality());
|
|
|
|
+ outerGetScoreDataResp.setOuterScoreDataBean(outerScoreDataBean);
|
|
|
|
+ return outerGetScoreDataResp;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "按考试名称,rootOrgId,courseCode,身份证号或学号获取成绩数据", httpMethod = "POST")
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "成功", response = OuterQueryScoreDataResp.class),
|
|
|
|
+ @ApiResponse(code = 500, message = "系统异常(异常信息见响应体)", response = StatusResponse.class)})
|
|
|
|
+ @PostMapping("/queryScoreData")
|
|
|
|
+ @Override
|
|
|
|
+ public OuterQueryScoreDataResp queryScoreData(@RequestBody OuterQueryScoreDataReq req) {
|
|
|
|
+ if (req.getRootOrgId() == null) {
|
|
|
|
+ throw new StatusException("1000001", "rootOrgId不能为空");
|
|
|
|
+ }
|
|
|
|
+ if (!getEnterpriseRootOrgId().equals(req.getRootOrgId())) {
|
|
|
|
+ throw new StatusException("1000002", "rootOrgId错误");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isBlank(req.getCourseCode())) {
|
|
|
|
+ throw new StatusException("1000004", "课程code不能为空");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isBlank(req.getIdentityNumber()) && StringUtils.isBlank(req.getStudentCode())) {
|
|
|
|
+ throw new StatusException("1000006", "身份证号和学号不能都为空");
|
|
|
|
+ }
|
|
|
|
+ QueryScoreDataReq queryScoreDataReq = new QueryScoreDataReq();
|
|
|
|
+ queryScoreDataReq.setCourseCode(req.getCourseCode());
|
|
|
|
+
|
|
|
|
+ //如果考试名称不为空,则把考试名称作为考试编码
|
|
|
|
+ if (StringUtils.isNotBlank(req.getExamName())) {
|
|
|
|
+ queryScoreDataReq.setExamCode(req.getExamName());
|
|
|
|
+ } else {
|
|
|
|
+ queryScoreDataReq.setExamCode(req.getExamCode());
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isBlank(queryScoreDataReq.getExamCode())) {
|
|
|
|
+ throw new StatusException("1000003", "考试代码不能为空");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ queryScoreDataReq.setExamName(req.getExamName());
|
|
|
|
+ queryScoreDataReq.setIdentityNumber(req.getIdentityNumber());
|
|
|
|
+ queryScoreDataReq.setRootOrgId(req.getRootOrgId());
|
|
|
|
+ queryScoreDataReq.setStudentCode(req.getStudentCode());
|
|
|
|
+
|
|
|
|
+ QueryScoreDataResp queryScoreDataResp = examScoreDataCloudService.queryScoreData(queryScoreDataReq);
|
|
|
|
+ List<ScoreDataBean> scoreDataBeanList = queryScoreDataResp.getScoreDataBeanList();
|
|
|
|
+ List<OuterScoreDataBean> outerScoreDataBeanList = new ArrayList<OuterScoreDataBean>();
|
|
|
|
+ for (ScoreDataBean scoreDataBean : scoreDataBeanList) {
|
|
|
|
+ OuterScoreDataBean outerScoreDataBean = new OuterScoreDataBean();
|
|
|
|
+ outerScoreDataBean.setCourseCode(scoreDataBean.getCourseCode());
|
|
|
|
+ outerScoreDataBean.setCourseName(scoreDataBean.getCourseName());
|
|
|
|
+ outerScoreDataBean.setEndTime(scoreDataBean.getEndTime());
|
|
|
|
+ outerScoreDataBean.setExamRecordDataId(scoreDataBean.getExamRecordDataId());
|
|
|
|
+ outerScoreDataBean.setIdentityNumber(scoreDataBean.getIdentityNumber());
|
|
|
|
+ outerScoreDataBean.setIsAudit(scoreDataBean.getIsAudit());
|
|
|
|
+ outerScoreDataBean.setIsWarn(scoreDataBean.getIsWarn());
|
|
|
|
+ outerScoreDataBean.setIsIllegality(scoreDataBean.getIsIllegality());
|
|
|
|
+ outerScoreDataBean.setStartTime(scoreDataBean.getStartTime());
|
|
|
|
+ outerScoreDataBean.setStudentCode(scoreDataBean.getStudentCode());
|
|
|
|
+ outerScoreDataBean.setStudentName(scoreDataBean.getStudentName());
|
|
|
|
+ outerScoreDataBean.setTotalScore(scoreDataBean.getTotalScore());
|
|
|
|
+ outerScoreDataBeanList.add(outerScoreDataBean);
|
|
|
|
+ }
|
|
|
|
+ OuterQueryScoreDataResp outerQueryScoreDataResp = new OuterQueryScoreDataResp();
|
|
|
|
+ outerQueryScoreDataResp.setOuterScoreDataBeanList(outerScoreDataBeanList);
|
|
|
|
+ return outerQueryScoreDataResp;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "获取成绩数据列表(分页)", httpMethod = "POST")
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "成功", response = OuterQueryScoreListResp.class),
|
|
|
|
+ @ApiResponse(code = 500, message = "系统异常(异常信息见响应体)", response = StatusResponse.class)})
|
|
|
|
+ @PostMapping("/queryScoreList")
|
|
|
|
+ public OuterQueryScoreListResp queryScoreList(@RequestBody OuterQueryScoreListReq req) {
|
|
|
|
+ if (req.getRootOrgId() == null) {
|
|
|
|
+ throw new StatusException("1001001", "rootOrgId值不能为空");
|
|
|
|
+ }
|
|
|
|
+ if (!getEnterpriseRootOrgId().equals(req.getRootOrgId())) {
|
|
|
|
+ throw new StatusException("1001002", "rootOrgId值有误");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ QueryScoreListReq queryReq = new QueryScoreListReq();
|
|
|
|
+ queryReq.setRootOrgId(req.getRootOrgId());
|
|
|
|
+ queryReq.setQueryStartTime(req.getQueryStartTime());
|
|
|
|
+ queryReq.setQueryEndTime(req.getQueryEndTime());
|
|
|
|
+ queryReq.setPageNo(req.getPageNo());
|
|
|
|
+ queryReq.setPageSize(req.getPageSize());
|
|
|
|
+ queryReq.setCourseCode(req.getCourseCode());
|
|
|
|
+ queryReq.setExamName(req.getExamName());
|
|
|
|
+
|
|
|
|
+ // 如果考试名称不为空,则把考试名称作为“考试代码”
|
|
|
|
+ if (StringUtils.isNotBlank(req.getExamName())) {
|
|
|
|
+ queryReq.setExamCode(req.getExamName());
|
|
|
|
+ } else {
|
|
|
|
+ queryReq.setExamCode(req.getExamCode());
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isBlank(queryReq.getExamCode())) {
|
|
|
|
+ throw new StatusException("1001003", "考试代码值不能为空");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ QueryScoreListResp queryResp = examScoreDataCloudService.queryScoreList(queryReq);
|
|
|
|
+ List<OuterScoreDataBean> scoreList = new ArrayList<>();
|
|
|
|
+ for (ScoreDataBean bean : queryResp.getScoreList()) {
|
|
|
|
+ OuterScoreDataBean score = new OuterScoreDataBean();
|
|
|
|
+ score.setCourseCode(bean.getCourseCode());
|
|
|
|
+ score.setCourseName(bean.getCourseName());
|
|
|
|
+ score.setStartTime(bean.getStartTime());
|
|
|
|
+ score.setEndTime(bean.getEndTime());
|
|
|
|
+ score.setExamRecordDataId(bean.getExamRecordDataId());
|
|
|
|
+ score.setIdentityNumber(bean.getIdentityNumber());
|
|
|
|
+ score.setStudentCode(bean.getStudentCode());
|
|
|
|
+ score.setStudentName(bean.getStudentName());
|
|
|
|
+ score.setIsIllegality(bean.getIsIllegality());
|
|
|
|
+ score.setIsWarn(bean.getIsWarn());
|
|
|
|
+ score.setIsAudit(bean.getIsAudit());
|
|
|
|
+ score.setTotalScore(bean.getTotalScore());
|
|
|
|
+ scoreList.add(score);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ OuterQueryScoreListResp resp = new OuterQueryScoreListResp();
|
|
|
|
+ resp.setTotalElements(queryResp.getTotalElements());
|
|
|
|
+ resp.setTotalPages(queryResp.getTotalPages());
|
|
|
|
+ resp.setScoreList(scoreList);
|
|
|
|
+ return resp;
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|