From 6b652d0e9269156936a1d6425829e104b7e680b5 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期五, 14 十一月 2025 13:21:48 +0800
Subject: [PATCH] 功能修改

---
 multi-system/src/main/resources/mapper/system/SysDeptMapper.xml |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml
index f39e55c..ec0c81a 100644
--- a/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -73,7 +73,7 @@
 		<if test="status != null and status != ''">
 			AND d.status = #{status}
 		</if>
-		order by  d.order_num desc
+		order by d.dept_type desc, d.order_num desc
     </select>
 	<resultMap type="com.gkhy.exam.system.domain.vo.DeptVo" id="DeptVoPageResult" extends="SysDeptResult">
 		<collection property="caluseVO1List" ofType="com.gkhy.exam.system.domain.vo.CaluseVO1" column="deptId = dept_id" select="getReponseData">
@@ -118,7 +118,7 @@
 		<if test="status != null and status != ''">
 			AND d.status = #{status}
 		</if>
-		order by  d.order_num desc
+		order by d.dept_type desc, d.order_num desc
 	</select>
 
 	<select id="getReponseData" resultType="com.gkhy.exam.system.domain.vo.CaluseVO1">
@@ -198,7 +198,7 @@
     <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
 		select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader_user_id,d.company_id,d.status,d.person_num,d.internal_auditors,
 			   d.responsibilities,d.dept_type,d.respons_type,
-			(select dept_name from sys_dept where dept_id = d.parent_id) parent_name,(select dept_name from sys_user where id = d.leader_user_id) leader_name
+			(select dept_name from sys_dept where dept_id = d.parent_id) parent_name,(select `name` from sys_user where id = d.leader_user_id) leader_name
 				,(select dept_name from sys_user where id = d.internal_auditors) internal_auditors_name
 		from sys_dept d
 		where d.dept_id = #{deptId}
@@ -249,6 +249,7 @@
  			<if test="status != null">status,</if>
  			<if test="createBy != null and createBy != ''">create_by,</if>
 			<if test="responsType != null and responsType != ''">respons_type,</if>
+			<if test="deptType != null and deptType != ''">dept_type,</if>
  			create_time
  		)values(
  			<if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -264,6 +265,7 @@
  			<if test="status != null">#{status},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
 			<if test="responsType != null and responsType != ''">#{responsType},</if>
+			<if test="deptType != null and deptType != ''">#{deptType},</if>
  			sysdate()
  		)
 	</insert>
@@ -282,6 +284,7 @@
  			<if test="status != null and status != ''">status = #{status},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
 			<if test="responsType != null and responsType != ''">respons_type = #{responsType},</if>
+			<if test="deptType != null and deptType != ''">dept_type = #{deptType},</if>
  			update_time = sysdate()
  		</set>
  		where dept_id = #{deptId}

--
Gitblit v1.9.2