Ver código fonte

知识点基础参数业务

change 4 anos atrás
pai
commit
763f273296

+ 8 - 1
zhongzheng-admin/src/main/java/com/zhongzheng/controller/exam/ExamKnowledgeController.java

@@ -3,6 +3,8 @@ package com.zhongzheng.controller.exam;
 import java.util.List;
 import java.util.Arrays;
 
+import cn.hutool.http.HttpStatus;
+import com.github.pagehelper.PageInfo;
 import lombok.RequiredArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -51,7 +53,12 @@ public class ExamKnowledgeController extends BaseController {
     public TableDataInfo<ExamKnowledgeVo> list(ExamKnowledgeQueryBo bo) {
         startPage();
         List<ExamKnowledgeVo> list = iExamKnowledgeService.queryList(bo);
-        return getDataTable(list);
+        TableDataInfo<ExamKnowledgeVo> rspData = new TableDataInfo();
+        rspData.setCode(HttpStatus.HTTP_OK);
+        rspData.setMsg("查询成功");
+        rspData.setRows(list);
+        rspData.setTotal(iExamKnowledgeService.queryListTotal(bo));
+        return rspData;
     }
 
     /**

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/vo/CourseBusinessVo.java

@@ -59,6 +59,11 @@ public class CourseBusinessVo {
 	@ApiModelProperty("教育类型id")
 	private Integer educationId;
 
+	@Excel(name = "教育类型id")
+	@ApiModelProperty("教育类型id")
+	private Integer businessId;
+
+
 	/** 项目名称 */
 	@Excel(name = "项目名称")
 	@ApiModelProperty("项目名称")

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/IExamKnowledgeService.java

@@ -49,4 +49,6 @@ public interface IExamKnowledgeService extends IService<ExamKnowledge> {
 	 * @return
 	 */
 	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+	long queryListTotal(ExamKnowledgeQueryBo bo);
 }

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamKnowledgeServiceImpl.java

@@ -7,6 +7,7 @@ import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.exam.bo.*;
 import com.zhongzheng.modules.exam.domain.ExamKnowledgeBusiness;
+import com.zhongzheng.modules.exam.domain.ExamPaper;
 import com.zhongzheng.modules.exam.service.IExamKnowledgeBusinessService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
@@ -123,4 +124,13 @@ public class ExamKnowledgeServiceImpl extends ServiceImpl<ExamKnowledgeMapper, E
         }
         return this.removeByIds(ids);
     }
+
+    @Override
+    public long queryListTotal(ExamKnowledgeQueryBo bo) {
+        LambdaQueryWrapper<ExamKnowledge> lqw = Wrappers.lambdaQuery();
+        lqw.like(StrUtil.isNotBlank(bo.getKnowledgeName()), ExamKnowledge::getKnowledgeName, bo.getKnowledgeName());
+        lqw.in(bo.getStatus() != null, ExamKnowledge::getStatus, bo.getStatus());
+        lqw.eq(StrUtil.isNotBlank(bo.getEncoder()), ExamKnowledge::getEncoder, bo.getEncoder());
+        return baseMapper.selectCount(lqw);
+    }
 }

+ 4 - 1
zhongzheng-system/src/main/resources/mapper/modules/exam/ExamKnowledgeMapper.xml

@@ -23,6 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <resultMap type="com.zhongzheng.modules.course.vo.CourseBusinessVo" id="CourseBusinessVoResult">
         <result property="businessName" column="business_name"/>
+        <result property="businessId" column="business_id"/>
+        <result property="courseSubjectId" column="subject_id"/>
         <result property="remark" column="remark"/>
         <result property="projectId" column="project_id"/>
         <result property="schoolYear" column="school_year"/>
@@ -49,7 +51,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                     j.subject_name,
                     e.education_name,
                     e.id AS education_id,
-                    p.project_name
+                    p.project_name,
+                       p.id as project_id
                 FROM
                     exam_knowledge_business b
                         LEFT JOIN course_business s ON s.id = b.business_id