Explorar o código

三力测试,色盲测试

zhangbin hai 1 ano
pai
achega
fe69d08cd8
Modificáronse 34 ficheiros con 2168 adicións e 10 borrados
  1. 122 0
      nbjk-admin/src/main/java/com/miaxis/app/controller/question/QuestionInfoNewController.java
  2. 118 0
      nbjk-admin/src/main/java/com/miaxis/app/controller/question/QuestionSeController.java
  3. 16 2
      nbjk-admin/src/main/java/com/miaxis/app/controller/question/ThreeForceController.java
  4. 49 0
      nbjk-admin/src/main/java/com/miaxis/open/controller/CommonQuestionInfoNewController.java
  5. 1 1
      nbjk-service/src/main/java/com/miaxis/job/AppAdJob.java
  6. 61 0
      nbjk-service/src/main/java/com/miaxis/question/domain/QuestionColumn.java
  7. 185 0
      nbjk-service/src/main/java/com/miaxis/question/domain/QuestionInfoNew.java
  8. 398 0
      nbjk-service/src/main/java/com/miaxis/question/domain/QuestionSe.java
  9. 89 0
      nbjk-service/src/main/java/com/miaxis/question/domain/TAppExamRuleNew.java
  10. 1 1
      nbjk-service/src/main/java/com/miaxis/question/dto/QuestionCollectionListDTO.java
  11. 77 0
      nbjk-service/src/main/java/com/miaxis/question/dto/QuestionInfoNewDTO.java
  12. 26 0
      nbjk-service/src/main/java/com/miaxis/question/dto/QuestionInfoNewTestDTO.java
  13. 23 0
      nbjk-service/src/main/java/com/miaxis/question/mapper/QuestionColumnMapper.java
  14. 40 0
      nbjk-service/src/main/java/com/miaxis/question/mapper/QuestionInfoNewMapper.java
  15. 23 0
      nbjk-service/src/main/java/com/miaxis/question/mapper/QuestionSeMapper.java
  16. 3 1
      nbjk-service/src/main/java/com/miaxis/question/mapper/TAppExamRuleMapper.java
  17. 22 0
      nbjk-service/src/main/java/com/miaxis/question/service/IQuestionColumnService.java
  18. 42 0
      nbjk-service/src/main/java/com/miaxis/question/service/IQuestionInfoNewService.java
  19. 23 0
      nbjk-service/src/main/java/com/miaxis/question/service/IQuestionSeService.java
  20. 4 1
      nbjk-service/src/main/java/com/miaxis/question/service/ITAppExamRuleService.java
  21. 33 0
      nbjk-service/src/main/java/com/miaxis/question/service/impl/QuestionColumnServiceImpl.java
  22. 296 0
      nbjk-service/src/main/java/com/miaxis/question/service/impl/QuestionInfoNewServiceImpl.java
  23. 42 0
      nbjk-service/src/main/java/com/miaxis/question/service/impl/QuestionSeServiceImpl.java
  24. 13 0
      nbjk-service/src/main/java/com/miaxis/question/service/impl/TAppExamRuleServiceImpl.java
  25. 3 0
      nbjk-service/src/main/java/com/miaxis/three/mapper/ThreeForceMapper.java
  26. 4 1
      nbjk-service/src/main/java/com/miaxis/three/service/IThreeForceService.java
  27. 38 0
      nbjk-service/src/main/java/com/miaxis/three/service/impl/ThreeForceServiceImpl.java
  28. 25 1
      nbjk-service/src/main/resources/mapper/question/QuestionCollectionMapper.xml
  29. 34 0
      nbjk-service/src/main/resources/mapper/question/QuestionColumnMapper.xml
  30. 184 0
      nbjk-service/src/main/resources/mapper/question/QuestionInfoNewMapper.xml
  31. 109 0
      nbjk-service/src/main/resources/mapper/question/QuestionSeMapper.xml
  32. 25 2
      nbjk-service/src/main/resources/mapper/question/QuestionWrongMapper.xml
  33. 34 0
      nbjk-service/src/main/resources/mapper/rule/TAppExamRuleMapper.xml
  34. 5 0
      nbjk-service/src/main/resources/mapper/three/ThreeForceMapper.xml

+ 122 - 0
nbjk-admin/src/main/java/com/miaxis/app/controller/question/QuestionInfoNewController.java

@@ -0,0 +1,122 @@
+package com.miaxis.app.controller.question;
+
+import com.miaxis.common.constant.Constants;
+import com.miaxis.common.core.controller.BaseController;
+import com.miaxis.common.core.domain.Response;
+import com.miaxis.common.core.page.ResponsePageInfo;
+import com.miaxis.question.domain.QuestionColumn;
+import com.miaxis.question.domain.QuestionInfo;
+import com.miaxis.question.domain.QuestionInfoNew;
+import com.miaxis.question.dto.*;
+import com.miaxis.question.service.IQuestionColumnService;
+import com.miaxis.question.service.IQuestionInfoNewService;
+import com.miaxis.question.service.IQuestionInfoService;
+import com.miaxis.question.vo.QuestionInfoDfVO;
+import com.miaxis.question.vo.QuestionInfoFlVO;
+import com.miaxis.question.vo.QuestionInfoJxVO;
+import com.miaxis.question.vo.QuestionInfoSxVO;
+import io.swagger.annotations.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 【题库】Controller
+ *
+ * @author miaxis
+ * @date 2021-10-20
+ */
+@RestController
+@RequestMapping(Constants.STUDENT_PREFIX+"/question2/info")
+@Api(tags={"【H5-新题库】"})
+public class QuestionInfoNewController extends BaseController {
+    @Autowired
+    private IQuestionInfoNewService questionInfoNewService;
+
+    @Autowired
+    private IQuestionColumnService questionColumnService;
+
+    /**
+     * 查询题库列表
+     */
+    @GetMapping("/list")
+    @ApiOperation("查询题库列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<QuestionInfoNew> list(@ModelAttribute QuestionInfoNewDTO QuestionInfoNewDTO){
+        startPage();
+        List<QuestionInfoNew> list = questionInfoNewService.selectQuestionInfoList(QuestionInfoNewDTO);
+        return toResponsePageInfo(list);
+    }
+
+
+    /**
+     * 获取题库详细信息
+     */
+    @GetMapping(value = "/{id}")
+    @ApiOperation("获取题库详细信息")
+    public Response<QuestionInfoNew> getInfo(
+            @ApiParam(name = "id", value = "题库参数", required = true)
+            @PathVariable("id") Long id
+    ){
+        return Response.success(questionInfoNewService.getById(id));
+    }
+
+    /**
+     * 获取题库详细信息多个题库
+     */
+    @PostMapping(value = "/getQuestionInfoByIds")
+    @ApiOperation("获取题库详细信息批量取题")
+    public ResponsePageInfo<QuestionInfoNew> getQuestionInfoByIds(@RequestBody QuestionInfoIdDTO idDTO){
+        List<QuestionInfoNew> list = questionInfoNewService.selectQuestionInfoListByIds(idDTO.getIds());
+        return toResponsePageInfo(list);
+    }
+
+
+
+    @GetMapping(value = "/getQuestionColumn")
+    @ApiOperation("获取题库分类")
+    public Response<List<QuestionColumn>> getQuestionColumn(@ModelAttribute QuestionColumn questionColumn){
+        List<QuestionColumn> list = questionColumnService.selectQuestionColumnList(questionColumn);
+        return Response.success(list);
+    }
+
+
+
+    /**
+     * 查询秘密卷
+     */
+    @GetMapping("/selectMiQuestionInfoList")
+    @ApiOperation("查询秘密卷")
+    public ResponsePageInfo<QuestionInfoNew> selectMiQuestionInfoList(@ModelAttribute QuestionInfoMiDTO questionInfoMiDTO){
+        List<QuestionInfoNew> list = questionInfoNewService.selectMiQuestionInfoList(questionInfoMiDTO);
+        return toResponsePageInfo(list);
+    }
+
+    /**
+     * 查询模拟考试科目1与4题库
+     */
+    @GetMapping("/selectTestK14QuestionInfoList")
+    @ApiOperation("取模拟考试题库")
+    public ResponsePageInfo<QuestionInfoNew> selectTestK14QuestionInfoList(@ModelAttribute QuestionInfoNewTestDTO questionInfoTestDTO){
+        List<QuestionInfoNew> list = questionInfoNewService.selectTestK14QuestionInfoList(questionInfoTestDTO);
+        return toResponsePageInfo(list);
+    }
+
+    /**
+     * 查询免费题库
+     */
+    @GetMapping("/selectFreeQuestionInfo")
+    @ApiOperation("查询免费题库")
+    public ResponsePageInfo<QuestionInfoNew> selectFreeQuestionInfo(@ModelAttribute QuestionInfoFreeDTO questionInfoFreeDTO){
+        List<QuestionInfoNew> list = questionInfoNewService.selectFreeQuestionInfo(questionInfoFreeDTO);
+        return toResponsePageInfo(list);
+    }
+
+
+
+}
+

+ 118 - 0
nbjk-admin/src/main/java/com/miaxis/app/controller/question/QuestionSeController.java

@@ -0,0 +1,118 @@
+package com.miaxis.app.controller.question;
+
+import com.miaxis.common.constant.Constants;
+import com.miaxis.common.core.controller.BaseController;
+import com.miaxis.common.core.domain.Response;
+import com.miaxis.common.core.page.ResponsePageInfo;
+import com.miaxis.question.domain.QuestionSe;
+import com.miaxis.question.service.IQuestionSeService;
+import io.swagger.annotations.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 【色盲题】Controller
+ *
+ * @author miaxis
+ * @date 2024-03-21
+ */
+@RestController
+@RequestMapping(Constants.STUDENT_PREFIX+"/question/se")
+@Api(tags={"【app-色盲题】"})
+public class QuestionSeController extends BaseController{
+    @Autowired
+    private IQuestionSeService questionSeService;
+
+    /**
+     * 查询色盲题列表
+     */
+    @GetMapping("/list")
+    @ApiOperation("查询色盲题列表")
+        @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<QuestionSe> list(@ModelAttribute QuestionSe questionSe){
+        startPage();
+        List<QuestionSe> list = questionSeService.selectQuestionSeList(questionSe);
+        return toResponsePageInfo(list);
+    }
+
+
+    /**
+     * 查询考试色盲考试题列表
+     */
+    @GetMapping("/testList")
+    @ApiOperation("查询考试色盲考试题列表")
+    public Response<List<QuestionSe>> testList(@ModelAttribute QuestionSe questionSe){
+        List<QuestionSe> list = questionSeService.selectTestQuestionSeList(questionSe);
+        return Response.success(list);
+
+    }
+
+    
+    /**
+     * 导出色盲题列表
+
+    @PreAuthorize("@ss.hasPermi('question:se:export')")
+    @Log(title = "色盲题", businessType = BusinessTypeEnum.EXPORT)
+    @GetMapping("/export")
+    @ApiOperation("导出色盲题列表Excel")
+    public Response<String> export(@ModelAttribute QuestionSe questionSe){
+        List<QuestionSe> list = questionSeService.selectQuestionSeList(questionSe);
+        ExcelUtil<QuestionSe> util = new ExcelUtil<QuestionSe>(QuestionSe.class);
+        return util.exportExcel(list, "se");
+    }
+     */
+
+    /**
+     * 获取色盲题详细信息
+     */
+    @GetMapping(value = "/{id}")
+    @ApiOperation("获取色盲题详细信息")
+    public Response<QuestionSe> getInfo(
+            @ApiParam(name = "id", value = "色盲题参数", required = true)
+            @PathVariable("id") Long id
+    ){
+        return Response.success(questionSeService.getById(id));
+    }
+
+    /**
+     * 新增色盲题
+
+    @PreAuthorize("@ss.hasPermi('question:se:add')")
+    @Log(title = "色盲题", businessType = BusinessTypeEnum.INSERT)
+    @PostMapping
+    @ApiOperation("新增色盲题")
+    public Response<Integer> add(@RequestBody QuestionSe questionSe){
+        return toResponse(questionSeService.save(questionSe) ? 1 : 0);
+    }
+     */
+    /**
+     * 修改色盲题
+
+    @PreAuthorize("@ss.hasPermi('question:se:edit')")
+    @Log(title = "色盲题", businessType = BusinessTypeEnum.UPDATE)
+    @PutMapping
+    @ApiOperation("修改色盲题")
+    public Response<Integer> edit(@RequestBody QuestionSe questionSe){
+        return toResponse(questionSeService.updateById(questionSe) ? 1 : 0);
+    }
+     */
+    /**
+     * 删除色盲题
+
+    @PreAuthorize("@ss.hasPermi('question:se:remove')")
+    @Log(title = "色盲题", businessType = BusinessTypeEnum.DELETE)
+	@DeleteMapping("/{ids}")
+    @ApiOperation("删除色盲题")
+    public  Response<Integer> remove(
+            @ApiParam(name = "ids", value = "色盲题ids参数", required = true)
+            @PathVariable Long[] ids
+    ){
+        return toResponse(questionSeService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
+    }
+     */
+}

