| | |
| | | and dept_category = 1 |
| | | AND dept.is_deleted = 0 |
| | | and dept.id !=1420222961377357825 |
| | | and dept.id !=1432625856013971457 |
| | | and dept.parent_id!=1420222961377357825 |
| | | <if test="param1!=null and param1!='' and param1!='1123598813738675201'"> |
| | | and si.jurisdiction = #{param1} |
| | |
| | | <insert id="add" parameterType="org.springblade.modules.system.entity.Dept" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into blade_dept(tenant_id, parent_id,ancestors,dept_category,dept_name) values(#{tenantId}, #{parentId}, #{ancestors}, #{deptCategory}, #{deptName}) |
| | | </insert> |
| | | |
| | | <select id="selectInfo" resultType="java.util.HashMap"> |
| | | SELECT |
| | | DISTINCT |
| | | dept.id, |
| | | dept.parent_id, |
| | | dept.dept_name AS title, |
| | | dept.id AS "value", |
| | | dept.id AS "key", |
| | | ( |
| | | SELECT |
| | | CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
| | | FROM |
| | | blade_dept |
| | | WHERE |
| | | parent_id = dept.id and is_deleted = 0 |
| | | ) AS "has_children" |
| | | FROM |
| | | blade_dept dept |
| | | left join |
| | | sys_information si |
| | | on |
| | | si.departmentid = dept.id |
| | | WHERE |
| | | 1=1 |
| | | and dept_category = 1 |
| | | AND dept.is_deleted = 0 |
| | | and dept.id !=1420222961377357825 |
| | | and dept.parent_id!=1420222961377357825 |
| | | </select> |
| | | </mapper> |