Эх сурвалжийг харах

bugfix - 章节、问卷、章节模板、问卷模板排序问题

wangggziwen 11 сар өмнө
parent
commit
3bc69d1bd1

+ 2 - 2
rc-buisness/src/main/resources/mapper/rc/TChapterMapper.xml

@@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTChapterVo">
-        select id, audit_id, code, name, dept_id from t_chapter
+        select id, audit_id, code, name, dept_id, IF(INSTR(code, '.') > 0, SUBSTR(code, 1, INSTR(code, '.') - 1), code) as codeSubStr from t_chapter
     </sql>
 
     <select id="selectTChapterList" parameterType="TChapter" resultMap="TChapterResult">
@@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="deptId != null  and deptId != ''"> and dept_id = #{deptId}</if>
         </where>
-        order by code asc
+        order by (IF(INSTR(code, '.') > 0, SUBSTR(code, 1, INSTR(code, '.') - 1), code) + 0) asc, code asc
     </select>
     
     <select id="selectTChapterById" parameterType="Long" resultMap="TChapterResult">

+ 2 - 2
rc-buisness/src/main/resources/mapper/rc/TChapterTemplateMapper.xml

@@ -12,7 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTChapterTemplateVo">
-        select id, code, name, dept_id from t_chapter_template
+        select id, code, name, dept_id, IF(INSTR(code, '.') > 0, SUBSTR(code, 1, INSTR(code, '.') - 1), code) as codeSubStr from t_chapter_template
     </sql>
 
     <select id="selectTChapterTemplateList" parameterType="TChapterTemplate" resultMap="TChapterTemplateResult">
@@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="deptId != null  and deptId != ''"> and dept_id = #{deptId}</if>
         </where>
-        order by code asc
+        order by (IF(INSTR(code, '.') > 0, SUBSTR(code, 1, INSTR(code, '.') - 1), code) + 0) asc, code asc
     </select>
     
     <select id="selectTChapterTemplateById" parameterType="Long" resultMap="TChapterTemplateResult">

+ 4 - 2
rc-buisness/src/main/resources/mapper/rc/TQuestionnaireMapper.xml

@@ -27,7 +27,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTQuestionnaireVo">
-        select id, audit_id, chapter_id, year, type, directory, code, name, yes_no_na, minimum_standard, good_practices, standard, completion_status, person_in_charge, reviewer, remarks, q.dept_id,
+        select id, audit_id, chapter_id, year, type, directory, code, name, yes_no_na, minimum_standard,
+        good_practices, standard, completion_status, person_in_charge, reviewer, remarks, q.dept_id,
+        SUBSTR(q.directory, 1, INSTR(q.directory, '.') - 1) as codeSubStr,
         u1.nick_name as person_in_charge_name, u2.nick_name as reviewer_name
         from t_questionnaire q
         left join sys_user u1 on q.person_in_charge = u1.user_id
@@ -54,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
             <if test="deptId != null  and deptId != ''"> and dept_id = #{deptId}</if>
         </where>
-        order by code asc
+        order by (SUBSTR(q.directory, 1, INSTR(q.directory, '.') - 1) + 0) asc
     </select>
     
     <select id="selectTQuestionnaireById" parameterType="Long" resultMap="TQuestionnaireResult">

+ 4 - 2
rc-buisness/src/main/resources/mapper/rc/TQuestionnaireTemplateMapper.xml

@@ -16,7 +16,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTQuestionnaireTemplateVo">
-        select qt.id, qt.chapter_id, qt.type, qt.directory, qt.code, qt.name, qt.dept_id, ct.name as chapter_name
+        select qt.id, qt.chapter_id, qt.type, qt.directory, qt.code, qt.name, qt.dept_id,
+        SUBSTR(qt.directory, 1, INSTR(qt.directory, '.') - 1) as directorySubStr,
+        ct.name as chapter_name
         from t_questionnaire_template qt
         left join t_chapter_template ct
         on qt.chapter_id=ct.id
@@ -32,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="deptId != null  and deptId != ''"> and dept_id = #{deptId}</if>
         </where>
-        order by directory asc, code asc
+        order by (SUBSTR(qt.directory, 1, INSTR(qt.directory, '.') - 1) + 0) asc, code asc
     </select>
     
     <select id="selectTQuestionnaireTemplateById" parameterType="Long" resultMap="TQuestionnaireTemplateResult">

+ 4 - 4
ruoyi-ui/src/views/home1.vue

@@ -353,7 +353,7 @@
     background: url(../assets/images/index/index2-1-1.png) no-repeat;
     background-size: 100% 100%;
     width: 23.4%;
-    height: 161px;
+    height: 120px;
     margin-right: 10px;
  }
 
@@ -361,7 +361,7 @@
     background: url(../assets/images/index/index2-1-2.png) no-repeat;
     background-size: 100% 100%;
     width: 23.4%;
-    height: 161px;
+    height: 120px;
     margin-right: 10px;
  }
 
@@ -369,7 +369,7 @@
     background: url(../assets/images/index/index2-1-3.png) no-repeat;
     background-size: 100% 100%;
     width: 23.4%;
-    height: 161px;
+    height: 120px;
     margin-right: 10px;
  }
 
@@ -377,7 +377,7 @@
     background: url(../assets/images/index/index2-1-4.png) no-repeat;
     background-size: 100% 100%;
     width: 23.4%;
-    height: 161px;
+    height: 120px;
     margin-left: 10px;
  }
 

+ 3 - 1
ruoyi-ui/src/views/rc/questionnaire/index.vue

@@ -179,7 +179,7 @@
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
-      @pagination="getList"
+      @pagination="getList(null, null)"
     />
 
     <!-- 添加或修改问卷对话框 -->
@@ -661,6 +661,8 @@ export default {
       if (auditId != null) {
         this.queryParams.auditId = auditId;
       }
+      console.log(this.queryParams.chapterId)
+      console.log(this.queryParams.auditId)
       listQuestionnaire(this.queryParams).then(response => {
         this.questionnaireList = response.rows;
         this.total = response.total;