feat: 会议提交剩余时间+解冻 + 会务/劳务材料批量下载 + 多角色人员/账号模块完善
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -10,12 +10,12 @@
|
||||
<result property="orgType" column="org_type" />
|
||||
<result property="department" column="department" />
|
||||
<result property="position" column="position" />
|
||||
<result property="role" column="role" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="unitType" column="unit_type" />
|
||||
<result property="accountType" column="account_type" />
|
||||
<result property="parentUserId" column="parent_user_id" />
|
||||
<result property="account" column="user_name" />
|
||||
<result property="email" column="email" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
@@ -23,17 +23,18 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFields">
|
||||
select person_id, name, phone, org_id, department, position, role, unit_type, user_id, create_by, create_time, update_by, update_time
|
||||
select person_id, name, phone, org_id, department, position, unit_type, user_id, create_by, create_time, update_by, update_time
|
||||
from biz_person
|
||||
</sql>
|
||||
|
||||
<!-- 通用列表: LEFT JOIN biz_org 取公司名/类型, LEFT JOIN sys_user 取账号状态/类型 -->
|
||||
<sql id="selectFieldsWithAccount">
|
||||
select p.person_id, p.name, p.phone, p.org_id, o.org_name, o.org_type,
|
||||
p.department, p.position, p.role, p.unit_type, p.user_id,
|
||||
p.department, p.position, p.unit_type, p.user_id,
|
||||
p.create_by, p.create_time, p.update_by, p.update_time,
|
||||
u.account_type, u.parent_user_id, u.status, u.del_flag as user_del_flag,
|
||||
u.user_name as user_name
|
||||
u.user_name as user_name,
|
||||
u.email as email
|
||||
from biz_person p
|
||||
left join biz_org o on p.org_id = o.org_id
|
||||
left join sys_user u on p.user_id = u.user_id
|
||||
@@ -51,12 +52,12 @@
|
||||
<if test="unitType != null and unitType != ''"> and p.unit_type = #{unitType}</if>
|
||||
<if test="name != null and name != ''"> and p.name like concat('%', #{name}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and p.phone = #{phone}</if>
|
||||
<if test="email != null and email != ''"> and u.email = #{email}</if>
|
||||
<if test="orgId != null"> and p.org_id = #{orgId}</if>
|
||||
<if test="orgName != null and orgName != ''"> and o.org_name like concat('%', #{orgName}, '%')</if>
|
||||
<if test="orgType != null and orgType != ''"> and o.org_type = #{orgType}</if>
|
||||
<if test="department != null and department != ''"> and p.department = #{department}</if>
|
||||
<if test="position != null and position != ''"> and p.position = #{position}</if>
|
||||
<if test="role != null and role != ''"> and p.role = #{role}</if>
|
||||
<if test="status != null and status != ''"> and u.status = #{status}</if>
|
||||
<if test="parentUserId != null"> and u.parent_user_id = #{parentUserId}</if>
|
||||
<if test="userId != null"> and p.user_id = #{userId}</if>
|
||||
@@ -80,7 +81,6 @@
|
||||
<if test="orgId != null">org_id,</if>
|
||||
<if test="department != null">department,</if>
|
||||
<if test="position != null">position,</if>
|
||||
<if test="role != null">role,</if>
|
||||
<if test="unitType != null">unit_type,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
@@ -95,7 +95,6 @@
|
||||
<if test="orgId != null">#{orgId},</if>
|
||||
<if test="department != null">#{department},</if>
|
||||
<if test="position != null">#{position},</if>
|
||||
<if test="role != null">#{role},</if>
|
||||
<if test="unitType != null">#{unitType},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
@@ -115,7 +114,6 @@
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="department != null">department = #{department},</if>
|
||||
<if test="position != null">position = #{position},</if>
|
||||
<if test="role != null">role = #{role},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
@@ -162,7 +160,6 @@
|
||||
<if test="orgName != null and orgName != ''"> and o.org_name like concat('%', #{orgName}, '%')</if>
|
||||
<if test="department != null and department != ''"> and p.department = #{department}</if>
|
||||
<if test="position != null and position != ''"> and p.position = #{position}</if>
|
||||
<if test="role != null and role != ''"> and p.role = #{role}</if>
|
||||
<if test="status != null and status != ''"> and u.status = #{status}</if>
|
||||
</where>
|
||||
order by p.person_id desc
|
||||
@@ -183,16 +180,9 @@
|
||||
<if test="orgName != null and orgName != ''"> and o.org_name like concat('%', #{orgName}, '%')</if>
|
||||
<if test="department != null and department != ''"> and p.department = #{department}</if>
|
||||
<if test="position != null and position != ''"> and p.position = #{position}</if>
|
||||
<if test="role != null and role != ''"> and p.role = #{role}</if>
|
||||
<if test="status != null and status != ''"> and u.status = #{status}</if>
|
||||
</where>
|
||||
order by p.person_id desc
|
||||
</select>
|
||||
|
||||
<!-- 校验某 org 下是否已有 admin 角色 (主账号自带 biz_person.role='admin', 每公司唯一) -->
|
||||
<select id="countAdminByOrgId" resultType="int">
|
||||
select count(*) from biz_person p
|
||||
left join sys_user u on p.user_id = u.user_id
|
||||
where p.org_id = #{orgId} and p.role = 'admin' and u.del_flag = '0'
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user