+ 16 - 2
nbjk-admin/src/main/java/com/miaxis/app/controller/question/ThreeForceController.java

@@ -5,6 +5,7 @@ import com.miaxis.common.core.controller.BaseController;
 import com.miaxis.common.core.domain.Response;
 import com.miaxis.common.core.page.ResponsePageInfo;
 import com.miaxis.question.domain.QuestionInfo;
+import com.miaxis.question.domain.QuestionInfoNew;
 import com.miaxis.three.domain.ThreeForce;
 import com.miaxis.three.service.IThreeForceService;
 import io.swagger.annotations.*;
@@ -40,7 +41,10 @@ public class ThreeForceController extends BaseController{
         List<ThreeForce> list = threeForceService.selectThreeForceList(threeForce);
         return toResponsePageInfo(list);
     }
-    
+
+
+
+
 
     /**
      * 获取三力测试详细信息
@@ -58,11 +62,21 @@ public class ThreeForceController extends BaseController{
      * 获取三力测试模拟考题
      */
     @GetMapping("/selectTestQuestionInfoList")
-    @ApiOperation("获取三力测试模拟考题")
+    @ApiOperation("获取三力测试模拟考题(一点通)")
     public ResponsePageInfo<ThreeForce> selectTestQuestionInfoList(){
         List<ThreeForce> list = threeForceService.selectTestQuestionInfoList();
         return toResponsePageInfo(list);
     }
 
 
+    /**
+     * 获取三力测试模拟考题
+     */
+    @GetMapping("/selectTestQuestionInfoNewList")
+    @ApiOperation("获取三力测试模拟考题(KT)")
+    public ResponsePageInfo<QuestionInfoNew> selectTestQuestionInfoNewList(){
+        List<QuestionInfoNew> list = threeForceService.selectTestQuestionInfoNewList();
+        return toResponsePageInfo(list);
+    }
+
 }

+ 49 - 0
nbjk-admin/src/main/java/com/miaxis/open/controller/CommonQuestionInfoNewController.java

@@ -0,0 +1,49 @@
+package com.miaxis.open.controller;
+
+import com.miaxis.common.constant.Constants;
+import com.miaxis.common.core.controller.BaseController;
+import com.miaxis.common.core.domain.Response;
+import com.miaxis.common.core.page.ResponsePageInfo;
+import com.miaxis.question.domain.QuestionInfo;
+import com.miaxis.question.domain.QuestionInfoNew;
+import com.miaxis.question.dto.QuestionInfoNewTestDTO;
+import com.miaxis.question.dto.QuestionInfoTestDTO;
+import com.miaxis.question.service.IQuestionInfoNewService;
+import com.miaxis.question.service.IQuestionInfoService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 【题库】Controller
+ *
+ * @author miaxis
+ * @date 2021-10-20
+ */
+@RestController
+@RequestMapping(Constants.OPEN_PREFIX+"/question2/info")
+@Api(tags={"【通用-新题库】"})
+public class CommonQuestionInfoNewController extends BaseController {
+    @Autowired
+    private IQuestionInfoNewService questionInfoNewService;
+
+
+    /**
+     * 查询模拟考试科目1与4题库
+     */
+    @GetMapping("/selectTestK14QuestionInfoList")
+    @ApiOperation("取模拟考试题库-无分页")
+    public Response<List<QuestionInfoNew>> selectTestK14QuestionInfoList(@ModelAttribute QuestionInfoNewTestDTO questionInfoNewTestDTO){
+        List<QuestionInfoNew> list = questionInfoNewService.selectTestK14QuestionInfoList(questionInfoNewTestDTO);
+        return Response.success(list);
+    }
+
+
+}
+

+ 1 - 1
nbjk-service/src/main/java/com/miaxis/job/AppAdJob.java

@@ -66,7 +66,7 @@ public class AppAdJob {
     }
 
 
-    @Scheduled(cron = "0 0/5 * * * ?")
+    //@Scheduled(cron = "0 0/5 * * * ?")
     public void wxProfitsharing()  {
         log.info("--------现在开始执行每1分钟一次的微信分帐!~---------------");
 

+ 61 - 0
nbjk-service/src/main/java/com/miaxis/question/domain/QuestionColumn.java

@@ -0,0 +1,61 @@
+package com.miaxis.question.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 题库分类对象 question_column
+ *
+ * @author miaxis
+ * @date 2023-11-03
+ */
+@Data
+@TableName("question_column")
+@ApiModel(value = "QuestionColumn", description = "题库分类对象 question_column")
+public class QuestionColumn extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**  ID */
+    @TableId(value = "id")
+    @ApiModelProperty(value = " ID")
+    private Long id;
+
+    /** 列ID */
+    @Excel(name = "列ID")
+    @TableField("column_id")
+    @ApiModelProperty(value = "列ID")
+    private Integer columnId;
+
+    /** 排序 */
+    @Excel(name = "排序")
+    @TableField("sort")
+    @ApiModelProperty(value = "排序")
+    private Integer sort;
+
+    /** 车型 */
+    @Excel(name = "车型")
+    @TableField("model")
+    @ApiModelProperty(value = "车型")
+    private String model;
+
+    /** 科目类型 */
+    @Excel(name = "科目类型")
+    @TableField("subject")
+    @ApiModelProperty(value = "科目类型 k1:顺序练习 k1_2:精选必考题 k1_3:分类练习 k1_4:地方题库  k4:顺序练习  k4_2:精选必考题  k4_3:分类练习  k4_4:地方题库")
+    private String subject;
+
+    /** 分类标题 */
+    @Excel(name = "分类标题")
+    @TableField("title")
+    @ApiModelProperty(value = "分类标题")
+    private String title;
+
+
+
+}

+ 185 - 0
nbjk-service/src/main/java/com/miaxis/question/domain/QuestionInfoNew.java

@@ -0,0 +1,185 @@
+package com.miaxis.question.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 获取快通题库对象 question_info_get
+ *
+ * @author miaxis
+ * @date 2022-04-08
+ */
+@Data
+@TableName("question_info_new")
+@ApiModel(value = "QuestionInfoNew", description = "获取快通题库对象 question_info_new")
+public class QuestionInfoNew extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**  主键 */
+    @TableId(value = "id",type = IdType.INPUT)
+    @ApiModelProperty(value = " 主键")
+    private Long id;
+
+
+    /** 一点通ID */
+    @Excel(name = "一点通ID")
+    @TableField("id_ydt")
+    @ApiModelProperty(value = "一点通ID")
+    private Long idYdt;
+
+
+    /** 在所有题目中的序号 */
+    @Excel(name = "在所有题目中的序号")
+    @TableField("number")
+    @ApiModelProperty(value = "在所有题目中的序号")
+    private Long number;
+
+    /** 正确答案 */
+    @Excel(name = "正确答案")
+    @TableField("answer")
+    @ApiModelProperty(value = "正确答案")
+    private String answer;
+
+    /** 答案关键词 */
+    @Excel(name = "答案关键词")
+    @TableField("answerkeyword")
+    @ApiModelProperty(value = "答案关键词")
+    private String answerkeyword;
+
+    /** 技巧讲解图片URL */
+    @Excel(name = "技巧讲解图片URL")
+    @TableField("explain_gif")
+    @ApiModelProperty(value = "技巧讲解图片URL")
+    private String explainGif;
+
+    /** 技巧讲解说明 */
+    @Excel(name = "技巧讲解说明")
+    @TableField("explain_jq")
+    @ApiModelProperty(value = "技巧讲解说明")
+    private String explainJq;
+
+    /** 官方解释 */
+    @Excel(name = "官方解释")
+    @TableField("explain_js")
+    @ApiModelProperty(value = "官方解释")
+    private String explainJs;
+
+    /** 技巧讲解语音URL */
+    @Excel(name = "技巧讲解语音URL")
+    @TableField("explain_mp3")
+    @ApiModelProperty(value = "技巧讲解语音URL")
+    private String explainMp3;
+
+    /** 题目图片URL */
+    @Excel(name = "题目图片URL")
+    @TableField("image")
+    @ApiModelProperty(value = "题目图片URL")
+    private String image;
+
+    /** 题目图片URL2 */
+    @Excel(name = "题目图片URL2")
+    @TableField("image_ydt")
+    @ApiModelProperty(value = "题目图片URL2")
+    private String imageYdt;
+
+    /** 题目 */
+    @Excel(name = "题目")
+    @TableField("issue")
+    @ApiModelProperty(value = "题目")
+    private String issue;
+
+    /** 答案选项 */
+    @Excel(name = "答案选项")
+    @TableField("opts")
+    @ApiModelProperty(value = "答案选项")
+    private String opts;
+
+    /** 答题技巧关键词 */
+    @Excel(name = "答题技巧关键词")
+    @TableField("skillkeyword")
+    @ApiModelProperty(value = "答题技巧关键词")
+    private String skillkeyword;
+
+    /** 题目关键词 */
+    @Excel(name = "题目关键词")
+    @TableField("titlekeyword")
+    @ApiModelProperty(value = "题目关键词")
+    private String titlekeyword;
+
+    /** 读题语音URL */
+    @Excel(name = "读题语音URL")
+    @TableField("issuemp3")
+    @ApiModelProperty(value = "读题语音URL")
+    private String issuemp3;
+
+    /** 答案语音URL */
+    @Excel(name = "答案语音URL")
+    @TableField("answermp3")
+    @ApiModelProperty(value = "答案语音URL")
+    private String answermp3;
+
+    /** 读题+答案语音URL */
+    @Excel(name = "读题+答案语音URL")
+    @TableField("explainjsmp3")
+    @ApiModelProperty(value = "读题+答案语音URL")
+    private String explainjsmp3;
+
+    /** 车型 */
+    @Excel(name = "车型")
+    @TableField("model")
+    @ApiModelProperty(value = "车型")
+    private String model;
+
+    /** 本题属于哪些分类ID */
+    @Excel(name = "本题属于哪些分类ID")
+    @TableField("column_all")
+    @ApiModelProperty(value = "本题属于哪些分类ID")
+    private String columnAll;
+
+    /** 题目类型 1判断题 2选择题 3多选题 */
+    @Excel(name = "题目类型 1判断题 2选择题 3多选题")
+    @TableField("question_type")
+    @ApiModelProperty(value = "题目类型 1判断题 2选择题 3多选题")
+    private Long questionType;
+
+
+    /** 科目 */
+    @Excel(name = "科目")
+    @TableField("subject")
+    @ApiModelProperty(value = "科目")
+    private String subject;
+
+
+    /** 章节ID */
+    @Excel(name = "章节ID")
+    @TableField("chapter_id")
+    @ApiModelProperty(value = "章节ID")
+    private Long chapterId;
+
+    /** 是否新规定 0否 1是 */
+    @Excel(name = "是否新规定 0否 1是")
+    @TableField("is_new")
+    @ApiModelProperty(value = "是否新规定 0否 1是")
+    private Long isNew;
+
+    /** 难度 */
+    @Excel(name = "难度")
+    @TableField("diff_degree")
+    @ApiModelProperty(value = "难度")
+    private Long diffDegree;
+
+    /** 错误率 */
+    @Excel(name = "错误率")
+    @TableField("error_rate")
+    @ApiModelProperty(value = "错误率")
+    private Long errorRate;
+
+
+}

