|
@@ -9,11 +9,16 @@ import cn.com.qmth.examcloud.examwork.api.ExamCloudService;
|
|
|
import cn.com.qmth.examcloud.examwork.api.bean.ExamBean;
|
|
|
import cn.com.qmth.examcloud.examwork.api.request.GetExamReq;
|
|
|
import cn.com.qmth.examcloud.examwork.api.response.GetExamResp;
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.ExamQuestionOuterService;
|
|
|
import cn.com.qmth.examcloud.exchange.outer.api.ScoreQueueService;
|
|
|
import cn.com.qmth.examcloud.exchange.outer.api.request.OuterDeleteScoreQueueTopReq;
|
|
|
import cn.com.qmth.examcloud.exchange.outer.api.request.OuterGetScoreQueueTopReq;
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.request.OuterGetSubjectivePaperStructReq;
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.request.OuterGetSubjectiveQuestionReq;
|
|
|
import cn.com.qmth.examcloud.exchange.outer.api.response.OuterDeleteScoreQueueTopResp;
|
|
|
import cn.com.qmth.examcloud.exchange.outer.api.response.OuterGetScoreQueueTopResp;
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.response.OuterGetSubjectivePaperStructResp;
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.response.OuterGetSubjectiveQuestionResp;
|
|
|
import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
|
import cn.com.qmth.examcloud.web.support.StatusResponse;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -33,85 +38,32 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
*/
|
|
|
@Api("考试作答服务")
|
|
|
@RestController
|
|
|
-@RequestMapping("${$rmp.cloud.exchange.outer}/scoreQueue")
|
|
|
-public class ExamQuestionOuterServiceProvider extends ControllerSupport implements ScoreQueueService {
|
|
|
+@RequestMapping("${$rmp.cloud.exchange.outer}/question")
|
|
|
+public class ExamQuestionOuterServiceProvider extends ControllerSupport implements ExamQuestionOuterService {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 7607495598308348018L;
|
|
|
|
|
|
/**
|
|
|
+ * 获取主观题试卷结构
|
|
|
*
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
*/
|
|
|
- private static final long serialVersionUID = -7975687672489564748L;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ExamScoreObtainQueueCloudService examScoreObtainQueueCloudService;
|
|
|
- @Autowired
|
|
|
- private ExamCloudService examCloudService;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- @ApiOperation(value = "取队列最顶层记录", httpMethod = "POST")
|
|
|
+ @ApiOperation(value = "获取主观题试卷结构", httpMethod = "POST")
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = OuterGetScoreQueueTopResp.class),
|
|
|
@ApiResponse(code = 500, message = "系统异常(异常信息见响应体)", response = StatusResponse.class)})
|
|
|
- @PostMapping("/getScoreQueueTop")
|
|
|
+ @PostMapping("/getSubjectivePaperStruct")
|
|
|
@Override
|
|
|
- public OuterGetScoreQueueTopResp getScoreQueueTop(@RequestBody OuterGetScoreQueueTopReq req) {
|
|
|
- if (!getEnterpriseRootOrgId().equals(req.getRootOrgId())) {
|
|
|
- throw new StatusException("1000001", "rootOrgId is wrong");
|
|
|
- }
|
|
|
- GetTopExamScoreQueueReq getTopExamScoreQueueReq = new GetTopExamScoreQueueReq();
|
|
|
- getTopExamScoreQueueReq.setRootOrgId(req.getRootOrgId());
|
|
|
- GetTopExamScoreQueueResp getTopExamScoreQueueResp = examScoreObtainQueueCloudService.getTopExamScoreQueue(getTopExamScoreQueueReq);
|
|
|
- OuterGetScoreQueueTopResp resp = new OuterGetScoreQueueTopResp();
|
|
|
-
|
|
|
- //返回值不为空数据
|
|
|
- if(!getTopExamScoreQueueResp.getIsEmpty()){
|
|
|
- resp.setQueueId(getTopExamScoreQueueResp.getQueueId());
|
|
|
- resp.setExamRecordDataId(getTopExamScoreQueueResp.getExamRecordDataId());
|
|
|
- Long examId=getTopExamScoreQueueResp.getExamId();
|
|
|
- GetExamReq getExamReq=new GetExamReq();
|
|
|
- getExamReq.setId(examId);
|
|
|
- //获取考试详情
|
|
|
- GetExamResp getExamResp = examCloudService.getExam(getExamReq);
|
|
|
- if(getExamResp!=null) {
|
|
|
- resp.setExamId(examId);//考试id
|
|
|
- ExamBean examBean = getExamResp.getExamBean();
|
|
|
- if(examBean!=null) {
|
|
|
- //需求调整201911216:code和name都返回为code
|
|
|
- resp.setExamCode(examBean.getCode());
|
|
|
- resp.setExamName(examBean.getCode());
|
|
|
- }
|
|
|
- }
|
|
|
- resp.setIsEmpty(false);//返回的为非空数据
|
|
|
- }else {
|
|
|
- resp.setIsEmpty(true);//返回的为空数据
|
|
|
- }
|
|
|
- return resp;
|
|
|
+ public OuterGetSubjectivePaperStructResp getSubjectivePaperStruct(OuterGetSubjectivePaperStructReq req) {
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "删除队列最顶层记录", httpMethod = "POST")
|
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "成功", response = OuterDeleteScoreQueueTopResp.class),
|
|
|
+ @ApiOperation(value = "获取主观题作答结果", httpMethod = "POST")
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "成功", response = OuterGetScoreQueueTopResp.class),
|
|
|
@ApiResponse(code = 500, message = "系统异常(异常信息见响应体)", response = StatusResponse.class)})
|
|
|
- @PostMapping("/deleteScoreQueueTop")
|
|
|
+ @PostMapping("/getSubjectiveQuestion")
|
|
|
@Override
|
|
|
- public OuterDeleteScoreQueueTopResp deleteScoreQueueTop(@RequestBody OuterDeleteScoreQueueTopReq req) {
|
|
|
- if (!getEnterpriseRootOrgId().equals(req.getRootOrgId())) {
|
|
|
- throw new StatusException("1000001", "rootOrgId is wrong");
|
|
|
- }
|
|
|
- GetTopExamScoreQueueReq getTopExamScoreQueueReq = new GetTopExamScoreQueueReq();
|
|
|
- getTopExamScoreQueueReq.setRootOrgId(req.getRootOrgId());
|
|
|
- GetTopExamScoreQueueResp getTopExamScoreQueueResp = examScoreObtainQueueCloudService.getTopExamScoreQueue(getTopExamScoreQueueReq);
|
|
|
-
|
|
|
- if(getTopExamScoreQueueResp.getQueueId()==null || (getTopExamScoreQueueResp.getQueueId()!=null && !getTopExamScoreQueueResp.getQueueId().equals(req.getQueueId()))){
|
|
|
- throw new StatusException("1000003", "queueId is wrong");
|
|
|
- }
|
|
|
-
|
|
|
- DeleteExamScoreQueueReq deleteExamScoreQueueReq = new DeleteExamScoreQueueReq();
|
|
|
- deleteExamScoreQueueReq.setQueueId(req.getQueueId());
|
|
|
- deleteExamScoreQueueReq.setRootOrgId(req.getRootOrgId());
|
|
|
- examScoreObtainQueueCloudService.deleteExamScoreQueue(deleteExamScoreQueueReq);
|
|
|
- OuterDeleteScoreQueueTopResp resp = new OuterDeleteScoreQueueTopResp();
|
|
|
- resp.setIsSuccess(true);
|
|
|
- resp.setDesc("删除成功");
|
|
|
- return resp;
|
|
|
+ public OuterGetSubjectiveQuestionResp getSubjectiveQuestion(OuterGetSubjectiveQuestionReq req) {
|
|
|
+ return null;
|
|
|
}
|
|
|
-
|
|
|
}
|