|
@@ -23,6 +23,7 @@ import com.qmth.teachcloud.common.service.TeachcloudCommonService;
|
|
|
import com.qmth.teachcloud.common.util.Result;
|
|
|
import com.qmth.teachcloud.common.util.ResultUtil;
|
|
|
import io.swagger.annotations.*;
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@@ -33,6 +34,7 @@ import java.security.NoSuchAlgorithmException;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Objects;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 客户端接口(打印端)
|
|
@@ -400,7 +402,7 @@ public class ClientController {
|
|
|
* 重打-查询考生列表
|
|
|
*
|
|
|
* @param examDetailId 考场ID
|
|
|
- * @param studentCode 学号
|
|
|
+ * @param studentCode 学号
|
|
|
* @param studentName 学号
|
|
|
* @param courseCode 课程代码
|
|
|
*/
|
|
@@ -420,7 +422,7 @@ public class ClientController {
|
|
|
* 重打-内容查询
|
|
|
*
|
|
|
* @param examDetailId 考场ID
|
|
|
- * @param studentCode 学号
|
|
|
+ * @param studentCode 学号
|
|
|
* @param type 类型
|
|
|
*/
|
|
|
@ApiOperation(value = "重打-内容查询")
|
|
@@ -498,6 +500,12 @@ public class ClientController {
|
|
|
@Aac(strict = false, auth = false)
|
|
|
public Result list(@RequestParam(required = false) String code) {
|
|
|
List<SchoolDto> list = clientService.listSchool(code);
|
|
|
+ if (CollectionUtils.isNotEmpty(list)) {
|
|
|
+ List<SchoolDto> defaultSchools = list.stream().filter(m -> m.getDefaultSchool() != null && m.getDefaultSchool()).collect(Collectors.toList());
|
|
|
+ if (CollectionUtils.isNotEmpty(defaultSchools)) {
|
|
|
+ return ResultUtil.ok(defaultSchools);
|
|
|
+ }
|
|
|
+ }
|
|
|
return ResultUtil.ok(list);
|
|
|
}
|
|
|
|