+ 398 - 0
nbjk-service/src/main/java/com/miaxis/question/domain/QuestionSe.java

@@ -0,0 +1,398 @@
+package com.miaxis.question.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import lombok.Data;
+/**
+ * 色盲题对象 question_se
+ *
+ * @author miaxis
+ * @date 2024-03-21
+ */
+@Data
+@TableName("question_se")
+@ApiModel(value = "QuestionSe", description = "色盲题对象 question_se")
+public class QuestionSe extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+    /**  主键 */
+    @TableId(value = "id")
+    @ApiModelProperty(value = " 主键")
+    private Long id;
+
+    /** ydtid */
+    @Excel(name = "ydtid")
+    @TableField("id_ydt")
+    @ApiModelProperty(value = "ydtid")
+    private Long idYdt;
+
+    /** 在所有题目中的序号 */
+    @Excel(name = "在所有题目中的序号")
+    @TableField("number")
+    @ApiModelProperty(value = "在所有题目中的序号")
+    private Long number;
+
+    /** 正确答案 */
+    @Excel(name = "正确答案")
+    @TableField("answer")
+    @ApiModelProperty(value = "正确答案")
+    private String answer;
+
+    /** 答案关键词 */
+    @Excel(name = "答案关键词")
+    @TableField("answerkeyword")
+    @ApiModelProperty(value = "答案关键词")
+    private String answerkeyword;
+
+    /** 技巧讲解图片URL */
+    @Excel(name = "技巧讲解图片URL")
+    @TableField("explain_gif")
+    @ApiModelProperty(value = "技巧讲解图片URL")
+    private String explainGif;
+
+    /** 技巧讲解说明 */
+    @Excel(name = "技巧讲解说明")
+    @TableField("explain_jq")
+    @ApiModelProperty(value = "技巧讲解说明")
+    private String explainJq;
+
+    /** 官方解释 */
+    @Excel(name = "官方解释")
+    @TableField("explain_js")
+    @ApiModelProperty(value = "官方解释")
+    private String explainJs;
+
+    /** 技巧讲解语音URL */
+    @Excel(name = "技巧讲解语音URL")
+    @TableField("explain_mp3")
+    @ApiModelProperty(value = "技巧讲解语音URL")
+    private String explainMp3;
+
+    /** 题目图片URL */
+    @Excel(name = "题目图片URL")
+    @TableField("image")
+    @ApiModelProperty(value = "题目图片URL")
+    private String image;
+
+    /** 题目图片URL2 */
+    @Excel(name = "题目图片URL2")
+    @TableField("image_ydt")
+    @ApiModelProperty(value = "题目图片URL2")
+    private String imageYdt;
+
+    /** 题目 */
+    @Excel(name = "题目")
+    @TableField("issue")
+    @ApiModelProperty(value = "题目")
+    private String issue;
+
+    /** 答案选项 */
+    @Excel(name = "答案选项")
+    @TableField("opts")
+    @ApiModelProperty(value = "答案选项")
+    private String opts;
+
+    /** 答题技巧关键词 */
+    @Excel(name = "答题技巧关键词")
+    @TableField("skillkeyword")
+    @ApiModelProperty(value = "答题技巧关键词")
+    private String skillkeyword;
+
+    /** 题目关键词 */
+    @Excel(name = "题目关键词")
+    @TableField("titlekeyword")
+    @ApiModelProperty(value = "题目关键词")
+    private String titlekeyword;
+
+    /** 读题语音URL */
+    @Excel(name = "读题语音URL")
+    @TableField("issuemp3")
+    @ApiModelProperty(value = "读题语音URL")
+    private String issuemp3;
+
+    /** 答案语音URL */
+    @Excel(name = "答案语音URL")
+    @TableField("answermp3")
+    @ApiModelProperty(value = "答案语音URL")
+    private String answermp3;
+
+    /** 读题+答案语音URL */
+    @Excel(name = "读题+答案语音URL")
+    @TableField("explainjsmp3")
+    @ApiModelProperty(value = "读题+答案语音URL")
+    private String explainjsmp3;
+
+    /** 车型 */
+    @Excel(name = "车型")
+    @TableField("model")
+    @ApiModelProperty(value = "车型")
+    private String model;
+
+    /** 本题属于哪些分类ID */
+    @Excel(name = "本题属于哪些分类ID")
+    @TableField("column_all")
+    @ApiModelProperty(value = "本题属于哪些分类ID")
+    private String columnAll;
+
+    /** 题目类型 1判断题 2选择题 3多选题 */
+    @Excel(name = "题目类型 1判断题 2选择题 3多选题")
+    @TableField("question_type")
+    @ApiModelProperty(value = "题目类型 1判断题 2选择题 3多选题")
+    private Long questionType;
+
+    /** 科目 */
+    @Excel(name = "科目")
+    @TableField("subject")
+    @ApiModelProperty(value = "科目")
+    private String subject;
+
+    /** 章节ID */
+    @Excel(name = "章节ID")
+    @TableField("chapter_id")
+    @ApiModelProperty(value = "章节ID")
+    private Long chapterId;
+
+    /** 是否新规定 0否 1是 */
+    @Excel(name = "是否新规定 0否 1是")
+    @TableField("is_new")
+    @ApiModelProperty(value = "是否新规定 0否 1是")
+    private Long isNew;
+
+    /** 难度 */
+    @Excel(name = "难度")
+    @TableField("diff_degree")
+    @ApiModelProperty(value = "难度")
+    private Long diffDegree;
+
+    /** 错误率 */
+    @Excel(name = "错误率")
+    @TableField("error_rate")
+    @ApiModelProperty(value = "错误率")
+    private Long errorRate;
+
+    public void setId(Long id){
+        this.id = id;
+    }
+
+    public Long getId(){
+        return id;
+    }
+    public void setIdYdt(Long idYdt){
+        this.idYdt = idYdt;
+    }
+
+    public Long getIdYdt(){
+        return idYdt;
+    }
+    public void setNumber(Long number){
+        this.number = number;
+    }
+
+    public Long getNumber(){
+        return number;
+    }
+    public void setAnswer(String answer){
+        this.answer = answer;
+    }
+
+    public String getAnswer(){
+        return answer;
+    }
+    public void setAnswerkeyword(String answerkeyword){
+        this.answerkeyword = answerkeyword;
+    }
+
+    public String getAnswerkeyword(){
+        return answerkeyword;
+    }
+    public void setExplainGif(String explainGif){
+        this.explainGif = explainGif;
+    }
+
+    public String getExplainGif(){
+        return explainGif;
+    }
+    public void setExplainJq(String explainJq){
+        this.explainJq = explainJq;
+    }
+
+    public String getExplainJq(){
+        return explainJq;
+    }
+    public void setExplainJs(String explainJs){
+        this.explainJs = explainJs;
+    }
+
+    public String getExplainJs(){
+        return explainJs;
+    }
+    public void setExplainMp3(String explainMp3){
+        this.explainMp3 = explainMp3;
+    }
+
+    public String getExplainMp3(){
+        return explainMp3;
+    }
+    public void setImage(String image){
+        this.image = image;
+    }
+
+    public String getImage(){
+        return image;
+    }
+    public void setImageYdt(String imageYdt){
+        this.imageYdt = imageYdt;
+    }
+
+    public String getImageYdt(){
+        return imageYdt;
+    }
+    public void setIssue(String issue){
+        this.issue = issue;
+    }
+
+    public String getIssue(){
+        return issue;
+    }
+    public void setOpts(String opts){
+        this.opts = opts;
+    }
+
+    public String getOpts(){
+        return opts;
+    }
+    public void setSkillkeyword(String skillkeyword){
+        this.skillkeyword = skillkeyword;
+    }
+
+    public String getSkillkeyword(){
+        return skillkeyword;
+    }
+    public void setTitlekeyword(String titlekeyword){
+        this.titlekeyword = titlekeyword;
+    }
+
+    public String getTitlekeyword(){
+        return titlekeyword;
+    }
+    public void setIssuemp3(String issuemp3){
+        this.issuemp3 = issuemp3;
+    }
+
+    public String getIssuemp3(){
+        return issuemp3;
+    }
+    public void setAnswermp3(String answermp3){
+        this.answermp3 = answermp3;
+    }
+
+    public String getAnswermp3(){
+        return answermp3;
+    }
+    public void setExplainjsmp3(String explainjsmp3){
+        this.explainjsmp3 = explainjsmp3;
+    }
+
+    public String getExplainjsmp3(){
+        return explainjsmp3;
+    }
+    public void setModel(String model){
+        this.model = model;
+    }
+
+    public String getModel(){
+        return model;
+    }
+    public void setColumnAll(String columnAll){
+        this.columnAll = columnAll;
+    }
+
+    public String getColumnAll(){
+        return columnAll;
+    }
+    public void setQuestionType(Long questionType){
+        this.questionType = questionType;
+    }
+
+    public Long getQuestionType(){
+        return questionType;
+    }
+    public void setSubject(String subject){
+        this.subject = subject;
+    }
+
+    public String getSubject(){
+        return subject;
+    }
+    public void setChapterId(Long chapterId){
+        this.chapterId = chapterId;
+    }
+
+    public Long getChapterId(){
+        return chapterId;
+    }
+    public void setIsNew(Long isNew){
+        this.isNew = isNew;
+    }
+
+    public Long getIsNew(){
+        return isNew;
+    }
+    public void setDiffDegree(Long diffDegree){
+        this.diffDegree = diffDegree;
+    }
+
+    public Long getDiffDegree(){
+        return diffDegree;
+    }
+    public void setErrorRate(Long errorRate){
+        this.errorRate = errorRate;
+    }
+
+    public Long getErrorRate(){
+        return errorRate;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("idYdt", getIdYdt())
+            .append("number", getNumber())
+            .append("answer", getAnswer())
+            .append("answerkeyword", getAnswerkeyword())
+            .append("explainGif", getExplainGif())
+            .append("explainJq", getExplainJq())
+            .append("explainJs", getExplainJs())
+            .append("explainMp3", getExplainMp3())
+            .append("image", getImage())
+            .append("imageYdt", getImageYdt())
+            .append("issue", getIssue())
+            .append("opts", getOpts())
+            .append("skillkeyword", getSkillkeyword())
+            .append("titlekeyword", getTitlekeyword())
+            .append("issuemp3", getIssuemp3())
+            .append("answermp3", getAnswermp3())
+            .append("explainjsmp3", getExplainjsmp3())
+            .append("model", getModel())
+            .append("columnAll", getColumnAll())
+            .append("questionType", getQuestionType())
+            .append("subject", getSubject())
+            .append("chapterId", getChapterId())
+            .append("isNew", getIsNew())
+            .append("diffDegree", getDiffDegree())
+            .append("errorRate", getErrorRate())
+            .append("createTime", getCreateTime())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 89 - 0
nbjk-service/src/main/java/com/miaxis/question/domain/TAppExamRuleNew.java

@@ -0,0 +1,89 @@
+package com.miaxis.question.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 考试取题对象 t_app_exam_rule
+ *
+ * @author miaxis
+ * @date 2022-05-23
+ */
+@Data
+@TableName("t_app_exam_rule_new")
+@ApiModel(value = "TAppExamRuleNew", description = "考试取题对象 t_app_exam_rule_new")
+public class TAppExamRuleNew extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    @TableField("id")
+    @ApiModelProperty(value = "$column.columnComment")
+    private Long id;
+
+    /** 车型 */
+    @Excel(name = "车型")
+    @TableField("gs")
+    @ApiModelProperty(value = "车型")
+    private String gs;
+
+    /** 科目 */
+    @Excel(name = "科目")
+    @TableField("kemu")
+    @ApiModelProperty(value = "科目")
+    private Integer kemu;
+
+    /** 章节ID */
+    @Excel(name = "章节ID")
+    @TableField("chapter_id")
+    @ApiModelProperty(value = "章节ID")
+    private Integer chapterId;
+
+    /** 总题库 */
+    @Excel(name = "总题库")
+    @TableField("total_count")
+    @ApiModelProperty(value = "总题库")
+    private Integer totalCount;
+
+    /** 判断题数 */
+    @Excel(name = "判断题数")
+    @TableField("judge_count")
+    @ApiModelProperty(value = "判断题数")
+    private Integer judgeCount;
+
+    /** 选择题数 */
+    @Excel(name = "选择题数")
+    @TableField("choice_count")
+    @ApiModelProperty(value = "选择题数")
+    private Integer choiceCount;
+
+    /** 多择题数 */
+    @Excel(name = "多择题数")
+    @TableField("multiple_choice_count")
+    @ApiModelProperty(value = "多择题数")
+    private Integer multipleChoiceCount;
+
+    /** 困难题数 */
+    @Excel(name = "困难题数")
+    @TableField("difficult_count")
+    @ApiModelProperty(value = "困难题数")
+    private Integer difficultCount;
+
+    /** 地区编号 */
+    @Excel(name = "地区编号")
+    @TableField("areacode")
+    @ApiModelProperty(value = "地区编号")
+    private Integer areacode;
+
+    /** 城市ID */
+    @Excel(name = "城市ID")
+    @TableField("city_id")
+    @ApiModelProperty(value = "城市ID")
+    private Integer cityId;
+
+
+}

