From df8b8a8b2edf55f4a0898d4ff998ac5ea331a137 Mon Sep 17 00:00:00 2001 From: haha Date: Sun, 25 Feb 2024 21:44:37 +0800 Subject: [PATCH] update code --- .../common/core/domain/entity/SysDept.java | 12 +- .../mapper/base/BaseAssetsTypeMapper.xml | 4 +- .../resources/mapper/system/SysDeptMapper.xml | 6 +- yanzhu-ui/src/views/base/assetsType/index.vue | 203 +++++++----------- 4 files changed, 92 insertions(+), 133 deletions(-) diff --git a/yanzhu-common/src/main/java/com/yanzhu/common/core/domain/entity/SysDept.java b/yanzhu-common/src/main/java/com/yanzhu/common/core/domain/entity/SysDept.java index b45d47c..bc746c9 100644 --- a/yanzhu-common/src/main/java/com/yanzhu/common/core/domain/entity/SysDept.java +++ b/yanzhu-common/src/main/java/com/yanzhu/common/core/domain/entity/SysDept.java @@ -52,6 +52,16 @@ public class SysDept extends BaseEntity /** 父部门名称 */ private String parentName; + private String unit; + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + /** 子部门 */ private List children = new ArrayList(); @@ -197,7 +207,7 @@ public class SysDept extends BaseEntity .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) + .append("unit", getUnit()) .toString(); } } diff --git a/yanzhu-mapper/src/main/resources/mapper/base/BaseAssetsTypeMapper.xml b/yanzhu-mapper/src/main/resources/mapper/base/BaseAssetsTypeMapper.xml index 9ccb3af..0d9d274 100644 --- a/yanzhu-mapper/src/main/resources/mapper/base/BaseAssetsTypeMapper.xml +++ b/yanzhu-mapper/src/main/resources/mapper/base/BaseAssetsTypeMapper.xml @@ -30,10 +30,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and parent_id is null - + and parent_id is null - + and parent_id = #{parentId} diff --git a/yanzhu-system/src/main/resources/mapper/system/SysDeptMapper.xml b/yanzhu-system/src/main/resources/mapper/system/SysDeptMapper.xml index 6b06cce..e28af36 100644 --- a/yanzhu-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/yanzhu-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -20,10 +20,11 @@ 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.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time,d.unit from sys_dept d @@ -99,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" email, status, create_by, + unit, create_time )values( #{deptId}, @@ -111,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{email}, #{status}, #{createBy}, + #{unit}, sysdate() ) @@ -127,6 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" email = #{email}, status = #{status}, update_by = #{updateBy}, + unit = #{unit}, update_time = sysdate() where dept_id = #{deptId} diff --git a/yanzhu-ui/src/views/base/assetsType/index.vue b/yanzhu-ui/src/views/base/assetsType/index.vue index 93a63d2..3206d66 100644 --- a/yanzhu-ui/src/views/base/assetsType/index.vue +++ b/yanzhu-ui/src/views/base/assetsType/index.vue @@ -1,57 +1,29 @@