he2802 2 vuotta sitten
vanhempi
commit
2c3db63ab2

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/ExamAddBo.java

@@ -76,7 +76,7 @@ public class ExamAddBo {
     @ApiModelProperty("做卷类型  1练习 2考试")
     private Integer doType;
     /** 模拟考配置参数 */
-    private ExamSimulateConfigBo simulateConfig;
+    private ExamSimulateConfigBo simulateConfigJson;
     /** 开启模拟考 1启动(考试类型才能启动) 0关闭 */
     private Integer simulateStatus;
 }

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/ExamEditBo.java

@@ -96,7 +96,7 @@ public class ExamEditBo {
     private Integer doType;
 
     /** 模拟考配置参数 */
-    private ExamSimulateConfigBo simulateConfig;
+    private ExamSimulateConfigBo simulateConfigJson;
     /** 开启模拟考 1启动(考试类型才能启动) 0关闭 */
     private Integer simulateStatus;
 }

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/ExamSimulateTypeBo.java

@@ -14,7 +14,7 @@ public class ExamSimulateTypeBo {
 
     /**  取题数 */
     @ApiModelProperty("取题数")
-    private Integer qNum;
+    private Integer qnum;
 
     /**  顺序数 */
     @ApiModelProperty("顺序数 0-3 0不开启 1-3启动")
@@ -28,6 +28,6 @@ public class ExamSimulateTypeBo {
     private List<Long> knowledIds;
 
     @ApiModelProperty("知识点取题数")
-    private Integer kNum;
+    private Integer knum;
 
 }

+ 8 - 6
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/ExamServiceImpl.java

@@ -132,6 +132,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
     @Transactional(rollbackFor = Exception.class)
     public ExamVo insertByAddBo(ExamAddBo bo) {
         Exam add = BeanUtil.toBean(bo, Exam.class);
+        add.setSimulateConfig(bo.getSimulateConfigJson());
         add.setCode(ServletUtils.getEncoded("SJ"));
         validEntityBeforeSave(add);
         add.setCreateTime(DateUtils.getNowTime());
@@ -182,6 +183,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
             throw new CustomException("试卷ID缺失");
         }
         Exam update = BeanUtil.toBean(bo, Exam.class);
+        update.setSimulateConfig(bo.getSimulateConfigJson());
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
         if(bo.getQuestionList()!=null){
@@ -243,22 +245,22 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
             }
         }
         if(Validator.isNotEmpty(entity.getSimulateConfig())){
-            Integer q1 = entity.getSimulateConfig().getSingleChoice().getQNum();
-            Integer q2 = entity.getSimulateConfig().getMultipleChoice().getQNum();
-            Integer q3 = entity.getSimulateConfig().getCaseQuestion().getQNum();
-            if((q1>0)&&(q1<entity.getSimulateConfig().getSingleChoice().getKNum())){
+            Integer q1 = entity.getSimulateConfig().getSingleChoice().getQnum();
+            Integer q2 = entity.getSimulateConfig().getMultipleChoice().getQnum();
+            Integer q3 = entity.getSimulateConfig().getCaseQuestion().getQnum();
+            if((q1>0)&&(q1<entity.getSimulateConfig().getSingleChoice().getKnum())){
                 throw new CustomException("模拟配置单选题参数错误");
             }
             if(entity.getSimulateConfig().getSingleChoice().getOrderNum()>3){
                 throw new CustomException("模拟配置单选题参数错误");
             }
-            if((q2>0)&&(q2<entity.getSimulateConfig().getMultipleChoice().getKNum())){
+            if((q2>0)&&(q2<entity.getSimulateConfig().getMultipleChoice().getKnum())){
                 throw new CustomException("模拟配置多选题参数错误");
             }
             if(entity.getSimulateConfig().getMultipleChoice().getOrderNum()>3){
                 throw new CustomException("模拟配置多选题参数错误");
             }
-            if((q3>0)&&(q3<entity.getSimulateConfig().getCaseQuestion().getKNum())){
+            if((q3>0)&&(q3<entity.getSimulateConfig().getCaseQuestion().getKnum())){
                 throw new CustomException("模拟配置案例题参数错误");
             }
             if(entity.getSimulateConfig().getCaseQuestion().getOrderNum()>3){