+ 1 - 1
nbjk-service/src/main/java/com/miaxis/question/dto/QuestionCollectionListDTO.java

@@ -24,7 +24,7 @@ public class QuestionCollectionListDTO  {
 
 
     /** 科目 */
-    @ApiModelProperty(value = "考试科目(1、2、3、4)")
+    @ApiModelProperty(value = "考试科目(1、2、3、4、9)")
     private Integer km;
 
 }

+ 77 - 0
nbjk-service/src/main/java/com/miaxis/question/dto/QuestionInfoNewDTO.java

@@ -0,0 +1,77 @@
+package com.miaxis.question.dto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 题库对象 question_info
+ *
+ * @author miaxis
+ * @date 2021-10-20
+ */
+@Data
+@ApiModel(value = "QuestionInfoNewDTO", description = "输入对象")
+public class QuestionInfoNewDTO  {
+    private static final long serialVersionUID = 1L;
+
+    /**  主键 */
+    @ApiModelProperty(value = " 主键")
+    private Long id;
+
+    /** 在所有题目中的序号 */
+    @ApiModelProperty(value = "在所有题目中的序号")
+    private Long number;
+
+    /** 正确答案 */
+    @ApiModelProperty(value = "正确答案")
+    private String answer;
+
+
+    /** 题目 */
+    @ApiModelProperty(value = "题目")
+    private String issue;
+
+    /** 答案选项 */
+    @ApiModelProperty(value = "答案选项")
+    private String opts;
+
+
+    /** 题目类型 */
+    @ApiModelProperty(value = "题目类型 1判断,2选择,3多选")
+    private Integer questionType;
+
+
+    /** 科目 */
+    @ApiModelProperty(value = "科目: 科目一:1;  科目二:2; 科目三:3;  科目四:4;  三力测试:9")
+    private String subject;
+
+    /** 车型 */
+    @ApiModelProperty(value = "车型 小车:cart;客车:bus;货车:truck; 摩托车:mtc")
+    private String model;
+
+    /** 分类 */
+    @ApiModelProperty(value = "分类")
+    private String columnAll;
+
+    /** 章节ID  */
+    @ApiModelProperty(value = "章节ID")
+    private Integer chapterId;
+
+    /**
+     * 难度等级1-5
+     */
+    @ApiModelProperty(value = "分类字段名",hidden = true)
+    private String diffDegree;
+
+
+    /**
+     * 是否是新规题
+     */
+    @ApiModelProperty(value = "是否是新规题 0否 1是",hidden = true)
+    private Integer isNew;
+
+
+}

+ 26 - 0
nbjk-service/src/main/java/com/miaxis/question/dto/QuestionInfoNewTestDTO.java

@@ -0,0 +1,26 @@
+package com.miaxis.question.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 模拟考试输入对象
+ * @author miaxis
+ * @date 2021-10-20
+ */
+@Data
+@ApiModel(value = "QuestionInfoNewTestDTO", description = "模拟考试输入对象")
+public class QuestionInfoNewTestDTO {
+    private static final long serialVersionUID = 1L;
+
+
+    @ApiModelProperty(value = "科目 科目一:1; 科目一:4")
+    private Integer subject;
+
+    @ApiModelProperty(value = "取题车型 小车:cart;客车:bus;货车:truck; 摩托车:mtc")
+    private String model;
+
+
+
+}

+ 23 - 0
nbjk-service/src/main/java/com/miaxis/question/mapper/QuestionColumnMapper.java

@@ -0,0 +1,23 @@
+package com.miaxis.question.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.question.domain.QuestionColumn;
+
+import java.util.List;
+
+/**
+ * 题库分类Mapper接口
+ *
+ * @author miaxis
+ * @date 2023-11-03
+ */
+public interface QuestionColumnMapper extends BaseMapper<QuestionColumn> {
+    /**
+     * 查询题库分类列表
+     *
+     * @param questionColumn 题库分类
+     * @return 题库分类集合
+     */
+    List<QuestionColumn> selectQuestionColumnList(QuestionColumn questionColumn);
+
+}

+ 40 - 0
nbjk-service/src/main/java/com/miaxis/question/mapper/QuestionInfoNewMapper.java

@@ -0,0 +1,40 @@
+package com.miaxis.question.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.question.domain.QuestionInfoNew;
+import com.miaxis.question.dto.QuestionInfoFreeDTO;
+import com.miaxis.question.dto.QuestionInfoMiDTO;
+import com.miaxis.question.dto.QuestionInfoNewDTO;
+import com.miaxis.question.dto.QuestionInfoNewTestDTO;
+
+import java.util.List;
+
+/**
+ * 获取快通题库Mapper接口
+ *
+ * @author miaxis
+ * @date 2023-11-03
+ */
+public interface QuestionInfoNewMapper extends BaseMapper<QuestionInfoNew> {
+    /**
+     * 查询获取快通题库列表
+     *
+     * @param questionInfoNew 获取快通题库
+     * @return 获取快通题库集合
+     */
+    List<QuestionInfoNew> selectQuestionInfoNewList(QuestionInfoNew questionInfoNew);
+
+    int selectQuestionInfoNewCount(QuestionInfoNew questionInfoNew);
+
+    List<QuestionInfoNew> selectTestK14QuestionInfoList(String sql);
+
+    List<QuestionInfoNew> selectFreeQuestionInfoList(QuestionInfoFreeDTO freeDTO);
+
+    List<QuestionInfoNew> selectQuestionInfoList(QuestionInfoNewDTO questionInfoNewDTO);
+
+    List<QuestionInfoNew> selectNormalQuestionInfoList(QuestionInfoNewDTO questionInfoNewDTO);
+
+    List<QuestionInfoNew> selectQuestionInfoListByIds(Long[] ids);
+
+    List<QuestionInfoNew> selectMiQuestionInfoList(QuestionInfoMiDTO questionInfoMiDTO);
+}

+ 23 - 0
nbjk-service/src/main/java/com/miaxis/question/mapper/QuestionSeMapper.java

@@ -0,0 +1,23 @@
+package com.miaxis.question.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.question.domain.QuestionSe;
+
+/**
+ * 色盲题Mapper接口
+ *
+ * @author miaxis
+ * @date 2024-03-21
+ */
+public interface QuestionSeMapper extends BaseMapper<QuestionSe> {
+    /**
+     * 查询色盲题列表
+     *
+     * @param questionSe 色盲题
+     * @return 色盲题集合
+     */
+    List<QuestionSe> selectQuestionSeList(QuestionSe questionSe);
+
+    List<QuestionSe> selectTestQuestionSeList(QuestionSe questionSe);
+}

+ 3 - 1
nbjk-service/src/main/java/com/miaxis/question/mapper/TAppExamRuleMapper.java

@@ -2,6 +2,7 @@ package com.miaxis.question.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.miaxis.question.domain.TAppExamRule;
+import com.miaxis.question.domain.TAppExamRuleNew;
 
 import java.util.List;
 
@@ -18,6 +19,7 @@ public interface TAppExamRuleMapper extends BaseMapper<TAppExamRule> {
      * @param tAppExamRule 考试取题
      * @return 考试取题集合
      */
-    public List<TAppExamRule> selectTAppExamRuleList(TAppExamRule tAppExamRule);
+    List<TAppExamRule> selectTAppExamRuleList(TAppExamRule tAppExamRule);
 
+    List<TAppExamRuleNew> selectTAppExamRuleNewList(TAppExamRuleNew tAppExamRuleNew);
 }

+ 22 - 0
nbjk-service/src/main/java/com/miaxis/question/service/IQuestionColumnService.java

@@ -0,0 +1,22 @@
+package com.miaxis.question.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.miaxis.question.domain.QuestionColumn;
+
+import java.util.List;
+
+/**
+ * 题库分类Service接口
+ *
+ * @author miaxis
+ * @date 2023-11-03
+ */
+public interface IQuestionColumnService extends IService<QuestionColumn>{
+    /**
+     * 查询题库分类列表
+     *
+     * @param questionColumn 题库分类
+     * @return 题库分类集合
+     */
+    List<QuestionColumn> selectQuestionColumnList(QuestionColumn questionColumn);
+}

+ 42 - 0
nbjk-service/src/main/java/com/miaxis/question/service/IQuestionInfoNewService.java

@@ -0,0 +1,42 @@
+package com.miaxis.question.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.miaxis.question.domain.QuestionInfoNew;
+import com.miaxis.question.dto.QuestionInfoFreeDTO;
+import com.miaxis.question.dto.QuestionInfoMiDTO;
+import com.miaxis.question.dto.QuestionInfoNewDTO;
+import com.miaxis.question.dto.QuestionInfoNewTestDTO;
+
+import java.util.List;
+
+/**
+ * 获取快通题库Service接口
+ *
+ * @author miaxis
+ * @date 2023-11-03
+ */
+public interface IQuestionInfoNewService extends IService<QuestionInfoNew>{
+    /**
+     * 查询获取快通题库列表
+     *
+     * @param questionInfoNew 获取快通题库
+     * @return 获取快通题库集合
+     */
+    List<QuestionInfoNew> selectQuestionInfoNewList(QuestionInfoNew questionInfoNew);
+
+    int selectQuestionInfoNewCount(QuestionInfoNew questionInfoNew);
+
+    List<QuestionInfoNew> selectTestK14QuestionInfoList(QuestionInfoNewTestDTO questionInfoNewTestDTO);
+
+    List<QuestionInfoNew> selectTestK14QuestionInfoList2(QuestionInfoNewTestDTO questionInfoNewTestDTO);
+
+    List<QuestionInfoNew> selectFreeQuestionInfo(QuestionInfoFreeDTO freeDTO);
+
+    List<QuestionInfoNew> selectQuestionInfoList(QuestionInfoNewDTO questionInfoNewDTO);
+
+    List<QuestionInfoNew> selectQuestionInfoListByIds(Long[] ids);
+
+    List<QuestionInfoNew> selectMiQuestionInfoList(QuestionInfoMiDTO questionInfoMiDTO);
+}
+
+

