|
@@ -56,6 +56,11 @@ public class CollationLabelController extends BaseExamController {
|
|
|
addMessage(redirectAttributes, "名称不能为空");
|
|
|
return "redirect:/admin/exam/collationLabel/add?examId=" + examId;
|
|
|
}
|
|
|
+ CollationLabel old = collationLabelService.find(examId,collationLabel.getCode());
|
|
|
+ if(old!=null){
|
|
|
+ addMessage(redirectAttributes, "代码已存在");
|
|
|
+ return "redirect:/admin/exam/collationLabel/add?examId=" + examId;
|
|
|
+ }
|
|
|
collationLabel.setExamId(examId);
|
|
|
collationLabel.setUpdateTime(new Date());
|
|
|
collationLabel = collationLabelService.save(collationLabel);
|