收敛充电订单开票待办接收人

This commit is contained in:
jsowell
2026-07-17 17:30:29 +08:00
parent c416bdacc9
commit 5c7f4dccec
9 changed files with 112 additions and 7 deletions

View File

@@ -107,6 +107,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
order by u.user_id
</select>
<select id="selectActiveUserIdsByDeptTreeAndRole" resultType="Long">
select distinct u.user_id
from sys_user u
inner join sys_user_role ur on ur.user_id = u.user_id
inner join sys_role r on r.role_id = ur.role_id
where u.status = '0'
and u.del_flag = '0'
and r.status = '0'
and r.del_flag = '0'
and ur.role_id = #{roleId}
and (
u.dept_id = #{deptId}
or u.dept_id in (
select d.dept_id
from sys_dept d
where find_in_set(#{deptId}, d.ancestors)
and d.status = '0'
)
)
order by u.user_id
</select>
<select id="selectAllocatedList" parameterType="com.jsowell.common.core.domain.entity.SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phone, u.status, u.create_time