+ 23 - 0
nbjk-service/src/main/java/com/miaxis/question/service/IQuestionSeService.java

@@ -0,0 +1,23 @@
+package com.miaxis.question.service;
+
+import java.util.List;
+import com.miaxis.question.domain.QuestionSe;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 色盲题Service接口
+ *
+ * @author miaxis
+ * @date 2024-03-21
+ */
+public interface IQuestionSeService extends IService<QuestionSe>{
+    /**
+     * 查询色盲题列表
+     *
+     * @param questionSe 色盲题
+     * @return 色盲题集合
+     */
+    List<QuestionSe> selectQuestionSeList(QuestionSe questionSe);
+
+    List<QuestionSe> selectTestQuestionSeList(QuestionSe questionSe);
+}

+ 4 - 1
nbjk-service/src/main/java/com/miaxis/question/service/ITAppExamRuleService.java

@@ -2,6 +2,7 @@ package com.miaxis.question.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.miaxis.question.domain.TAppExamRule;
+import com.miaxis.question.domain.TAppExamRuleNew;
 
 import java.util.List;
 
@@ -18,5 +19,7 @@ public interface ITAppExamRuleService extends IService<TAppExamRule>{
      * @param tAppExamRule 考试取题
      * @return 考试取题集合
      */
-    public List<TAppExamRule> selectTAppExamRuleList(TAppExamRule tAppExamRule);
+     List<TAppExamRule> selectTAppExamRuleList(TAppExamRule tAppExamRule);
+
+     List<TAppExamRuleNew> selectTAppExamRuleNewList(TAppExamRuleNew tAppExamRuleNew);
 }

+ 33 - 0
nbjk-service/src/main/java/com/miaxis/question/service/impl/QuestionColumnServiceImpl.java

@@ -0,0 +1,33 @@
+package com.miaxis.question.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.miaxis.question.domain.QuestionColumn;
+import com.miaxis.question.mapper.QuestionColumnMapper;
+import com.miaxis.question.service.IQuestionColumnService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 题库分类Service业务层处理
+ *
+ * @author miaxis
+ * @date 2023-11-03
+ */
+@Service
+public class QuestionColumnServiceImpl extends ServiceImpl<QuestionColumnMapper, QuestionColumn> implements IQuestionColumnService {
+    @Autowired
+    private QuestionColumnMapper questionColumnMapper;
+
+    /**
+     * 查询题库分类列表
+     *
+     * @param questionColumn 题库分类
+     * @return 题库分类
+     */
+    @Override
+    public List<QuestionColumn> selectQuestionColumnList(QuestionColumn questionColumn){
+        return questionColumnMapper.selectQuestionColumnList(questionColumn);
+    }
+}

+ 296 - 0
nbjk-service/src/main/java/com/miaxis/question/service/impl/QuestionInfoNewServiceImpl.java

@@ -0,0 +1,296 @@
+package com.miaxis.question.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.miaxis.common.exception.CustomException;
+import com.miaxis.question.domain.QuestionInfoNew;
+import com.miaxis.question.domain.TAppExamRuleNew;
+import com.miaxis.question.dto.QuestionInfoFreeDTO;
+import com.miaxis.question.dto.QuestionInfoMiDTO;
+import com.miaxis.question.dto.QuestionInfoNewDTO;
+import com.miaxis.question.dto.QuestionInfoNewTestDTO;
+import com.miaxis.question.mapper.QuestionInfoNewMapper;
+import com.miaxis.question.service.IQuestionInfoNewService;
+import com.miaxis.question.service.ITAppExamRuleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+/**
+ * 获取快通题库Service业务层处理
+ *
+ * @author miaxis
+ * @date 2023-11-03
+ */
+@Service
+public class QuestionInfoNewServiceImpl extends ServiceImpl<QuestionInfoNewMapper, QuestionInfoNew> implements IQuestionInfoNewService {
+    @Autowired
+    private QuestionInfoNewMapper questionInfoNewMapper;
+
+
+    @Autowired
+    private ITAppExamRuleService appExamRuleService;
+
+    /**
+     * 查询获取快通题库列表
+     *
+     * @param questionInfoNew 获取快通题库
+     * @return 获取快通题库
+     */
+    @Override
+    public List<QuestionInfoNew> selectQuestionInfoNewList(QuestionInfoNew questionInfoNew) {
+        return questionInfoNewMapper.selectQuestionInfoNewList(questionInfoNew);
+    }
+
+    @Override
+    public int selectQuestionInfoNewCount(QuestionInfoNew questionInfoNew) {
+        return questionInfoNewMapper.selectQuestionInfoNewCount(questionInfoNew);
+    }
+
+    @Override
+    public List<QuestionInfoNew> selectTestK14QuestionInfoList(QuestionInfoNewTestDTO qt) {
+        String cx = null;
+
+        if ("mtc".equals(qt.getModel())) {
+            cx = "mtc";
+        } else if ("cart".equals(qt.getModel())) {
+            cx = "xc";
+        } else if ("truck".equals(qt.getModel())) {
+            cx = "hc";
+        } else if ("bus".equals(qt.getModel())) {
+            cx = "kc";
+        }
+
+        //全题库
+        List<QuestionInfoNew> allList = new ArrayList<QuestionInfoNew>();
+        TAppExamRuleNew tAppExamRuleNew = new TAppExamRuleNew();
+        tAppExamRuleNew.setKemu(qt.getSubject());
+        tAppExamRuleNew.setGs(cx);
+        tAppExamRuleNew.setAreacode(0);
+
+        List<TAppExamRuleNew> list = appExamRuleService.selectTAppExamRuleNewList(tAppExamRuleNew);
+        if (list.size() == 0) {
+            return allList;
+        }
+        int total = 0;
+        StringBuffer sql = new StringBuffer();
+        sql.append("SELECT * FROM (");
+
+        boolean shouldRetry = false;
+        do {
+            shouldRetry = false;
+            for (int i = 0; i < list.size(); i++) {
+                TAppExamRuleNew er = list.get(i);
+                int easyJudge = er.getJudgeCount(); //判断
+                int easyChoice = er.getChoiceCount(); //选择
+                int easyMultiple = er.getMultipleChoiceCount(); //多选
+
+                System.out.println("i=" + i);
+                System.out.println(qt.getModel() + "+" + qt.getSubject());
+                System.out.println("判断题:" + easyJudge);
+                System.out.println("选择题:" + easyChoice);
+                System.out.println("多选题:" + easyMultiple);
+
+                total = total + easyJudge + easyChoice + easyMultiple;
+
+                int difficult = er.getDifficultCount(); //难题数
+                int chapterId = er.getChapterId();
+
+                Random random = new Random();
+                int diffJudeg = 0; //判断题
+                int diffChoice = 0; //单选题
+                int diffMultiple = 0; //多选题
+
+                int randomNum = 0;
+                for (int j = 0; j < difficult; j++) {
+
+
+                    if (qt.getSubject() == 1 || (qt.getSubject() == 4 && easyMultiple == 0)) {
+                        randomNum = random.nextInt(2); //随机出现 0和1  0表示判断 1表示单选
+                        if (randomNum == 0) {   //判断题
+                            diffJudeg++;
+                            easyJudge--;
+                        } else if (randomNum == 1) {  //单选题
+                            diffChoice++;
+                            easyChoice--;
+                        }
+                    } else if (qt.getSubject() == 4) {
+                        randomNum = random.nextInt(3); //随机出现 0、1、2  0表示判断 1表示单选 2多选
+                        if (randomNum == 0) {   //判断题
+                            diffJudeg++;
+                            easyJudge--;
+                        } else if (randomNum == 1) {  //单选题
+                            diffChoice++;
+                            easyChoice--;
+                        } else if (randomNum == 2) {    //多选题
+                            diffMultiple++;
+                            easyMultiple--;
+                        }
+
+                    }
+
+
+                }
+
+                if (qt.getSubject() == 1) {
+                    if (diffJudeg < 0 || easyJudge < 0 || diffChoice < 0 || easyChoice < 0) {
+                        shouldRetry = true;
+                        sql.setLength(0);  //清空还原
+                        sql.append("SELECT * FROM (");
+                        break;
+                    }
+                }
+                // 检查变量值是否小于0
+                if (qt.getSubject() == 4) {
+                    if (diffJudeg < 0 || easyJudge < 0 || diffChoice < 0 || easyChoice < 0 || diffMultiple < 0 || easyMultiple < 0) {
+                        shouldRetry = true;
+                        sql.setLength(0);  //清空还原
+                        sql.append("SELECT * FROM (");
+                        break;
+                    }
+                }
+
+
+                if (i != 0) {
+                    sql.append(" union ");
+                }
+                //判断题
+                sql.append(" (SELECT * FROM question_info_new WHERE chapter_id = " + chapterId + " AND subject = " + qt.getSubject() + " AND FIND_IN_SET('" + qt.getModel() + "', model)  AND question_type = '1' AND diff_degree in (1,2,3) ORDER BY RAND() LIMIT " + easyJudge + ") ");
+                sql.append(" union ");
+                sql.append(" (SELECT * FROM question_info_new WHERE chapter_id = " + chapterId + " AND subject = " + qt.getSubject() + " AND FIND_IN_SET('" + qt.getModel() + "', model)  AND question_type = '1' AND diff_degree in (4,5) ORDER BY RAND() LIMIT " + diffJudeg + ") ");
+                sql.append(" union ");
+                //选择题
+                sql.append(" (SELECT * FROM question_info_new WHERE chapter_id = " + chapterId + " AND subject = " + qt.getSubject() + " AND FIND_IN_SET('" + qt.getModel() + "', model)  AND question_type = '2' AND diff_degree in (1,2,3) ORDER BY RAND() LIMIT " + easyChoice + ") ");
+                sql.append(" union ");
+                sql.append(" (SELECT * FROM question_info_new WHERE chapter_id = " + chapterId + " AND subject = " + qt.getSubject() + " AND FIND_IN_SET('" + qt.getModel() + "', model)  AND question_type = '2' AND diff_degree in (4,5) ORDER BY RAND() LIMIT " + diffChoice + ") ");
+                //多选题
+                if (qt.getSubject() == 4) {
+                    sql.append(" union ");
+                    sql.append(" (SELECT * FROM question_info_new WHERE chapter_id = " + chapterId + " AND subject = " + qt.getSubject() + " AND FIND_IN_SET('" + qt.getModel() + "', model) AND question_type = '3' AND diff_degree in (1,2,3) ORDER BY RAND() LIMIT " + easyMultiple + ") ");
+                    sql.append(" union ");
+                    sql.append(" (SELECT * FROM question_info_new WHERE chapter_id = " + chapterId + " AND subject = " + qt.getSubject() + " AND FIND_IN_SET('" + qt.getModel() + "', model) AND question_type = '3' AND diff_degree in (4,5) ORDER BY RAND() LIMIT " + diffMultiple + ") ");
+                }
+            }
+
+        } while (shouldRetry);
+
+        sql.append(" ) as db");
+        sql.append(" order by question_type,diff_degree ");
+
+        System.out.println(sql.toString());
+        allList = questionInfoNewMapper.selectTestK14QuestionInfoList(sql.toString());
+
+        if (allList.size() == total) {
+            return allList;
+        } else {
+            return this.selectTestK14QuestionInfoList2(qt);
+        }
+    }
+
+
+    /**
+     * 不考虑题库难度,直接出题
+     * @param qt
+     * @return
+     */
+    @Override
+    public List<QuestionInfoNew> selectTestK14QuestionInfoList2(QuestionInfoNewTestDTO qt) {
+        String cx = null;
+
+        if ("mtc".equals(qt.getModel())) {
+            cx = "mtc";
+        } else if ("cart".equals(qt.getModel())) {
+            cx = "xc";
+        } else if ("truck".equals(qt.getModel())) {
+            cx = "hc";
+        } else if ("bus".equals(qt.getModel())) {
+            cx = "kc";
+        }
+
+
+        //全题库
+        List<QuestionInfoNew> allList = new ArrayList<QuestionInfoNew>();
+        TAppExamRuleNew tAppExamRuleNew = new TAppExamRuleNew();
+        tAppExamRuleNew.setKemu(qt.getSubject());
+        tAppExamRuleNew.setGs(cx);
+        tAppExamRuleNew.setAreacode(0);
+
+        List<TAppExamRuleNew> list = appExamRuleService.selectTAppExamRuleNewList(tAppExamRuleNew);
+        if (list.size() == 0) {
+            return allList;
+        }
+        int total = 0;
+        StringBuffer sql = new StringBuffer();
+        sql.append("SELECT * FROM (");
+
+        boolean shouldRetry = false;
+        do {
+            shouldRetry = false;
+            for (int i = 0; i < list.size(); i++) {
+                TAppExamRuleNew er = list.get(i);
+                int judge = er.getJudgeCount(); //判断
+                int choice = er.getChoiceCount(); //选择
+                int multiple = er.getMultipleChoiceCount(); //多选
+                int chapterId = er.getChapterId();
+
+                total = total + judge + choice + multiple;
+
+                if (i != 0) {
+                    sql.append(" union ");
+                }
+                //判断题
+                sql.append(" (SELECT * FROM question_info_new WHERE chapter_id = " + chapterId + " AND subject = " + qt.getSubject() + " AND FIND_IN_SET('"+ qt.getModel() +"', model)  AND question_type = '1'  ORDER BY RAND() LIMIT " + judge + ") ");
+                sql.append(" union ");
+                //选择题
+                sql.append(" (SELECT * FROM question_info_new WHERE chapter_id = " + chapterId + " AND subject = " + qt.getSubject() + " AND FIND_IN_SET('"+ qt.getModel() +"', model) AND question_type = '2'  ORDER BY RAND() LIMIT " + choice + ") ");
+                //多选题
+                if (qt.getSubject() == 4) {
+                    sql.append(" union ");
+                    sql.append(" (SELECT * FROM question_info_new WHERE chapter_id = " + chapterId + " AND subject = " + qt.getSubject() + " AND FIND_IN_SET('"+ qt.getModel() +"', model) AND question_type = '3'  ORDER BY RAND() LIMIT " + multiple + ") ");
+                }
+            }
+
+        } while (shouldRetry);
+
+        sql.append(" ) as db");
+        sql.append(" order by question_type,diff_degree ");
+
+        System.out.println(sql.toString());
+        allList = questionInfoNewMapper.selectTestK14QuestionInfoList(sql.toString());
+
+        if (allList.size() == total) {
+            return allList;
+        } else {
+            new CustomException("模拟考试取题出错,请重试。");
+            return null;
+        }
+    }
+
+
+
+
+    @Override
+    public List<QuestionInfoNew> selectFreeQuestionInfo(QuestionInfoFreeDTO freeDTO) {
+        List<QuestionInfoNew> list = questionInfoNewMapper.selectFreeQuestionInfoList(freeDTO);
+        return list;
+    }
+
+    @Override
+    public List<QuestionInfoNew> selectQuestionInfoList(QuestionInfoNewDTO questionInfoNewDTO) {
+        return questionInfoNewMapper.selectQuestionInfoList(questionInfoNewDTO);
+    }
+
+    @Override
+    public List<QuestionInfoNew> selectQuestionInfoListByIds(Long[] ids) {
+        return questionInfoNewMapper.selectQuestionInfoListByIds(ids);
+    }
+
+    @Override
+    public List<QuestionInfoNew> selectMiQuestionInfoList(QuestionInfoMiDTO questionInfoMiDTO) {
+        return questionInfoNewMapper.selectMiQuestionInfoList(questionInfoMiDTO);
+    }
+
+
+}

