From 76404d696111737d5a7b70fc37f50c85117db28a Mon Sep 17 00:00:00 2001 From: PQZ Date: Mon, 24 Nov 2025 11:21:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=83=A8=E9=97=A8=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E8=B4=9F=E8=B4=A3=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/domain/entity/SysDept.java | 14 +++++ .../resources/mapper/system/SysDeptMapper.xml | 42 +++++++------ dl_vue/src/views/cus/main/drawForm.vue | 1 - dl_vue/src/views/system/dept/index.vue | 59 +++++++++++++++++-- 4 files changed, 93 insertions(+), 23 deletions(-) diff --git a/dl_admin/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java b/dl_admin/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java index fb18c5c..b808c6a 100644 --- a/dl_admin/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java +++ b/dl_admin/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java @@ -37,6 +37,9 @@ public class SysDept extends BaseEntity /** 负责人 */ private String leader; + /** 负责人id */ + private Long leaderId; + /** 联系电话 */ private String phone; @@ -118,6 +121,16 @@ public class SysDept extends BaseEntity this.leader = leader; } + public Long getLeaderId() + { + return leaderId; + } + + public void setLeaderId(Long leaderId) + { + this.leaderId = leaderId; + } + @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符") public String getPhone() { @@ -190,6 +203,7 @@ public class SysDept extends BaseEntity .append("deptName", getDeptName()) .append("orderNum", getOrderNum()) .append("leader", getLeader()) + .append("leaderId", getLeaderId()) .append("phone", getPhone()) .append("email", getEmail()) .append("status", getStatus()) diff --git a/dl_admin/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/dl_admin/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index cf439f6..890abb2 100644 --- a/dl_admin/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/dl_admin/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -21,14 +22,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time + select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader,d.leader_id, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time from sys_dept d - + - + - + - + - + - + - + - + - + insert into sys_dept( dept_id, @@ -95,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ancestors, order_num, leader, + leader_id, phone, email, status, @@ -107,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{ancestors}, #{orderNum}, #{leader}, + #{leaderId}, #{phone}, #{email}, #{status}, @@ -114,7 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sysdate() ) - + update sys_dept @@ -123,6 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ancestors = #{ancestors}, order_num = #{orderNum}, leader = #{leader}, + leader_id = #{leaderId}, phone = #{phone}, email = #{email}, status = #{status}, @@ -131,7 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where dept_id = #{deptId} - + update sys_dept set ancestors = - + - update sys_dept set status = '0' where dept_id in + update sys_dept set status = '0' where dept_id in #{deptId} - + update sys_dept set del_flag = '2' where dept_id = #{deptId} diff --git a/dl_vue/src/views/cus/main/drawForm.vue b/dl_vue/src/views/cus/main/drawForm.vue index b651190..2e5063c 100644 --- a/dl_vue/src/views/cus/main/drawForm.vue +++ b/dl_vue/src/views/cus/main/drawForm.vue @@ -366,7 +366,6 @@ export default { } listCountry(queryParams).then(response => { this.countryList = response.data.records; - this.total = response.data.total; this.countryLoading = false; }); } else { diff --git a/dl_vue/src/views/system/dept/index.vue b/dl_vue/src/views/system/dept/index.vue index e502b4e..f24a0f2 100644 --- a/dl_vue/src/views/system/dept/index.vue +++ b/dl_vue/src/views/system/dept/index.vue @@ -57,6 +57,7 @@ :tree-props="{children: 'children', hasChildren: 'hasChildren'}" > +