From c8d1a07654ab41983f107ba039a1c3b6e362e85d Mon Sep 17 00:00:00 2001 From: heheng <475597332@qq.com> Date: 星期二, 17 六月 2025 13:02:07 +0800 Subject: [PATCH] 部分功能调整 --- multi-system/src/main/resources/mapper/system/SysDeptMapper.xml | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 25c1557..01802b7 100644 --- a/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -27,8 +27,10 @@ </resultMap> <resultMap type="com.gkhy.exam.system.domain.vo.DeptVo" id="DeptVoResult" extends="SysDeptResult"> <collection property="caluseVO1List" ofType="com.gkhy.exam.system.domain.vo.CaluseVO1"> - <id property="clauseNum" column="clause_num" /> + <result property="clauseNum" column="clause_num" /> <result property="content" column="content" /> + <result property="clauseId" column="clause_id" /> + <result property="id" column="data_id" /> </collection> </resultMap> @@ -40,26 +42,26 @@ <select id="selectDeptList" parameterType="com.gkhy.exam.common.domain.entity.SysDept" resultMap="DeptVoResult"> 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.del_flag, d.create_by, d.create_time,d.person_num,d.internal_auditors, - d.responsibilities,u.name as leader_name,d2.dept_name as parent_name, dr.content ,dr.clause_num + d.responsibilities,u.name as leader_name,d2.dept_name as parent_name, dr.content ,dr.clause_num,dr.id as data_id,dr.clause_id from sys_dept d - left join sys_user u on d.leader_user_id = u.user_id + left join sys_user u on d.leader_user_id = u.id left join sys_dept d2 on d.parent_id = d2.dept_id left join sys_dept_responsibility dr on d.dept_id = dr.dept_id and dr.del_flag = '0' and data_type = 2 where d.del_flag = '0' <if test="companyId != null and companyId != 0"> - AND company_id = #{companyId} + AND d.company_id = #{companyId} </if> <if test="deptId != null and deptId != 0"> - AND dept_id = #{deptId} + AND d.dept_id = #{deptId} </if> <if test="parentId != null and parentId != 0"> - AND parent_id = #{parentId} + AND d.parent_id = #{parentId} </if> <if test="deptName != null and deptName != ''"> - AND dept_name like concat('%', #{deptName}, '%') + AND d.dept_name like concat('%', #{deptName}, '%') </if> <if test="status != null and status != ''"> - AND status = #{status} + AND d.status = #{status} </if> order by d.parent_id, d.order_num </select> @@ -131,7 +133,7 @@ and del_flag = '0' limit 1 </select> - <insert id="insertDept" parameterType="com.gkhy.exam.common.domain.entity.SysDept"> + <insert id="insertDept" parameterType="com.gkhy.exam.common.domain.entity.SysDept" useGeneratedKeys="true" keyProperty="deptId"> insert into sys_dept( <if test="deptId != null and deptId != 0">dept_id,</if> <if test="parentId != null and parentId != 0">parent_id,</if> @@ -202,7 +204,7 @@ </update> <delete id="deleteDeptById" parameterType="Long"> - update sys_dept set del_flag = '2' where dept_id = #{deptId} + update sys_dept set del_flag = '1' where dept_id = #{deptId} </delete> </mapper> \ No newline at end of file -- Gitblit v1.9.2