+ 42 - 0
nbjk-service/src/main/java/com/miaxis/question/service/impl/QuestionSeServiceImpl.java

@@ -0,0 +1,42 @@
+package com.miaxis.question.service.impl;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.miaxis.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.apache.commons.lang3.StringUtils;
+import com.miaxis.question.mapper.QuestionSeMapper;
+import com.miaxis.question.domain.QuestionSe;
+import com.miaxis.question.service.IQuestionSeService;
+
+/**
+ * 色盲题Service业务层处理
+ *
+ * @author miaxis
+ * @date 2024-03-21
+ */
+@Service
+public class QuestionSeServiceImpl extends ServiceImpl<QuestionSeMapper, QuestionSe> implements IQuestionSeService {
+    @Autowired
+    private QuestionSeMapper questionSeMapper;
+
+    /**
+     * 查询色盲题列表
+     *
+     * @param questionSe 色盲题
+     * @return 色盲题
+     */
+    @Override
+    public List<QuestionSe> selectQuestionSeList(QuestionSe questionSe){
+        return questionSeMapper.selectQuestionSeList(questionSe);
+    }
+
+    @Override
+    public List<QuestionSe> selectTestQuestionSeList(QuestionSe questionSe){
+        return questionSeMapper.selectTestQuestionSeList(questionSe);
+    }
+
+}

+ 13 - 0
nbjk-service/src/main/java/com/miaxis/question/service/impl/TAppExamRuleServiceImpl.java

@@ -2,6 +2,7 @@ package com.miaxis.question.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.miaxis.question.domain.TAppExamRule;
+import com.miaxis.question.domain.TAppExamRuleNew;
 import com.miaxis.question.mapper.TAppExamRuleMapper;
 import com.miaxis.question.service.ITAppExamRuleService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,4 +32,16 @@ public class TAppExamRuleServiceImpl extends ServiceImpl<TAppExamRuleMapper, TAp
     public List<TAppExamRule> selectTAppExamRuleList(TAppExamRule tAppExamRule){
         return tAppExamRuleMapper.selectTAppExamRuleList(tAppExamRule);
     }
+
+
+    /**
+     * 查询考试取题列表
+     *
+     * @param tAppExamRuleNew 考试取题
+     * @return 考试取题
+     */
+    @Override
+    public List<TAppExamRuleNew> selectTAppExamRuleNewList(TAppExamRuleNew tAppExamRuleNew){
+        return tAppExamRuleMapper.selectTAppExamRuleNewList(tAppExamRuleNew);
+    }
 }

+ 3 - 0
nbjk-service/src/main/java/com/miaxis/three/mapper/ThreeForceMapper.java

@@ -3,6 +3,7 @@ package com.miaxis.three.mapper;
 import java.util.List;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.miaxis.question.domain.QuestionInfo;
+import com.miaxis.question.domain.QuestionInfoNew;
 import com.miaxis.three.domain.ThreeForce;
 
 /**
@@ -23,4 +24,6 @@ public interface ThreeForceMapper extends BaseMapper<ThreeForce> {
     List<ThreeForce> selectThreeForceMediaList();
 
     List<ThreeForce> selectTestQuestionInfoList(String sql);
+
+    List<QuestionInfoNew> selectTestQuestionInfoNewList(String sql);
 }

+ 4 - 1
nbjk-service/src/main/java/com/miaxis/three/service/IThreeForceService.java

@@ -3,6 +3,7 @@ package com.miaxis.three.service;
 import java.util.List;
 
 import com.miaxis.question.domain.QuestionInfo;
+import com.miaxis.question.domain.QuestionInfoNew;
 import com.miaxis.three.domain.ThreeForce;
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -19,9 +20,11 @@ public interface IThreeForceService extends IService<ThreeForce>{
      * @param threeForce 三力测试
      * @return 三力测试集合
      */
-    public List<ThreeForce> selectThreeForceList(ThreeForce threeForce);
+    List<ThreeForce> selectThreeForceList(ThreeForce threeForce);
 
     List<ThreeForce> selectTestQuestionInfoList();
 
+    List<QuestionInfoNew> selectTestQuestionInfoNewList();
+
     List<ThreeForce> selectThreeForceMediaList();
 }

+ 38 - 0
nbjk-service/src/main/java/com/miaxis/three/service/impl/ThreeForceServiceImpl.java

@@ -3,7 +3,9 @@ package com.miaxis.three.service.impl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.miaxis.common.exception.CustomException;
 import com.miaxis.question.domain.QuestionInfo;
+import com.miaxis.question.domain.QuestionInfoNew;
 import com.miaxis.question.domain.TAppExamRule;
+import com.miaxis.question.domain.TAppExamRuleNew;
 import com.miaxis.question.service.ITAppExamRuleService;
 import com.miaxis.three.domain.ThreeForce;
 import com.miaxis.three.mapper.ThreeForceMapper;
@@ -74,6 +76,42 @@ public class ThreeForceServiceImpl extends ServiceImpl<ThreeForceMapper, ThreeFo
         }
     }
 
