|
@@ -27,6 +27,7 @@ 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 com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import io.swagger.annotations.*;
|
|
import io.swagger.annotations.*;
|
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -41,14 +42,11 @@ import java.util.List;
|
|
*
|
|
*
|
|
* @author WANGWEI
|
|
* @author WANGWEI
|
|
* @date 2018年7月2日
|
|
* @date 2018年7月2日
|
|
- * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
|
|
|
|
*/
|
|
*/
|
|
@Api(tags = "考生相关接口")
|
|
@Api(tags = "考生相关接口")
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("${$rmp.cloud.exchange.outer}/examStudent")
|
|
@RequestMapping("${$rmp.cloud.exchange.outer}/examStudent")
|
|
-public class ExamStudentOuterServiceProvider extends ControllerSupport
|
|
|
|
- implements
|
|
|
|
- ExamStudentOuterService {
|
|
|
|
|
|
+public class ExamStudentOuterServiceProvider extends ControllerSupport implements ExamStudentOuterService {
|
|
|
|
|
|
private static final long serialVersionUID = -8252740695302763716L;
|
|
private static final long serialVersionUID = -8252740695302763716L;
|
|
|
|
|
|
@@ -144,6 +142,15 @@ public class ExamStudentOuterServiceProvider extends ControllerSupport
|
|
throw new StatusException("1000001", "rootOrgId is wrong");
|
|
throw new StatusException("1000001", "rootOrgId is wrong");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ List<ExamStudent4BatchBean> examStudentList = req.getExamStudentList();
|
|
|
|
+ if (CollectionUtils.isEmpty(examStudentList)) {
|
|
|
|
+ throw new StatusException("1000001", "考生信息列表为空!");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (examStudentList.size() > 100) {
|
|
|
|
+ throw new StatusException("1000001", "考生信息列表,条数限制每次100条内!");
|
|
|
|
+ }
|
|
|
|
+
|
|
Long examId = req.getExamId();
|
|
Long examId = req.getExamId();
|
|
String examCode = req.getExamCode();
|
|
String examCode = req.getExamCode();
|
|
String examName = req.getExamName();
|
|
String examName = req.getExamName();
|
|
@@ -158,8 +165,6 @@ public class ExamStudentOuterServiceProvider extends ControllerSupport
|
|
GetExamResp r = examCloudService.getExam(getExamReq);
|
|
GetExamResp r = examCloudService.getExam(getExamReq);
|
|
ExamBean examBean = r.getExamBean();
|
|
ExamBean examBean = r.getExamBean();
|
|
|
|
|
|
- List<ExamStudent4BatchBean> examStudentList = req.getExamStudentList();
|
|
|
|
-
|
|
|
|
List<ExamStudentStatus4BatchBean> successList = Lists.newArrayList();
|
|
List<ExamStudentStatus4BatchBean> successList = Lists.newArrayList();
|
|
List<ExamStudentStatus4BatchBean> failureList = Lists.newArrayList();
|
|
List<ExamStudentStatus4BatchBean> failureList = Lists.newArrayList();
|
|
|
|
|