From 7918c0611f1cdf1cad82250225307e5185abac4c Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 27 十月 2023 10:37:49 +0800
Subject: [PATCH] bug修改:148(历史数据导入报错,当前分类没有设置编码规则,未找父级的编码规则的bug);150(主数据新增时未先找当前层级的编码规则,再向上查找的bug)
---
Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/DeptMapper.xml | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/DeptMapper.xml b/Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/DeptMapper.xml
index 8272ac3..f7e1f17 100644
--- a/Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/DeptMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/DeptMapper.xml
@@ -111,5 +111,23 @@
</foreach>
and is_deleted = 0
</select>
-
+ <select id="deptList" resultMap="deptVOResultMap">
+ SELECT
+ dept.* ,
+ (
+ SELECT
+ CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
+ FROM
+ pl_org_dept
+ WHERE
+ parent_id = dept.id and is_deleted = 0
+ ) AS "has_children"
+ FROM
+ pl_org_dept dept
+ WHERE dept.is_deleted = 0
+ <if test="_parameter!=null and _parameter!=''">
+ and tenant_id = #{_parameter}
+ </if>
+ ORDER BY sort
+ </select>
</mapper>
--
Gitblit v1.10.0