+
+    @Override
+    public List<QuestionInfoNew> selectTestQuestionInfoNewList() {
+
+        List<QuestionInfoNew> allList = new ArrayList<QuestionInfoNew>();
+        TAppExamRuleNew tAppExamRule = new TAppExamRuleNew();
+        tAppExamRule.setGs("test");
+        tAppExamRule.setAreacode(0);
+
+        List<TAppExamRuleNew> list = appExamRuleService.selectTAppExamRuleNewList(tAppExamRule);
+        if (list.size() == 0) {
+            return allList;
+        }
+        StringBuffer sql = new StringBuffer();
+        sql.append("SELECT * FROM (");
+        TAppExamRuleNew er = list.get(0);
+        int easyJudge = er.getJudgeCount(); //判断
+        int easyChoice = er.getChoiceCount(); //选择
+        int total = +easyJudge + easyChoice; //总题数
+        //判断题
+        sql.append(" (SELECT * FROM question_info_new WHERE subject = '9' and question_type=1  ORDER BY RAND() LIMIT " + easyJudge + ") ");
+        sql.append(" union ");
+        //选择题
+        sql.append(" (SELECT * FROM question_info_new WHERE subject = '9' and question_type=2 ORDER BY RAND() LIMIT " + easyChoice + ") ");
+        sql.append(" ) as db");
+        System.out.println(sql.toString());
+        allList = threeForceMapper.selectTestQuestionInfoNewList(sql.toString());
+        if (allList.size() == total) {
+            return allList;
+        } else {
+            new CustomException("模拟考试取题出错,请重试。");
+            return null;
+        }
+    }
+
+
     @Override
     public List<ThreeForce> selectThreeForceMediaList() {
         return threeForceMapper.selectThreeForceMediaList();

+ 25 - 1
nbjk-service/src/main/resources/mapper/question/QuestionCollectionMapper.xml

@@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
 
-
+    <!--
     <select id="selectCollectionIdByUserId" resultType="com.miaxis.question.vo.QuestionColIdDateVo">
 
         select q1.id,q2.create_time from question_info q1 join question_collection q2 on q1.id = q2.question_id
@@ -49,6 +49,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
 
     </select>
+    -->
+
+    <select id="selectCollectionIdByUserId" resultType="com.miaxis.question.vo.QuestionColIdDateVo">
+
+        select q2.question_id as id,q2.create_time from  question_collection q2
+        <where>
+            <if test="userId != null and userId !='' "> and q2.user_id = #{userId}</if>
+            <if test="km != null and km!='' "> and q2.km = #{km}</if>
+        </where>
+        order by q2.create_time asc
+
+    </select>
+
+
+
+    <select id="selectCollectionCountByUserId" resultType="java.lang.Integer">
+
+        select count(1) from  question_collection q2
+        <where>
+            <if test="userId != null and userId !='' "> and q2.user_id = #{userId}</if>
+            <if test="km != null and km!='' "> and q2.km = #{km}</if>
+        </where>
+
+    </select>
 
 
 </mapper>

+ 34 - 0
nbjk-service/src/main/resources/mapper/question/QuestionColumnMapper.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.miaxis.question.mapper.QuestionColumnMapper">
+
+    <resultMap type="QuestionColumn" id="QuestionColumnResult">
+        <result property="id"    column="id"    />
+        <result property="columnId"    column="column_id"    />
+        <result property="sort"    column="sort"    />
+        <result property="model"    column="model"    />
+        <result property="subject"    column="subject"    />
+        <result property="title"    column="title"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectQuestionColumnVo">
+        select * from question_column
+    </sql>
+
+    <select id="selectQuestionColumnList" parameterType="QuestionColumn" resultMap="QuestionColumnResult">
+        <include refid="selectQuestionColumnVo"/>
+        <where>
+            <if test="sort != null "> and sort = #{sort}</if>
+            <if test="columnId != null "> and column_id = #{columnId}</if>
+            <if test="model != null  and model != ''"> AND FIND_IN_SET(#{model}, model)</if>
+            <if test="subject != null  and subject != ''"> AND FIND_IN_SET(#{subject}, subject)</if>
+            <if test="title != null  and title != ''"> and title = #{title}</if>
+        </where>
+        order by sort
+    </select>
+
+</mapper>

+ 184 - 0
nbjk-service/src/main/resources/mapper/question/QuestionInfoNewMapper.xml

@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.miaxis.question.mapper.QuestionInfoNewMapper">
+
+    <resultMap type="QuestionInfoNew" id="QuestionInfoNewResult">
+        <result property="id"    column="id"    />
+        <result property="idYdt"    column="id_ydt"    />
+        <result property="number"    column="number"    />
+        <result property="answer"    column="answer"    />
+        <result property="answerkeyword"    column="answerkeyword"    />
+        <result property="explainGif"    column="explain_gif"    />
+        <result property="explainJq"    column="explain_jq"    />
+        <result property="explainJs"    column="explain_js"    />
+        <result property="explainMp3"    column="explain_mp3"    />
+        <result property="image"    column="image"    />
+        <result property="imageYdt"    column="image_ydt"    />
+        <result property="issue"    column="issue"    />
+        <result property="opts"    column="opts"    />
+        <result property="skillkeyword"    column="skillkeyword"    />
+        <result property="titlekeyword"    column="titlekeyword"    />
+        <result property="issuemp3"    column="issuemp3"    />
+        <result property="answermp3"    column="answermp3"    />
+        <result property="explainjsmp3"    column="explainjsmp3"    />
+        <result property="model"    column="model"    />
+        <result property="columnAll"    column="column_all"    />
+        <result property="questionType"    column="question_type"    />
+        <result property="subject"    column="subject"    />
+        <result property="chapterId"    column="chapter_id"    />
+        <result property="isNew"    column="is_new"    />
+        <result property="diffDegree"    column="diff_degree"    />
+        <result property="errorRate"    column="error_rate"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectQuestionInfoNewVo">
+        select * from question_info_new
+    </sql>
+
+    <select id="selectQuestionInfoNewList" parameterType="QuestionInfoNew" resultMap="QuestionInfoNewResult">
+        <include refid="selectQuestionInfoNewVo"/>
+        <where>
+            <if test="idYdt != null "> and id_ydt = #{idYdt}</if>
+            <if test="number != null "> and number = #{number}</if>
+            <if test="answer != null  and answer != ''"> and answer = #{answer}</if>
+            <if test="answerkeyword != null  and answerkeyword != ''"> and answerkeyword = #{answerkeyword}</if>
+            <if test="explainGif != null  and explainGif != ''"> and explain_gif = #{explainGif}</if>
+            <if test="explainJq != null  and explainJq != ''"> and explain_jq = #{explainJq}</if>
+            <if test="explainJs != null  and explainJs != ''"> and explain_js = #{explainJs}</if>
+            <if test="explainMp3 != null  and explainMp3 != ''"> and explain_mp3 = #{explainMp3}</if>
+            <if test="image != null  and image != ''"> and image = #{image}</if>
+            <if test="imageYdt != null  and imageYdt != ''"> and image_ydt = #{imageYdt}</if>
+            <if test="issue != null  and issue != ''"> and issue = #{issue}</if>
+            <if test="opts != null  and opts != ''"> and opts = #{opts}</if>
+            <if test="skillkeyword != null  and skillkeyword != ''"> and skillkeyword = #{skillkeyword}</if>
+            <if test="titlekeyword != null  and titlekeyword != ''"> and titlekeyword = #{titlekeyword}</if>
+            <if test="issuemp3 != null  and issuemp3 != ''"> and issuemp3 = #{issuemp3}</if>
+            <if test="answermp3 != null  and answermp3 != ''"> and answermp3 = #{answermp3}</if>
+            <if test="explainjsmp3 != null  and explainjsmp3 != ''"> and explainjsmp3 = #{explainjsmp3}</if>
+            <if test="model != null and model != ''"> AND model like concat('%', #{model}, '%') </if>
+            <if test="columnAll != null  and columnAll != ''"> and column_all like concat('%', #{columnAll}, '%')</if>
+            <if test="questionType != null "> and question_type = #{questionType}</if>
+            <if test="subject != null  and subject != ''"> and subject = #{subject}</if>
+            <if test="chapterId != null "> and chapter_id = #{chapterId}</if>
+            <if test="isNew != null "> and is_new = #{isNew}</if>
+            <if test="diffDegree != null "> and diff_degree = #{diffDegree}</if>
+            <if test="errorRate != null "> and error_rate = #{errorRate}</if>
+        </where>
+    </select>
+
+
+    <select id="selectQuestionInfoNewCount" parameterType="QuestionInfoNew" resultType="int">
+        select count(1) from question_info_new
+        <where>
+            <if test="id != null "> and id = #{id}</if>
+            <if test="idYdt != null "> and id_ydt = #{idYdt}</if>
+            <if test="number != null "> and number = #{number}</if>
+            <if test="answer != null  and answer != ''"> and answer = #{answer}</if>
+            <if test="answerkeyword != null  and answerkeyword != ''"> and answerkeyword = #{answerkeyword}</if>
+            <if test="explainGif != null  and explainGif != ''"> and explain_gif = #{explainGif}</if>
+            <if test="explainJq != null  and explainJq != ''"> and explain_jq = #{explainJq}</if>
+            <if test="explainJs != null  and explainJs != ''"> and explain_js = #{explainJs}</if>
+            <if test="explainMp3 != null  and explainMp3 != ''"> and explain_mp3 = #{explainMp3}</if>
+            <if test="image != null  and image != ''"> and image = #{image}</if>
+            <if test="imageYdt != null  and imageYdt != ''"> and image_ydt = #{imageYdt}</if>
+            <if test="issue != null  and issue != ''"> and issue = #{issue}</if>
+            <if test="opts != null  and opts != ''"> and opts = #{opts}</if>
+            <if test="skillkeyword != null  and skillkeyword != ''"> and skillkeyword = #{skillkeyword}</if>
+            <if test="titlekeyword != null  and titlekeyword != ''"> and titlekeyword = #{titlekeyword}</if>
+            <if test="issuemp3 != null  and issuemp3 != ''"> and issuemp3 = #{issuemp3}</if>
+            <if test="answermp3 != null  and answermp3 != ''"> and answermp3 = #{answermp3}</if>
+            <if test="explainjsmp3 != null  and explainjsmp3 != ''"> and explainjsmp3 = #{explainjsmp3}</if>
+            <if test="model != null  and model != ''"> AND FIND_IN_SET(#{model}, model)</if>
+            <if test="columnAll != null  and columnAll != ''"> AND FIND_IN_SET(#{columnAll}, column_all)</if>
+            <if test="questionType != null "> and question_type = #{questionType}</if>
+            <if test="subject != null  and subject != ''"> and subject = #{subject}</if>
+            <if test="chapterId != null "> and chapter_id = #{chapterId}</if>
+            <if test="isNew != null "> and is_new = #{isNew}</if>
+            <if test="diffDegree != null "> and diff_degree = #{diffDegree}</if>
+            <if test="errorRate != null "> and error_rate = #{errorRate}</if>
+        </where>
+    </select>
+
+    <select id="selectTestK14QuestionInfoList" resultType="com.miaxis.question.domain.QuestionInfoNew">
+        ${sql}
+    </select>
+
+
+    <select id="selectFreeQuestionInfoList" resultMap="QuestionInfoNewResult"
+            resultType="com.miaxis.question.domain.QuestionInfoNew">
+        select q1.* from question_info_new q1 join question_free q2 on q1.id = q2.id
+        <where>
+            <if test="subject != null"> and q2.subject = #{subject}</if>
+        </where>
+        order by q1.number
+    </select>
+
+
+    <select id="selectQuestionInfoList" parameterType="com.miaxis.question.dto.QuestionInfoNewDTO" resultMap="QuestionInfoNewResult">
+        <include refid="selectQuestionInfoNewVo"/>
+        <where>
+            <if test="id != null "> and id = #{id}</if>
+            <if test="number != null "> and number = #{number}</if>
+            <if test="answer != null  and answer != ''"> and answer = #{answer}</if>
+            <if test="issue != null  and issue != ''"> and issue = #{issue}</if>
+            <if test="opts != null  and opts != ''"> and opts = #{opts}</if>
+            <if test="questionType != null "> and question_type = #{questionType}</if>
+            <if test="model != null and model != ''"> AND FIND_IN_SET(#{model}, model) </if>
+            <if test="columnAll != null  and columnAll != ''"> AND FIND_IN_SET(#{columnAll}, column_all) </if>
+            <if test="subject != null  and subject != ''"> and subject = #{subject}</if>
+            <if test="subject == 1"> and question_type != 3 </if>
+            <if test="chapterId != null "> and chapter_id = #{chapterId}</if>
+            <if test="diffDegree != null "> and diff_degree = #{diffDegree}</if>
+            <if test="isNew != null "> and is_new = #{isNew}</if>
+        </where>
+        order by number
+    </select>
+
+
+    <select id="selectNormalQuestionInfoList" parameterType="com.miaxis.question.dto.QuestionInfoDTO" resultMap="QuestionInfoNewResult">
+        <include refid="selectQuestionInfoNewVo"/>
+        <where>
+            <if test="id != null "> and id = #{id}</if>
+            <if test="number != null "> and number = #{number}</if>
+            <if test="answer != null  and answer != ''"> and answer = #{answer}</if>
+            <if test="issue != null  and issue != ''"> and issue = #{issue}</if>
+            <if test="opts != null  and opts != ''"> and opts = #{opts}</if>
+            <if test="questionType != null "> and question_type = #{questionType}</if>
+            <if test="model != null and model != ''"> AND model like concat('%', #{model}, '%') </if>
+            <if test="columnAll != null  and columnAll != ''"> and column_all like concat('%', #{columnAll}, '%')</if>
+            <if test="subject != null  and subject != ''"> and subject = #{subject}</if>
+            <if test="chapterId != null "> and chapter_id = #{chapterId}</if>
+            <if test="errorRate != null "> and error_rate = #{errorRate}</if>
+            <if test="diffDegree != null "> and diff_degree = #{diffDegree}</if>
+            <if test="isNew != null "> and is_new = #{isNew}</if>
+        </where>
+        limit 0,50
+        order by number
+    </select>
+
+
+    <select id="selectQuestionInfoListByIds" parameterType="Long" resultMap="QuestionInfoNewResult">
+        <include refid="selectQuestionInfoNewVo"/>
+        <where>
+            and id in
+            <foreach collection="array" item="id" index="index" open="(" close=")" separator=",">
+                #{id}
+            </foreach>
+        </where>
+        order by number
+    </select>
+
+
+    <select id="selectMiQuestionInfoList" parameterType="QuestionInfoMiDTO" resultMap="QuestionInfoNewResult">
+        select * from
+            (select * from question_info_new t2 join
+                           (SELECT substring_index(group_concat(t.id order by t.id desc ),',',1) maxid FROM question_info t GROUP BY t.id_ydt) t1 on t2.id = t1.maxid) t3
+                JOIN t_app_question_category tt ON t3.id_ydt = tt.question_id where tt.gs = #{gs} AND tt.kemu = #{kemu} and tt.category = #{category}
+
+    </select>
+
+</mapper>

+ 109 - 0
nbjk-service/src/main/resources/mapper/question/QuestionSeMapper.xml

@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.miaxis.question.mapper.QuestionSeMapper">
+
+    <resultMap type="QuestionSe" id="QuestionSeResult">
+        <result property="id"    column="id"    />
+        <result property="idYdt"    column="id_ydt"    />
+        <result property="number"    column="number"    />
+        <result property="answer"    column="answer"    />
+        <result property="answerkeyword"    column="answerkeyword"    />
+        <result property="explainGif"    column="explain_gif"    />
+        <result property="explainJq"    column="explain_jq"    />
+        <result property="explainJs"    column="explain_js"    />
+        <result property="explainMp3"    column="explain_mp3"    />
+        <result property="image"    column="image"    />
+        <result property="imageYdt"    column="image_ydt"    />
+        <result property="issue"    column="issue"    />
+        <result property="opts"    column="opts"    />
+        <result property="skillkeyword"    column="skillkeyword"    />
+        <result property="titlekeyword"    column="titlekeyword"    />
+        <result property="issuemp3"    column="issuemp3"    />
+        <result property="answermp3"    column="answermp3"    />
+        <result property="explainjsmp3"    column="explainjsmp3"    />
+        <result property="model"    column="model"    />
+        <result property="columnAll"    column="column_all"    />
+        <result property="questionType"    column="question_type"    />
+        <result property="subject"    column="subject"    />
+        <result property="chapterId"    column="chapter_id"    />
+        <result property="isNew"    column="is_new"    />
+        <result property="diffDegree"    column="diff_degree"    />
+        <result property="errorRate"    column="error_rate"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectQuestionSeVo">
+        select * from question_se
+    </sql>
+
+    <select id="selectQuestionSeList" parameterType="QuestionSe" resultMap="QuestionSeResult">
+        <include refid="selectQuestionSeVo"/>
+        <where>
+            <if test="idYdt != null "> and id_ydt = #{idYdt}</if>
+            <if test="number != null "> and number = #{number}</if>
+            <if test="answer != null  and answer != ''"> and answer = #{answer}</if>
+            <if test="answerkeyword != null  and answerkeyword != ''"> and answerkeyword = #{answerkeyword}</if>
+            <if test="explainGif != null  and explainGif != ''"> and explain_gif = #{explainGif}</if>
+            <if test="explainJq != null  and explainJq != ''"> and explain_jq = #{explainJq}</if>
+            <if test="explainJs != null  and explainJs != ''"> and explain_js = #{explainJs}</if>
+            <if test="explainMp3 != null  and explainMp3 != ''"> and explain_mp3 = #{explainMp3}</if>
+            <if test="image != null  and image != ''"> and image = #{image}</if>
+            <if test="imageYdt != null  and imageYdt != ''"> and image_ydt = #{imageYdt}</if>
+            <if test="issue != null  and issue != ''"> and issue = #{issue}</if>
+            <if test="opts != null  and opts != ''"> and opts = #{opts}</if>
+            <if test="skillkeyword != null  and skillkeyword != ''"> and skillkeyword = #{skillkeyword}</if>
+            <if test="titlekeyword != null  and titlekeyword != ''"> and titlekeyword = #{titlekeyword}</if>
+            <if test="issuemp3 != null  and issuemp3 != ''"> and issuemp3 = #{issuemp3}</if>
+            <if test="answermp3 != null  and answermp3 != ''"> and answermp3 = #{answermp3}</if>
+            <if test="explainjsmp3 != null  and explainjsmp3 != ''"> and explainjsmp3 = #{explainjsmp3}</if>
+            <if test="model != null  and model != ''"> and model = #{model}</if>
+            <if test="columnAll != null  and columnAll != ''"> and column_all = #{columnAll}</if>
+            <if test="questionType != null "> and question_type = #{questionType}</if>
+            <if test="subject != null  and subject != ''"> and subject = #{subject}</if>
+            <if test="chapterId != null "> and chapter_id = #{chapterId}</if>
+            <if test="isNew != null "> and is_new = #{isNew}</if>
+            <if test="diffDegree != null "> and diff_degree = #{diffDegree}</if>
+            <if test="errorRate != null "> and error_rate = #{errorRate}</if>
+        </where>
+    </select>
+
+
+    <select id="selectTestQuestionSeList" parameterType="QuestionSe" resultMap="QuestionSeResult">
+        (select * from question_se
+        <where>
+            <if test="idYdt != null "> and id_ydt = #{idYdt}</if>
+            <if test="number != null "> and number = #{number}</if>
+            <if test="answer != null  and answer != ''"> and answer = #{answer}</if>
+            <if test="answerkeyword != null  and answerkeyword != ''"> and answerkeyword = #{answerkeyword}</if>
+            <if test="explainGif != null  and explainGif != ''"> and explain_gif = #{explainGif}</if>
+            <if test="explainJq != null  and explainJq != ''"> and explain_jq = #{explainJq}</if>
+            <if test="explainJs != null  and explainJs != ''"> and explain_js = #{explainJs}</if>
+            <if test="explainMp3 != null  and explainMp3 != ''"> and explain_mp3 = #{explainMp3}</if>
+            <if test="image != null  and image != ''"> and image = #{image}</if>
+            <if test="imageYdt != null  and imageYdt != ''"> and image_ydt = #{imageYdt}</if>
+            <if test="issue != null  and issue != ''"> and issue = #{issue}</if>
+            <if test="opts != null  and opts != ''"> and opts = #{opts}</if>
+            <if test="skillkeyword != null  and skillkeyword != ''"> and skillkeyword = #{skillkeyword}</if>
+            <if test="titlekeyword != null  and titlekeyword != ''"> and titlekeyword = #{titlekeyword}</if>
+            <if test="issuemp3 != null  and issuemp3 != ''"> and issuemp3 = #{issuemp3}</if>
+            <if test="answermp3 != null  and answermp3 != ''"> and answermp3 = #{answermp3}</if>
+            <if test="explainjsmp3 != null  and explainjsmp3 != ''"> and explainjsmp3 = #{explainjsmp3}</if>
+            <if test="model != null  and model != ''"> and model = #{model}</if>
+            <if test="columnAll != null  and columnAll != ''"> and column_all = #{columnAll}</if>
+            <if test="questionType != null "> and question_type = #{questionType}</if>
+            <if test="subject != null  and subject != ''"> and subject = #{subject}</if>
+            <if test="chapterId != null "> and chapter_id = #{chapterId}</if>
+            <if test="isNew != null "> and is_new = #{isNew}</if>
+            <if test="diffDegree != null "> and diff_degree = #{diffDegree}</if>
+            <if test="errorRate != null "> and error_rate = #{errorRate}</if>
+        </where>
+        order by rand()
+        limit 0,10)
+        order by number
+    </select>
+
+
+</mapper>

+ 25 - 2
nbjk-service/src/main/resources/mapper/question/QuestionWrongMapper.xml

@@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
 
-
+    <!--
     <select id="selectWrongIdByUserId" resultType="com.miaxis.question.vo.QuestionWrongIdDateVo">
 
         select q1.id,q2.create_time from question_info q1 join question_wrong q2 on q1.id = q2.question_id
@@ -36,7 +36,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by q2.create_time
     </select>
-
+    -->
+    <!--
     <select id="selectWrongCountByUserId" resultType="int">
 
         select count(1) from question_info q1 join question_wrong q2 on q1.id = q2.question_id
@@ -46,5 +47,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
 
     </select>
+    -->
+
+    <select id="selectWrongIdByUserId" resultType="com.miaxis.question.vo.QuestionWrongIdDateVo">
+
+        select q2.question_id as id,q2.create_time from  question_wrong q2
+        <where>
+            <if test="userId != null and userId !='' "> and q2.user_id = #{userId}</if>
+            <if test="km != null and km!='' "> and q2.km = #{km}</if>
+        </where>
+        order by q2.create_time
+    </select>
+
+
+    <select id="selectWrongCountByUserId" resultType="int">
+
+        select count(1) from  question_wrong q2
+        <where>
+            <if test="userId != null and userId !='' "> and q2.user_id = #{userId}</if>
+            <if test="km != null and km!='' "> and q2.km = #{km}</if>
+        </where>
+
+    </select>
 
 </mapper>

+ 34 - 0
nbjk-service/src/main/resources/mapper/rule/TAppExamRuleMapper.xml

@@ -18,10 +18,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="cityId"    column="city_id"    />
     </resultMap>
 
+    <resultMap type="TAppExamRuleNew" id="TAppExamRuleNewResult">
+        <result property="id"    column="id"    />
+        <result property="gs"    column="gs"    />
+        <result property="kemu"    column="kemu"    />
+        <result property="chapterId"    column="chapter_id"    />
+        <result property="totalCount"    column="total_count"    />
+        <result property="judgeCount"    column="judge_count"    />
+        <result property="choiceCount"    column="choice_count"    />
+        <result property="multipleChoiceCount"    column="multiple_choice_count"    />
+        <result property="difficultCount"    column="difficult_count"    />
+        <result property="areacode"    column="areacode"    />
+        <result property="cityId"    column="city_id"    />
+    </resultMap>
+
     <sql id="selectTAppExamRuleVo">
         select * from t_app_exam_rule
     </sql>
 
+    <sql id="selectTAppExamRuleNewVo">
+        select * from t_app_exam_rule_new
+    </sql>
+
     <select id="selectTAppExamRuleList" parameterType="TAppExamRule" resultMap="TAppExamRuleResult">
         <include refid="selectTAppExamRuleVo"/>
         <where>
@@ -38,4 +56,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
 
+    <select id="selectTAppExamRuleNewList" parameterType="TAppExamRuleNew" resultMap="TAppExamRuleNewResult">
+        <include refid="selectTAppExamRuleNewVo"/>
+        <where>
+            <if test="gs != null  and gs != ''"> and gs = #{gs}</if>
+            <if test="kemu != null "> and kemu = #{kemu}</if>
+            <if test="chapterId != null "> and chapter_id = #{chapterId}</if>
+            <if test="totalCount != null "> and total_count = #{totalCount}</if>
+            <if test="judgeCount != null "> and judge_count = #{judgeCount}</if>
+            <if test="choiceCount != null "> and choice_count = #{choiceCount}</if>
+            <if test="multipleChoiceCount != null "> and multiple_choice_count = #{multipleChoiceCount}</if>
+            <if test="difficultCount != null "> and difficult_count = #{difficultCount}</if>
+            <if test="areacode != null "> and areacode = #{areacode}</if>
+            <if test="cityId != null "> and city_id = #{cityId}</if>
+        </where>
+    </select>
+
 </mapper>

+ 5 - 0
nbjk-service/src/main/resources/mapper/three/ThreeForceMapper.xml

@@ -90,4 +90,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ${sql}
     </select>
 
+
+    <select id="selectTestQuestionInfoNewList" resultType="com.miaxis.question.domain.QuestionInfoNew">
+        ${sql}
+    </select>
+
 </mapper>