|
@@ -113,7 +113,6 @@ import io.swagger.annotations.ApiOperation;
|
|
* @date 2018年8月17日
|
|
* @date 2018年8月17日
|
|
* @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
|
|
* @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
|
|
*/
|
|
*/
|
|
-@Transactional
|
|
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("${$rmp.ctr.examwork}/exam")
|
|
@RequestMapping("${$rmp.ctr.examwork}/exam")
|
|
public class ExamController extends ControllerSupport {
|
|
public class ExamController extends ControllerSupport {
|
|
@@ -510,6 +509,7 @@ public class ExamController extends ControllerSupport {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "新增考试批次", notes = "新增")
|
|
@ApiOperation(value = "新增考试批次", notes = "新增")
|
|
@PostMapping()
|
|
@PostMapping()
|
|
|
|
+ @Transactional
|
|
public ExamEntity addExam(@RequestBody ExamDomain domain) {
|
|
public ExamEntity addExam(@RequestBody ExamDomain domain) {
|
|
return saveExam(domain, CURD.CREATION);
|
|
return saveExam(domain, CURD.CREATION);
|
|
}
|
|
}
|
|
@@ -523,6 +523,7 @@ public class ExamController extends ControllerSupport {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "更新考试批次", notes = "更新")
|
|
@ApiOperation(value = "更新考试批次", notes = "更新")
|
|
@PutMapping()
|
|
@PutMapping()
|
|
|
|
+ @Transactional
|
|
public ExamEntity updateExam(@RequestBody ExamDomain domain) {
|
|
public ExamEntity updateExam(@RequestBody ExamDomain domain) {
|
|
return saveExam(domain, CURD.UPDATE);
|
|
return saveExam(domain, CURD.UPDATE);
|
|
}
|
|
}
|
|
@@ -567,6 +568,7 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "复制考试批次", notes = "")
|
|
@ApiOperation(value = "复制考试批次", notes = "")
|
|
@PostMapping("copyExam")
|
|
@PostMapping("copyExam")
|
|
|
|
+ @Transactional
|
|
public void copyExam(@RequestBody CopyExamDomain domain) {
|
|
public void copyExam(@RequestBody CopyExamDomain domain) {
|
|
|
|
|
|
Long srcExamId = domain.getSrcExamId();
|
|
Long srcExamId = domain.getSrcExamId();
|
|
@@ -811,6 +813,7 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "启用考试", notes = "启用考试")
|
|
@ApiOperation(value = "启用考试", notes = "启用考试")
|
|
@PutMapping("enable/{ids}")
|
|
@PutMapping("enable/{ids}")
|
|
|
|
+ @Transactional
|
|
public void enableUser(@PathVariable String ids) {
|
|
public void enableUser(@PathVariable String ids) {
|
|
List<Long> examIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
List<Long> examIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
@@ -852,6 +855,7 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "禁用考试", notes = "禁用考试")
|
|
@ApiOperation(value = "禁用考试", notes = "禁用考试")
|
|
@PutMapping("disable/{ids}")
|
|
@PutMapping("disable/{ids}")
|
|
|
|
+ @Transactional
|
|
public void disableUser(@PathVariable String ids) {
|
|
public void disableUser(@PathVariable String ids) {
|
|
List<Long> examIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
List<Long> examIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
@@ -986,6 +990,7 @@ public class ExamController extends ControllerSupport {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "新增考试相关的学习中心设置", notes = "")
|
|
@ApiOperation(value = "新增考试相关的学习中心设置", notes = "")
|
|
@PostMapping("examOrgSettings")
|
|
@PostMapping("examOrgSettings")
|
|
|
|
+ @Transactional
|
|
public ExamSpecialSettingsEntity addExamOrgSettings(@RequestBody ExamOrgSettingsDomain domain) {
|
|
public ExamSpecialSettingsEntity addExamOrgSettings(@RequestBody ExamOrgSettingsDomain domain) {
|
|
return saveExamOrgSettings(domain);
|
|
return saveExamOrgSettings(domain);
|
|
}
|
|
}
|
|
@@ -999,6 +1004,7 @@ public class ExamController extends ControllerSupport {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "更新考试相关的学习中心设置", notes = "")
|
|
@ApiOperation(value = "更新考试相关的学习中心设置", notes = "")
|
|
@PutMapping("examOrgSettings")
|
|
@PutMapping("examOrgSettings")
|
|
|
|
+ @Transactional
|
|
public ExamSpecialSettingsEntity updateExamOrgSettings(
|
|
public ExamSpecialSettingsEntity updateExamOrgSettings(
|
|
@RequestBody ExamOrgSettingsDomain domain) {
|
|
@RequestBody ExamOrgSettingsDomain domain) {
|
|
return saveExamOrgSettings(domain);
|
|
return saveExamOrgSettings(domain);
|
|
@@ -1127,6 +1133,7 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "导入学习中心设置", notes = "导入")
|
|
@ApiOperation(value = "导入学习中心设置", notes = "导入")
|
|
@PostMapping("importExamOrgSettings/{examId}")
|
|
@PostMapping("importExamOrgSettings/{examId}")
|
|
|
|
+ @Transactional
|
|
public Map<String, Object> importExamOrgSettings(@PathVariable Long examId,
|
|
public Map<String, Object> importExamOrgSettings(@PathVariable Long examId,
|
|
@RequestParam CommonsMultipartFile file) {
|
|
@RequestParam CommonsMultipartFile file) {
|
|
|
|
|
|
@@ -1149,6 +1156,7 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "学习中心禁考", notes = "")
|
|
@ApiOperation(value = "学习中心禁考", notes = "")
|
|
@PutMapping("setOrgExamLimited/{ids}")
|
|
@PutMapping("setOrgExamLimited/{ids}")
|
|
|
|
+ @Transactional
|
|
public List<String> setOrgExamLimited(@PathVariable String ids) {
|
|
public List<String> setOrgExamLimited(@PathVariable String ids) {
|
|
List<Long> orgSettingsIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
List<Long> orgSettingsIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
@@ -1165,6 +1173,7 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "学习中心开考", notes = "")
|
|
@ApiOperation(value = "学习中心开考", notes = "")
|
|
@PutMapping("setOrgExamNotLimited/{ids}")
|
|
@PutMapping("setOrgExamNotLimited/{ids}")
|
|
|
|
+ @Transactional
|
|
public List<String> setOrgExamNotLimited(@PathVariable String ids) {
|
|
public List<String> setOrgExamNotLimited(@PathVariable String ids) {
|
|
List<Long> orgSettingsIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
List<Long> orgSettingsIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
@@ -1181,6 +1190,7 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "删除学习中心特殊设置", notes = "")
|
|
@ApiOperation(value = "删除学习中心特殊设置", notes = "")
|
|
@PutMapping("deleteExamOrgSettings/{ids}")
|
|
@PutMapping("deleteExamOrgSettings/{ids}")
|
|
|
|
+ @Transactional
|
|
public List<String> deleteExamOrgSettings(@PathVariable String ids) {
|
|
public List<String> deleteExamOrgSettings(@PathVariable String ids) {
|
|
List<Long> orgSettingsIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
List<Long> orgSettingsIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
@@ -1199,6 +1209,7 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "删除所有学习中心特殊设置", notes = "")
|
|
@ApiOperation(value = "删除所有学习中心特殊设置", notes = "")
|
|
@PutMapping("deleteAllExamOrgSettings/{examId}")
|
|
@PutMapping("deleteAllExamOrgSettings/{examId}")
|
|
|
|
+ @Transactional
|
|
public void deleteAllExamOrgSettings(@PathVariable Long examId) {
|
|
public void deleteAllExamOrgSettings(@PathVariable Long examId) {
|
|
|
|
|
|
ExamEntity exam = GlobalHelper.getPresentEntity(examRepo, examId, ExamEntity.class);
|
|
ExamEntity exam = GlobalHelper.getPresentEntity(examRepo, examId, ExamEntity.class);
|